Uncaught table_name is a required path param


#1

When i was testing the api docs GET /db/_table/{table_name} getRecords() - Retrieve one or more records, it was found that i cant have proper response :sweat::

why was this happen? thanks


#2

Your console shows many 401 unauthorized errors. It is entirely likely that your session has expired. Try logging out and logging back in. If this does not resolve the issue, check the Network tab of the developer console for any failed API calls and post back the text of the error.


#3

I also see “table_name” is required–have you selected a table name from the drop-down list? (This is cut off in the screenshot.)


#4

In fact i cant select any table from the drop-down list :disappointed_relieved:


and when i press “try it out” , the loading bar keep loading and the error " Uncaught table_name is a required path param" appear.


#5

You’ll want to do a Get Tables (the call above Get Records) with refresh = true.
Then you’ll need to refresh the page for that dropdown table list to be populated.


#6

I tried to do a Get Table calls


but it’s found that the request URL will direct to “http://127.0.0.1:80/api/v2/db/_table?refresh=true

which is the localhost but not the server ip. What is the reason of causing this? Many thanks.


#7

what type of installation is this? (AWS, Azure, private windows server, etc?)

I’m not sure why the API calls would revert to 127.0.0.1 with Swagger (API Docs) unless the instance was initially accessed via the 127.0.0.1 IP. Swagger writes that IP to the cache file. You can try clearing your cache (Config->Cache) and then refreshing the site.

If that doesn’t work, try adding a CORS entry for for your public IP, like this screenshot:


#8

It works! Thank you! :grinning: