Images
Starts a direct upload of a build-context tar of up to 1 GiB. When the project already holds a verified upload of the same archive in the region, the response is that upload with state ready and no parts. Otherwise PUT each part's bytes to its URL, then call POST /build-contexts/{id}/complete.
AuthorizationBearer <token>Bearer project API key.
Scope: write:images
application/json- body
bytes*integerThe size of the build-context tar in bytes, at most 1 GiB.
int641 <= value <= 1073741824dockerfile?|Path of the Dockerfile within the context. Defaults to Dockerfile.
region_id?|The region the image will be built in. When omitted, the project's default region is used, then the organization's, then the platform's default region. A build can use the upload only in this region.
sha256*stringThe SHA-256 of the build-context tar, as 64 lowercase hex characters.
tree_hash?|The canonical tree hash of the build context, as 64 lowercase hex characters. Optional: when set, the upload is refused unless the stored archive hashes to it.
The verified upload of the same archive
application/json- response
A build-context upload.
bytes*integerThe size of the build-context tar in bytes.
int64dockerfile*stringPath of the Dockerfile within the context.
expires_at?|When a ready upload can no longer be used by a build.
date-timeid*stringThe upload ID.
uuidpart_size?|The size of every part but the last, in bytes. Set while uploading.
int64parts*array<>The parts to upload. Empty once the upload is ready.
region_id*stringThe region the upload belongs to.
sha256*stringThe SHA-256 of the build-context tar.
state*BuildContextUploadStateuploading until the upload is completed and verified, then ready.
"uploading""ready"upload_expires_at?|When an upload that was not completed expires and is deleted. Set
while uploading.
date-timeurls_expire_at?|When the part URLs stop accepting uploads. Set while uploading.
date-timecurl -X POST 'https://example.com/build-contexts' \ -H 'Content-Type: application/json' \ -d '{ "bytes": 1, "sha256": "string"}'{ "bytes": 0, "dockerfile": "string", "expires_at": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "part_size": 0, "parts": [ { "bytes": 0, "part_number": 0, "url": "string" } ], "region_id": "string", "sha256": "string", "state": "uploading", "upload_expires_at": "2019-08-24T14:15:22Z", "urls_expire_at": "2019-08-24T14:15:22Z"}Assembles the uploaded parts and verifies the stored archive: its size and SHA-256 must match the declared ones, it must be a well-formed tar, and its Dockerfile must pass the build admission checks. An archive that fails verification is deleted and the upload fails with a 400. Repeating the request on a ready upload returns it unchanged.
AuthorizationBearer <token>Bearer project API key.
Scope: write:images
id*stringThe upload ID
uuidapplication/json- body
region_id*stringThe region the upload was created in, as POST /build-contexts
returned it. Required: a multi-region deployment routes the request
to that region's servers by it.
The verified upload
application/json- response
A build-context upload.
bytes*integerThe size of the build-context tar in bytes.
int64dockerfile*stringPath of the Dockerfile within the context.
expires_at?|When a ready upload can no longer be used by a build.
date-timeid*stringThe upload ID.
uuidpart_size?|The size of every part but the last, in bytes. Set while uploading.
int64parts*array<>The parts to upload. Empty once the upload is ready.
region_id*stringThe region the upload belongs to.
sha256*stringThe SHA-256 of the build-context tar.
state*BuildContextUploadStateuploading until the upload is completed and verified, then ready.
"uploading""ready"upload_expires_at?|When an upload that was not completed expires and is deleted. Set
while uploading.
date-timeurls_expire_at?|When the part URLs stop accepting uploads. Set while uploading.
date-timecurl -X POST 'https://example.com/build-contexts/497f6eca-6276-4993-bfeb-53cbbbba6f08/complete' \ -H 'Content-Type: application/json' \ -d '{ "region_id": "string"}'{ "bytes": 0, "dockerfile": "string", "expires_at": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "part_size": 0, "parts": [ { "bytes": 0, "part_number": 0, "url": "string" } ], "region_id": "string", "sha256": "string", "state": "uploading", "upload_expires_at": "2019-08-24T14:15:22Z", "urls_expire_at": "2019-08-24T14:15:22Z"}Images are returned newest first.
AuthorizationBearer <token>Bearer project API key.
Scope: read:images
limit?integerMaximum number of items to return, 1–200 (default 100)
int641 <= value <= 200100cursor?stringOpaque continuation token returned as next_cursor by a previous request
name?stringMatch this exact image name.
sandbox_id?stringReturn images captured from this sandbox ID.
anonymous?booleanReturn anonymous images when true and named images when false. Defaults to false.
platform?stringWhich images to list. Defaults to false.
"true""false""any"The page of images
application/json- response
Page of images (GET /images).
images*array<>The images in this page.
next_cursor?|Opaque keyset token for the next page; null on the last page.
curl -X GET 'https://example.com/images'{ "images": [ { "anonymous": true, "bytes": 0, "class": "string", "created_at": "2019-08-24T14:15:22Z", "cursor": "string", "default": true, "deprecated": true, "disk_mib": 0, "error": "string", "expires_at": "2019-08-24T14:15:22Z", "format_outdated": true, "format_version": 0, "id": "string", "imported_from": { "id": "string", "platform": "string" }, "layer_count": 0, "name": "string", "origin": "string", "platform": true, "region_id": "string", "region_ids": [ "string" ], "retention": "permanent", "source": null, "status": "string", "updated_at": "2019-08-24T14:15:22Z" } ], "next_cursor": "string"}AuthorizationBearer <token>Bearer project API key.
Scope: write:images
Build request. application/json carries a registry or named source, an inline Dockerfile, or the context_upload_id of a build context uploaded with POST /build-contexts; multipart/form-data carries a build context of up to 64 MiB, with the fields name, optional dockerfile (a path within the context), region_id, cpu_arch, and the file field context (a build-context tar).
- body
context_upload_id?|A ready build-context upload from POST /build-contexts to build:
the Dockerfile at the upload's dockerfile path, with the uploaded
archive as its context. The image must be created in the upload's
region. Mutually exclusive with source and dockerfile.
uuidcpu_arch?|The CPU architecture: amd64 or arm64. Omit it to use the region default.
dockerfile?|An inline, self-contained Dockerfile body to build. Local files cannot be used with COPY or ADD; use multipart/form-data to upload a build context. Mutually exclusive with source.
idle_expiry_seconds?|The idle-retention window in seconds for an anonymous image: the image
is deleted once this long has passed without a sandbox being created
from it, and every create from the image restarts the clock. Allowed
only without name; a named image is permanent, and
idle_expiry_seconds with name is a 400. Omitted or -1 uses the
maximum, 7 days by default; 1 up to that maximum sets the window.
Reusing an anonymous image only extends its retention. Promote it to keep it.
0, values below -1, and values above the maximum answer
400 IDLE_OUT_OF_RANGE, whose body carries max.
int64name?|The project-unique image name. Omit it to create an anonymous image.
region_id?|The region to create the image in. When omitted, the project's default region is used, then the organization's, then the platform's default region.
source?||A registry image or an existing project image. Mutually exclusive with
dockerfile; exactly one source is required.
Accepted: a new image build, an identical named import replay (same image id and current pending/building/ready status, no new job), or a failed identical named import retry (same image id, reset to pending with a new job after build admission)
application/json- response
An accepted asynchronous operation.
id*stringThe ID of the resource the operation acts on.
status*stringThe resource's lifecycle status at acceptance.
curl -X POST 'https://example.com/images' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "status": "string"}Searches the project's images using the supplied filters. Results may be briefly stale after a change.
AuthorizationBearer <token>Bearer project API key.
Scope: read:images
q?stringFree text over the image name. A value that is an image ID matches that image exactly.
name?stringMatch this exact image name.
name_prefix?stringname starts with this string (case-sensitive).
status?array<>Comma-separated build statuses. An unrecognized value answers 400.
class?array<>Comma-separated sandbox classes the image supports.
origin?array<>Comma-separated origins: how the image was created.
region_ids?stringComma-separated home region IDs. A broader region (a geo group, or
earth) matches every region inside it. An unknown region answers
400. Defaults to every region.
sandbox_id?stringImages captured from this sandbox ID.
anonymous?booleanReturn anonymous images when true and named images when false. Defaults to false.
platform?stringWhich images to return: the project's own (false, the default),
the platform's (true), or both (any). Deprecated platform images
are never returned.
"true""false""any"created_start_at?stringInclusive lower bound on creation time.
date-timecreated_end_at?stringExclusive upper bound on creation time.
date-timeupdated_start_at?stringInclusive lower bound on last-modified time.
date-timeupdated_end_at?stringExclusive upper bound on last-modified time.
date-timesort?stringSort field. Defaults to created_at; ties break on the ID.
"created_at""updated_at""name""bytes"order?stringSort order. Defaults to desc.
"asc""desc"limit?integerMaximum number of items to return, 1–200 (default 100)
int641 <= value <= 200100cursor?stringOpaque continuation token returned as next_cursor by a previous request
The page of matching images
application/json- response
A page of matching images.
images*array<>Matching images in this page.
next_cursor?|Continuation token for the next page; null on the last page.
total*integerThe number of matching images. Exact when total_relation is eq,
and a lower bound of 10000 when it is gte.
int640 <= valuetotal_relation*SearchTotalRelationWhether total is exact (eq) or a lower bound (gte).
"eq""gte"curl -X GET 'https://example.com/images/search'{ "images": [ { "anonymous": true, "bytes": 0, "class": "string", "created_at": "2019-08-24T14:15:22Z", "cursor": "string", "default": true, "deprecated": true, "disk_mib": 0, "error": "string", "expires_at": "2019-08-24T14:15:22Z", "format_outdated": true, "format_version": 0, "id": "string", "imported_from": { "id": "string", "platform": "string" }, "layer_count": 0, "name": "string", "origin": "string", "platform": true, "region_id": "string", "region_ids": [ "string" ], "retention": "permanent", "source": null, "status": "string", "updated_at": "2019-08-24T14:15:22Z" } ], "next_cursor": "string", "total": 0, "total_relation": "eq"}Optionally waits for the image to reach a requested status.
AuthorizationBearer <token>Bearer project API key.
Scope: read:images
id*stringThe image ID or name
wait?stringBlock until the resource reaches this status or a terminal status. Omit to return immediately.
timeout_ms?integerMaximum time to block, in milliseconds. Default 30000, maximum 60000.
int640 <= valueid_only?booleanResolve the path value strictly as an ID, without a name fallback.
The image
application/json- response
anonymous*booleanWhether the image has no permanent name.
bytes?|The image size in bytes, or null until the build completes.
int64class*stringThe sandbox class supported by the image.
created_at*stringWhen the image was created.
date-timedefault*booleanWhether this is the image a sandbox create without image boots.
deprecated*booleanWhether this platform image is deprecated. A deprecated image is not listed and cannot be used by name, but its ID still resolves.
disk_mib?|The disk size in MiB that a macOS sandbox created from this image gets
when the create omits disk_mib; a create cannot ask for less. Set for
images captured from a macOS sandbox; null for other images.
int64error?|Build failure reason; null unless status is failed.
expires_at?|When an anonymous image expires, or null for a permanent image.
date-timeformat_outdated*booleanformat_version is below the current format. Such an image converts
on its first Linux sandbox create (which waits queued meanwhile) or
ahead of time with POST /images/{id}/convert; other operations refuse
it with IMAGE_FORMAT_OUTDATED until then.
format_version*integerImage format version: 1 for images imported from Daytona v0, 2 for the current format. See status for image readiness.
int32id*stringThe image ID.
imported_from?The source platform and resource ID when this image was imported.
layer_count?|The number of filesystem layers, or null until the build completes.
int32name?|The image name, or null for an anonymous image.
origin*stringHow the image was created.
platform*booleanWhether the platform publishes this image for every project. A project's own image with the same name takes precedence for that project, and platform images cannot be renamed, converted, or deleted.
region_id*stringThe home region.
region_ids*array<string>Every region where the image is available.
retention*ImageRetentionThe retention policy: permanent or idle.
"permanent""idle"source?||||The image source.
status*stringThe build status.
updated_at*stringWhen the image was last updated.
date-timecurl -X GET 'https://example.com/images/string'{ "anonymous": true, "bytes": 0, "class": "string", "created_at": "2019-08-24T14:15:22Z", "default": true, "deprecated": true, "disk_mib": 0, "error": "string", "expires_at": "2019-08-24T14:15:22Z", "format_outdated": true, "format_version": 0, "id": "string", "imported_from": { "id": "string", "platform": "string" }, "layer_count": 0, "name": "string", "origin": "string", "platform": true, "region_id": "string", "region_ids": [ "string" ], "retention": "permanent", "source": null, "status": "string", "updated_at": "2019-08-24T14:15:22Z"}Naming an anonymous image makes it permanent. Named images cannot be renamed.
AuthorizationBearer <token>Bearer project API key.
Scope: write:images
id*stringThe image ID or name
id_only?booleanResolve the path value strictly as an ID, without a name fallback.
application/json- body
name*stringThe permanent image name.
The image
application/json- response
anonymous*booleanWhether the image has no permanent name.
bytes?|The image size in bytes, or null until the build completes.
int64class*stringThe sandbox class supported by the image.
created_at*stringWhen the image was created.
date-timedefault*booleanWhether this is the image a sandbox create without image boots.
deprecated*booleanWhether this platform image is deprecated. A deprecated image is not listed and cannot be used by name, but its ID still resolves.
disk_mib?|The disk size in MiB that a macOS sandbox created from this image gets
when the create omits disk_mib; a create cannot ask for less. Set for
images captured from a macOS sandbox; null for other images.
int64error?|Build failure reason; null unless status is failed.
expires_at?|When an anonymous image expires, or null for a permanent image.
date-timeformat_outdated*booleanformat_version is below the current format. Such an image converts
on its first Linux sandbox create (which waits queued meanwhile) or
ahead of time with POST /images/{id}/convert; other operations refuse
it with IMAGE_FORMAT_OUTDATED until then.
format_version*integerImage format version: 1 for images imported from Daytona v0, 2 for the current format. See status for image readiness.
int32id*stringThe image ID.
imported_from?The source platform and resource ID when this image was imported.
layer_count?|The number of filesystem layers, or null until the build completes.
int32name?|The image name, or null for an anonymous image.
origin*stringHow the image was created.
platform*booleanWhether the platform publishes this image for every project. A project's own image with the same name takes precedence for that project, and platform images cannot be renamed, converted, or deleted.
region_id*stringThe home region.
region_ids*array<string>Every region where the image is available.
retention*ImageRetentionThe retention policy: permanent or idle.
"permanent""idle"source?||||The image source.
status*stringThe build status.
updated_at*stringWhen the image was last updated.
date-timecurl -X PATCH 'https://example.com/images/string' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'{ "anonymous": true, "bytes": 0, "class": "string", "created_at": "2019-08-24T14:15:22Z", "default": true, "deprecated": true, "disk_mib": 0, "error": "string", "expires_at": "2019-08-24T14:15:22Z", "format_outdated": true, "format_version": 0, "id": "string", "imported_from": { "id": "string", "platform": "string" }, "layer_count": 0, "name": "string", "origin": "string", "platform": true, "region_id": "string", "region_ids": [ "string" ], "retention": "permanent", "source": null, "status": "string", "updated_at": "2019-08-24T14:15:22Z"}Deletion is refused while a sandbox or snapshot depends on the image.
AuthorizationBearer <token>Bearer project API key.
Scope: delete:images
id*stringThe image ID or name
id_only?booleanResolve the path value strictly as an ID, without a name fallback.
Image deleted
curl -X DELETE 'https://example.com/images/string'AuthorizationBearer <token>Bearer project API key.
Scope: read:images
id*stringThe image ID or name
id_only?booleanResolve the path value strictly as an ID, without a name fallback.
The image build logs URL
application/json- response
A link to build logs.
url*stringThe URL for reading the build logs.
curl -X GET 'https://example.com/images/string/build-logs-url'{ "url": "string"}Converts the image to the format the platform currently boots. Repeating the request is safe and returns the in-progress conversion.
AuthorizationBearer <token>Bearer project API key.
Scope: write:images
id*stringThe image ID or name
id_only?booleanResolve the path value strictly as an ID, without a name fallback.
Accepted: the image conversion
application/json- response
An image format conversion result.
converted*booleantrue when this call started or joined a conversion; false when the
image was already at the current format and nothing was enqueued.
from_format*integerThe image's format before the call, as Image.format_version
reported it.
int32id*stringThe image ID.
status*stringThe image's status after the call: pending/building while it
converts, or its own status when it was already at the current format.
to_format*integerThe format the conversion targets: the current one.
int32curl -X POST 'https://example.com/images/string/convert'{ "converted": true, "from_format": 0, "id": "string", "status": "string", "to_format": 0}Captures the sandbox disk as an image. A persistent, stopped macOS sandbox produces an image usable by a later macOS create. To capture memory, create a snapshot instead.
AuthorizationBearer <token>Bearer project API key.
Scope: write:images, write:sandboxes
sandbox_id*stringThe sandbox ID
application/json- body
idle_expiry_seconds?|The idle-retention window in seconds for an anonymous image: the image
is deleted once this long has passed without a sandbox being created
from it, and every create from the image restarts the clock. Allowed
only without name; a named image is permanent, and
idle_expiry_seconds with name is a 400. The same rule as
POST /images: omitted or -1 uses the maximum, 7 days by default;
1 up to that maximum sets the window; 0, values below -1, and
values above the maximum answer 400 IDLE_OUT_OF_RANGE, whose body
carries max. Promote the image (PATCH /images/{id}) to keep it.
int64name?|The project-unique image name, or null for an anonymous image.
Accepted: the sandbox image capture
application/json- response
An accepted asynchronous operation.
id*stringThe ID of the resource the operation acts on.
status*stringThe resource's lifecycle status at acceptance.
curl -X POST 'https://example.com/sandboxes/string/images' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "status": "string"}