Skip to navigation

Create a plan of tasks

Beta

Create up to 15 tasks in one call, with which of them wait on which: each item is a new task’s fields, an optional key (its own name in the plan) and needs (other items’ keys, or tasks that already exist, by T-number or asset id). The plan is checked whole before anything is created: a bad field, a key used twice, a loop, a task in needs the caller cannot open, or anything creating one of the tasks alone would refuse, refuses the plan and names the item. Tasks are then created one at a time, each with what it waits on, and a plan cannot be undone as a whole: one that stops part way answers partly_created with the tasks that exist. Send an idempotency key (in the body, or as the Idempotency-Key header) so that a retry within 24 hours creates only what is missing and answers the same tasks.

Authentication

X-API-KEYstring
API Key authentication via header

Headers

X-Athena-Session-CredentialstringOptional
Idempotency-Keystring or nullOptional1-64 characters

Optional caller-chosen key that makes the plan safe to retry (1 to 64 letters, digits, - or _); the same as idempotency_key in the body.

Request

This endpoint expects an object.
taskslist of objectsRequired
The tasks to create, 1 to 15. Give each one another needs a key, and say what each waits on in needs.
workspace_idstringRequired<=128 characters

The workspace to create them in; the caller must be a member.

idempotency_keystring or nullOptional<=64 characters

Your own name for this plan (1 to 64 letters, digits, - or _), also taken as the Idempotency-Key header. Sending the same key and the same tasks again within 24 hours creates nothing twice and answers the same tasks, so always send one and reuse it when a call fails or stops part way.

parent_folder_idstring or nullOptional<=128 characters

A folder or project to put every task of the plan in; needs edit access there.

Response

The plan’s tasks: created, answered again for a repeated key, or partly_created with what exists and why it stopped.

countinteger
How many of the plan's tasks exist.
created_nowinteger
How many of them this call created.
resultenum

created: every task of the plan exists. partly_created: the plan stopped part way, and nothing it created was undone.

Allowed values:
stoppedstring or null

With partly_created: which item was not created, why, and how to finish the plan.

taskslist of objects
Every item, in the order sent.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
503
Service Unavailable Error