rest api variable substitution

soibam_ana_sing
Giga Contributor

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' "

 

find_real_file.png

yours helps/inputs are greatly appreciated. 

 

Regards

Soibam 

 

 

15 REPLIES 15

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 12find_real_file.png

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'

 

find_real_file.png

 

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}

Tried with both  tests  but not luck 

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 

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