Build an image
Starts building an image from a recipe, as a job of kind image_build. When the job is done, its result is { "image_id": "img_..." }. When it is failed, its error.code is one of: build_failed (The build itself failed, for example a package would not install.), build_lost (The platform lost track of the build. Build the recipe again.), import_check_failed (The image built, but a module in import_check would not import.), unavailable (A service behind the API failed. Build the recipe again after a short wait.). New codes may be added. A retry with the same Idempotency-Key and body returns the same job, also with 202.
/v1/imagesAuthorizationBearer token (ibk_<public id>_<secret>) · headerrequiredA lane's API key. The lane is taken from the key, never from the request.
Idempotency-KeystringMakes a retry safe. A retry with the same key and body gets the answer described for this operation; the same key with a different body gets 409 idempotency_mismatch. Keys are kept for 24 hours. The SDKs send a fresh key on every call they may retry.
application/jsonbaseImageBaserequiredThe image the build starts from, pinned by digest.
Show propertiesHide properties
digeststringrequiredThe digest the base image is pinned to. The build uses exactly this image, whatever reference later points at.
referencestringrequiredThe base image's name and tag in a public registry, for people to read. The digest decides what is built.
import_checkstring[]Modules to import once the packages are installed, as a check that the build works. At most 50. A failed import fails the build.
packagesRecipePackage[]requiredThe packages to install, each once, at most 500. Nothing is installed that is not listed with its hash.
Show propertiesHide properties
RecipePackagehashesstring[]requiredEvery hash this exact version may have, one per file it is published as. A downloaded file whose hash is not listed fails the build.
namestringrequiredversionstringrequiredOne exact version. Ranges are not allowed.
The build job.
created_atstring<date-time>requiredA UTC time in RFC 3339 form.
errorJobError | nullrequiredSet when status is failed.
Show propertiesHide properties
codestringrequiredA stable code for why the job failed. New codes may be added, so treat an unknown one as a failure. Known codes for kind image_build: build_failed (The build itself failed, for example a package would not install.), build_lost (The platform lost track of the build. Build the recipe again.), import_check_failed (The image built, but a module in import_check would not import.), unavailable (A service behind the API failed. Build the recipe again after a short wait.).
messagestringrequirednullidstringrequiredThe job id, job_....
kindstringrequiredWhat the job does. Each kind documents its own result.
resultobject | nullrequiredSet when status is done. Its shape depends on kind.
Show propertiesHide properties
objectnullstatusJobStatusrequiredMoves forward only. done, failed and cancelled are final.
acceptedrunningdonefailedcancelledupdated_atstring<date-time>requiredA UTC time in RFC 3339 form.
invalid_request: The request does not match the contract.
errorErrorDetailrequiredShow propertiesHide properties
codestringrequiredA stable, machine-readable code. Known codes: env_name_refused, file_not_found, file_too_large, idempotency_mismatch, image_not_built, in_progress, internal_error, invalid_request, lane_limit, name_in_use, not_found, payload_too_large, resources_over_cap, region_mismatch, sandbox_stopped, unavailable, store_prefix_refused, store_unavailable, unauthorized. New codes may be added, so treat an unknown one by its HTTP status.
messagestringrequiredA sentence for a person. Do not parse it.
request_idstringrequiredThe same value as the X-Request-Id header.
unauthorized: The API key is missing, unknown or revoked.
errorErrorDetailrequiredShow propertiesHide properties
codestringrequiredA stable, machine-readable code. Known codes: env_name_refused, file_not_found, file_too_large, idempotency_mismatch, image_not_built, in_progress, internal_error, invalid_request, lane_limit, name_in_use, not_found, payload_too_large, resources_over_cap, region_mismatch, sandbox_stopped, unavailable, store_prefix_refused, store_unavailable, unauthorized. New codes may be added, so treat an unknown one by its HTTP status.
messagestringrequiredA sentence for a person. Do not parse it.
request_idstringrequiredThe same value as the X-Request-Id header.
in_progress: A call with this Idempotency-Key is still running, or the sandbox is still being created. Retry later. idempotency_mismatch: The Idempotency-Key was used before with a different body.
errorErrorDetailrequiredShow propertiesHide properties
codestringrequiredA stable, machine-readable code. Known codes: env_name_refused, file_not_found, file_too_large, idempotency_mismatch, image_not_built, in_progress, internal_error, invalid_request, lane_limit, name_in_use, not_found, payload_too_large, resources_over_cap, region_mismatch, sandbox_stopped, unavailable, store_prefix_refused, store_unavailable, unauthorized. New codes may be added, so treat an unknown one by its HTTP status.
messagestringrequiredA sentence for a person. Do not parse it.
request_idstringrequiredThe same value as the X-Request-Id header.
internal_error: The platform failed. A retry may succeed; for a call that creates or writes, retry with the same Idempotency-Key.
errorErrorDetailrequiredShow propertiesHide properties
codestringrequiredA stable, machine-readable code. Known codes: env_name_refused, file_not_found, file_too_large, idempotency_mismatch, image_not_built, in_progress, internal_error, invalid_request, lane_limit, name_in_use, not_found, payload_too_large, resources_over_cap, region_mismatch, sandbox_stopped, unavailable, store_prefix_refused, store_unavailable, unauthorized. New codes may be added, so treat an unknown one by its HTTP status.
messagestringrequiredA sentence for a person. Do not parse it.
request_idstringrequiredThe same value as the X-Request-Id header.
unavailable: A service behind the API could not be reached. Retry after a short wait; for a call that creates or writes, with the same Idempotency-Key.
errorErrorDetailrequiredShow propertiesHide properties
codestringrequiredA stable, machine-readable code. Known codes: env_name_refused, file_not_found, file_too_large, idempotency_mismatch, image_not_built, in_progress, internal_error, invalid_request, lane_limit, name_in_use, not_found, payload_too_large, resources_over_cap, region_mismatch, sandbox_stopped, unavailable, store_prefix_refused, store_unavailable, unauthorized. New codes may be added, so treat an unknown one by its HTTP status.
messagestringrequiredA sentence for a person. Do not parse it.
request_idstringrequiredThe same value as the X-Request-Id header.