Zeebe API (REST)

Number of APIs: 5

🚀 Overview

The Zeebe API is a REST API designed to interact with the Zeebe process automation engine.

Take a closer look at Camunda's Zeebe API documentation.

💪 What do you need to make it work?

Authentication

All requests to the Zeebe API require authentication.

This Qodex collection is configured to automatically handle the authentication process if:

  • You are using the SaaS offering of Camunda

  • You provide an API client ID and secret

1. Configure an API client

To interact with the Zeebe API programmatically, create client credentials in your cluster's settings under the API tab.

Ensure the API client is granted access to the Zeebe scope.

After client credentials are created, the Client secret is only shown once. Save this Client secret somewhere safe.

2. Configure a Qodex environment

Enable the Camunda SaaS environment in Qodex. From the Camunda 8 Qodex workspace, click the Environments tab on the left side of the page, mouse over Camunda SaaS, and click the Set active checkmark icon. See the [Qodex documentation] on managing environments for more information.

Configure the Current value of the following variables in the environment:

  • authorizationServerUrl - The URL of the authorization server. For the SaaS offering, this is https://login.cloud.camunda.io/oauth/token.

  • zeebeApiAudience - The audience associated with the API client. For the SaaS offering, this is zeebe.camunda.io.

  • zeebeApiBaseUrl - The base URL of your Optimize instance. For the SaaS offering, this is http://${REGION}.zeebe.camunda.io:443/${CLUSTER_ID}/v1/, and can be captured from your API client connection information in the Camunda 8 Console.

  • zeebeApiClientId - The client ID of the API client you created in the Camunda 8 Console.

  • zeebeApiClientSecret - The client secret of the API client you created in the Camunda 8 Console.

With these values configured, a pre-request script defined on the collection will automatically retrieve an access token before each request, and store it in the zeebeApiBearerToken variable. If you forget to configure any of these variables, requests will show a failed test with an error message indicating the unconfigured variable.

If you prefer to manually manage the access token, configure its value in the zeebeApiBearerToken variable.

The access token is automatically included in the headers of every request in the collection: Authorization: Bearer {{zeebeApiBearerToken}}.

3. Make requests to the API

With the environment configured, you can now make requests to the Camunda 8 Optimize API.

See the Camunda 8 documentation for more information on the available endpoints and their usage.

Common issues

No request made, 1/2 tests pass

If it appears no request was made, and the Test Results tab shows a failing test, there is likely misconfigured data. Common issues include:

  • No environment selected.

  • Unconfigured authorizationServerUrl, zeebeApiAudience, zeebeApiBaseUrl, zeebeApiClientId, or zeebeApiClientSecret variables.

  • Improperly formed access token.

Error message: There was an error in evaluating the Pre-request Script:Error: No data, empty input at 1:1 ^

Additional information can be found in the Qodex console. This error may indicate a problem with credentials, such as an invalid zeebeApiClientId or zeebeApiClientSecret.

403 Forbidden response

A 403 Forbidden response may indicate insufficient permissions for the API client. Ensure the client has the necessary scopes and permissions to perform the requested operation.

  1. User task - Assign a user task POST {{zeebeApiBaseUrl}}/v1/user-tasks/:userTaskKey/assignment

  2. User task - Complete a user task POST {{zeebeApiBaseUrl}}/v1/user-tasks/:userTaskKey/completion

  3. User task - Unassign a user task DELETE {{zeebeApiBaseUrl}}/v1/user-tasks/:userTaskKey/assignee

  4. User task - Update a user task PATCH {{zeebeApiBaseUrl}}/v1/user-tasks/:userTaskKey

  5. Cluster - Cluster topology GET {{zeebeApiBaseUrl}}/v1/topology