Most REST API calls require a payload using the HTTP method POST to post the payload to the server through a REST API call. Here's a common REST API method that creates and executes a Process instance based on a Process definition.
The above REST API documentation for the method “Execute” shows the following:
- Http method - POST
- URL - /api/Process/Execute
- Request body or payload in JSON format
{
"isTestMode": true,
"testModeUser": "string",
"definitionID": "string",
"instanceID": "string",
"instanceName": "string",
"variables": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"globals": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
}
The above JSON payload describes the payload structure, keys, and values, including the value data types. Wherever it says “string,” we suggest passing a value to it; otherwise, pass an empty string, do not pass the value “string.”
Here's a valid payload to send, all you have to provide is the Process definition ID.
"isTestMode": false,
"testModeUser": "",
"definitionID": "3536a1fe-8825-4929-8c59-b3a73f5e7ffc",
"instanceID": "",
"instanceName": "",
"variables": {
},
"globals": {
}
}
Here's the POSTMAN configuration for the REST API Call:
The above request was sent to the server, and the server processed it successfully and returned a JSON response. This call is under security, so provide your username and password for authentication.