EN: Is there a way to use Jestor.loadData() to get a list of the account’s tables? Also, does it let you get a list of Apps/Dashboards, Pages, and Reports?
PT: Tem jeito de use Jestor.loadData para pegar lista das tabelas? App/Dash? Pages? Reports?
EN: Is there a way to use Jestor.loadData() to get a list of the account’s tables? Also, does it let you get a list of Apps/Dashboards, Pages, and Reports?
PT: Tem jeito de use Jestor.loadData para pegar lista das tabelas? App/Dash? Pages? Reports?
Hey @dammon.burden
Not with a native method, but you can get this info via API calls (which you can post from low-code). If you send a POST call to https://YOUR_ORG.api.jestor.com/object/get-all, it should return a JSON with all the tables.
Tables: https://YOUR_ORG.api.jestor.com/object/get-all,
Apps: https://YOUR_ORG.api.jestor.com/dashboard/get-all,
I think there are similar methods for Pages, but I don’t
Regarding Pages, there are similar methods but I’m not sure, maybe @vinicius.belnuovo can help you with that
@vinicius.belnuovo the above didn’t work for the tables, but it worked great for the apps! Is there a way to get the table list without using curl?
This is what I used that worked for Apps/Dashboards:
$url = "https://ORG.api.jestor.com/dashboard/get-all";
$response = Jestor.curlCall($url,array(
CURLOPT_HTTPHEADER => array('Content-Type: application/json',
'Authorization: Bearer XXXXXXXXXXXXXXXXAPIXXXXXXXXXXXXXXXXXXX'),
CURLOPT_POST => true,));
$response = json_decode($response, true);
This was based on the information on the API documentation for listing records: list records
It would be cool to be able to build some low-code that can interact with getting table names/ids dynamically. Especially, if I didn’t want to hardcode a table name particularly, so it could be used in a template or something.
@dammon.burden I tested here and I could call.
Try to change the variable name $response to other thing.
Follow below my sample:
$url = “https://MY_ORG.api.jestor.com/object/get-all”;
$myResponse = Jestor.curlCall($url ,array(
CURLOPT_HTTPHEADER => array(
‘Content-Type: application/json’,
‘Authorization: Bearer MY_TOKEN’
),
CURLOPT_POST => 1,
CURLOPT_RETURNTRANSFER => 1
));
$data = json_decode($myResponse);