Data API type names with utf-8 characters like "ç"

I’m have an app with portuguese names for things and I’m trying to use Data API do access data in the app. The problem is I have a thing called “Tabela De Preço” and when I try to access it with:

“https://appname.bubbleapps.io/api/1.1/obj/tabeladepreço” or “https://appname.bubbleapps.io/api/1.1/obj/tabeladepreco” or “https://appname.bubbleapps.io/api/1.1/obj/tabeladepre_o”

I get a {“statusCode”:404,“body”:{“status”:“NOT_FOUND”,“message”:“Type not found tabeladepre%C3%A7o”}} error

How do I know the type name to use in the Data API when I have characters like “ç” or any other that will be URL encoded?

Have you tried exploring the Swagger API documentation?

It should be available at https://appname.bubbleapps.io/api/1.1/meta/swagger.json or https://yourdomain.com/api/1.1/meta/swagger.json.

Thanks for the tip. I just checked it and it has a definition of “tabeladepreco”, but it doesn’t work when I try to request the obj with this name :confused:, very odd.

what error do you get?

The same error, actually. That’s why I’m a bit confused.

There was an issue setting up your call.

Raw response for the API 
Status code 404
{"statusCode":404,"body":{"status":"NOT_FOUND","message":"Type not found tabeladepreco"}}

The swagger json shows the following definition.

"definitions": {
    "tabeladepreco": {
        "type": "object",
        "properties": {
            /* properties here */
         }
    },

It’s possible that the Swagger generation is incorrect. (You might need to file a bug report with Bubble to be able to know what the actual endpoint name is. I don’t know of any other way to know what the endpoint name is.)

There is a way to see what Bubble internally calls a data type and you can expose this with my “Fielder” plugin. You can’t inquire directly about a Thing, but if you put a field of that type on some other thing, Fielder can tell you the internal data type name for that field.

So, if I make a data type called Tabela De Preço:

And then I put a field of that type on some other Thing:

When I run Fielder on the Favorite Thing data type with Debug mode turned on, here’s what we learn about that data type in the console:

So it would seem its internal name is:

tabela_de_pre_o

My best guess is that that is the actual name of the endpoint.

Have you tried checking the swagger docs under the path section instead of definitions?

You should find there the actual path to call like /obj/your_resource/{UniqueID}.

People… I figure out what the problem was. It’s was quite simple and bit embarrassing actually :joy:.

I had selected the wrong type in the Data API exposure settings, that’s why it wasn’t being found. Sorry to take everyone’s time and thanks for the help!

When I selected the right one it accepted the “tabeladepreco” name.