Follow

Special characters in REST commands

Occasionally it may be necessary to include 'special' characters within REST commands that would otherwise be interpreted as meta-data. This may be done by substituting the URL character code in place of the character itself.

For example, the following command may fail due to the embedded hash (#) character:

https://traverse.acme.com/api/rest/command/container.create?serviceName=Room #400&serviceType=device&memberListMethod=auto&ruleDeviceName=Traverse

However, when the hash character (#) is replaced by the equivalent URL code '%23', the command succeeds:

https://traverse.acme.com/api/rest/command/container.create?serviceName=Room %23400&serviceType=device&memberListMethod=auto&ruleDeviceName=Traverse

Additional information about URL encoding is available at http://www.w3schools.com/tags/ref_urlencode.asp

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.