Use API output in circle.yml file?

Hi all -

In my deploy step, I’m actually making a CircleCI API call to kick off another project. This is working well, and it returns the JSON file. However, I need to verify the success of the call so I know to pass or fail the step. Is there a way to utilize the JSON data that is returned in the circle.yml? I.e. to be able to test if one of the parameters contains a certain value?

First though would be simply checking exit code / http response code and fail the build step accordingly.

If you need to interpret response to make a decision, piping API response to a tool like jq can also help.