# Minor bug/inconsistency on API

**URL:** https://community.glideapps.com/t/minor-bug-inconsistency-on-api/39744
**Category:** Report a Bug
**Created:** [March 16, 2022, 8:38pm UTC](https://community.glideapps.com/t/minor-bug-inconsistency-on-api/39744 "2022-03-16T20:38:14Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![Dan\_San](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dan_san/32/24085_2.png) [@Dan\_San](https://community.glideapps.com/u/Dan_San)
#### Post date: [March 16, 2022, 8:38pm UTC](https://community.glideapps.com/t/minor-bug-inconsistency-on-api/39744/1 "2022-03-16T20:38:15Z")

</div>

When you create the API key in the private app, inside the CURL you have  
“tableName”: “Contractors”,

This identifies the name of the sheet. It seems like this name is generated at the time the sheet is created and placed into the API.

If you subsequently change the name of the sheet to another name then the “tablename” in the CURL does NOT seem to change/update, we tested the API and it works with the old tablename

Not sure if it is easy for the tablename to be updated when you change it in glidetables, otherwise would there be an issue if you later you created another table with the old name ?

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [March 17, 2022, 1:05am UTC](https://community.glideapps.com/t/minor-bug-inconsistency-on-api/39744/2 "2022-03-17T01:05:16Z")

</div>

I don’t think I have ever seen a table name being referenced in the API call.

My table names always look like this: native-table-[table ID]

---

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [March 17, 2022, 1:27am UTC](https://community.glideapps.com/t/minor-bug-inconsistency-on-api/39744/3 "2022-03-17T01:27:11Z")

</div>

![CleanShot 2022-03-16 at 21.26.10@2x](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/b/eb6a9a0b2d2ad5538e8b35b44e149028573f17d8.png)

You’re absolutely right. The API will grab the original TABLE name.

Same is true with the COLUMN names. If you know you’re going to use API on a table, it’s best to clear all the columns and start afresh making sure you’re naming them exactly how you’ll want them referenced.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [March 17, 2022, 1:45am UTC](https://community.glideapps.com/t/minor-bug-inconsistency-on-api/39744/4 "2022-03-17T01:45:31Z")

</div>

> [@Robert\_Petitto](#):
>
> You’re absolutely right. The API will grab the original TABLE name.

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/a/aa86268ee56153dcef9d1e5428aa682aa5986cdc.png)

That’s weird, it’s like this in my case.

For the column names, you’re right. Columns that are created by default by Glide won’t have their name changed, I believe.

---

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [March 17, 2022, 1:50am UTC](https://community.glideapps.com/t/minor-bug-inconsistency-on-api/39744/5 "2022-03-17T01:50:05Z")

</div>

Must be a Google Sheet thing?

---

<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: [March 17, 2022, 2:53am UTC](https://community.glideapps.com/t/minor-bug-inconsistency-on-api/39744/6 "2022-03-17T02:53:30Z")

</div>

I remember asking Mark about this some time ago…

Mark: “Yes, those are the internal column names. They will be stable, and won’t change when you rename [y]our columns, for example”

---

<div class="post-metadata">

### Author: ![Dan\_San](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dan_san/32/24085_2.png) [@Dan\_San](https://community.glideapps.com/u/Dan_San)
#### Post date: [March 18, 2022, 12:11am UTC](https://community.glideapps.com/t/minor-bug-inconsistency-on-api/39744/7 "2022-03-18T00:11:41Z")

</div>

Thanks guys.

Actually thinking about it, it is correct that the name doesn’t change as that will break your API calls.

I’m still a little confused on how ThinhDinh is getting the uniqueID at the end of his table name, it look more robust then mine 🙂

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [March 18, 2022, 12:37am UTC](https://community.glideapps.com/t/minor-bug-inconsistency-on-api/39744/8 "2022-03-18T00:37:24Z")

</div>

Ah @Robert_Petitto was right.

> [@Robert\_Petitto](#):
>
> Must be a Google Sheet thing?

Google Sheet tables will have their name as you reported (but I assume you can just do an add row with Integromat/Zapier instead?).

Glide Tables will have my version.

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/a/aa86268ee56153dcef9d1e5428aa682aa5986cdc.png)

---

<div class="post-metadata">

### Author: ![Dan\_San](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dan_san/32/24085_2.png) [@Dan\_San](https://community.glideapps.com/u/Dan_San)
#### Post date: [March 18, 2022, 2:27am UTC](https://community.glideapps.com/t/minor-bug-inconsistency-on-api/39744/9 "2022-03-18T02:27:31Z")

</div>

It works totally fine.

We are actually doing direct API call the google sheet, reading the data from the sheet and inserting it into a backup DB. We are then using the GLIDE API to delete the data in GLIDE once it is backed up (we could have just delete it in Google sheets).

If there was a read endpoint for GLIDE that would be handy, we only see (ADD, UPDATE, DELETE)

By the way, I now have lots of empty rows in my google sheets. I know how to manually delete the empty rows, but is there an automatic way ? All so if I don’t delete them will it max out the google sheet row limit ?

Thanks in advance for help

---

<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: [March 18, 2022, 3:00am UTC](https://community.glideapps.com/t/minor-bug-inconsistency-on-api/39744/10 "2022-03-18T03:00:11Z")

</div>

> [@Dan\_San](#):
>
> If there was a read endpoint for GLIDE that would be handy, we only see (ADD, UPDATE, DELETE)

There is, but at the moment it’s only available to Enterprise customers.

> [@Dan\_San](#):
>
> By the way, I now have lots of empty rows in my google sheets. I know how to manually delete the empty rows, but is there an automatic way ?

I use a bit of apps script for this. Here’s an example you could adapt:

```auto
function remove_empty_rows() {
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheetByName('YOUR SHEET NAME GOES HERE');
  var headers = sheet.getRange(1,1,1,sheet.getLastColumn()).getValues().shift();
  var concat_index = headers.indexOf('CHANGE THIS');
  var uuid_index = headers.indexOf('CHANGE THIS ALSO');
  var data = sheet.getRange(2,1,sheet.getLastRow()-1,sheet.getLastColumn()).getValues();
  var row = sheet.getLastRow();
  while (row > 2) {
    var rec = data.pop();
    var concat = rec[concat_index];
    var uuid = rec[uuid_index];
    if (concat == "" && uuid == "") {
      console.log("deleting row %s", row);
      sheet.deleteRow(row);
    }
    row--;
  }
}

```

Basically with the above, I just picked two columns that I know should never be empty, and if both of them are then the row gets deleted.

> [@Dan\_San](#):
>
> All so if I don’t delete them will it max out the google sheet row limit ?

As long as they don’t contain any formulas, Glide will ignore them and they won’t count.

---

<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: [April 17, 2022, 10:28pm UTC](https://community.glideapps.com/t/minor-bug-inconsistency-on-api/39744/11 "2022-04-17T22:28:20Z")

</div>

Closing due to inactivity. This topic will be deleted in a few weeks if there are no more comments.

---

<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: [April 17, 2022, 10:28pm UTC](https://community.glideapps.com/t/minor-bug-inconsistency-on-api/39744/12 "2022-04-17T22:28:20Z")

</div>



---

<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: [May 17, 2022, 10:29pm UTC](https://community.glideapps.com/t/minor-bug-inconsistency-on-api/39744/13 "2022-05-17T22:29:22Z")

</div>



---

<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: [May 17, 2022, 10:29pm UTC](https://community.glideapps.com/t/minor-bug-inconsistency-on-api/39744/14 "2022-05-17T22:29:22Z")

</div>


