import requests
url = "https://api.13-215-85-171.sslip.io/v1/templates/builds/{build_id}/retry"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.13-215-85-171.sslip.io/v1/templates/builds/{build_id}/retry \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"build_id": "<string>",
"template_id": "<string>",
"name": "<string>",
"tags": [
"<string>"
],
"status": "waiting",
"build_backend": "native",
"source_type": "declarative",
"canonical_ref": "<string>",
"namespace_slug": "<string>",
"visibility": "private",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"source_digest": "<string>",
"context_digest": "<string>",
"dockerfile_digest": "<string>",
"build_config": {
"vcpus": 123,
"memory_mib": 123,
"internet_access": true,
"disk_mb": 513
},
"triggered_by": "<string>",
"queued_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"failure_phase": "<string>",
"cache_summary": {
"final_artifact_hits": 123,
"final_artifact_misses": 123,
"final_artifact_bypasses": 123,
"final_artifact_stores": 123,
"layer_hits": 123,
"layer_misses": 123,
"layer_bypasses": 123,
"layer_stores": 123,
"file_blob_hits": 123,
"file_blob_misses": 123,
"file_blob_bypasses": 123,
"file_blob_stores": 123
},
"artifact_availability": {
"status": "available",
"reason": "<string>"
},
"promotability": {
"status": "promotable",
"promotable": true,
"reason": "<string>"
},
"retention_expires_at": "2023-11-07T05:31:56Z",
"runtime_defaults": {
"default_env_keys": [
"<string>"
],
"start_cmd": "<string>",
"default_user": "<string>",
"default_workdir": "<string>",
"readiness": {
"kind": "tcp",
"port": 3000,
"timeout_secs": 30,
"interval_ms": 500,
"startup_grace_secs": 2
}
},
"oci_metadata": {
"labels": {},
"exposed_ports": [
"<string>"
],
"volumes": [
"<string>"
],
"healthcheck": {
"test": [
"<string>"
],
"interval_ns": 123,
"timeout_ns": 123,
"start_period_ns": 123,
"retries": 123,
"mapped_readiness": {
"kind": "tcp",
"port": 3000,
"timeout_secs": 30,
"interval_ms": 500,
"startup_grace_secs": 2
}
}
},
"artifact_ids": [
"<string>"
],
"retry_of_build_id": "<string>",
"original_build_id": "<string>",
"cancel_requested_at": "2023-11-07T05:31:56Z",
"cancel_requested_by": "<string>",
"cancellation_reason": "<string>",
"error": "<string>",
"error_detail": {
"code": "unauthorized",
"message": "<string>",
"phase": "auth",
"retryable": true,
"suggested_action": "<string>",
"step_index": 123,
"attempt": 123,
"max_attempts": 123,
"cache_subject": "<string>",
"build_id": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": "<string>",
"code": "invalid_request",
"error_detail": {
"code": "unauthorized",
"message": "<string>",
"phase": "auth",
"retryable": true,
"suggested_action": "<string>",
"step_index": 123,
"attempt": 123,
"max_attempts": 123,
"cache_subject": "<string>",
"build_id": "<string>",
"request_id": "<string>",
"details": {}
},
"request_id": "<string>",
"build_id": "<string>"
}{
"error": "Missing or invalid bearer credential",
"code": "unauthorized",
"request_id": "req_123"
}{
"error": "<string>",
"code": "invalid_request",
"error_detail": {
"code": "unauthorized",
"message": "<string>",
"phase": "auth",
"retryable": true,
"suggested_action": "<string>",
"step_index": 123,
"attempt": 123,
"max_attempts": 123,
"cache_subject": "<string>",
"build_id": "<string>",
"request_id": "<string>",
"details": {}
},
"request_id": "<string>",
"build_id": "<string>"
}{
"error": "<string>",
"code": "invalid_request",
"error_detail": {
"code": "unauthorized",
"message": "<string>",
"phase": "auth",
"retryable": true,
"suggested_action": "<string>",
"step_index": 123,
"attempt": 123,
"max_attempts": 123,
"cache_subject": "<string>",
"build_id": "<string>",
"request_id": "<string>",
"details": {}
},
"request_id": "<string>",
"build_id": "<string>"
}Retry a template build from its persisted definition
Starts a new build attempt from the sanitized persisted build definition. Builds that used private base-image credentials require fresh base_image_auth; inline build context bytes are not persisted and must have reusable blob references to be retryable.
import requests
url = "https://api.13-215-85-171.sslip.io/v1/templates/builds/{build_id}/retry"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.13-215-85-171.sslip.io/v1/templates/builds/{build_id}/retry \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'{
"build_id": "<string>",
"template_id": "<string>",
"name": "<string>",
"tags": [
"<string>"
],
"status": "waiting",
"build_backend": "native",
"source_type": "declarative",
"canonical_ref": "<string>",
"namespace_slug": "<string>",
"visibility": "private",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"source_digest": "<string>",
"context_digest": "<string>",
"dockerfile_digest": "<string>",
"build_config": {
"vcpus": 123,
"memory_mib": 123,
"internet_access": true,
"disk_mb": 513
},
"triggered_by": "<string>",
"queued_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"duration_ms": 123,
"failure_phase": "<string>",
"cache_summary": {
"final_artifact_hits": 123,
"final_artifact_misses": 123,
"final_artifact_bypasses": 123,
"final_artifact_stores": 123,
"layer_hits": 123,
"layer_misses": 123,
"layer_bypasses": 123,
"layer_stores": 123,
"file_blob_hits": 123,
"file_blob_misses": 123,
"file_blob_bypasses": 123,
"file_blob_stores": 123
},
"artifact_availability": {
"status": "available",
"reason": "<string>"
},
"promotability": {
"status": "promotable",
"promotable": true,
"reason": "<string>"
},
"retention_expires_at": "2023-11-07T05:31:56Z",
"runtime_defaults": {
"default_env_keys": [
"<string>"
],
"start_cmd": "<string>",
"default_user": "<string>",
"default_workdir": "<string>",
"readiness": {
"kind": "tcp",
"port": 3000,
"timeout_secs": 30,
"interval_ms": 500,
"startup_grace_secs": 2
}
},
"oci_metadata": {
"labels": {},
"exposed_ports": [
"<string>"
],
"volumes": [
"<string>"
],
"healthcheck": {
"test": [
"<string>"
],
"interval_ns": 123,
"timeout_ns": 123,
"start_period_ns": 123,
"retries": 123,
"mapped_readiness": {
"kind": "tcp",
"port": 3000,
"timeout_secs": 30,
"interval_ms": 500,
"startup_grace_secs": 2
}
}
},
"artifact_ids": [
"<string>"
],
"retry_of_build_id": "<string>",
"original_build_id": "<string>",
"cancel_requested_at": "2023-11-07T05:31:56Z",
"cancel_requested_by": "<string>",
"cancellation_reason": "<string>",
"error": "<string>",
"error_detail": {
"code": "unauthorized",
"message": "<string>",
"phase": "auth",
"retryable": true,
"suggested_action": "<string>",
"step_index": 123,
"attempt": 123,
"max_attempts": 123,
"cache_subject": "<string>",
"build_id": "<string>",
"request_id": "<string>",
"details": {}
}
}{
"error": "<string>",
"code": "invalid_request",
"error_detail": {
"code": "unauthorized",
"message": "<string>",
"phase": "auth",
"retryable": true,
"suggested_action": "<string>",
"step_index": 123,
"attempt": 123,
"max_attempts": 123,
"cache_subject": "<string>",
"build_id": "<string>",
"request_id": "<string>",
"details": {}
},
"request_id": "<string>",
"build_id": "<string>"
}{
"error": "Missing or invalid bearer credential",
"code": "unauthorized",
"request_id": "req_123"
}{
"error": "<string>",
"code": "invalid_request",
"error_detail": {
"code": "unauthorized",
"message": "<string>",
"phase": "auth",
"retryable": true,
"suggested_action": "<string>",
"step_index": 123,
"attempt": 123,
"max_attempts": 123,
"cache_subject": "<string>",
"build_id": "<string>",
"request_id": "<string>",
"details": {}
},
"request_id": "<string>",
"build_id": "<string>"
}{
"error": "<string>",
"code": "invalid_request",
"error_detail": {
"code": "unauthorized",
"message": "<string>",
"phase": "auth",
"retryable": true,
"suggested_action": "<string>",
"step_index": 123,
"attempt": 123,
"max_attempts": 123,
"cache_subject": "<string>",
"build_id": "<string>",
"request_id": "<string>",
"details": {}
},
"request_id": "<string>",
"build_id": "<string>"
}Authorizations
API key passed as Bearer token
Path Parameters
Body
Optional replacement tags for the retry attempt.
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Fresh request-time BuildKit registry credentials for this retry.
Show child attributes
Show child attributes
Fresh request-time BuildKit secret values for this retry. When the original build used secrets, the retry must provide the same secret IDs again; historical request-time values are not replayed.
Show child attributes
Show child attributes
Response
Retry build accepted
waiting, building, ready, error, cancelled Template build backend. native is retained for declarative/OCI build requests and historical filters; Dockerfile build requests use buildkit.
native, buildkit declarative, dockerfile, oci_import, template_base private, public Build VM resource configuration
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Effective runtime defaults retained for a built template. Environment values are intentionally omitted; only keys are exposed.
Show child attributes
Show child attributes
OCI image metadata retained from Dockerfile or OCI imports. Volume declarations are metadata only and do not create persistent Nullspace volumes.
Show child attributes
Show child attributes
Show child attributes
Show child attributes