Create workflow connection
const url = 'https://example.com/api/admin/workflow/connections';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Camunda Production","baseUrl":"https://camunda.example.com/api","callbackBaseUrl":"https://cmbox.example.com","auth":{"type":"bearer","token":"secret-token","username":"admin","password":"example","apiKey":"example","headerName":"X-API-Key"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/admin/workflow/connections \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Camunda Production", "baseUrl": "https://camunda.example.com/api", "callbackBaseUrl": "https://cmbox.example.com", "auth": { "type": "bearer", "token": "secret-token", "username": "admin", "password": "example", "apiKey": "example", "headerName": "X-API-Key" } }'Creates a new workflow connection
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”object
Human-readable connection name
Example
Camunda ProductionBase URL of the workflow engine API
Example
https://camunda.example.com/apiBase URL for CM Box callbacks
Example
https://cmbox.example.comobject
Authentication type
Example
bearerBearer token (for type: bearer)
Example
secret-tokenUsername (for type: basic)
Example
adminPassword (for type: basic)
API key (for type: api_key)
Header name for API key (default: X-API-Key)
Example
X-API-KeyResponses
Section titled “Responses”Connection created successfully
object
Unique connection identifier
Human-readable connection name
Base URL of the workflow engine API
Base URL for CM Box callbacks
object
Authentication type
Bearer token (for type: bearer)
Username (for type: basic)
Password (for type: basic)
API key (for type: api_key)
Header name for API key (default: X-API-Key)
Example
{ "id": "camunda-prod", "name": "Camunda Production", "baseUrl": "https://camunda.example.com/api", "callbackBaseUrl": "https://cmbox.example.com", "auth": { "type": "bearer", "token": "secret-token", "username": "admin", "headerName": "X-API-Key" }}Invalid request body
object
Indicates an error occurred
Error message describing what went wrong
Example
{ "error": true, "message": "Item not found"}Connection with this ID already exists
object
Indicates an error occurred
Error message describing what went wrong
Example
{ "error": true, "message": "Item not found"}Internal server error
object
Indicates an error occurred
Error message describing what went wrong
Example
{ "error": true, "message": "Item not found"}