Get data api has old table names

I’m building scripts to convert the json I receive from the GET data API into data in a mysql database on another server.

In most cases I can identify the data with the “_type” field because it has this pattern
“user” for built-in tables
“custom.whatever_something” for tables I created

However, as I’m going through the data one of the data sets has the wrong name in the “_type” field. Where I’m expecting “custom.preset_array” it says “custom.metric_array1”.

Maybe I changed the name of the table from metric_array1 to preset_array at some point? I don’t remember.

At any rate, I want to be able to trust the API to tell me what the data is CURRENTLY called. I don’t even see a way to look up what the table names used to be.

Is this a mistake? Should the GET data API return the current name of the table instead of an old name? @emmanuel

I’m sure you thought of this already, but I ran into similar problem and it was because I hadn’t deployed. If you change an endpoint (name, properties, etc.), external servers calling in will get the old endpoint until you re-deploy.

Yeah, I’ve deployed a lot since that table name must have been changed.

Could this be related to the toggle option in Settings → API → Use field display instead of ID for key names?


1 Like

Probably a similar idea, but I think that refers to the field names, not the table names, and I’ve already got it checked anyway.

We currently don’t update the type field indeed and show the raw type ID. We’ll look into fixing this but it’s not a quick one as it could break existing apps.

1 Like