Skip to content

Depot scripts

Registers the library CRUD + lifecycle 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.

GETscript:readshared facehosteditmspremoteIdempotent

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

Source: [object Object]

List scripts

NameInTypeRequiredDescription
agentIdquerystringNo
categoryquerystringNo
dirquerystring, one of asc, descNoSort direction.
osFamilyquerystringNo
pagequeryintegerNoOne-based page number. Defaults to 1.
pageSizequeryintegerNoRows per page, 1 to 200. Defaults to 50.
qquerystringNo
queryquerystringNo
scopequerystringNo
sortquerystring, one of category, created, name, status, updatedNoSort key.
statusquerystringNo
StatusBodyDescription
200application/json, PagedResultScriptSummaryViewSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold script:read.
500application/problem+json, ProblemDetailsThe request failed.
503application/problem+json, ProblemDetailsThe script library is not available on this Depot.

200 response body

FieldTypeDescription
itemsrequiredarray of ScriptSummaryView
items[].builtInrequiredboolean
items[].categoryrequiredstring
items[].descriptionrequiredstring
items[].interpreterrequiredstring
items[].isCollectorrequiredboolean
items[].namerequiredstring
items[].osFamilyrequiredstring, one of any, linux, macos, windows
items[].publicIdrequiredstring
items[].scoperequiredstring
items[].statusrequiredstring
items[].tagsrequiredarray of string
items[].updatedAtrequiredstring (date-time)
items[].versionrequiredinteger
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/scripts?agentId=<agentId>&category=<category>&dir=asc&osFamily=<osFamily>&page=0&pageSize=0' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

POSTscript:manageshared facehosteditmspremote

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

Source: [object Object]

Create script

Required, sent as application/json.

FieldTypeDescription
bodystring or null
categorystring or null
collectorFieldKeystring or null
collectorParseModestring or null
descriptionstring or null
interpreterstring or null
isCollectorboolean or null
maxOutputBytesinteger or null

int64.

namestring or null
osFamilystring or null
paramsrequiredarray of ScriptParamView
params[].defaultrequiredstring
params[].descriptionrequiredstring
params[].keyrequiredstring
params[].kindrequiredstring
params[].labelrequiredstring
params[].optionsrequiredarray of string
params[].requiredrequiredboolean
runAsDefaultstring or null
scopestring or null
tagsrequiredarray of string
timeoutSecondsinteger or null
StatusBodyDescription
201application/json, ScriptDetailViewCreated.
400application/problem+json, ProblemDetailsThe request body is not valid JSON.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThis script is in the shared library, which every workspace on this Depot reads, and it is not edited from inside one of them. Duplicate it and change your own copy instead.
404application/problem+json, ProblemDetailsNo resource matches.
500application/problem+json, ProblemDetailsThe request failed.
503application/problem+json, ProblemDetailsThe script library is not available on this Depot.

201 response body

FieldTypeDescription
approvalClearedboolean
approvalFloorFrameworksarray of string
approvalReasonstring
approvalTicketstring
approvedAtstring (date-time) or null
approvedBystring
approvedByNamestring
approvedViastring
bodyrequiredstring
bodySha256requiredstring
builtInrequiredboolean
categoryrequiredstring
collectorFieldKeyrequiredstring
collectorParseModerequiredstring
descriptionrequiredstring
interpreterrequiredstring
isCollectorrequiredboolean
maxOutputBytesrequiredinteger

int64.

namerequiredstring
osFamilyrequiredstring, one of any, linux, macos, windows
ownWorkboolean
paramsrequiredarray of ScriptParamView
params[].defaultrequiredstring
params[].descriptionrequiredstring
params[].keyrequiredstring
params[].kindrequiredstring
params[].labelrequiredstring
params[].optionsrequiredarray of string
params[].requiredrequiredboolean
publicIdrequiredstring
runAsDefaultrequiredstring
scoperequiredstring
secondPersonApprovedrequiredboolean
soleEditorboolean
statusrequiredstring
tagsrequiredarray of string
timeoutSecondsrequiredinteger
updatedAtrequiredstring (date-time)
versionrequiredinteger
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/scripts' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '{
"body": "string",
"category": "string",
"collectorFieldKey": "string",
"collectorParseMode": "string",
"description": "string",
"interpreter": "string",
"isCollector": false,
"maxOutputBytes": 0,
"name": "string",
"osFamily": "string",
"params": [
{
"default": "string",
"description": "string",
"key": "string",
"kind": "string",
"label": "string",
"options": [
"string"
],
"required": false
}
],
"runAsDefault": "string",
"scope": "string",
"tags": [
"string"
],
"timeoutSeconds": 0
}'

GETscript:readshared facehosteditmspremoteIdempotent

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

Source: [object Object]

Get script

NameInTypeRequiredDescription
scriptIdpathstringYesA uuid.
StatusBodyDescription
200application/json, ScriptDetailViewSuccess.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold script:read.
404application/problem+json, ProblemDetailsNo resource matches that id.
500application/problem+json, ProblemDetailsThe request failed.
503application/problem+json, ProblemDetailsThe script library is not available on this Depot.

200 response body

FieldTypeDescription
approvalClearedboolean
approvalFloorFrameworksarray of string
approvalReasonstring
approvalTicketstring
approvedAtstring (date-time) or null
approvedBystring
approvedByNamestring
approvedViastring
bodyrequiredstring
bodySha256requiredstring
builtInrequiredboolean
categoryrequiredstring
collectorFieldKeyrequiredstring
collectorParseModerequiredstring
descriptionrequiredstring
interpreterrequiredstring
isCollectorrequiredboolean
maxOutputBytesrequiredinteger

int64.

namerequiredstring
osFamilyrequiredstring, one of any, linux, macos, windows
ownWorkboolean
paramsrequiredarray of ScriptParamView
params[].defaultrequiredstring
params[].descriptionrequiredstring
params[].keyrequiredstring
params[].kindrequiredstring
params[].labelrequiredstring
params[].optionsrequiredarray of string
params[].requiredrequiredboolean
publicIdrequiredstring
runAsDefaultrequiredstring
scoperequiredstring
secondPersonApprovedrequiredboolean
soleEditorboolean
statusrequiredstring
tagsrequiredarray of string
timeoutSecondsrequiredinteger
updatedAtrequiredstring (date-time)
versionrequiredinteger
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/scripts/<scriptId>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

PUTscript:manageshared facehosteditmspremoteIdempotent

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

Source: [object Object]

Update script

NameInTypeRequiredDescription
scriptIdpathstringYesA uuid.

Required, sent as application/json.

FieldTypeDescription
bodystring or null
categorystring or null
collectorFieldKeystring or null
collectorParseModestring or null
descriptionstring or null
interpreterstring or null
isCollectorboolean or null
maxOutputBytesinteger or null

int64.

namestring or null
osFamilystring or null
paramsrequiredarray of ScriptParamView
params[].defaultrequiredstring
params[].descriptionrequiredstring
params[].keyrequiredstring
params[].kindrequiredstring
params[].labelrequiredstring
params[].optionsrequiredarray of string
params[].requiredrequiredboolean
runAsDefaultstring or null
scopestring or null
tagsrequiredarray of string
timeoutSecondsinteger or null
StatusBodyDescription
200application/json, ScriptDetailViewSuccess.
400application/problem+json, ProblemDetailsThe request body is not valid JSON.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThis script is in the shared library, which every workspace on this Depot reads, and it is not edited from inside one of them. Duplicate it and change your own copy instead.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state.
500application/problem+json, ProblemDetailsThe request failed.
503application/problem+json, ProblemDetailsThe script library is not available on this Depot.

200 response body

FieldTypeDescription
approvalClearedboolean
approvalFloorFrameworksarray of string
approvalReasonstring
approvalTicketstring
approvedAtstring (date-time) or null
approvedBystring
approvedByNamestring
approvedViastring
bodyrequiredstring
bodySha256requiredstring
builtInrequiredboolean
categoryrequiredstring
collectorFieldKeyrequiredstring
collectorParseModerequiredstring
descriptionrequiredstring
interpreterrequiredstring
isCollectorrequiredboolean
maxOutputBytesrequiredinteger

int64.

namerequiredstring
osFamilyrequiredstring, one of any, linux, macos, windows
ownWorkboolean
paramsrequiredarray of ScriptParamView
params[].defaultrequiredstring
params[].descriptionrequiredstring
params[].keyrequiredstring
params[].kindrequiredstring
params[].labelrequiredstring
params[].optionsrequiredarray of string
params[].requiredrequiredboolean
publicIdrequiredstring
runAsDefaultrequiredstring
scoperequiredstring
secondPersonApprovedrequiredboolean
soleEditorboolean
statusrequiredstring
tagsrequiredarray of string
timeoutSecondsrequiredinteger
updatedAtrequiredstring (date-time)
versionrequiredinteger
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/scripts/<scriptId>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '{
"body": "string",
"category": "string",
"collectorFieldKey": "string",
"collectorParseMode": "string",
"description": "string",
"interpreter": "string",
"isCollector": false,
"maxOutputBytes": 0,
"name": "string",
"osFamily": "string",
"params": [
{
"default": "string",
"description": "string",
"key": "string",
"kind": "string",
"label": "string",
"options": [
"string"
],
"required": false
}
],
"runAsDefault": "string",
"scope": "string",
"tags": [
"string"
],
"timeoutSeconds": 0
}'

DELETEscript:manageshared facehosteditmspremoteIdempotent

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

Source: [object Object]

Delete script

NameInTypeRequiredDescription
scriptIdpathstringYesA uuid.
StatusBodyDescription
204NoneSuccess, with no body.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThis script is in the shared library, which every workspace on this Depot reads, and it is not edited from inside one of them. Duplicate it and change your own copy instead.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsThe request conflicts with the current state.
500application/problem+json, ProblemDetailsThe request failed.
503application/problem+json, ProblemDetailsThe script library is not available 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/scripts/<scriptId>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

POSTscript:approveshared facehosteditmspremoteIdempotent

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

Source: [object Object]

Approve script

NameInTypeRequiredDescription
scriptIdpathstringYesA uuid.

Required, sent as application/json.

FieldTypeDescription
acknowledgeWarningrequiredboolean
emergencyrequiredboolean
reasonrequiredstring
soleEditorrequiredboolean
ticketrequiredstring
StatusBodyDescription
200application/json, ScriptDetailViewSuccess.
400application/problem+json, ProblemDetailsThe request body is not valid JSON.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThis script is in the shared library, which every workspace on this Depot reads, and it is not edited from inside one of them. Duplicate it and change your own copy instead.
404application/problem+json, ProblemDetailsNo resource matches that id.
409application/problem+json, ProblemDetailsAn emergency approval is for approving your own version or your own request. You can approve this one the ordinary way.
500application/problem+json, ProblemDetailsThe request failed.
503application/problem+json, ProblemDetailsThe script library is not available on this Depot.

200 response body

FieldTypeDescription
approvalClearedboolean
approvalFloorFrameworksarray of string
approvalReasonstring
approvalTicketstring
approvedAtstring (date-time) or null
approvedBystring
approvedByNamestring
approvedViastring
bodyrequiredstring
bodySha256requiredstring
builtInrequiredboolean
categoryrequiredstring
collectorFieldKeyrequiredstring
collectorParseModerequiredstring
descriptionrequiredstring
interpreterrequiredstring
isCollectorrequiredboolean
maxOutputBytesrequiredinteger

int64.

namerequiredstring
osFamilyrequiredstring, one of any, linux, macos, windows
ownWorkboolean
paramsrequiredarray of ScriptParamView
params[].defaultrequiredstring
params[].descriptionrequiredstring
params[].keyrequiredstring
params[].kindrequiredstring
params[].labelrequiredstring
params[].optionsrequiredarray of string
params[].requiredrequiredboolean
publicIdrequiredstring
runAsDefaultrequiredstring
scoperequiredstring
secondPersonApprovedrequiredboolean
soleEditorboolean
statusrequiredstring
tagsrequiredarray of string
timeoutSecondsrequiredinteger
updatedAtrequiredstring (date-time)
versionrequiredinteger
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/scripts/<scriptId>/approve' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '{
"acknowledgeWarning": false,
"emergency": false,
"reason": "string",
"soleEditor": false,
"ticket": "string"
}'

POSTscript:manageshared facehosteditmspremote

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

Source: [object Object]

duplicateScript copies a script into a new DRAFT.

It is how a built-in becomes editable, and how somebody starts from a working script rather than a blank page. The copy is never approved, whatever the original was: an approval is a signature over a body, and the copy is about to be edited.

THE COPY LANDS IN THE FACE’S SCOPE, not the source’s. That is what makes forking the shared “Flush DNS” from inside a client produce that client’s own copy, leaving every other client still running the original - which is the whole reason editing a built-in forks rather than edits.

NameInTypeRequiredDescription
scriptIdpathstringYesA uuid.

Required, sent as application/json.

FieldTypeDescription
fromVersionrequiredinteger
StatusBodyDescription
201application/json, ScriptDetailViewCreated.
400application/problem+json, ProblemDetailsThe request body is not valid JSON.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThis script is in the shared library, which every workspace on this Depot reads, and it is not edited from inside one of them. Duplicate it and change your own copy instead.
404application/problem+json, ProblemDetailsNo resource matches that id.
500application/problem+json, ProblemDetailsThe request failed.
503application/problem+json, ProblemDetailsThe script library is not available on this Depot.

201 response body

FieldTypeDescription
approvalClearedboolean
approvalFloorFrameworksarray of string
approvalReasonstring
approvalTicketstring
approvedAtstring (date-time) or null
approvedBystring
approvedByNamestring
approvedViastring
bodyrequiredstring
bodySha256requiredstring
builtInrequiredboolean
categoryrequiredstring
collectorFieldKeyrequiredstring
collectorParseModerequiredstring
descriptionrequiredstring
interpreterrequiredstring
isCollectorrequiredboolean
maxOutputBytesrequiredinteger

int64.

namerequiredstring
osFamilyrequiredstring, one of any, linux, macos, windows
ownWorkboolean
paramsrequiredarray of ScriptParamView
params[].defaultrequiredstring
params[].descriptionrequiredstring
params[].keyrequiredstring
params[].kindrequiredstring
params[].labelrequiredstring
params[].optionsrequiredarray of string
params[].requiredrequiredboolean
publicIdrequiredstring
runAsDefaultrequiredstring
scoperequiredstring
secondPersonApprovedrequiredboolean
soleEditorboolean
statusrequiredstring
tagsrequiredarray of string
timeoutSecondsrequiredinteger
updatedAtrequiredstring (date-time)
versionrequiredinteger
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/scripts/<scriptId>/duplicate' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '{
"fromVersion": 0
}'

POSTscript:manageshared facehosteditmspremote

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

Source: [object Object]

moveScript sends a script to the other library, keeping its id, its whole history and its version numbering.

IT NEEDS A TENANT ON THE REQUEST in either direction, because both directions have a client end: a global script moves INTO one client’s library and a client’s moves OUT of it. The practice face has no tenant and therefore cannot say which client is at the other end, so it is refused rather than guessed at.

The ordering, the crash window and why the reverse ordering is worse are all in scriptlib.Move; nothing about it is decided here.

NameInTypeRequiredDescription
scriptIdpathstringYesA uuid.

Required, sent as application/json.

FieldTypeDescription
scoperequiredstring
StatusBodyDescription
200application/json, ScriptDetailViewSuccess.
400application/problem+json, ProblemDetailsThe request body is not valid JSON.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsMoving a script in or out of the shared library changes what every workspace on this Depot can run, so it is not done from inside one of them. Duplicate the script instead; the copy is your own.
404application/problem+json, ProblemDetailsNo resource matches that id.
500application/problem+json, ProblemDetailsThe request failed.
503application/problem+json, ProblemDetailsThe script library is not available on this Depot.

200 response body

FieldTypeDescription
approvalClearedboolean
approvalFloorFrameworksarray of string
approvalReasonstring
approvalTicketstring
approvedAtstring (date-time) or null
approvedBystring
approvedByNamestring
approvedViastring
bodyrequiredstring
bodySha256requiredstring
builtInrequiredboolean
categoryrequiredstring
collectorFieldKeyrequiredstring
collectorParseModerequiredstring
descriptionrequiredstring
interpreterrequiredstring
isCollectorrequiredboolean
maxOutputBytesrequiredinteger

int64.

namerequiredstring
osFamilyrequiredstring, one of any, linux, macos, windows
ownWorkboolean
paramsrequiredarray of ScriptParamView
params[].defaultrequiredstring
params[].descriptionrequiredstring
params[].keyrequiredstring
params[].kindrequiredstring
params[].labelrequiredstring
params[].optionsrequiredarray of string
params[].requiredrequiredboolean
publicIdrequiredstring
runAsDefaultrequiredstring
scoperequiredstring
secondPersonApprovedrequiredboolean
soleEditorboolean
statusrequiredstring
tagsrequiredarray of string
timeoutSecondsrequiredinteger
updatedAtrequiredstring (date-time)
versionrequiredinteger
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/scripts/<scriptId>/move' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b 'outpost_console=<console-session>' \
--data '{
"scope": "string"
}'

GETscript:readshared facehosteditmspremoteIdempotent

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

Source: [object Object]

List script revisions

NameInTypeRequiredDescription
scriptIdpathstringYesA uuid.
pagequeryintegerNoOne-based page number. Defaults to 1.
pageSizequeryintegerNoRows per page, 1 to 200. Defaults to 50.
StatusBodyDescription
200application/json, PagedResultScriptRevisionSummaryViewSuccess.
400application/problem+json, ProblemDetailsOne or more validation errors occurred.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold script:read.
404application/problem+json, ProblemDetailsNo resource matches that id.
500application/problem+json, ProblemDetailsThe request failed.
503application/problem+json, ProblemDetailsThe script library is not available on this Depot.

200 response body

FieldTypeDescription
itemsrequiredarray of ScriptRevisionSummaryView
items[].authoredAtrequiredstring (date-time)
items[].authoredBystring
items[].bodySha256requiredstring
items[].interpreterrequiredstring
items[].namerequiredstring
items[].originScoperequiredstring
items[].osFamilyrequiredstring
items[].reasonrequiredstring, one of backfill, create, edit, fork, import, seed
items[].versionrequiredinteger
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/scripts/<scriptId>/revisions?page=0&pageSize=0' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

GET /api/v1/scripts/{scriptId}/revisions/{version}

Section titled “GET /api/v1/scripts/{scriptId}/revisions/{version}”

GETscript:readshared facehosteditmspremoteIdempotent

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

Source: [object Object]

getScriptRevision reads one frozen text BY INTEGER VERSION.

By the integer and not by a revision id, because every batch, schedule and command row already records the integer, so it is the key an auditor is holding when they arrive here. A revision PublicId would be a second identifier that nothing else in the product names.

NameInTypeRequiredDescription
scriptIdpathstringYesA uuid.
versionpathstringYes
StatusBodyDescription
200application/json, ScriptRevisionViewSuccess.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold script:read.
404application/problem+json, ProblemDetailsNo resource matches that id.
500application/problem+json, ProblemDetailsThe request failed.
503application/problem+json, ProblemDetailsThe script library is not available on this Depot.

200 response body

FieldTypeDescription
authoredAtrequiredstring (date-time)
authoredBystring
bodyrequiredstring
bodySha256requiredstring
collectorFieldKeyrequiredstring
collectorParseModerequiredstring
interpreterrequiredstring
isCollectorrequiredboolean
maxOutputBytesrequiredinteger

int64.

namerequiredstring
originScoperequiredstring
osFamilyrequiredstring
paramsrequiredarray of ScriptParamView
params[].defaultrequiredstring
params[].descriptionrequiredstring
params[].keyrequiredstring
params[].kindrequiredstring
params[].labelrequiredstring
params[].optionsrequiredarray of string
params[].requiredrequiredboolean
reasonrequiredstring, one of backfill, create, edit, fork, import, seed
runAsDefaultrequiredstring
timeoutSecondsrequiredinteger
versionrequiredinteger
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/scripts/<scriptId>/revisions/<version>' \
-H 'X-CSRF-Token: <csrf-token>' \
-H 'Accept: application/json' \
-b 'outpost_console=<console-session>'

POSTscript:approveshared facehosteditmspremote

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

Source: [object Object]

Revoke script

NameInTypeRequiredDescription
scriptIdpathstringYesA uuid.
StatusBodyDescription
200application/json, ScriptDetailViewSuccess.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThis script is in the shared library, which every workspace on this Depot reads, and it is not edited from inside one of them. Duplicate it and change your own copy instead.
404application/problem+json, ProblemDetailsNo resource matches that id.
500application/problem+json, ProblemDetailsThe request failed.
503application/problem+json, ProblemDetailsThe script library is not available on this Depot.

200 response body

FieldTypeDescription
approvalClearedboolean
approvalFloorFrameworksarray of string
approvalReasonstring
approvalTicketstring
approvedAtstring (date-time) or null
approvedBystring
approvedByNamestring
approvedViastring
bodyrequiredstring
bodySha256requiredstring
builtInrequiredboolean
categoryrequiredstring
collectorFieldKeyrequiredstring
collectorParseModerequiredstring
descriptionrequiredstring
interpreterrequiredstring
isCollectorrequiredboolean
maxOutputBytesrequiredinteger

int64.

namerequiredstring
osFamilyrequiredstring, one of any, linux, macos, windows
ownWorkboolean
paramsrequiredarray of ScriptParamView
params[].defaultrequiredstring
params[].descriptionrequiredstring
params[].keyrequiredstring
params[].kindrequiredstring
params[].labelrequiredstring
params[].optionsrequiredarray of string
params[].requiredrequiredboolean
publicIdrequiredstring
runAsDefaultrequiredstring
scoperequiredstring
secondPersonApprovedrequiredboolean
soleEditorboolean
statusrequiredstring
tagsrequiredarray of string
timeoutSecondsrequiredinteger
updatedAtrequiredstring (date-time)
versionrequiredinteger
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/scripts/<scriptId>/revoke' \
-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.