Tasks_PublishTask
const url = 'https://dev-api.qualiastudios.dev/v1/accounts/example/tasks/example:publish';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"name":"example","etag":"example","note":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://dev-api.qualiastudios.dev/v1/accounts/example/tasks/example:publish \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "name": "example", "etag": "example", "note": "example" }'Validates the draft and publishes it as the next immutable revision. (— api-linter: core::0136::response-message-name=disabled aip.dev/not-precedent: publishing creates the revision it returns. —) FAILED_PRECONDITION names what is missing; publishing a draft identical to the newest revision is refused too.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The account id.
The task id.
Request Body required
Section titled “Request Body required ”Request for Tasks.PublishTask.
object
Accounts/{account}/tasks/{task}
The task’s etag as read; publishing refuses (ABORTED) a draft that changed since, so what was reviewed is what is published.
What changed, for the revision history. At most 1000 characters.
Example generated
{ "name": "example", "etag": "example", "note": "example"}Responses
Section titled “ Responses ”OK
A published, immutable task specification. Episodes judged and evals scored against a task cite one of these, so results stay comparable: a revision never changes once written.
object
Accounts/{account}/tasks/{task}/revisions/{revision}
1, 2, 3, … in publishing order.
The task’s display name when it was published.
The specification, exactly as published.
object
What the robot should do, in ordinary language. Required to publish.
The scene the task runs in: the workspace, the objects that matter, how things start and what varies between episodes.
The steps of the task in order, one per line, e.g. “pick a box from the tray”.
How success shows: what has to be true, or seen happening, for an episode to succeed. Required to publish.
How it fails: the ways the task goes wrong, and what looks like a failure but is fine.
The task as a state machine of steps and transitions, beside the prose. Optional; when it has steps, publishing checks that it is well formed.
object
The steps. Step ids are the stable names judgments, subtask labels and progress report against. At most 64.
A state of the task: its start, an action, a recovery, or an outcome it ends in.
object
Stable within the procedure, e.g. “place_box”: given by the editor when the step is made and not changed after. 1 to 64 lowercase letters, digits or ’_’, starting with a letter. Unique within the procedure.
What the step is.
The step in one line, as it observably holds: what an action or
recovery gets done (e.g. “place the box upright on the shelf”), what an
outcome looks like. At most 200 characters. Needed to publish, except on
the start and on a step that stands for a task (task), which is named
by the task.
An action that is a whole other task of the same account,
accounts/{account}/tasks/{task}. In a draft it means that task’s newest
published revision; publishing pins it, so a revision’s steps name
accounts/{account}/tasks/{task}/revisions/{revision}. A task never
contains itself, directly or through others. Such a step takes its name
from the task and leaves description empty.
The fewest times an action (or recovery) happens in a successful
attempt: 0 or more; 0 makes it optional, e.g. a step only some attempts
need. With both counts unset the step is not counted: checks report how
often it happened and never flag it. Checks enforce a count only when
count_set names the person who set it.
The most times an action (or recovery) happens in a successful attempt,
e.g. 4 box placements: 1 or more, and at least min_count. Unset is no
limit. Exactly N is both N; up to N is max_count N alone.
What observably sets a recovery off (“When”), e.g. “the box slips in the gripper”. Only a recovery has triggers, and it needs one to publish. At most 16, each 1 to 500 characters.
Conditions that observably hold at this step. At most 16; each needs text to publish and may also name a numeric condition. Not on START.
An observable condition at a procedure step, optionally expressed as a number.
object
What must hold, in 1 to 500 characters. Needed to publish.
A numeric form of the condition, when it can be measured. Only a person
writes one: it publishes only with numeric_set.
object
The metric name: 1 to 64 lowercase letters, digits, ’_’ or ’.’, starting with a letter.
The comparison: lt, le, gt, ge, eq or between.
The comparison value, or the lower value for between.
The upper value, greater than value. Set if and only if op is between.
The person who set numeric to its current value. Written only by the
server, from UpdateTaskRequest.person_set. It follows the numeric form
within its step and is cleared when that form changes without it.
object
The person, always kind PERSON, with user and display_name as at
the time.
object
What kind of actor it is.
The person’s user id when kind is PERSON; empty otherwise.
The person’s display name at the time, for rendering without a lookup.
The rule code, or the model id (e.g. “gemini-robotics-er”), when not a person.
The run a model or rule finding came from, when it has one.
The API key’s id when a person acted through one; empty for a session. Never the key itself.
Signed identity evidence recorded with the change, kept apart from the principal above. Unset on older records and wherever none was signed.
object
How the principal authenticated.
The user id of a person verified as starting the work: the person of a session, or the person a trusted service’s signed job record names. Empty when nobody was verified.
The initiator’s display name at the time, never their email.
The user id of the key’s creator at the time. Not who used the key.
Who owned the key at the time.
The owning space’s id (a workspace or the organization) when
credential_owner is SPACE.
When they set it.
Lowercase hex sha256 of the value. For counts:
“count:<min_count>:<max_count>”, each empty when unset. For a numeric
condition: “numeric:
Metric limits for this step. At most 8. Not on START.
Inclusive limits for a measured metric at a procedure step.
object
The metric name: 1 to 64 lowercase letters, digits, ’_’ or ’.’, starting with a letter.
The lower limit. At least one of min and max is needed to publish.
The upper limit, at least min when both are set.
The person who set min_count and max_count to their current values.
Written only by the server, from UpdateTaskRequest.person_set; cleared
when either count, the kind or task changes without it. Unset means the
counts are not enforced, whatever they are.
object
The person, always kind PERSON, with user and display_name as at
the time.
object
What kind of actor it is.
The person’s user id when kind is PERSON; empty otherwise.
The person’s display name at the time, for rendering without a lookup.
The rule code, or the model id (e.g. “gemini-robotics-er”), when not a person.
The run a model or rule finding came from, when it has one.
The API key’s id when a person acted through one; empty for a session. Never the key itself.
Signed identity evidence recorded with the change, kept apart from the principal above. Unset on older records and wherever none was signed.
object
How the principal authenticated.
The user id of a person verified as starting the work: the person of a session, or the person a trusted service’s signed job record names. Empty when nobody was verified.
The initiator’s display name at the time, never their email.
The user id of the key’s creator at the time. Not who used the key.
Who owned the key at the time.
The owning space’s id (a workspace or the organization) when
credential_owner is SPACE.
When they set it.
Lowercase hex sha256 of the value. For counts:
“count:<min_count>:<max_count>”, each empty when unset. For a numeric
condition: “numeric:
How steps follow each other, each from one step to another; nothing is implied. A failure outcome that can happen at several steps has a transition from each. At most 256.
A move from one step to another.
object
The step it leaves, by id.
The step it enters, by id.
The signed-in person whose edit wrote these steps and transitions.
Written only by the server, on any UpdateTask from such a person that
changes them. An API key’s change or a new proposal from preparation
clears it. Unset on a draft, the step-order check reads uncertain instead
of failing a take. It is left out of content_hash.
object
The person, always kind PERSON, with user and display_name as at
the time.
object
What kind of actor it is.
The person’s user id when kind is PERSON; empty otherwise.
The person’s display name at the time, for rendering without a lookup.
The rule code, or the model id (e.g. “gemini-robotics-er”), when not a person.
The run a model or rule finding came from, when it has one.
The API key’s id when a person acted through one; empty for a session. Never the key itself.
Signed identity evidence recorded with the change, kept apart from the principal above. Unset on older records and wherever none was signed.
object
How the principal authenticated.
The user id of a person verified as starting the work: the person of a session, or the person a trusted service’s signed job record names. Empty when nobody was verified.
The initiator’s display name at the time, never their email.
The user id of the key’s creator at the time. Not who used the key.
Who owned the key at the time.
The owning space’s id (a workspace or the organization) when
credential_owner is SPACE.
When they set it.
Lowercase hex sha256 of the value. For counts:
“count:<min_count>:<max_count>”, each empty when unset. For a numeric
condition: “numeric:
The version of the TaskSpec schema it was written with. Readers reject a version they do not know rather than guess.
Sha256 of the spec’s canonical JSON: two revisions with one hash say the same thing, and a run can pin the content it read.
What changed, in the publisher’s words.
Who published it.
object
What kind of actor it is.
The person’s user id when kind is PERSON; empty otherwise.
The person’s display name at the time, for rendering without a lookup.
The rule code, or the model id (e.g. “gemini-robotics-er”), when not a person.
The run a model or rule finding came from, when it has one.
The API key’s id when a person acted through one; empty for a session. Never the key itself.
Signed identity evidence recorded with the change, kept apart from the principal above. Unset on older records and wherever none was signed.
object
How the principal authenticated.
The user id of a person verified as starting the work: the person of a session, or the person a trusted service’s signed job record names. Empty when nobody was verified.
The initiator’s display name at the time, never their email.
The user id of the key’s creator at the time. Not who used the key.
Who owned the key at the time.
The owning space’s id (a workspace or the organization) when
credential_owner is SPACE.
When it was published.
Example
{ "spec": { "procedure": { "steps": [ { "kind": "KIND_UNSPECIFIED", "stateChecks": [ { "numericSet": { "actor": { "kind": "KIND_UNSPECIFIED", "attribution": { "authentication": "AUTHENTICATION_UNSPECIFIED", "credentialOwner": "CREDENTIAL_OWNER_UNSPECIFIED" } } } } ], "countSet": { "actor": { "kind": "KIND_UNSPECIFIED", "attribution": { "authentication": "AUTHENTICATION_UNSPECIFIED", "credentialOwner": "CREDENTIAL_OWNER_UNSPECIFIED" } } } } ], "procedureSet": { "actor": { "kind": "KIND_UNSPECIFIED", "attribution": { "authentication": "AUTHENTICATION_UNSPECIFIED", "credentialOwner": "CREDENTIAL_OWNER_UNSPECIFIED" } } } } }, "publisher": { "kind": "KIND_UNSPECIFIED", "attribution": { "authentication": "AUTHENTICATION_UNSPECIFIED", "credentialOwner": "CREDENTIAL_OWNER_UNSPECIFIED" } }}default
Section titled “default ”Default error response
The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.
object
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
A list of messages that carry the error details. There is a common set of message types for APIs to use.
Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
object
The type of the serialized message.
Example generated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}