Create a build
POST
/v1/algorithms/{algorithmId}/buildscurl -X POST 'https://api.embodiflow.io/v1/algorithms/{algorithmId}/builds' \
-H 'Authorization: Bearer $EMBODIFLOW_PAT' \
-H 'Content-Type: application/json' \
-d '{
"kind": "cloud_build",
"version": "string",
"contentLength": 0,
"git": {
"url": "string",
"ref": "string",
"secretName": "string"
}
}'Authorization
Send a personal access token with every request.
- Authorization: Bearer PAT
Path parameters
- algorithmIdstringrequired
Header parameters
- Idempotency-Keystring
Optional idempotency key, at most 255 characters (UUIDv4 recommended). A repeated key returns the first response byte-for-byte, including a 5xx. The same key with a different body, or a second in-flight request, returns 409 IDEMPOTENCY_CONFLICT. Keys are unique per tenant and retained for 24 hours.
Request body
Content-Typeapplication/json
- kindstringrequiredAllowed valuescloud_buildarchive_import
- versionstring | null
- contentLengthnumber | null
- gitobject | null
- urlstringrequired
- refstringrequired
- secretNamestring
Responses
Build accepted; poll GET for state
- dataobjectrequired
- sourceRefone ofrequired
- uploadobject
- logsobject
- logTailstring
- idstringrequired
- algorithmDefinitionIdstringrequired
- versionstring | nullrequired
- kindstringrequiredAllowed valuescloud_buildarchive_import
- statestringrequiredAllowed valuesqueuedrunningsucceededfailedcancelled
- imageDigeststring | nullrequired
- logObjectKeystring | nullrequired
- errorMessagestring | nullrequired
- durationSnumber | nullrequired
- algorithmRevisionIdstring | null
- cacheKeystring | null
- failureReasonstring | nullAllowed valuespip_resolutiontimeoutsubmit_failedbuild_failed
- createdAtstringrequired
- updatedAtstringrequired
Response example
{
"data": {
"sourceRef": {
"type": "archive",
"objectKey": "string"
},
"upload": {
"url": "string",
"objectKey": "string",
"expiresAt": "string"
},
"logs": {
"url": "string",
"expiresAt": "string"
},
"logTail": "string",
"id": "string",
"algorithmDefinitionId": "string",
"version": "string",
"kind": "cloud_build",
"state": "queued",
"imageDigest": "string",
"logObjectKey": "string",
"errorMessage": "string",
"durationS": 0,
"algorithmRevisionId": "string",
"cacheKey": "string",
"failureReason": "pip_resolution",
"createdAt": "string",
"updatedAt": "string"
}
}Servershttps://api.embodiflow.io/v1https://api.embodiflow.dev/v1