Writing to a Variable
- Updated2025-08-15
- 1 minute(s) read
Required permission: VariableWrite
To modify the variable value, issue a PUT request to the variable with a request body that uses the following data format:
{ "Value" : "[new value]"}
For example, to modify the value of ni.var.psp://localhost/hvac/t01, use the following URI:
PUT http://my_server:3580/nivariable/VariableValues('ni.var.psp://localhost/hvac/t01')/Value
An empty response body with a header status code of 204 indicates that the modification was a success. If the PUT request data is invalid or the variable is not writable, a 500 Internal Error code or a 400 Bad Request code will be returned. In the case of an error, the response body contains the standard OData error object serialized to the format specified in the request.