Customers often use /jobs.json to pull a list of jobs when doing API calls that needs that information. This works, but is also a heavy API call on MSV.
There is a more efficient way, but this requires more total API calls: /jobs/list_page_data. This requires the parameters of a page number (page), sort column (sortCol, I use ‘job_time’), sort direction (sortDir, I use desc) and a size per page (size, I typically use 200).
In Python 3, your call might look like the following:
jobs_response = session.get(f'https://{director_ip}/jobs/list_page_data', data {'page':str(page),'sortCol':'job_time', 'sortDir':'desc', 'size':str(size)})
The way to work this in the code is to iterate through pages (starting at zero) until the length of job results returned from the API call is less than the size you denoted in the call.