Skip to navigation

Register a sandbox image

View as Markdown

Registers a Docker image so sandboxes can be provisioned from it. The image belongs to the workspace in X-Workspace-Id.

For images in a private registry, first create the credential with POST /registries and pass its id as registry_id.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

x-workspace-idstring or nullOptional

UUID of the workspace that scopes this request. List the workspaces you belong to with GET /workspaces.

Request

This endpoint expects an object.
namestringRequired1-255 characters
imagestringRequired1-512 characters
descriptionstring or nullOptional<=1000 characters
tagstringOptional1-128 charactersDefaults to latest
enabledbooleanOptionalDefaults to true
is_defaultbooleanOptionalDefaults to false
registry_idstring or nullOptionalformat: "uuid"
memory_mbintegerOptional256-8192Defaults to 1024

Memory in MB (256–8192)

readiness_portinteger or nullOptional1-65535

HTTP port for readiness probe. Leave blank to use exec probe (pgrep supervisord).

ttl_secondsinteger or nullOptional60-86400

Hard time limit in seconds for sandbox pods (60–86400). Leave blank for no limit.

Response

Successful Response
idstringformat: "uuid"
namestring
imagestring
descriptionstring or null
tagstring
enabledboolean
is_defaultboolean
memory_mbinteger
created_atdatetime
updated_atdatetime
readiness_portinteger or nullOptional
ttl_secondsinteger or nullOptional
workspace_idstring or nullOptionalformat: "uuid"
registry_idstring or nullOptionalformat: "uuid"
registry_namestring or nullOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
422
Unprocessable Entity Error