API Reference
Stream a full explorer widget export on a shared dashboard
Mirror of POST /api/dashboards/{id}/widgets/{widgetId}/export, limited to widgets on public pages. Streams CSV/JSON/NDJSON with no buffering.
POST /api/public/dashboards/{token}/widgets/{widgetId}/export
Mirror of POST /api/dashboards/{id}/widgets/{widgetId}/export, limited to widgets on public pages. Streams CSV/JSON/NDJSON with no buffering.
Operation ID: exportPublicDashboardWidget
Authentication
No authentication is required.
Path parameters
token—string,requiredwidgetId—string,required
Request body
application/json
- Type:
object - Properties:
explorer_params(ExplorerViewerParams) — Viewer-supplied refinements for an explorer widget. Merged into the author'sbase_query— base filter keys always win, and when the widget declarescolumnsthey act as an allowlist for filters/sort/columns.- Reference:
ExplorerViewerParams- Description: Viewer-supplied refinements for an explorer widget. Merged into the author's
base_query— base filter keys always win, and when the widget declarescolumnsthey act as an allowlist for filters/sort/columns. - Properties:
filters(array<object>)- Items:
- Type:
object - Properties:
field(string,required)operator(string,required)- Allowed values:
eq,neq,gt,gte,lt,lte,in,nin,contains,exists
- Allowed values:
value(unknown)
- Type:
- Items:
sort(array<object>)- Items:
- Type:
object - Properties:
column(string)direction(string)- Allowed values:
asc,desc
- Allowed values:
- Type:
- Items:
page(integer)limit(integer)columns(array<string>)- Items:
- Type:
string
- Type:
- Items:
cursor(string)
- Description: Viewer-supplied refinements for an explorer widget. Merged into the author's
- Reference:
format(string)- Allowed values:
csv,ndjson - Default:
csv
- Allowed values:
filename(string)
Success responses
200
Streamed file download. Gzip when Accept-Encoding includes gzip.
Content type: text/csv
Content type: application/x-ndjson
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
Examples
cURL
curl --request POST \
--url 'https://your-envoy.example.com/api/public/dashboards/YOUR_TOKEN/widgets/YOUR_WIDGET_ID/export' \
--header 'Content-Type: application/json' \
--data '{
"explorer_params": {
"filters": [
{
"field": "string",
"operator": "eq"
}
],
"sort": [
{
"column": "string",
"direction": "asc"
}
],
"page": 0,
"limit": 0,
"columns": [
"string"
]
},
"format": "csv",
"filename": "string"
}'JavaScript (fetch)
const response = await fetch('https://your-envoy.example.com/api/public/dashboards/YOUR_TOKEN/widgets/YOUR_WIDGET_ID/export', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
"explorer_params": {
"filters": [
{
"field": "string",
"operator": "eq"
}
],
"sort": [
{
"column": "string",
"direction": "asc"
}
],
"page": 0,
"limit": 0,
"columns": [
"string"
]
},
"format": "csv",
"filename": "string"
}),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = response.status === 204 ? null : await response.json();
console.log(data);