# \TaskVariableApi All URIs are relative to *http://localhost:8080/engine-rest* Method | HTTP request | Description ------------- | ------------- | ------------- [**delete_task_variable**](TaskVariableApi.md#delete_task_variable) | **delete** /task/{id}/variables/{varName} | [**get_task_variable**](TaskVariableApi.md#get_task_variable) | **get** /task/{id}/variables/{varName} | [**get_task_variable_binary**](TaskVariableApi.md#get_task_variable_binary) | **get** /task/{id}/variables/{varName}/data | [**get_task_variables**](TaskVariableApi.md#get_task_variables) | **get** /task/{id}/variables | [**modify_task_variables**](TaskVariableApi.md#modify_task_variables) | **post** /task/{id}/variables | [**put_task_variable**](TaskVariableApi.md#put_task_variable) | **put** /task/{id}/variables/{varName} | [**set_binary_task_variable**](TaskVariableApi.md#set_binary_task_variable) | **post** /task/{id}/variables/{varName}/data | ## delete_task_variable > delete_task_variable(id, var_name) Removes a variable that is visible to a task. A variable is visible to a task if it is a local task variable or declared in a parent scope of the task. See documentation on [visiblity of variables](https://docs.camunda.org/manual/7.13/user-guide/process-engine/variables/). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **id** | **String** | The id of the task to delete the variable from. | [required] | **var_name** | **String** | The name of the variable to be removed. | [required] | ### Return type (empty response body) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## get_task_variable > crate::models::VariableValueDto get_task_variable(id, var_name, deserialize_value) Retrieves a variable from the context of a given task. 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](https://docs.camunda.org/manual/7.13/user-guide/process-engine/variables/). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **id** | **String** | The id of the task to retrieve the variable from. | [required] | **var_name** | **String** | The name of the variable to get. | [required] | **deserialize_value** | Option<**bool**> | Determines whether serializable variable values (typically variables that store custom Java objects) should be deserialized on the server side (default `true`). If set to `true`, a serializable variable will be deserialized on server side and transformed to JSON using [Jackson's](https://github.com/FasterXML/jackson) POJO/bean property introspection feature. Note that this requires the Java classes of the variable value to be on the REST API's classpath. If set to `false`, a serializable variable will be returned in its serialized format. For example, a variable that is serialized as XML will be returned as a JSON string containing XML. Note: While `true` is the default value for reasons of backward compatibility, we recommend setting this parameter to `false` when developing web applications that are independent of the Java process applications deployed to the engine. | |[default to true] ### Return type [**crate::models::VariableValueDto**](VariableValueDto.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## get_task_variable_binary > std::path::PathBuf get_task_variable_binary(id, var_name) 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](https://docs.camunda.org/manual/7.13/user-guide/process-engine/variables/). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **id** | **String** | The id of the task to retrieve the variable for. | [required] | **var_name** | **String** | The name of the variable to retrieve. | [required] | ### Return type [**std::path::PathBuf**](std::path::PathBuf.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/octet-stream, text/plain, application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## get_task_variables > ::std::collections::HashMap get_task_variables(id, deserialize_value) Retrieves all variables visible from the task. A variable 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](https://docs.camunda.org/manual/7.13/user-guide/process-engine/variables/). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **id** | **String** | The id of the task to retrieve the variables from. | [required] | **deserialize_value** | Option<**bool**> | Determines whether serializable variable values (typically variables that store custom Java objects) should be deserialized on the server side (default `true`). If set to `true`, a serializable variable will be deserialized on server side and transformed to JSON using [Jackson's](https://github.com/FasterXML/jackson) POJO/bean property introspection feature. Note that this requires the Java classes of the variable value to be on the REST API's classpath. If set to `false`, a serializable variable will be returned in its serialized format. For example, a variable that is serialized as XML will be returned as a JSON string containing XML. Note: While `true` is the default value for reasons of backward compatibility, we recommend setting this parameter to `false` when developing web applications that are independent of the Java process applications deployed to the engine. | |[default to true] ### Return type [**::std::collections::HashMap**](VariableValueDto.md) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## modify_task_variables > modify_task_variables(id, patch_variables_dto) Updates or deletes the variables visible from the task. Updates precede deletions. So, if a variable is updated AND deleted, the deletion overrides the update. A variable 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](https://docs.camunda.org/manual/7.13/user-guide/process-engine/variables/). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **id** | **String** | The id of the task to set variables for. | [required] | **patch_variables_dto** | Option<[**PatchVariablesDto**](PatchVariablesDto.md)> | | | ### Return type (empty response body) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## put_task_variable > put_task_variable(id, var_name, variable_value_dto) Updates a process variable that is visible from the Task scope. A variable is visible from the task if it is a local task variable, or declared in a parent scope of the task. See the documentation on [variable scopes and visibility](https://docs.camunda.org/manual/7.13/user-guide/process-engine/variables#variable-scopes-and-variable-visibility). **Note**: If a variable doesn't exist, the variable is created in the top-most scope visible from the task. ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **id** | **String** | The id of the task to set the variable for. | [required] | **var_name** | **String** | The name of the variable to set. | [required] | **variable_value_dto** | Option<[**VariableValueDto**](VariableValueDto.md)> | | | ### Return type (empty response body) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) ## set_binary_task_variable > set_binary_task_variable(id, var_name, data, value_type) Sets the serialized value for a binary variable or the binary value for a file variable visible from the task. A variable 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](https://docs.camunda.org/manual/7.13/user-guide/process-engine/variables/). ### Parameters Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **id** | **String** | The id of the task to retrieve the variable for. | [required] | **var_name** | **String** | The name of the variable to retrieve. | [required] | **data** | Option<**std::path::PathBuf**> | The binary data to be set. For File variables, this multipart can contain the filename, binary value and MIME type of the file variable to be set Only the filename is mandatory. | | **value_type** | Option<**String**> | The name of the variable type. Either Bytes for a byte array variable or File for a file variable. | | ### Return type (empty response body) ### Authorization No authorization required ### HTTP request headers - **Content-Type**: multipart/form-data - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)