REST API: char and array parameter problem
|
|
---|---|
Hello tangoer. because JSON has not char data type, i want to execute DevVarCharArray command, how to set input value, `[48,49,50]` or `["0","1","2"]` all failed
When write attribute(s), i want to pass new value in request's body, but failed
thanks |
|
|
---|---|
Hi Jimmy, As per version 2.1 DevVarCharArray is not supported. Concerning long spectrum you should pass an argument as `v` query param:
OR in encoded way:
Hope this helps |
|
|
---|---|
Thank you Ingvord For write attributes, should pass an argument as `v` query param. As from https://tango-rest-api.readthedocs.io/en/v1.1/device/#value have: argument can be passed in request's body. so i get can pass an argument as request body |
|
|
---|---|
That's true, you can pass arguments in body for multiple attributes reading/writing, e.g. https://tango-rest-api.readthedocs.io/en/v1.1/hosts/#attributes For single device attributes query parameter `v` is used Cheers, |