Skip to content

Depot docs imports

Registers the import and export routes.

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

GETdocs:manageshared facehosteditmspremoteIdempotent

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

Source: [object Object]

List doc exports

NameInTypeRequiredDescription
limitquerystringNo
offsetquerystringNo
StatusBodyDescription
200application/json, objectSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold docs:manage.
500application/problem+json, ProblemDetailsThe request failed.
503application/problem+json, ProblemDetailsThis Depot has no storage configured, so documentation cannot be imported or exported.
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/docs/exports?limit=<limit>&offset=<offset>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

POSTdocs:manageshared facehosteditmspremoteIdempotent

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

Source: [object Object]

createDocExport queues an export.

THE PERMISSION IS DECIDED HERE. A caller who asks for secrets without vault:reveal is REFUSED rather than quietly given an export with nulls in it: an operator who believes they have a full backup and does not is worse off than one who was told no.

Required, sent as application/json.

FieldTypeDescription
clientIdsrequiredarray of string
includeAttachmentsboolean or null
includeSecretsrequiredboolean
StatusBodyDescription
202application/json, ExportJobJSONAccepted.
400application/problem+json, ProblemDetailsThe request body is not valid JSON.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsIncluding the passwords in an export needs the vault reveal permission. Ask again without them, or ask an administrator for the permission.
404application/problem+json, ProblemDetailsNo resource matches.
409application/problem+json, ProblemDetailsThe request conflicts with the current state.
500application/problem+json, ProblemDetailsThe request failed.
501application/problem+json, ProblemDetailsThis Depot cannot store import and export jobs yet.
503application/problem+json, ProblemDetailsThis Depot has no storage configured, so documentation cannot be imported or exported.

202 response body

FieldTypeDescription
clientIdsarray of string
completedAtstring
createdAtrequiredstring
createdBystring
downloadablerequiredboolean
errorstring
expiresAtstring
idrequiredstring
includeAttachmentsrequiredboolean
includeSecretsrequiredboolean
manifestManifest

Manifest is the receipt, and it NEVER carries a value out of the data.

manifest.clientsrequiredarray of ClientManifest
manifest.clients[].countsrequiredobject
manifest.clients[].namerequiredstring
manifest.clients[].publicIdrequiredstring
manifest.countsrequiredobject
manifest.generatedAtrequiredstring (date-time)
manifest.includeAttachmentsrequiredboolean
manifest.includeSecretsrequiredboolean
manifest.jobPublicIdrequiredstring
manifest.omissionsrequiredarray of Omission
manifest.omissions[].countrequiredinteger
manifest.omissions[].whatrequiredstring
manifest.omissions[].whyrequiredstring
manifest.productrequiredstring
manifest.schemaVersionrequiredinteger
manifest.secretsIncludedrequiredinteger
manifest.secretsOmittedrequiredinteger
manifest.unavailableClientsrequiredarray of string
quarantinedboolean
sizeBytesrequiredinteger

int64.

staterequiredstring
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 POST 'https://depot.example.com/api/v1/docs/exports' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '{
"clientIds": [
"string"
],
"includeAttachments": false,
"includeSecrets": false
}'

GETdocs:manageshared facehosteditmspremoteIdempotent

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

Source: [object Object]

Get doc export

NameInTypeRequiredDescription
jobIdpathstringYesA uuid.
StatusBodyDescription
200application/json, ExportJobJSONSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold docs:manage.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state.
500application/problem+json, ProblemDetailsThe request failed.
501application/problem+json, ProblemDetailsThis Depot cannot store import and export jobs yet.
503application/problem+json, ProblemDetailsThis Depot has no storage configured, so documentation cannot be imported or exported.

200 response body

FieldTypeDescription
clientIdsarray of string
completedAtstring
createdAtrequiredstring
createdBystring
downloadablerequiredboolean
errorstring
expiresAtstring
idrequiredstring
includeAttachmentsrequiredboolean
includeSecretsrequiredboolean
manifestManifest

Manifest is the receipt, and it NEVER carries a value out of the data.

manifest.clientsrequiredarray of ClientManifest
manifest.clients[].countsrequiredobject
manifest.clients[].namerequiredstring
manifest.clients[].publicIdrequiredstring
manifest.countsrequiredobject
manifest.generatedAtrequiredstring (date-time)
manifest.includeAttachmentsrequiredboolean
manifest.includeSecretsrequiredboolean
manifest.jobPublicIdrequiredstring
manifest.omissionsrequiredarray of Omission
manifest.omissions[].countrequiredinteger
manifest.omissions[].whatrequiredstring
manifest.omissions[].whyrequiredstring
manifest.productrequiredstring
manifest.schemaVersionrequiredinteger
manifest.secretsIncludedrequiredinteger
manifest.secretsOmittedrequiredinteger
manifest.unavailableClientsrequiredarray of string
quarantinedboolean
sizeBytesrequiredinteger

int64.

staterequiredstring
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/docs/exports/<jobId>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

GETdocs:manageshared 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]

downloadDocExport streams the zip.

A SECOND STEP-UP, not just the one that queued it. The queue may have taken an hour and the download is where the bytes actually leave, so the freshness window is asked about again at the moment it matters.

NameInTypeRequiredDescription
jobIdpathstringYesA uuid.
StatusBodyDescription
200application/octet-stream, string (binary)Success. The body shape was not resolved; see x-outpost-unresolved.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThis export was made with the passwords in it, so downloading it needs the vault reveal permission. Ask an administrator for the permission, or make an export without them.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state.
410application/problem+json, ProblemDetailsThis export has expired and its file has been deleted. Make a new one.
500application/problem+json, ProblemDetailsThe request failed.
501application/problem+json, ProblemDetailsThis Depot cannot store import and export jobs yet.
502application/problem+json, ProblemDetailsThe export file could not be read out of storage.
503application/problem+json, ProblemDetailsThis Depot has no storage configured, so documentation cannot be imported or exported.
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/docs/exports/<jobId>/download' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

GETdocs:manageshared facehosteditmspremoteIdempotent

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

Source: [object Object]

List doc imports

NameInTypeRequiredDescription
limitquerystringNo
offsetquerystringNo
StatusBodyDescription
200application/json, objectSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold docs:manage.
500application/problem+json, ProblemDetailsThe request failed.
503application/problem+json, ProblemDetailsThis Depot has no storage configured, so documentation cannot be imported or exported.
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/docs/imports?limit=<limit>&offset=<offset>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

POSTdocs:manageshared facehosteditmspremoteIdempotent

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

Source: [object Object]

createDocImport takes the uploaded file and queues the dry run.

The file rides in the BODY and its metadata in the query string, which is the shape ticket attachments already use: a multipart parse would buy nothing over a raw stream and would spool a quarter of a gigabyte through memory to get it.

NameInTypeRequiredDescription
clientIdquerystringNo
fileNamequerystringNo
matchSourceSystemquerystringNo
sourcequerystringNo

Required, sent as multipart/form-data.

The body is object.

StatusBodyDescription
202application/json, ImportJobJSONAccepted.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold docs:manage.
404application/problem+json, ProblemDetailsNo resource matches.
409application/problem+json, ProblemDetailsThe request conflicts with the current state.
413application/problem+json, ProblemDetailsThe request was refused.
500application/problem+json, ProblemDetailsThe request failed.
501application/problem+json, ProblemDetailsThis Depot cannot store import and export jobs yet.
502application/problem+json, ProblemDetailsThe file could not be stored, so nothing was imported.
503application/problem+json, ProblemDetailsThis Depot has no storage configured, so documentation cannot be imported or exported.

202 response body

FieldTypeDescription
completedAtstring
createdAtrequiredstring
createdBystring
errorstring
fileNamerequiredstring
idrequiredstring
quarantinedboolean
reportReport

Report is one report the portal offers.

report.coderequiredstring
report.formatsrequiredarray of string
report.titlerequiredstring
resultCommitResult

CommitResult is what the job row keeps and the console shows afterwards.

result.createdrequiredobject
result.findingsrequiredarray of Finding
result.findings[].Coderequiredstring
result.findings[].Countrequiredinteger
result.findings[].Detailrequiredstring
result.findings[].Detailsrequiredarray of string
result.flattenedrequiredinteger
result.imagesNotImportedrequiredinteger
result.orphanedCredentialsrequiredinteger
result.rowsProcessedrequiredinteger
result.rowsTotalrequiredinteger
result.secretsFilledrequiredinteger
result.skippedrequiredobject
result.unresolvedLinksrequiredinteger
result.updatedrequiredobject
rowsProcessedrequiredinteger
rowsTotalrequiredinteger
sizeBytesrequiredinteger

int64.

sourcerequiredstring
startedAtstring
staterequiredstring
targetClientIdstring
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 POST 'https://depot.example.com/api/v1/docs/imports?clientId=<clientId>&fileName=<fileName>&matchSourceSystem=<matchSourceSystem>&source=<source>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-b 'outpost_console=<console-session>' \
--data '{}'

GETdocs:manageshared facehosteditmspremoteIdempotent

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

Source: [object Object]

Get doc import

NameInTypeRequiredDescription
jobIdpathstringYesA uuid.
StatusBodyDescription
200application/json, ImportJobJSONSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold docs:manage.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state.
500application/problem+json, ProblemDetailsThe request failed.
501application/problem+json, ProblemDetailsThis Depot cannot store import and export jobs yet.
503application/problem+json, ProblemDetailsThis Depot has no storage configured, so documentation cannot be imported or exported.

200 response body

FieldTypeDescription
completedAtstring
createdAtrequiredstring
createdBystring
errorstring
fileNamerequiredstring
idrequiredstring
quarantinedboolean
reportReport

Report is one report the portal offers.

report.coderequiredstring
report.formatsrequiredarray of string
report.titlerequiredstring
resultCommitResult

CommitResult is what the job row keeps and the console shows afterwards.

result.createdrequiredobject
result.findingsrequiredarray of Finding
result.findings[].Coderequiredstring
result.findings[].Countrequiredinteger
result.findings[].Detailrequiredstring
result.findings[].Detailsrequiredarray of string
result.flattenedrequiredinteger
result.imagesNotImportedrequiredinteger
result.orphanedCredentialsrequiredinteger
result.rowsProcessedrequiredinteger
result.rowsTotalrequiredinteger
result.secretsFilledrequiredinteger
result.skippedrequiredobject
result.unresolvedLinksrequiredinteger
result.updatedrequiredobject
rowsProcessedrequiredinteger
rowsTotalrequiredinteger
sizeBytesrequiredinteger

int64.

sourcerequiredstring
startedAtstring
staterequiredstring
targetClientIdstring
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/docs/imports/<jobId>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

POSTdocs:manageshared facehosteditmspremoteIdempotent

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

Source: [object Object]

commitDocImport moves the job into the commit queue.

IT REFUSES WHILE THE DRY RUN IS BLOCKING, here as well as in the worker. The worker’s refusal is the one that matters, because it re-analyzes against the database as it is at commit time; this one exists so the operator is told in the response to the button they pressed rather than by a job that fails a minute later.

NameInTypeRequiredDescription
jobIdpathstringYesA uuid.
StatusBodyDescription
202application/json, ImportJobJSONAccepted.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold docs:manage.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThis import was queued before Outpost recorded which client an import belongs to, so it is held until somebody says whose it is. See 0065_control.sql.
500application/problem+json, ProblemDetailsThe request failed.
501application/problem+json, ProblemDetailsThis Depot cannot store import and export jobs yet.
503application/problem+json, ProblemDetailsThis Depot has no storage configured, so documentation cannot be imported or exported.

202 response body

FieldTypeDescription
completedAtstring
createdAtrequiredstring
createdBystring
errorstring
fileNamerequiredstring
idrequiredstring
quarantinedboolean
reportReport

Report is one report the portal offers.

report.coderequiredstring
report.formatsrequiredarray of string
report.titlerequiredstring
resultCommitResult

CommitResult is what the job row keeps and the console shows afterwards.

result.createdrequiredobject
result.findingsrequiredarray of Finding
result.findings[].Coderequiredstring
result.findings[].Countrequiredinteger
result.findings[].Detailrequiredstring
result.findings[].Detailsrequiredarray of string
result.flattenedrequiredinteger
result.imagesNotImportedrequiredinteger
result.orphanedCredentialsrequiredinteger
result.rowsProcessedrequiredinteger
result.rowsTotalrequiredinteger
result.secretsFilledrequiredinteger
result.skippedrequiredobject
result.unresolvedLinksrequiredinteger
result.updatedrequiredobject
rowsProcessedrequiredinteger
rowsTotalrequiredinteger
sizeBytesrequiredinteger

int64.

sourcerequiredstring
startedAtstring
staterequiredstring
targetClientIdstring
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 POST 'https://depot.example.com/api/v1/docs/imports/<jobId>/commit' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

GETdocs:manageshared facehosteditmspremoteIdempotent

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

Source: [object Object]

List doc import matches

NameInTypeRequiredDescription
jobIdpathstringYesA uuid.
decisionquerystringNo
limitquerystringNo
offsetquerystringNo
StatusBodyDescription
200application/json, objectSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold docs:manage.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state.
500application/problem+json, ProblemDetailsThe request failed.
501application/problem+json, ProblemDetailsThis Depot cannot store import and export jobs yet.
503application/problem+json, ProblemDetailsThis Depot has no storage configured, so documentation cannot be imported or exported.
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/docs/imports/<jobId>/matches?decision=<decision>&limit=<limit>&offset=<offset>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

PATCH /api/v1/docs/imports/{jobId}/matches/{matchId}

Section titled “PATCH /api/v1/docs/imports/{jobId}/matches/{matchId}”

PATCHdocs:manageshared facehosteditmspremoteIdempotent

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

Source: [object Object]

patchDocImportMatch records one decision off the review table.

The two decisions this collects are the whole point of the dry run: skip this row, and put this ambiguous one in that client. A commit that ignored them would make the review page a lie.

THE MATCH IS NOT ASSUMED TO BE ON THE JOB IN THE PATH. This route used to read job A, check A’s state, and then write match B by its id alone - so a match belonging to a different job, on a different tenant, in a state where decisions are closed, could be redirected by naming it in the path beside a job the caller does own. The four facts travel together into one UPDATE whose predicate names all four (store.DocImportMatchDecision), and the 409 below survives only as the friendlier answer for the ordinary case: an operator clicking a row on a page that went stale while the commit started.

NameInTypeRequiredDescription
jobIdpathstringYesA uuid.
matchIdpathstringYesA uuid.

Required, sent as application/json.

FieldTypeDescription
decisionrequiredstring
targetClientIdrequiredstring
targetIdrequiredstring
StatusBodyDescription
200application/json, ImportMatchJSONSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold docs:manage.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThis import has already started committing, so its decisions can no longer be changed.
500application/problem+json, ProblemDetailsThe request failed.
501application/problem+json, ProblemDetailsThis Depot cannot store import and export jobs yet.
503application/problem+json, ProblemDetailsThis Depot has no storage configured, so documentation cannot be imported or exported.

200 response body

FieldTypeDescription
decisionrequiredstring
entityKindrequiredstring
idrequiredstring
notestring
sourceNamerequiredstring
sourceRefrequiredstring
targetClientIdstring
targetIdstring
targetNamestring
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 PATCH 'https://depot.example.com/api/v1/docs/imports/<jobId>/matches/<matchId>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '{
"decision": "string",
"targetClientId": "string",
"targetId": "string"
}'

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.