Parsing the ATF REST Query Response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2018 01:27 PM
Hi
We Have an ATF test that invokes a REST API and get a 200 response code
As part of the REST API response ,there is a Discovery Job ID that comes back.
How can we capture it as part of the ATF?
Response Body:
{"result":{"message":"Successfully created discovery job","job_id":"DIS0039467"}}
Appreciate your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2018 02:05 PM
Dear Minnie,
Two things
1.Create a test step
REST test step: Assert JSON Response Payload Element
2. Assert steps must immediately follow a Send REST Request - Inbound step.
3. The Step would look like below
in your case element path would be /result/job_id and value would be the value to test against.
Result :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2018 10:08 AM
I have a similar question related to this,
From the Rest API response, can we use a attribute in the next step.
Say I create a change using Rest API inbound call in ATF, I will get a change Number in the response JSON. Can I use the change number value in the next step?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2020 01:30 AM
None of the automated REST test steps under ATF (versions <= Newyork) provide an output referencing the API response.
I believe your best option is to submit the record that you would typically create using REST APIs using ATF UI test steps and use the sys_id from the step output to make further assertions.