Downtime Reasons
⚠️ Experimental — this resource is under active development and may change without notice.
Returns a list of downtime reasons in your organization.
Caps the page size. Defaults to 1000, which is also the maximum; a value below 1 or above 1000 is rejected.
1000If not set, all downtime reasons will be considered.
Only return reasons belonging to any of the given catalogs.
Only return reasons whose catalog is assigned to any of the given machines. If not set, reasons for all machines will be considered.
If not set, both active and archived reasons will be returned.
Successful Response
Validation Error
GET /api/v2/downtime-reasons HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"data": [
{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"category": "PLANNED",
"group": "text",
"state": "active",
"catalog": "123e4567-e89b-12d3-a456-426614174000"
}
],
"metadata": {
"next_cursor": "text"
}
}Create a downtime reason within a catalog.
UUID of the active catalog to create the reason in.
Free-text description of the downtime reason.
One of: PLANNED, UNPLANNED, NOT_SCHEDULED, INVALID
Single-level, free-text group the reason belongs to.
Successful Response
The UUID of the downtime reason.
Free-text description of the downtime reason.
Category of the downtime reason.
Lifecycle state of the downtime reason.
UUID of the catalog this reason belongs to. Resolve it via GET /api/v2/downtime-catalogs/{uuid}. null for legacy reasons not yet migrated to a catalog (only reachable as an embedded reason on GET /api/v2/downtimes).
Not Found
Conflict
Validation Error
POST /api/v2/downtime-reasons HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 121
{
"catalog": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"category": "PLANNED",
"group": "text"
}{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"category": "PLANNED",
"group": "text",
"state": "active",
"catalog": "123e4567-e89b-12d3-a456-426614174000"
}Returns details for a specific downtime reason.
Successful Response
The UUID of the downtime reason.
Free-text description of the downtime reason.
Category of the downtime reason.
Lifecycle state of the downtime reason.
UUID of the catalog this reason belongs to. Resolve it via GET /api/v2/downtime-catalogs/{uuid}. null for legacy reasons not yet migrated to a catalog (only reachable as an embedded reason on GET /api/v2/downtimes).
Validation Error
GET /api/v2/downtime-reasons/{uuid} HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"category": "PLANNED",
"group": "text",
"state": "active",
"catalog": "123e4567-e89b-12d3-a456-426614174000"
}Delete a downtime reason. Downtimes labeled with it are kept, but lose their reason. Works on active and archived reasons. Pass dry_run=true to see how many downtimes would be affected, without deleting anything.
If true, nothing is deleted; the response reports what a real delete would affect.
falseSuccessful Response
Number of downtimes that lose their reason; the downtimes themselves are kept (a dry run reports how many would be unlabeled).
Not Found
Validation Error
DELETE /api/v2/downtime-reasons/{uuid} HTTP/1.1
Authorization: YOUR_API_KEY
Accept: */*
{
"unlabeled_downtimes": 1
}Update a downtime reason's name, description, or group.
Successful Response
The UUID of the downtime reason.
Free-text description of the downtime reason.
Category of the downtime reason.
Lifecycle state of the downtime reason.
UUID of the catalog this reason belongs to. Resolve it via GET /api/v2/downtime-catalogs/{uuid}. null for legacy reasons not yet migrated to a catalog (only reachable as an embedded reason on GET /api/v2/downtimes).
Not Found
Conflict
Validation Error
PATCH /api/v2/downtime-reasons/{uuid} HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 51
{
"name": "text",
"description": "text",
"group": "text"
}{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"category": "PLANNED",
"group": "text",
"state": "active",
"catalog": "123e4567-e89b-12d3-a456-426614174000"
}Archive or restore a downtime reason. A reason in an archived catalog can only be restored by restoring its catalog. Setting the state the reason is already in is a no-op.
Lifecycle state to transition the reason to.
Successful Response
The UUID of the downtime reason.
Free-text description of the downtime reason.
Category of the downtime reason.
Lifecycle state of the downtime reason.
UUID of the catalog this reason belongs to. Resolve it via GET /api/v2/downtime-catalogs/{uuid}. null for legacy reasons not yet migrated to a catalog (only reachable as an embedded reason on GET /api/v2/downtimes).
Not Found
Conflict
Validation Error
PUT /api/v2/downtime-reasons/{uuid}/state HTTP/1.1
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 18
{
"state": "active"
}{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"name": "text",
"description": "text",
"category": "PLANNED",
"group": "text",
"state": "active",
"catalog": "123e4567-e89b-12d3-a456-426614174000"
}Zuletzt aktualisiert