Migrate to the Camunda 8 API
This document offers a comprehensive guide to migrate from Camunda's V1 component REST APIs (the Tasklist REST API, for example) to the V2 Camunda 8 REST API.
Camunda is streamlining the developer experience by creating a unified REST API for Zeebe, Operate, Tasklist, and the Identity components with endpoint parity. This will be a single REST API for the orchestration cluster for a consistent and intuitive API experience to help your teams develop process automation solutions faster.
The Administration and Web Modeler APIs will not be part of the Camunda 8 REST API, as these are platform APIs outside the cluster’s scope.
Over time, there will be a deprecation process for the individual component APIs starting with the former Operate and Tasklist APIs. These will continue to be in the product for the short-term, but it is recommended to begin the adoption of the new API. In addition, we will begin to deprecate several Zeebe gPRC endpoints as well. See the official blog announcement.
This guide considers all public endpoints existing in the component REST APIs and the Camunda 8 API counterparts or required migration changes.
General endpoint changes
- All endpoints
- Endpoints querying for data
- The new API can be found at
<cluster>/v2/…>
instead of<cluster>/v1/…>
. - All endpoints are no longer separated by component concerns and all endpoints receive similar support. For example, process definitions, user tasks, and user authorizations were previously spread across separate Tasklist, Operate, and Identity APIs.
- Naming, response codes, and type handling have been streamlined for all endpoints to provide a consistent UX.
- Endpoints with similar concerns (variable search, for example) have been consolidated into single endpoints.
- Unified search request structure.
- Attributes
filter
,page
, andsort
on root level. - Endpoint-specific filter attributes in the filter object, not at the root level.
- Pagination information in the
page
object. For example, the attributesfrom
,limit
,searchBefore
, andsearchAfter
. - Sorting configuration in sort object array, each object containing the field name and order (descending or ascending).
- Attributes
- Unified search response structure.
- Attributes
items
andpage
on root level. - List of endpoint-specific response items in
items
attribute. - Page information in
page
attribute, for example the attributestotalItems
,firstSortValues
, andlastSortValues
to use insearchBefore
andsearchAfter
in follow-up requests.
- Attributes
Name changes and mappings
The following conventions apply to all attributes:
key
andid
fields contain the entity as a prefix, for example,userTaskKey
,processDefinitionId
. This applies when referencing other resources likeformKey
in the user task entity, in the respective entities themselves likeuserTaskKey
in the user task entity.- The full entity is the prefix to avoid confusion, for example
processDefinitionKey
instead ofprocessKey
(the latter could be interpreted as process instance or process definition). - Other attributes of entities themselves have no prefix to avoid clutter, for example version in the process definition entity. In other resources, they have to be referenced with a prefix, like
processDefinitionVersion
in the process instance entity. - The
bpmnProcessId
andprocessName
are now calledprocessDefinitionId
to be easily relatable to the process definition entity, like theprocessDefinitionKey
. - The
decisionKey
anddmnDecisionKey
are now aligned todecisionDefinitionKey
, thedecisionId
anddmnDecisionId
todecisionDefinitionId
. Similar to theprocessDefinitionId
being related to the process definition, those attributes are now easily relatable to the decision definition entity.
Tasklist API
Form
Get a form
- V1 endpoint:
GET /v1/forms/{formId}
- V2 endpoints:
GET /v2/user-tasks/{userTaskKey}/form
GET /v2/process-definitions/{processDefinitionKey}/form
- Input adjustments
- Output adjustments
- You cannot fetch forms directly anymore. Instead, fetch them by user task or process definition to get the respective form data.
- The respective endpoint only takes the key of the resource the form is related to as input parameter.
- Embedded forms are no longer returned as Camunda user tasks don't support them.
- Renamed atttibutes
id
- UseformKey
as this refers to the unique system identifier of the form.title
- UseformId
as this aligns better with the attribute defined in the form schema.
- Removed attributes
isDeleted
- The endpoint does not serve this information anymore.processDefinitionKey
- You can identify the related entity from the endpoint resource and the provided key parameter, the form response does not contain it additionally anymore.
Task
Save task draft variables
- V1 endpoint:
POST /v1/tasks/{taskId}/variables
- V2 endpoint: This feature is not supported in V2 anymore. Use setting variables as
local
to the user task'selementInstanceKey
as a replacement.
Search task variables
- V1 endpoint:
POST /v1/tasks/{taskId}/variables/search
- V2 endpoint:
POST /v2/user-tasks/{userTaskKey}/variables/search
- Input adjustments
- Output adjustments
- Request structure changes as outlined in general changes.
- Renamed attributes
variableNames
- Use thefilter
object'sname
, either with a plain string for one exact match or with{ "$in": [ "xyz", ... ]}
.
- Removed attributes
includeVariables
- The endpoint returns all variables associated with the user task.
- Response structure changes as outlined in general changes.
- Renamed attributes
id
- UsevariableKey
as this refers to the unique system identifier of the variable.value
- UsefullValue
as this represents the full variable value in case thevalue
is only a preview due to size constraints. If thevalue
is not a preview, thefullValue
is empty.previewValue
- Usevalue
as this always represents the variable value. This can be a preview value due to size constraints. In that case, thefullValue
contains the full variable value.isValueTruncated
- UseisTruncated
as a replacement
- Removed attributes
draft
- Draft variables are not supported in V2 anymore, see also the save draft variables endpoint for further details.
- Added attributes
scopeKey
- Variables belong to a specific scope, for example, the process instance or the element instance of a user task. This value represents the scope the variables is related to.processInstanceKey
- A variable belongs to process instance and this value represents the unique system identifier of that instance.tenantId
- Variables can belong to a dedicated tenant and this value represents the one it belongs to. See multi-tenancy for further details.
Search tasks
- V1 endpoint:
POST /v1/tasks/search
- V2 endpoint:
POST /v2/user-tasks/search
- Input adjustments
- Output adjustments
- Request structure changes as outlined in general changes.
- The
pageSize
is now thelimit
in thepage
object. - The
searchAfter
andsearchBefore
are in thepage
object. - The
searchAfterOrEqual
andsearchBeforeOrEqual
options do not exist.
- The
- Renamed attributes
taskDefinitionId
- UseelementId
as this refers to the user-provided identifier of the BPMN element that created the user task.followUpDate
anddueDate
filter options - Instead offrom
andto
, use$gte
and$lte
. Additionally, you can use new comparison filter options.priority
filter options - Filter object keys need a$
prefix. Additionally, you can use new comparison filter options like$neq
,$exists
, and$in
.
- Removed attributes
assigned
- Useassignee
with{ "$exists": false }
. Multiple filters can be combined in one attribute.assignees
- Useassignee
with{ "$in": [ "xyz", ... ] }
. Multiple filters can be combined in one attribute.candidateGroups
- UsecandidateGroup
with{ "$in": [ "xyz", ... ] }
.candidateUsers
- UsecandidateUser
with{ "$in": [ "xyz", ... ] }
.taskVariables
split up and renamed- You can define
localVariables
andprocessInstanceVariables
. - Local variables match the defined
name
andvalue
and exist in the local scope of the BPMN element instance that created the user task. - Process instance variables match the defined
name
andvalue
and exist anywhere in the process instance that the user task belongs to.
- You can define
tenantIds
- UsetenantId
with{ "$in": [ "xyz", ... ] }
.includeVariables
- The endpoint does not return variables. Use the search task variables endpoint to retrieve them.implementation
- The V2 API supports only Camunda user tasks.
- Added attributes
userTaskKey
- Filter for specific user tasks by their unique system identifiers.processDefinitionId
- Filter for user tasks by the user-provided unique identifier of the process.elementInstanceKey
- Find tasks by the unique system identifier of the instance of the BPMN element that created the user task.
- Response structure changes as outlined in general changes.
sortValues
do not exist per result item. Instead, thepage
object containsfirstSortValues
andlastSortValues
, referring to thesortValues
of the first and last item of the result set.
- Renamed attributes
id
- UseuserTaskKey
, this still refers to the unique system identifier of the user task.formKey
- This now is a unique system identifier, referencing a linked Camunda form in a specific version. Previously, this encoded an embedded form, a linked Camunda form, or an external form reference.taskDefinitionId
- UseelementId
, this still refers to the user-provided identifier of the BPMN element that created the user task.taskState
- Usestate
, this still refers to the user task's current state.processName
- UseprocessDefinitionId
, this still refers to the user-provided identifier of the process.
- Removed attributes
isFirst
- This used to identify if the task was the first in the process.variables
- Use the [search user task variables endpoint][] to retrieve variables for a user task.implementation
- The V2 API supports only Camunda user tasks.isFormEmbedded
- The V2 API does not support embedded forms anymore.formVersion
- Use the [get user task form endpoint][] to retrieve form data bound to this user task. TheformKey
references the form of a specificformId
, linked to this user task in a specific version.formId
- Use the [get user task form endpoint][] to retrieve form data bound to this user task. TheformKey
references the form of a specificformId
, linked to this user task in a specific version.
- Added attributes
customHeaders
- Any user-provided custom header values provided for the user task.externalFormReference
- The user-provided reference to an external form for the user task. Previously, theformKey
encoded this value.processDefinitionVersion
- The version of the process this user task belongs to.
Unassign user task
- V1 endpoint:
PATCH /v1/tasks/{taskId}/unassign
- V2 endpoint:
DELETE /v2/user-tasks/{userTaskKey}/assignee
- Input adjustments
- Output adjustments
- No input adjustments.
- Response object removed - The V2 API returns a 204 status, indicating that the task was unassigned. Fetching the updated data of the user task should be done through the respective API since the data can change concurrently at any time.
Complete user task
- V1 endpoint:
PATCH /v1/tasks/{taskId}/complete
- V2 endpoint:
POST /v2/user-tasks/{userTaskKey}/completion
- Input adjustments
- Output adjustments
- Adjusted attributes
variables
- Provide the variables as a proper JSON object instead of an array of objects with aname
and a serialized JSON stringvalue
.
- Added attributes
action
- Provide any custom lifecycle for this action or use the default value of"assign"
.
- Response object removed - The V2 API returns a 204 status, indicating that the task was completed. Fetching the updated data of the user task should be done through the respective API since the data can change concurrently at any time.
Assign user task
- V1 endpoint:
PATCH /v1/tasks/{taskId}/assign
- V2 endpoint:
POST /v2/user-tasks/{userTaskKey}/assignment
- Input adjustments
- Output adjustments
- Renamed attributes
allowOverrideAssignment
- UseallowOverride
, this still refers to allowing to override any existing assignee.
- Added attributes
action
- Provide any custom lifecycle for this action or use the default value of"assign"
.
- Response object removed - The V2 API returns a 204 status, indicating that the task was assigned. Fetching the updated data of the user task should be done through the respective API since the data can change concurrently at any time.
Get user task
- V1 endpoint:
GET /v1/tasks/{taskId}
- V2 endpoint:
GET /v2/user-tasks/{userTaskKey}
- Input adjustments
- Output adjustments
- No input adjustments.
- Except for the response structure changes, all adjustments from search tasks apply.