Skip to main content
Version: v0.1.4-beta.2

API Tasks

API Tasks call external HTTP services through the Easy BPM worker. They are useful for CRM calls, ERP updates, payment checks, webhook-style integrations, and private service orchestration.

Define an API task​

{
"id": "create-ticket",
"name": "Create Support Ticket",
"type": "APITask",
"properties": {
"method": "POST",
"url": "https://api.example.com/tickets",
"headers": {
"Content-Type": "application/json"
},
"body": {
"customerId": "${customerId}",
"summary": "${requestSummary}"
},
"auth": {
"type": "bearer",
"ref": "SUPPORT_API_TOKEN"
}
}
}

Authentication options​

TypeRequired fieldsBehavior
bearerrefSends bearer credentials from the referenced secret or environment variable.
basicrefSends basic credentials from the referenced secret or environment variable.
apikeyref, optional in, optional keySends an API key in a header or query string.

For API key auth:

"auth": {
"type": "apikey",
"ref": "PARTNER_API_KEY",
"in": "header",
"key": "X-API-Key"
}

Variable substitution​

String values can reference process variables with ${variableName}. Resolve sensitive values through your secret management approach rather than storing secrets in process variables.

Worker execution​

When an API task is reached, the backend publishes a worker request to RabbitMQ. The worker executes the call and returns the result so the process can continue.

If the worker does not complete the request within 2 minutes and no Error Boundary handles the failure, Easy BPM marks the process instance as FAILED and records the failure on the instance as errorMessage and errorNodeId.

Keep API tasks idempotent when possible. If a worker retries or an operator restarts a process path, the external system should be able to handle duplicate requests safely.