Start a new topic
Answered

Can you help me configure my REST Client Response Output Value Selector?

Can you help me configure my REST Client Response Output Value Selector ?


Best Answer

When following the documentation on declaring REST Clients, it is mentioned that the Response Output Value Selector corresponds to "a JSON Path, starting from the root of the response payload and pointing to a single value in the payload".

To help find the desired JSON Path you may follow these steps :

  • make your API call work using an external tool like Postman and copy the received response : 
Working test on Postman -> copy Responsehttps://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/43330056669/original/uzs-gP1ORVlRsZWc5ZppNJ-TK1eB9xC0zA.png?1654537773" data-fileid="43330056669" data-uniquekey="1654537801185">
Working test on Postman -> copy Response
  • find the desired JSON path for your Response Output using a tool like JSON Path Finder
Response copied on the left, Path found by clicking on the right
Response copied on the left, Path found by clicking on the right
  • Validate the retrieved path using a similar JayWay evaluator than ours (x. has to be removed from the beginning of the path for example) : 
Can you help me configure my REST Client Response Output Value Selector ?
  • Copy the path into the Value Selector for the tested Response Output : 
Can you help me configure my REST Client Response Output Value Selector ?
  • Test your REST Client configuration using the test button : 
Successful test
Successful test

Your REST Client is ready for use in an API Enricher

I hope this helps!

Stéphanie.

1 Comment

Answer

When following the documentation on declaring REST Clients, it is mentioned that the Response Output Value Selector corresponds to "a JSON Path, starting from the root of the response payload and pointing to a single value in the payload".

To help find the desired JSON Path you may follow these steps :

  • make your API call work using an external tool like Postman and copy the received response : 
Working test on Postman -> copy Responsehttps://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/43330056669/original/uzs-gP1ORVlRsZWc5ZppNJ-TK1eB9xC0zA.png?1654537773" data-fileid="43330056669" data-uniquekey="1654537801185">
Working test on Postman -> copy Response
  • find the desired JSON path for your Response Output using a tool like JSON Path Finder
Response copied on the left, Path found by clicking on the right
Response copied on the left, Path found by clicking on the right
  • Validate the retrieved path using a similar JayWay evaluator than ours (x. has to be removed from the beginning of the path for example) : 
Can you help me configure my REST Client Response Output Value Selector ?
  • Copy the path into the Value Selector for the tested Response Output : 
Can you help me configure my REST Client Response Output Value Selector ?
  • Test your REST Client configuration using the test button : 
Successful test
Successful test

Your REST Client is ready for use in an API Enricher

I hope this helps!

Stéphanie.

Login to post a comment