API Reference
Execute multiple widget data queries on a shared dashboard
Execute multiple widget data queries on a shared dashboard
POST /api/public/dashboards/{token}/widgets/data
Execute multiple widget data queries on a shared dashboard
Operation ID: executePublicDashboardWidgets
Authentication
No authentication is required.
Path parameters
token—string,required
Request body
application/json
- Type:
object - Properties:
widget_ids(array<string>)- Items:
- Type:
string
- Type:
- Items:
Success responses
200
Per-widget data or errors
Content type: application/json
- Reference:
WidgetBatchDataResponse- Type:
object - Properties:
widgets(object)- Additional properties:
- Reference:
WidgetBatchItem- Type:
object - Properties:
data(unknown) — Widget-specific payload when the query succeedederror(string) — Error message when this widget failed (other widgets may still succeed)
- Type:
- Reference:
- Additional properties:
- Type:
Error responses
400
Validation error
Content type: application/json
- Reference:
Error- Type:
object - Properties:
error(string)- Example:
NOT_FOUND
- Example:
message(string)- Example:
Resource not found
- Example:
- Type:
Example:
{
"error": "VALIDATION_ERROR",
"message": "Invalid input"
}404
Resource not found
Content type: application/json
- Reference:
Error- Type:
object - Properties:
error(string)- Example:
NOT_FOUND
- Example:
message(string)- Example:
Resource not found
- Example:
- Type:
Example:
{
"error": "NOT_FOUND",
"message": "Resource not found"
}503
Public dashboards disabled on this server
Examples
cURL
curl --request POST \
--url 'https://your-envoy.example.com/api/public/dashboards/YOUR_TOKEN/widgets/data' \
--header 'Content-Type: application/json' \
--data '{
"widget_ids": [
"string"
]
}'JavaScript (fetch)
const response = await fetch('https://your-envoy.example.com/api/public/dashboards/YOUR_TOKEN/widgets/data', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
"widget_ids": [
"string"
]
}),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = response.status === 204 ? null : await response.json();
console.log(data);