Skip to main content
POST
Move a factory task to another status
The reference panel describes the current v3 operation. The notes below describe its v2 compatibility API. Follow the v3 request schema for current calls: v3 can move identifiers from the body or query into the URL. Keep the v2 method, path, and payload together when using the compatibility API.

v2 compatibility notes

POST /api/v2/factories/transitionTask moves a task to the status to and answers the updated FactoryTaskDetail. A move must follow the task state machine Console uses. A move it does not allow is 400 with The task cannot move to that status. Pass expectedStatus from your last read to refuse a stale move. If the task’s status is no longer that, the answer is 409 conflict and nothing is written. The task must belong to a factory you may read; otherwise the answer is 404 resource_missing. You need factories:manage at the task’s home (its factory’s org unit). Without it the answer is 403 with requiredPermission: "factories:manage". Moving a task schedules nothing and starts no factory work.

Authorizations

Authorization
string
header
required

An External App: the JWT it obtains from POST /oauth/token with OAuth2 client_credentials. Pass as Authorization: Bearer <jwt>. An app's static companion key also authenticates as the app, but is deprecated and is not protected by Idempotency-Key.

Headers

Idempotency-Key
string

Path Parameters

taskId
string
required
Minimum string length: 1

Body

application/json
to
enum<string>
required
Available options:
ICEBOX,
BACKLOG,
READY,
ASSIGNED,
IN_PROGRESS,
BLOCKED,
IN_REVIEW,
COMPLETE,
CANCELLED
expectedStatus
enum<string>

The status you last read; a different current status answers 409 conflict.

Available options:
ICEBOX,
BACKLOG,
READY,
ASSIGNED,
IN_PROGRESS,
BLOCKED,
IN_REVIEW,
COMPLETE,
CANCELLED

Response

The task as written

data
object
required

A factory task with its description (null when it has none). Tasks are written with createTask, updateTask, assignTask and transitionTask; starting factory work is done by a person in Console.

meta
object
required