I am creating a job template in Ansible Tower and then launching it using REST API. Now I need to check the status(PENDING, RUNNING, FAILED, SUCCESSFUL, CANCELLED) of the current running job in Ansible Tower with the job id.
I was trying to run the curl GET requests along with jq to parse json output, but there are so many fields with different job events as well the previous job records in the GET output which I couldn't figure out the right way to filter my expected output(current job status).
/api/v2/jobs/{jobId}/
/api/v2/jobs/{jobId}/job_events/
/api/v2/jobs/{jobId}/job_host_sumamries/
/api/v2/jobs/{jobId}/activity_stream/
Is there a way to get job status of the particular job with job id.