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 :
why was this happen? thanksYour 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.
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.)
In fact i cant select any table from the drop-down list
and when i press âtry it outâ , the loading bar keep loading and the error " Uncaught table_name is a required path param" appear.
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.
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.
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:
It works! Thank you!