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-23-2019 08:25 AM
1. here is another test with parameter break up in rest api.
https://<ip_address>/rest/server-hardware?filter=name EQ '${option}' where option = SGH817YECA, bay 12
its throw different error message "No response for ECC message request with sysid=103e80badb58b3000080e1bb4b9619b7 after waiting for 60 seconds in ECC Queue"
2. using postman, its execute successfully with same endpoint
https://<ip_address>/rest/server-hardware?filter=name EQ 'SGH817YECA, bay 12'

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2019 10:17 AM
do not pass the parameter in single quote
try
https://<ip_address>/rest/server-hardware?filter=name=${option}
or
https://<ip_address>/rest/server-hardware?filter=nameEQ${option}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2019 07:25 PM
Tried with both tests but not luck

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2019 09:10 PM
just confirming here,
have you set the context-type in your get method ?
can you confirm are you still getting "invalid query" error?
please share the error details
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2019 09:29 PM
Content-Type is set to "application/json" in header fields and below is error messages
No response for ECC message request with sysid=4b77aabadb9cb3000080e1bb4b9619d4 after waiting for 60 seconds in ECC Queue