Update Task varibales

When I try to update task variables as a file type variable through ReST API it shows success.
But when I try to retrieve it,I find the variable value to be null.
Am I missing anything.


URI : {{baseURL}}/rest/engine/default/task/{{taskId}}/variables

Request Body:
“modifications”: {
“value”:“Base64 encoded string”,
“filename”:“Camunda Doc”,

This is successfully executed.

But when I try to retrieve it using the following API
GET : {{baseURL}}/rest/engine/default/task/{{taskId}}/variables

I get the following response.

{“attachment”: {
“type”: “File”,
“value”: null,
“valueInfo”: {
“encoding”: “UTF-8”,
“filename”: “Camunda Doc”

Is there anything else to be done?

why are you using the endpoint
instead of

Either way it gives the same response.