Get Job Status
Ahhhh - did that work?
It started, but did it actually work?
All of the major actions in Tuono are tracked with a Job object. This is because many of the jobs we run can take a while, so we wanted to make sure we didn't clog up our API with synchronous operations. Don't worry, your job is being taken care of and will get all the love it needs (and CPU cycles). You can look in on it at any time by checking its status.
job
GET
https://portal.tuono.io/api/v1/job/{job_id}
Get the status of a job.
Headers
Name
Type
Description
Authorization
string
Bearer {YOUR_TOKEN}
Content-Type
string
application/json
{'object': {'_id': '5f773e7b8e86c2e38b5e9110',
'_inserted': '2020-10-02 14:51:39',
'_updated': '2020-10-02 14:52:04',
'action': 'simulate',
'blueprint_ids': [],
'cred_type': 'static',
'credential_set': 'mh-static-aws',
'credential_set_id': '5f7612549e2aa1e6a254c4ae',
'current_phase': 'transitioning',
'environment_id': '5f76120d92160c05fa55ac04',
'executed_by': '5f7611299e2aa1e6a254c4a8',
'execution_feedback': [],
'failure_insights': [],
'job_details': {,
'last_phase': 'simulate',
'organization_id': '5f76112956599f23a120fdcc',
'pid': 17032,
'pod_directory': '/datastore/confab/logs/jobs/job_data/MHConsulting/mh_static_aws/data/API_demo_aws_10_02_14_51_5f773e7b8e86c2e38b5e9110',
'prepare_status': {,
'previous_working_set': {},
'simulate_status': {},
'simulation_feedback': [],
'status': 'succeeded',
'sts_credentials': None,
'support': [],
'timeouts': 0,
'venue': 'aws',
'working_set': {}
}
}
Example code
import requests
token = "Your JWT token"
job_id = "JOB ID"
headers = {"Authorization": f"Bearer {token}", "Content-Type": "application/json"}
url = f"https://portal.tuono.io/api/v1/job/{job_id}"
response = requests.get(url, headers=headers)
job = response.json()["object"]
Last updated
Was this helpful?