How to pass special characters in REST commands?

QUESTION:

How to pass special characters in REST commands

 

RESOLUTION:

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 in the value of 'serviceName':

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

See the link in the Reference section below for a URL character code table. 

APPLIES TO:

All versions of Traverse

 

REFERENCE:

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

Have more questions?

Contact us

Was this article helpful?
0 out of 0 found this helpful

Provide feedback for the Documentation team!

Browse this section