Skip to content

Depot incidentfiles

Registers the file 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]

listIncidentFiles returns one incident’s files.

The incident is REQUIRED rather than optional: a bare list of every file in the tenant is not a screen anybody asked for, and it would be the one read that ignores decision 4.

Soft-deleted rows are filtered here rather than by the store, which returns them so the sweeper can read the storage key off a row somebody deleted.

NameInTypeRequiredDescription
incidentIdquerystringNo
StatusBodyDescription
200application/json, array of IncidentFileViewSuccess.
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
[].contentTyperequiredstring
[].createdAtrequiredstring (date-time)
[].downloadUrlrequiredstring
[].incidentIdrequiredstring
[].isPublicrequiredboolean
[].kindrequiredstring
[].namerequiredstring
[].publicIdrequiredstring
[].sizeBytesrequiredinteger

int64.

[].uploadedBystring
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-files?incidentId=<incidentId>' \
-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]

uploadIncidentFile takes one file as the raw request body.

Raw body rather than multipart, for uploadTicketAttachment’s reason: there is exactly one file per request and no other fields, so multipart would add a parser, a spool and a second set of limits to carry no information. The name, the parent, the kind and the publish flag travel as query parameters, which is where an HTTP client already puts them.

NameInTypeRequiredDescription
incidentIdquerystringNo
isPublicquerystringNo
kindquerystringNo
namequerystringNo
StatusBodyDescription
201application/json, IncidentFileViewCreated.
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:manage.
404application/problem+json, ProblemDetailsIncident not found.
409application/problem+json, ProblemDetailsThis incident has been deleted.
413application/problem+json, ProblemDetailsThe request was refused.
500application/problem+json, ProblemDetailsNo client store in request context.
502application/problem+json, ProblemDetailsThe file could not be stored. Nothing was attached to the incident.
503application/problem+json, ProblemDetailsFile storage is not configured on this Depot.
507application/problem+json, ProblemDetailsThis client’s file storage is full. Raise the quota or remove old files.

201 response body

FieldTypeDescription
contentTyperequiredstring
createdAtrequiredstring (date-time)
downloadUrlrequiredstring
incidentIdrequiredstring
isPublicrequiredboolean
kindrequiredstring
namerequiredstring
publicIdrequiredstring
sizeBytesrequiredinteger

int64.

uploadedBystring
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-files?incidentId=<incidentId>&isPublic=<isPublic>&kind=<kind>&name=<name>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

GETincident:readtenant facehosteditmspremoteIdempotentdownloadNot fully resolved

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

What this page does not know
  • response

These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.

Source: [object Object]

downloadIncidentFile streams one file back.

Read the file header before changing any header this writes. The combination of a forced generic content type, an attachment disposition and nosniff is what keeps an uploaded HTML document from executing on the console’s origin, and each one alone is insufficient: a browser will sniff a missing type, and an inline HTML document runs whatever type it was labelled with.

NameInTypeRequiredDescription
fileIdpathstringYesA uuid.
incidentIdquerystringNo
StatusBodyDescription
200application/octet-stream, string (binary)Success. The body shape was not resolved; see x-outpost-unresolved.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold incident:read.
404application/problem+json, ProblemDetailsNo resource matches that id.
500application/problem+json, ProblemDetailsNo client store in request context.
502application/problem+json, ProblemDetailsThe file could not be read from storage.
503application/problem+json, ProblemDetailsFile storage is not configured on this Depot.
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-files/<fileId>?incidentId=<incidentId>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

DELETEincident:managetenant facehosteditmspremoteIdempotent

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

Source: [object Object]

Delete incident file

NameInTypeRequiredDescription
fileIdpathstringYesA uuid.
incidentIdquerystringNo
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.
503application/problem+json, ProblemDetailsFile storage is not configured on this Depot.
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-files/<fileId>?incidentId=<incidentId>' \
-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.