Skip to content

Depot attachments

Registers the attachment routes on 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.

GET /api/v1/tickets/{ticketID}/attachments

Section titled “GET /api/v1/tickets/{ticketID}/attachments”

GETticket:readtenant facehosteditmspremoteIdempotent

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

Source: [object Object]

listTicketAttachments returns every live attachment on the ticket, whether it rode in on a message or was added to the ticket itself.

The conversation already carries the per-message files, but a file uploaded from the console’s Attachments section has no message, and the message list keys by message id, so those were reachable by nothing. This is the one place that shows the whole set. Same view type as the message list, so the console has one shape to render and one downloadUrl to trust.

NameInTypeRequiredDescription
ticketIDpathstringYesA uuid.
pagequeryintegerNoOne-based page number. Defaults to 1.
pageSizequeryintegerNoRows per page, 1 to 200. Defaults to 50.
StatusBodyDescription
200application/json, PagedResultTicketAttachmentRefViewSuccess.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold ticket:read.
404application/problem+json, ProblemDetailsNo resource matches that id.
500application/problem+json, ProblemDetailsNo client store in request context.

200 response body

FieldTypeDescription
itemsrequiredarray of TicketAttachmentRefView
items[].contentTyperequiredstring
items[].createdAtstring (date-time) or null
items[].downloadUrlrequiredstring
items[].fileNamerequiredstring
items[].messagePublicIdstring
items[].publicIdrequiredstring
items[].sizeBytesrequiredinteger

int64.

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/tickets/<ticketID>/attachments?page=0&pageSize=0' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

POST /api/v1/tickets/{ticketID}/attachments

Section titled “POST /api/v1/tickets/{ticketID}/attachments”

POSTticket:writetenant facehosteditmspremote

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

Source: [object Object]

uploadTicketAttachment takes one file as the raw request body.

Raw body rather than multipart: there is exactly one file per request and no other fields, so multipart would add a parser, a temporary spool and a set of its own limits to carry no information. The file name travels as a query parameter and the content type as the Content-Type header, which is where an HTTP client already puts them.

NameInTypeRequiredDescription
ticketIDpathstringYesA uuid.
fileNamequerystringNo
messageIdquerystringNo
StatusBodyDescription
201application/json, TicketAttachmentRefViewCreated.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold ticket:write.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state.
413application/problem+json, ProblemDetailsThe request was refused.
500application/problem+json, ProblemDetailsNo client store in request context.
503application/problem+json, ProblemDetailsAttachment storage is not configured on this Depot.
507application/problem+json, ProblemDetailsThis client’s attachment storage is full. Raise the quota or remove old attachments.

201 response body

FieldTypeDescription
contentTyperequiredstring
createdAtstring (date-time) or null
downloadUrlrequiredstring
fileNamerequiredstring
messagePublicIdstring
publicIdrequiredstring
sizeBytesrequiredinteger

int64.

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/tickets/<ticketID>/attachments?fileName=<fileName>&messageId=<messageId>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

GET /api/v1/tickets/{ticketID}/attachments/{attachmentID}

Section titled “GET /api/v1/tickets/{ticketID}/attachments/{attachmentID}”

GETticket: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]

downloadTicketAttachment 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 email-ingested HTML file 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
attachmentIDpathstringYesA uuid.
ticketIDpathstringYesA uuid.
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 ticket:read.
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.
502application/problem+json, ProblemDetailsThe attachment could not be read from storage.
503application/problem+json, ProblemDetailsAttachment storage is not configured on this Depot.
507application/problem+json, ProblemDetailsThe storage profile for this client is over its configured quota. Raise the quota or remove attachments.
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/tickets/<ticketID>/attachments/<attachmentID>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

DELETE /api/v1/tickets/{ticketID}/attachments/{attachmentID}

Section titled “DELETE /api/v1/tickets/{ticketID}/attachments/{attachmentID}”

DELETEticket:writetenant facehosteditmspremoteIdempotent

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

Source: [object Object]

Delete ticket attachment

NameInTypeRequiredDescription
attachmentIDpathstringYesA uuid.
ticketIDpathstringYesA uuid.
StatusBodyDescription
204NoneSuccess, with no body.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold ticket:write.
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, ProblemDetailsAttachment storage is not configured on this Depot.
507application/problem+json, ProblemDetailsThe storage profile for this client is over its configured quota. Raise the quota or remove attachments.
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/tickets/<ticketID>/attachments/<attachmentID>' \
-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.