Skip to navigation

Save a version

View as Markdown

Compiles the procedure and saves it as the next version. The first version of a Machine creates the Machine and is published. A procedure with errors gives 400 procedure_invalid. A save of the same procedure and tools as the latest version answers 200 with that version. Needs the scopes machines and machines:write.

Authentication

AuthorizationBearer

An API key (crk_), an exchanged token (crt_) or a JWT of a trusted issuer. The credential needs the scope of the capability. Read the description of each route.

Path parameters

namestringRequired

The Machine name: lowercase letters, digits and hyphens.

Request

This endpoint expects an object.
proceduremap from strings to anyRequired

Only with include=procedure.

toolslist of objects or objectRequired

The tools of the procedure: a list, or an object with tools.

descriptionstringOptional<=1000 characters
A text for people.
publishbooleanOptional
True to publish the new version. The first version is always published.
base_versionintegerOptional0-9007199254740991

The latest version that you read. Another latest version gives 409 version_conflict.

strictbooleanOptional
True to treat each warning as an error.

Response headers

x-request-idstringOptional

The id of the request: req_ and a ULID. Every answer has it.

server-timingstringOptional
The time of the admission.
x-ratelimit-limit-requestsstringOptional
The size of the request bucket, per minute.
x-ratelimit-remaining-requestsstringOptional
The requests that remain.
x-ratelimit-reset-requestsstringOptional
The time until the request bucket is full.
x-ratelimit-limit-unitsstringOptional
The size of the units bucket, per minute. Absent when no limit applies.
x-ratelimit-remaining-unitsstringOptional
The units that remain.
x-ratelimit-reset-unitsstringOptional
The time until the units bucket is full.

Response

The latest version had the same content.
object"machine_version"
namestring
versioninteger1-9007199254740991
publishedboolean
ir_hashstring
source_hashstring
compilerstring
inputsmap from strings to any
The declared inputs and their schemas.
caller_toolslist of objects
warningslist of objects
created_atdatetime
created_bystring

key:<id> or token:<id>.

proceduremap from strings to anyOptional

Only with include=procedure.

toolslist of anyOptional

Only with include=tools.

iranyOptional

The compiled program. Only with include=ir.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error