Skip to content

Workspace: deletion

View as Markdown

Schedule this workspace for deletion, after a seven-day hold

Section titled “Schedule this workspace for deletion, after a seven-day hold”

POST /v1/workspace/deletion · operation requestWorkspaceDeletion

Requires the batondeck:workspace:admin permission (action workspace:delete).

Requires a step-up: MFA enrolled and re-authenticated within 15 minutes. Not reachable with an API key — a key has no session and so can never step up.

Refused while the workspace is suspended or on deletion hold.

Request body (application/json)

Field Type Required Notes
reason string ≤ 500 chars
Request schema
{
"type": "object",
"properties": {
"reason": {
"type": "string",
"maxLength": 500
}
},
"additionalProperties": false
}

Responses

Status Meaning
201 Schedule this workspace for deletion, after a seven-day hold
400 The arguments did not validate.
401 No portal session, and no live API key.
403 The policy refused, or the request was cross-site.
404 No such resource, or none this session may see.
201 response schema
{
"type": "object",
"properties": {
"hold_until": {
"type": "number"
}
},
"required": [
"hold_until"
],
"additionalProperties": false
}
Terminal window
curl -X POST 'https://api.batondeck.com/v1/workspace/deletion' \
-H "Authorization: Bearer $BATONDECK_API_KEY" \
-H 'content-type: application/json' \
-d @body.json

DELETE /v1/workspace/deletion · operation cancelWorkspaceDeletion

Requires the batondeck:workspace:admin permission (action workspace:cancel-deletion).

Refused while the workspace is suspended or on deletion hold.

Responses

Status Meaning
200 Change your mind inside the seven days
401 No portal session, and no live API key.
403 The policy refused, or the request was cross-site.
404 No such resource, or none this session may see.
200 response schema
{
"type": "null"
}
Terminal window
curl -X DELETE 'https://api.batondeck.com/v1/workspace/deletion' \
-H "Authorization: Bearer $BATONDECK_API_KEY"