Skip to content

Depot incidenttemplates

Registers the template routes on the TENANT mux.

This page is generated from the Depot route table. Every operation carries the permission it needs and the anchor an agent can link to.

GETincident:readtenant facehosteditmspremoteIdempotent

From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.

Source: [object Object]

listIncidentTemplates returns the templates, searched, sorted and paged.

THE ENVELOPE IS A CHANGE OF SHAPE, for listStatusComponents’ reason: a search toolbar has to be able to say how many rows its term matched.

ponytail: narrowed, ordered and cut in Go over the store’s whole read, because the set is bounded by how many sentences an operator writes by hand and ListIncidentTemplates is also incident.Service’s render-time lookup. The upgrade path is a filter pushed into the store if that ever stops being true.

NameInTypeRequiredDescription
dirquerystring, one of asc, descNoSort direction.
kindquerystringNo
pagequeryintegerNoOne-based page number. Defaults to 1.
pageSizequeryintegerNoRows per page, 1 to 200. Defaults to 50.
qquerystringNoFree-text search term.
sortquerystring, one of created, kind, name, updatedNoSort key.
StatusBodyDescription
200application/json, PagedResultIncidentTemplateViewSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold incident:read.
500application/problem+json, ProblemDetailsNo client store in request context.

200 response body

FieldTypeDescription
itemsrequiredarray of IncidentTemplateView
items[].bodyTemplaterequiredstring
items[].createdAtrequiredstring (date-time)
items[].defaultSeveritystring
items[].kindrequiredstring
items[].namerequiredstring
items[].publicIdrequiredstring
items[].titleTemplaterequiredstring
items[].updatedAtrequiredstring (date-time)
pagerequiredinteger
pageSizerequiredinteger
totalrequiredinteger
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X GET 'https://depot.example.com/api/v1/incident-templates?dir=asc&kind=<kind>&page=0&pageSize=0&q=<q>&sort=created' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

POSTincident:managetenant facehosteditmspremote

From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.

Source: [object Object]

Create incident template

Required, sent as application/json.

FieldTypeDescription
bodyTemplaterequiredstring
defaultSeverityrequiredstring
kindrequiredstring
namerequiredstring
titleTemplaterequiredstring
StatusBodyDescription
201application/json, IncidentTemplateViewCreated.
400application/problem+json, ProblemDetailsThe request body is not valid JSON.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold incident:manage.
404application/problem+json, ProblemDetailsNo resource matches.
409application/problem+json, ProblemDetailsThe request conflicts with the current state.
500application/problem+json, ProblemDetailsNo client store in request context.
503application/problem+json, ProblemDetailsThe request was refused.

201 response body

FieldTypeDescription
bodyTemplaterequiredstring
createdAtrequiredstring (date-time)
defaultSeveritystring
kindrequiredstring
namerequiredstring
publicIdrequiredstring
titleTemplaterequiredstring
updatedAtrequiredstring (date-time)
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
curl -X POST 'https://depot.example.com/api/v1/incident-templates' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '{
"bodyTemplate": "string",
"defaultSeverity": "string",
"kind": "string",
"name": "string",
"titleTemplate": "string"
}'

PUT /api/v1/incident-templates/{templateId}

Section titled “PUT /api/v1/incident-templates/{templateId}”

PUTincident:managetenant facehosteditmspremoteIdempotent

From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.

Source: [object Object]

Update incident template

NameInTypeRequiredDescription
templateIdpathstringYesA uuid.

Required, sent as application/json.

FieldTypeDescription
bodyTemplaterequiredstring
defaultSeverityrequiredstring
kindrequiredstring
namerequiredstring
titleTemplaterequiredstring
StatusBodyDescription
200application/json, IncidentTemplateViewSuccess.
400application/problem+json, ProblemDetailsThe request body is not valid JSON.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold incident:manage.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state.
500application/problem+json, ProblemDetailsNo client store in request context.
503application/problem+json, ProblemDetailsThe request was refused.

200 response body

FieldTypeDescription
bodyTemplaterequiredstring
createdAtrequiredstring (date-time)
defaultSeveritystring
kindrequiredstring
namerequiredstring
publicIdrequiredstring
titleTemplaterequiredstring
updatedAtrequiredstring (date-time)
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X PUT 'https://depot.example.com/api/v1/incident-templates/<templateId>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '{
"bodyTemplate": "string",
"defaultSeverity": "string",
"kind": "string",
"name": "string",
"titleTemplate": "string"
}'

DELETE /api/v1/incident-templates/{templateId}

Section titled “DELETE /api/v1/incident-templates/{templateId}”

DELETEincident:managetenant facehosteditmspremoteIdempotent

From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.

Source: [object Object]

Delete incident template

NameInTypeRequiredDescription
templateIdpathstringYesA uuid.
StatusBodyDescription
204NoneSuccess, with no body.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold incident:manage.
404application/problem+json, ProblemDetailsNo resource matches that id.
500application/problem+json, ProblemDetailsNo client store in request context.
Terminal window
# Sign in first. outpost_console is a session cookie, so send it with every request.
# This operation is idempotent. Repeating it does not repeat its effect.
curl -X DELETE 'https://depot.example.com/api/v1/incident-templates/<templateId>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

Content is licensed CC BY 4.0. Code samples are MIT. Outpost and the Outpost mark are trademarks of Outpost Business Solutions, PBC and are not covered by either license.