API Reference
Update a dashboard template
Update a dashboard template
PATCH /api/dashboard-templates/{id}
Update a dashboard template
Operation ID: updateDashboardTemplate
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 ID
Request body
application/json
- Type:
object - Properties:
name(string)description(string)yaml_content(string)status(string)- Allowed values:
active,archived
- Allowed values:
Success responses
200
Updated dashboard template
Content type: application/json
- Reference:
DashboardTemplate- Type:
object - Properties:
id(integer)job_template_id(integer)name(string)description(string | null)- Nullable: yes
yaml_content(string)status(string)- Allowed values:
active,archived
- Allowed values:
created_at(string)- Format:
date-time
- Format:
updated_at(string | null)- Format:
date-time - Nullable: yes
- Format:
linked_dashboard_count(integer) — Present on GET detail — count of job dashboards referencing this template
- 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"
}Examples
cURL
curl --request PATCH \
--url 'https://your-envoy.example.com/api/dashboard-templates/YOUR_ID' \
--header 'Authorization: Bearer $API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"name": "string",
"description": "string",
"yaml_content": "string",
"status": "active"
}'JavaScript (fetch)
const response = await fetch('https://your-envoy.example.com/api/dashboard-templates/YOUR_ID', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "string",
"description": "string",
"yaml_content": "string",
"status": "active"
}),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = response.status === 204 ? null : await response.json();
console.log(data);