Process API
Process API
The Process API provides access to process definitions, versions, and BPMN diagrams.
Base Path: /process
Endpoints
GET /process
Returns all available process definitions.
Purpose: Get a list of all process definitions currently imported from CIB seven.
Parameters: None
Response Example:
[
{
"id": "invoice-process:1:abc123",
"name": "Invoice Process",
"key": "invoice-process"
},
{
"id": "approval-process:1:def456",
"name": "Approval Process",
"key": "approval-process"
},
{
"id": "invoice-process:2:ghi789",
"name": "Invoice Process",
"key": "invoice-process"
}
]
Response Fields:
| Field | Type | Description |
|---|---|---|
id |
string | Process definition ID from CIB seven |
name |
string | Human-readable process name |
key |
string | Process definition key (identifier) |
GET /process/{processKey}/version
Returns all available versions for a specific process.
Purpose: Get version numbers for a given process definition.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
processKey |
string | Yes | Process definition key (path parameter) |
Response Example:
[
"1",
"2",
"3"
]
Response Type: Array of strings
GET /process/bpmn
Returns the BPMN XML diagram for a specific process version.
Purpose: Get the BPMN 2.0 XML definition for visualization or analysis.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
processKey |
string | Yes | Process definition key |
version |
string | Yes | Process version |
Response Example:
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
id="Definitions_1"
targetNamespace="http://bpmn.io/schema/bpmn">
<bpmn:process id="invoice-process" name="Invoice Process" isExecutable="true">
<bpmn:startEvent id="StartEvent_1" name="Invoice Received">
<bpmn:outgoing>Flow_1</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:task id="Task_1" name="Review Invoice">
<bpmn:incoming>Flow_1</bpmn:incoming>
<bpmn:outgoing>Flow_2</bpmn:outgoing>
</bpmn:task>
<!-- ... more BPMN elements ... -->
</bpmn:process>
<!-- ... diagram information ... -->
</bpmn:definitions>
Response Type: application/octet-stream (binary XML data)
Usage Examples
Get All Processes
curl -X GET "http://localhost:8899/process"
Get Versions for a Process
curl -X GET "http://localhost:8899/process/invoice-process/version"
Download BPMN Diagram
curl -X GET "http://localhost:8899/process/bpmn?processKey=invoice-process&version=1" -o invoice-process.bpmn
Get BPMN for Visualization
curl -X GET "http://localhost:8899/process/bpmn?processKey=invoice-process&version=1"
Notes
- The process list includes all versions; filter by
keyto group by process - The BPMN endpoint returns raw XML data (binary stream)
- BPMN diagrams conform to the BPMN 2.0 specification
- Process keys are unique identifiers, but names may be duplicated across versions
- An empty
processKeyin/process/{processKey}/versionwill throw an error