Get Process Variable (Binary)
Retrieves the content of a Process Variable by the Process Instance id and the Process Variable name. Applicable for byte array or file Process Variables.
Method
GET /process-instance/{id}/variables/{varName}/data
Parameters
Path Parameters
Name | Description |
---|---|
id | The id of the process instance to retrieve the variable for. |
varName | The name of the variable to retrieve. |
Result
For binary variables or files without any MIME type information, a byte stream is returned. File variables with MIME type information are returned as the saved type. Additionally, for file variables the Content-Disposition header will be set.
Response Codes
Code | Media type | Description |
---|---|---|
200 | application/octet-stream or the saved MIME type | Request successful. |
400 | application/json | A Process Variable with the given id exists but does not serialize as binary data. See the Introduction for the error response format. |
404 | application/json | A Process Variable with the given id does not exist. See the Introduction for the error response format. |
Example
Request
GET /process-instance/aProcessInstanceId/variables/aVarName/data
Response
binary variable: Status 200. Content-Type: application/octet-stream
file variable: Status 200. Content-Type: text/plain; charset=UTF-8. Content-Disposition: attachment; filename=“someFile.txt”