How to call the TaskList API-related APIs in Camunda 8.8 (unreleased)
Hi there! ![]()
Great question about TaskList APIs in Camunda 8.8! In version 8.8, you have two main options for working with TaskList APIs:
Option 1: Tasklist REST API (v1) - Still Available in 8.8
The Tasklist REST API v1 is deprecated in 8.8 and will be removed in 8.10, but it’s still fully functional in 8.8. You can use it for:
- Querying tasks
- Task assignment/unassignment
- Task completion
- Working with variables and forms
Authentication & Basic Usage:
For SaaS:
POST /v1/tasks/search
Authorization: Bearer <TOKEN>
Content-Type: application/json
{}
For Self-Managed (Camunda 8 Run):
Log in to get a session cookie, then include it on each request.
Common API Calls:
- Search tasks:
POST /v1/tasks/search - Get specific task:
GET /v1/tasks/{taskId} - Assign task:
PATCH /v1/tasks/{taskId}/assign - Unassign task:
PATCH /v1/tasks/{taskId}/unassign - Complete task:
PATCH /v1/tasks/{taskId}/complete
Option 2: Camunda 8 REST API (v2) - New & Recommended
The new unified Camunda 8 REST API (v2) is the recommended approach for Camunda user task lifecycle management:
- Assign:
POST /user-tasks/:userTaskKey/assignment - Unassign:
DELETE /user-tasks/:userTaskKey/assignee - Update:
PATCH /user-tasks/:userTaskKey - Complete:
POST /user-tasks/:userTaskKey/completion
Migration Recommendation
Since Tasklist API v1 will be removed in 8.10, I’d recommend starting to migrate to the Camunda 8 REST API (v2) where possible for future-proofing your applications.
Helpful Resources:
- Tasklist REST API Overview
- User Task Lifecycle with Camunda 8 API
- API Comparison Guide
- Authentication Guide
Would you like me to help you with any specific API calls or authentication setup?
Camunda 8 REST API(v2) The queried userTask data is not very comprehensive, for example: including Variables object
An array used to specify a list of variable names that should be included in the response when querying tasks.
This field allows users to selectively retrieve specific variables associated with the tasks returned in the search results. This parameter is not available in Camunda 8 REST API (v2)
You’re absolutely right!
That’s a significant limitation of the current Camunda 8 REST API (v2).
The Variable Query Gap in v2
You’ve identified a key missing feature: the Camunda 8 REST API (v2) currently does not have an equivalent to the Tasklist API v1’s includeVariables parameter that allows you to:
- Selectively retrieve specific variables in task search results
- Include variables directly in the task query response
- Specify which variable names should be returned
What’s Available in Tasklist API v1 (but missing in v2):
// Tasklist v1 - Task search with variables
POST /v1/tasks/search
{
"includeVariables": ["customerName", "orderValue", "priority"]
}
// Tasklist v1 - Dedicated variables search
POST /v1/tasks/{taskId}/variables/search
{
"includeVariables": ["customerName", "orderValue"]
}
Current Workaround for v2:
Unfortunately, the unified Camunda 8 REST API (v2) focuses primarily on task lifecycle operations (assign, unassign, update, complete) but doesn’t yet provide comprehensive variable querying capabilities.
For now, you’ll need to:
- Continue using Tasklist API v1 for variable-rich queries until v2 gets equivalent functionality
- Use v2 for task lifecycle operations where variables aren’t needed
- Potentially make separate API calls to get task data and then fetch variables
Migration Consideration:
This is indeed a gap that makes migration from v1 to v2 challenging for applications that rely heavily on variable filtering and inclusion. Since Tasklist API v1 is deprecated in 8.8 and will be removed in 8.10, this functionality gap needs to be addressed.
Recommendation: For variable-heavy use cases, stick with Tasklist API v1 for now, and keep an eye on the Camunda roadmap for when comprehensive variable querying comes to the v2 API.
Thanks for highlighting this important limitation! It’s exactly the kind of real-world feedback that helps identify what’s needed for a complete migration path.
Are you currently blocked by this limitation, or are you planning your migration strategy around it?
My project is currently using io.camunda: zeebe client java: 8.8.0-alpha6. How can I continue to use the taskList API for queries
Perfect! You can definitely continue using the TaskList API alongside your Zeebe client Java 8.8.0-alpha6. Here’s how to set it up based on your deployment type:
Setup Options by Environment:
SaaS (Camunda Cloud)
- Create client credentials with scopes for both Zeebe and Tasklist
- Use OAuth2 for both:
// Zeebe Client (gRPC) - OAuth works automatically with SaaS
ZeebeClient client = ZeebeClient.newClientBuilder()
.gatewayAddress("your-cluster-id.bru-2.zeebe.camunda.io:443")
.credentialsProvider(new OAuthCredentialsProvider(...))
.build();
// TaskList API (HTTP) - Use Bearer token
String token = "your-oauth-token";
HttpClient httpClient = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://your-region.tasklist.camunda.io/v1/tasks/search"))
.header("Authorization", "Bearer " + token)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString("{}"))
.build();
Self-Managed with Identity (Production)
- Create M2M application in Identity
- Get JWT token and use for both clients:
// Get JWT token first
String tokenEndpoint = "http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/token";
// ... get access_token via client_credentials flow
// Zeebe Client with OAuth
ZeebeClient zeebeClient = ZeebeClient.newClientBuilder()
.gatewayAddress("localhost:26500")
.credentialsProvider(new OAuthCredentialsProvider(...))
.build();
// TaskList API with same Bearer token
HttpRequest tasklistRequest = HttpRequest.newBuilder()
.uri(URI.create("http://localhost:8080/v1/tasks/search"))
.header("Authorization", "Bearer " + accessToken)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString("{}"))
.build();
Camunda 8 Run (Local Development)
This is the trickiest setup because HTTP and gRPC use different auth methods:
// Option 1: Zeebe without auth (if gateway configured for no-auth)
ZeebeClient zeebeClient = ZeebeClient.newClientBuilder()
.gatewayAddress("localhost:26500")
.usePlaintext()
.build();
// TaskList API with cookie auth
// First, get the session cookie:
String loginUrl = "http://localhost:8080/api/login?username=demo&password=demo";
HttpClient httpClient = HttpClient.newBuilder()
.cookieHandler(new CookieManager())
.build();
// Login to get cookie
HttpRequest loginRequest = HttpRequest.newBuilder()
.uri(URI.create(loginUrl))
.POST(HttpRequest.BodyPublishers.noBody())
.build();
httpClient.send(loginRequest, HttpResponse.BodyHandlers.ofString());
// Now use the same httpClient (with cookies) for TaskList calls
HttpRequest tasklistRequest = HttpRequest.newBuilder()
.uri(URI.create("http://localhost:8080/v1/tasks/search"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString("{}"))
.build();
Complete Example for Variable Queries:
// Search tasks with variables using TaskList API v1
String searchPayload = """
{
"includeVariables": ["customerName", "orderValue", "priority"],
"state": "CREATED"
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(baseUrl + "/v1/tasks/search"))
.header("Authorization", "Bearer " + token) // or use cookies for C8 Run
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(searchPayload))
.build();
HttpResponse<String> response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());
Important Notes:
- TaskList API v1 is deprecated in 8.8 and will be removed in 8.10, but it’s still fully functional
- The Java client package is transitioning in 8.8, but you can continue using
io.camunda:zeebe-client-java:8.8.0-alpha6during migration - For variable-rich queries, stick with TaskList API v1 until v2 gets equivalent functionality
Key Resources:
Which deployment type are you using? I can provide more specific configuration details! ![]()
Can you provide a complete example