GetJobLogFiles
get_job_log_files(public_api_client, job_id)
Expand source code
get_job_log_files(public_api_client, job_id):"""Description-----------To get the list of log files for a given job id.Parameters----------public_api_client: QDC api client object.job_id: id of the jobReturns-------json object: object having filename and file size in bytesUsages------job_id = 4309 ## job id for getting list of log files.logFiles = qdc_api.get_job_log_files(public_api_client, job_id)"""job_logs_response = get_jobs_job_id_logs.sync_detailed(job_id=job_id, client=get_client_with_headers_added(public_api_client))if job_logs_response.status_code == 200:print(f"job logs response: {job_logs_response.content.decode('utf-8')}")for log_file in job_logs_response.parsed:print(f'filename: {log_file.filename}, size_in_bytes: {log_file.file_size_in_byte}')return job_logs_response.parsedelse:print(f"Get list of job logs failed with error code {job_logs_response.status_code} {job_logs_response.content.decode('utf-8')}")return None
Description
To get the list of log files for a given job id. Parameters public_api_client: QDC api client object. job_id: id of the job
Returns
json object
: object having filename and file size in bytes
Usages
job_id = 4309 ## job id for getting list of log files.logFiles = qdc_api.get_job_log_files(public_api_client, job_id)