Process Execution using Admin API
When working with processes you might want to trigger them from within your application or interact with processes from outside the publishing server. For this purpose we introduce some endpoints that can be used from the Admin API to support execution of processes. The motivation is that you can trigger processes from within external applications (e.g. upload an excel/csv file that will trigger a rendering) or from a CI/CD server or other DevOps service.
Step by step:
- Check Camunda Service is available
- Find processes which are belong to ObjectTypes
- Find the input parameters of process, in case the input has upload parameters we also need get upload parameters
- Start process with Post method
- Get process' status by its instanceId
- Get process' tasks status that include running tasks and finish tasks
This guide covers the process execution and monitoring capabilities of the AdminAPI. For prerequisites and general API information, including authentication, error handling, and integration conventions, see the AdminAPI documentation.
1.Check Camunda Service Available
- Endpoint: GET /api/processes/camunda-is-available
- Response:
- 204: service is available
- 503: service is unavailable
2.Get Processes For ObjectTypes
It filters based on your object types arguments pass through payload.
- Endpoint: POST api/processes/find
- Payload example:
{
"objectType": "GENERAL",
"excludedProcessType": [
"USER_TASK_PROCESS",
"SERVICE_PROCESS",
"DOWNLOAD_PROCESS",
"INTERNAL_PROCESS",
"UNDEFINED",
"GRID_ELEMENT_PREVIEW_PROCESS",
"CONTENT"
],
"objectIds": [],
"processTypeFilter": "UPLOAD_PROCESS"
}
- response:
[
{
"createdBy": "admin",
"createdOn": "2023-10-04 11:11:33",
"id": 22,
"processDefinitionKey": "P023_IMPORT_PUBLICATIONTYPES",
"processDefinitionName": "P023_IMPORT_PUBLICATIONTYPES",
"processType": "UPLOAD_PROCESS",
"project": [],
"roles": [],
"stages": [],
"status": "ENABLED",
"type": "GENERAL",
"updatedBy": "admin",
"updatedOn": "2024-03-27 08:32:29"
}
]
3.Get Input Parameters for Process
We need to retrieve parameters or input form of process (if we have) to collect all arguments of process needed.
- Endpoint: POST api/processes/
{process_key}/parameters - Payload example:
{
"objectType": "GENERAL",
"excludedProcessType": [
"USER_TASK_PROCESS",
"SERVICE_PROCESS",
"DOWNLOAD_PROCESS",
"INTERNAL_PROCESS",
"UNDEFINED",
"GRID_ELEMENT_PREVIEW_PROCESS",
"CONTENT"
],
"objectIds": [],
"businessKey": []
}
- response: list of parameters
[
{
"label": "upload File",
"identifier": "uploadFile",
"value": "",
"type": "UPLOADBUTTON",
"widthInChars": 40,
"heightInChars": 1,
"mandatory": true,
"editable": true,
"canChangeGUI": false,
"translations": {
"de": "Datei hochladen",
"en": "Upload File"
},
"visibility": true
},
{
"identifier": "methodMappedName",
"value": "com.priint.pubserver.plugins.workflow.forms.ImportPublicationTypesForm",
"type": "LABEL",
"widthInChars": 40,
"heightInChars": 1,
"mandatory": false,
"editable": true,
"canChangeGUI": false,
"translations": {},
"visibility": false
}
]
*[OPTIONAL] In case our process is an import process, we need to call the endpointGET api/import/upload-parametersto get information which is the system support for upload processes.
- response: list of parameters
{
"allowedTypes": [
"ZIP",
"XLSX",
"PSD",
"W2ML",
"TIFF",
"PDF",
"XML",
"INDD",
"CSV",
"PNG",
"EPS",
"JPEG"
],
"uploadLimitBytes": 10485760
}
4.Start Process
After collecting all parameters we start to send request starting the process.
- Endpoint: POST api/processes/
{process_key}/execute - Payload example:
{
"objectType": "GENERAL",
"businessKey": [
""
],
"variables": {
"methodMappedName": {
"type": "LABEL",
"value": "com.priint.pubserver.plugins.workflow.forms.ImportPublicationTypesForm"
},
"uploadFile": {
"type": "string",
"value": "23d00ba5-20c6-4454-905d-9846bab54fd2/minh_test_2705.xml"
}
},
"objectIds": []
}
- response: list of parameters
[
{
"businessKey": "",
"definitionId": "ee5843a1-102d-11f0-9d02-42010a940004",
"ended": false,
"id": "2f9fcbc7-6143-11f0-b4f4-42010a940004",
"suspended": false
}
]
5.Get Process Status by processInstanceId
- Endpoint: GET api/processes/process-instance/
{process-instance-id}state - Response: kind of statuses like these:
- ACTIVE: Process is running.
- EXTERNALLY_TERMINATED: The process was terminated externally.
- SUSPENDED: The process is currently paused/suspended.
- COMPLETED: The process has finished.
6.Get process' tasks' status
To know what tasks have finished and what tasks are running in a process.
- Endpoint:
GET /api/process-instances/
{process-instance-id}/activity-instance?unfinished=true: get tasks are running Resonpse:
[
{
"activityId": "delete_uuid_folder",
"activityName": "Delete UUID Folder",
"activityType": "serviceTask",
"canceled": false,
"completeScope": false,
"executionId": "7b1bb37a-637d-11f0-b4f4-42010a940004",
"id": "delete_uuid_folder:7b1bb37b-637d-11f0-b4f4-42010a940004",
"parentActivityInstanceId": "7aee61b9-637d-11f0-b4f4-42010a940004",
"processDefinitionId": "ee5843a1-102d-11f0-9d02-42010a940004",
"processDefinitionKey": "P023_IMPORT_PUBLICATIONTYPES",
"processInstanceId": "7aee61b9-637d-11f0-b4f4-42010a940004",
"rootProcessInstanceId": "7aee61b9-637d-11f0-b4f4-42010a940004",
"startTime": "2025-07-18T02:18:24.000+0000"
}
]
- GET /api/process-instances/
{process-instance-id}/activity-instance?unfinished=false: get tasks have finished
Response:
[
{
"activityId": "Import_Publication_Types",
"activityName": "Import Publication Types",
"activityType": "serviceTask",
"canceled": false,
"completeScope": false,
"durationInMillis": 588,
"endTime": "2025-07-18T02:18:24.000+0000",
"executionId": "7aef2521-637d-11f0-b4f4-42010a940004",
"id": "Import_Publication_Types:7aef2522-637d-11f0-b4f4-42010a940004",
"parentActivityInstanceId": "7aee61b9-637d-11f0-b4f4-42010a940004",
"processDefinitionId": "ee5843a1-102d-11f0-9d02-42010a940004",
"processDefinitionKey": "P023_IMPORT_PUBLICATIONTYPES",
"processInstanceId": "7aee61b9-637d-11f0-b4f4-42010a940004",
"rootProcessInstanceId": "7aee61b9-637d-11f0-b4f4-42010a940004",
"startTime": "2025-07-18T02:18:23.000+0000"
},
{
"activityId": "delete_uuid_folder",
"activityName": "Delete UUID Folder",
"activityType": "serviceTask",
"canceled": false,
"completeScope": false,
"durationInMillis": 1029,
"endTime": "2025-07-18T02:18:25.000+0000",
"executionId": "7b1bb37a-637d-11f0-b4f4-42010a940004",
"id": "delete_uuid_folder:7b1bb37b-637d-11f0-b4f4-42010a940004",
"parentActivityInstanceId": "7aee61b9-637d-11f0-b4f4-42010a940004",
"processDefinitionId": "ee5843a1-102d-11f0-9d02-42010a940004",
"processDefinitionKey": "P023_IMPORT_PUBLICATIONTYPES",
"processInstanceId": "7aee61b9-637d-11f0-b4f4-42010a940004",
"rootProcessInstanceId": "7aee61b9-637d-11f0-b4f4-42010a940004",
"startTime": "2025-07-18T02:18:24.000+0000"
}
]