Preview what a public link would expose
/dashboard/{id}/public-link/preview
Includes `dashboard_description`, the line link previews (Slack and the like) show beside the dashboard name; creating or refreshing a link publishes it, so it is part of what the person agrees to. With forms_enabled it also lists the forms: each widget carries `fillable`, `editable` and `detail`, and a form that cannot be public is hidden as form_not_public with a sentence saying why. `live_tables: { notice, tables[] }` is what switching live tables on would allow: the consent text to show, and each shown row-query table with what its viewer controls offer (search, filter_fields and sort_fields by name, export).
Path Parameters
Resource id
Request Body
Preview with forms on.
Page keys; all pages when left out.
Preview with row edits on. Ignored unless forms_enabled is true.
curl -X POST 'https://api.elaichi.ai/dashboard/<id>/public-link/preview' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"pages":[],"forms_enabled":true,"rows_editable":true}'const body = {
"pages": [],
"forms_enabled": true,
"rows_editable": true
};
const response = await fetch('https://api.elaichi.ai/dashboard/<id>/public-link/preview', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import os
import requests
url = "https://api.elaichi.ai/dashboard/<id>/public-link/preview"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
payload = {
"pages": [],
"forms_enabled": True,
"rows_editable": True
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())