Skip to main content
Version: 8.8 (unreleased)

Assign a task

PATCH 

http://localhost:8080/v1/tasks/:taskId/assign

Assign a task with taskId to assignee or the active user. Returns the task.

Request​

Path Parameters

    taskId stringrequired

    The ID of the task.

Body

When using REST API with JWT authentication token following request body parameters may be used.

    assigneestring

    When using a JWT token, the assignee parameter is NOT optional when called directly from the API. The system will not be able to detect the assignee from the JWT token, therefore the assignee parameter needs to be explicitly passed in this instance.

    allowOverrideAssignmentboolean

    When true the task that is already assigned may be assigned again. Otherwise the task must be first unassigned and only then assigned again.

    Default value: true

Responses​

On success returned.

Schema
    idstring

    The unique identifier of the task.

    namestring

    The name of the task.

    taskDefinitionIdstring

    User task ID from the BPMN definition.

    processNamestring

    The name of the process.

    creationDatestring

    When was the task created (renamed equivalent of Task.creationTime field).

    completionDatestring

    When was the task completed (renamed equivalent of Task.completionTime field).

    assigneestring

    The username/id of who is assigned to the task.

    taskStatestring

    The state of the task.

    Possible values: [CREATED, COMPLETED, CANCELED, FAILED]

    formKeystring

    Reference to the task form.

    formIdstring

    Reference to the ID of a deployed form. If the form is not deployed, this property is null.

    formVersionint64

    Reference to the version of a deployed form. If the form is not deployed, this property is null.

    isFormEmbeddedboolean

    Is the form embedded for this task? If there is no form, this property is null.

    processDefinitionKeystring

    Reference to process definition (renamed equivalent of Task.processDefinitionId field).

    processInstanceKeystring

    Reference to process instance id (renamed equivalent of Task.processInstanceId field).

    tenantIdstring

    The tenant ID associated with the task.

    dueDatedate-time

    The due date for the task.

    followUpDatedate-time

    The follow-up date for the task.

    candidateGroupsstring[]

    The candidate groups for the task.

    candidateUsersstring[]

    The candidate users for the task.

    implementationstring

    Possible values: [JOB_WORKER, ZEEBE_USER_TASK]

    priorityinteger

    The priority of a user task. The higher the value the higher the priority. Applicable only for job worker-based user tasks managed by Camunda.

    Possible values: >= 0 and <= 100

    Default value: 50

Authorization: TASKLIST-SESSION

name: TASKLIST-SESSIONtype: apiKeydescription: Cookie-based authentication is only available on Self-Managed clusters.in: cookie
name: bearer-keytype: httpscheme: bearerbearerFormat: JWT
curl -L -X PATCH 'http://localhost:8080/v1/tasks/:taskId/assign' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TASKLIST-SESSION>' \
-d '{
"assignee": "string",
"allowOverrideAssignment": true
}'
Request Collapse all
Base URL
http://localhost:8080
Auth
Parameters
— pathrequired
Body
{
"assignee": "string",
"allowOverrideAssignment": true
}