# Glide API - Deleting All Rows and Adding New Ones

**URL:** <https://community.glideapps.com/t/glide-api-deleting-all-rows-and-adding-new-ones/63062>\
**Category:** Ask for Help\
**Created:** [June 22, 2023, 4:54pm UTC](https://community.glideapps.com/t/glide-api-deleting-all-rows-and-adding-new-ones/63062 "2023-06-22T16:54:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Byder\_App](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/byder_app/32/56553_2.png) [@Byder\_App](https://community.glideapps.com/u/Byder_App)\
**Post date:** [June 22, 2023, 4:54pm UTC](https://community.glideapps.com/t/glide-api-deleting-all-rows-and-adding-new-ones/63062/1 "2023-06-22T16:54:12Z")

</div>

Hi!

I’m trying to use the Glide API with python to essentially replace an entire table.  
For now, I’ve only managed to do it by

1. Getting all rows and extracting their row-id.
2. Looping through each row-id and making an api call per row to delete each one iindividually.
3. Add the new rows one at a time through separate API calls.

I’m sure there must be away to bulk delete/upload but can’t seem to figure out how.

Does anyone know. a more efficient way to do this?

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [June 22, 2023, 5:06pm UTC](https://community.glideapps.com/t/glide-api-deleting-all-rows-and-adding-new-ones/63062/2 "2023-06-22T17:06:43Z")

</div>

I think that’s how you have to do it but you could optimize the get rows part with a query.

> **[Glide • Using Glide Tables API](https://www.glideapps.com/docs/reference/data-sources/using-glide-tables-api)**
>
> Explore what you can do with the Glide Tables API

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [June 22, 2023, 5:32pm UTC](https://community.glideapps.com/t/glide-api-deleting-all-rows-and-adding-new-ones/63062/3 "2023-06-22T17:32:26Z")

</div>

> [@Byder\_App](#):
>
> - Looping through each row-id and making an api call per row to delete each one iindividually.
> - Add the new rows one at a time through separate API calls.

You can optimise these 2 steps by sending multiple mutations in a single API call. There is a hard limit of 500, but it’s recommended to send batches of no more than 100.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [June 23, 2023, 5:32pm UTC](https://community.glideapps.com/t/glide-api-deleting-all-rows-and-adding-new-ones/63062/4 "2023-06-23T17:32:45Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
