API Reference
Save an input widget's config value
Validates the value against the widget schema (and optional validation expr ), applies any transform expr , then upserts it under the widget's config key . Only config key s dec…
PUT /api/dashboards/{id}/widgets/{widgetId}/config
Validates the value against the widget schema (and optional
validation_expr), applies any transform_expr, then upserts it under the
widget's config_key. Only config_keys declared by an input widget in
this dashboard are writable. Open to any authenticated user.
Operation ID: saveDashboardWidgetConfig
Authentication
Option 1
- BearerAuth (
http bearer) API key token. Create via POST /api/api-keys. Format:envoy_<hex>
Option 2
- CookieAuth (
apiKey) Session cookie set after login + TOTP verification
Path parameters
id—integer,requiredResource IDwidgetId—string,required
Request body
The request body is required.
application/json
- Reference:
WidgetConfigRequest- Type:
object - Properties:
value(unknown,required) — Persisted value for the widget. field_mapping → array of{ source_field, target_field, transform? }; form → object keyed by field key.
- Type:
Success responses
200
Saved
Content type: application/json
- Type:
object - Properties:
ok(boolean)
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"
}Examples
cURL
curl --request PUT \
--url 'https://your-envoy.example.com/api/dashboards/YOUR_ID/widgets/YOUR_WIDGET_ID/config' \
--header 'Authorization: Bearer $API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"value": "string"
}'JavaScript (fetch)
const response = await fetch('https://your-envoy.example.com/api/dashboards/YOUR_ID/widgets/YOUR_WIDGET_ID/config', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"value": "string"
}),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = response.status === 204 ? null : await response.json();
console.log(data);