GetJobById
get_job_by_id(public_api_client, job_id)def get_job_by_id(public_api_client, job_id):
"""
Description
-----------
To get the details of a given job.
Args
----
public_api_client: QDC api client object.
job_id: Id of the job.
Returns
-------
object: Details of the specified job ID.
Usages
------
job_id = "1234"
job_details = qdc_api.get_job_by_id(public_api_client, job_id)
"""
get_job_details = try_call(
lambda: get_jobs_job_id.sync_detailed(job_id=job_id,
client=get_client_with_headers_added(public_api_client))
)
if get_job_details.status_code == 200:
response_data = get_job_details.content.decode('utf-8')
logger.info(f"Job response: {response_data}")
return get_job_details.parsedDescription
To get the details of a given job.
Arguments
public_api_client: QDC api client object.job_id: ID of the job.
Returns
object: Details of the specified job ID.
Usages
job_id = "1234"
job_details = qdc_api.get_job_by_id(public_api_client, job_id)