Publish a dashboard snapshot link
/dashboard/{id}/public-link
Requires dashboard:publish and the org setting. 403 public_links_disabled, 400 validation_error for rows_editable without forms_enabled, 409 public_link_no_forms / public_link_no_editable_forms / public_link_consent_stale / public_link_limit / public_filter_variants_too_many / public_filter_variants_too_slow, 413 public_snapshot_too_large. The URL is returned once.
Path Parameters
Resource id
Request Body
The revision the preview was made from.
The forms whose rows visitors may see and change: a second, separate agreement, required when row edits are on.
The widgets the preview showed.
1 to 365, default 90; there is no "never".
Visitors may fill in the dashboard's forms.
Viewers may filter, sort, page and export the link's tables live; every query runs as the publisher (snapshot_by). Default false. The preview's live_tables.notice is the consent text to show.
Page keys; all pages when left out.
daily is accepted as interval every 24 hours.
manualautomationintervaldaily
Required with refresh interval; only with it.
161224
Visitors may also see and change the rows of the forms that edit rows. 400 validation_error without forms_enabled.
curl -X POST 'https://api.elaichi.ai/dashboard/<id>/public-link' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"pages":[],"refresh":"manual","refresh_interval_hours":1,"expires_in_days":0,"forms_enabled":true,"rows_editable":true,"consent":{},"live_tables":true}'const body = {
"pages": [],
"refresh": "manual",
"refresh_interval_hours": 1,
"expires_in_days": 0,
"forms_enabled": true,
"rows_editable": true,
"consent": {},
"live_tables": true
};
const response = await fetch('https://api.elaichi.ai/dashboard/<id>/public-link', {
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"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
payload = {
"pages": [],
"refresh": "manual",
"refresh_interval_hours": 1,
"expires_in_days": 0,
"forms_enabled": True,
"rows_editable": True,
"consent": {},
"live_tables": True
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())