rest api variable substitution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2019 06:31 PM
We are facing some challenges in complex variable substitution in outbound rest API web service.
Endpoint: https://<ip_address>/rest/server-hardware?filter=${filter}
Method: GET
Variable substitution: "name EQ 'SGH817YECA, bay 12' "
yours helps/inputs are greatly appreciated.
Regards
Soibam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2019 11:40 PM
Hi,
Variable Substitution is for testing purpose, you can change the Escape Type as 'Escape XML' which will escape single quote and send it.
While using the Rest Message in Script we have to use setStringParameter method to set the parameter value, which will does the Escape XML.
Regards,
Bala T

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2019 03:36 AM
What is the problem you are facing? If you test the rest message, does it not substitute the variable correctly? Might want to try to and use "Escape XML" in the "Escape Type" setting on the variable substitution.
This is only for test though, once you want to use it for real you need to have a look at "Preview script usage" to see how to use it in a business rule, or wherever you want to use it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2019 05:31 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2019 07:03 AM
the query you have mentioned in variable substitution is not valid. can you confirm how does that variable value looks like when you try to filter the record manually from that application .
did you try with adding only one value not the complete filter. break the query part one by one so that you can identify exact which line is breaking here