Create a version
POST
/v1/algorithms/{algorithmId}/versionscurl -X POST 'https://api.embodiflow.io/v1/algorithms/{algorithmId}/versions' \
-H 'Authorization: Bearer $EMBODIFLOW_PAT' \
-H 'Content-Type: application/json' \
-d '{
"source": "string",
"requirements": [
"string"
],
"version": "string",
"image": {
"ref": "string",
"entrypoint": [
"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
- sourcestring
- requirementsarray<string>
- versionstring
- imageobject
- refstringrequired
- entrypointarray<string>
Responses
The saved version, with its frozen `manifest` and (Python) `sourceCode`. A save whose interface and code equal the latest usable version writes nothing and also answers 201, with the stored version and `meta.unchanged: true`.
- dataobjectrequired
- packageobjectrequired
- manifestobjectrequired
- sourcestringrequiredAllowed valuespythonimage
- sourceCodestring | nullrequired
- requirementsarray<string>required
- idstringrequired
- algorithmIdstringrequired
- versionstringrequired
- revisionnumberrequired
- imageRefstringrequired
- imageDigeststring | nullrequired
- interfaceHashstringrequired
- bumpWarningobject | nullrequired
- imageCommandarray<string>required
- deprecatedAtstring | nullrequired
- disabledAtstring | nullrequired
- createdAtstringrequired
- buildobject
- metaobject
- unchangedbooleanrequiredAllowed valuestrue
Response example
{
"data": {
"package": {},
"manifest": {},
"source": "python",
"sourceCode": "string",
"requirements": [
"string"
],
"id": "string",
"algorithmId": "string",
"version": "string",
"revision": 0,
"imageRef": "string",
"imageDigest": "string",
"interfaceHash": "string",
"bumpWarning": {},
"imageCommand": [
"string"
],
"deprecatedAt": "string",
"disabledAt": "string",
"createdAt": "string",
"build": {
"buildId": "string",
"state": "queued",
"reason": "pip_resolution",
"startedAt": "string",
"finishedAt": "string"
}
},
"meta": {
"unchanged": true
}
}Servershttps://api.embodiflow.io/v1https://api.embodiflow.dev/v1