Get Task Variable (Binary)

Retrieves a binary variable from the context of a given task. Applicable for byte array and file variables. The variable must be visible from the task. It is visible from the task if it is a local task variable or declared in a parent scope of the task. See documentation on visiblity of variables.


GET /task/{id}/variables/{varId}/data


Path Parameters

Name Description
id The id of the task to retrieve the variable from.
varId The name of the variable to get.


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
the saved mime type
Request successful.
400 application/json Variable with given id exists but is not a binary variable. See the Introduction for the error response format.
404 application/json Variable with given id does not exist. See the Introduction for the error response format.



GET /task/aTaskId/variables/aVarName/data


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”

On this Page: