Optimize Public API
Number of APIs: 14
🚀 Overview
The Optimize API is a REST API designed to build task applications for human-centered processes. The API allows you to connect business process-related event data and variable data held in external systems from third-party systems to Optimize
Take a closer look at Camunda's Optimize API documentation.
💪 What do you need to make it work?
Authentication
All requests to the Optimize 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 Optimize API programmatically, create client credentials in your cluster's settings under the API tab.
Ensure the API client is granted access to the Optimize
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 ishttps://login.cloud.camunda.io/oauth/token
.optimizeApiAudience
- The audience associated with the API client. For the SaaS offering, this isoptimize.camunda.io
.optimizeApiBaseUrl
- The base URL of your Optimize instance. For the SaaS offering, this ishttps://${REGION}.optimize.camunda.io/${CLUSTER_ID}
, and can be captured from your API client connection information in the Camunda 8 Console.optimizeApiClientId
- The client ID of the API client you created in the Camunda 8 Console.optimizeApiClientSecret
- 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 optimizeApiBearerToken
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 optimizeApiBearerToken
variable.
The access token is automatically included in the headers of every request in the collection: Authorization: Bearer {{optimizeApiBearerToken}}
.
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
,optimizeApiAudience
,optimizeApiBaseUrl
,optimizeApiClientId
, oroptimizeApiClientSecret
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 optimizeApiClientId
or optimizeApiClientSecret
.
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.
-
Import entities - Import entities POST {{optimizeApiBaseUrl}}/api/public/import?collectionId
-
Event ingestion - Event ingestion POST {{optimizeApiBaseUrl}}/api/ingestion/event/batch
-
Dashboard - Get dashboard IDs GET {{optimizeApiBaseUrl}}/api/public/dashboard?collectionId=
-
Dashboard - Delete dashboard DELETE {{optimizeApiBaseUrl}}/api/public/dashboard/{dashboard-ID}
-
Dashboard - Export dashboard definitions POST {{optimizeApiBaseUrl}}/api/public/export/dashboard/definition/json
-
Report - Get report IDs GET {{optimizeApiBaseUrl}}/api/public/report?collectionId=
-
Report - Delete report DELETE {{optimizeApiBaseUrl}}/api/public/report/{report-ID}
-
Report - Export report definitions POST {{optimizeApiBaseUrl}}/api/public/export/report/definition/json
-
Report - Export report result data GET {{optimizeApiBaseUrl}}/api/public/export/report/{report-ID}/result/json
-
External variable ingestion - External variable ingestion POST {{optimizeApiBaseUrl}}/api/ingestion/variable