GET One Job
Request an individual job using the sref of that job. This is typically found by searching for jobs via other requests (such as all jobs within a certain date range). The sref is a combination of the path and ID, i.e., /jobs/123.
Request
Method | GET |
Path | /jobs/id |
Header |
Realm: account_realm Authorization: Bearer access_token |
Response
The response for this request is a single job object:
Body |
"results": { "name": "Homepage", "url": "http://www.mydomain.com", "startedAt": "2017-02-27T13:19:11+00:00", "updatedAt": "2017-02-27T13:19:53+00:00", "startedBy": "Joe Bloggs", "type": "Single", "pageCount": 1, "status": "completed", "sref": "jobs/12345", "jobTemplateUri": "jobTemplates/6789", "runType": "manual", "testRunsUri": "testRuns?job=jobs%2F12345" } |
Job Parameters
Each job you request from the API includes the following parameters:
Parameter | Details |
---|---|
name | The name of the job |
url | The main URL for the job |
startedAt | The date and time the job started |
updatedAt | The date and time the job last updated. If the job is still running, this is updated as test run results become available. |
startedBy | The person who ran the job. Jobs run from the API show as being run by the Performance Analyzer API user. |
type | The type of job: Single, Multi, Crawl, or Scripted |
pageCount | The number of test run results available for the job. If the job is still running, this number increases as results become available. |
status |
The status of the job:
|
sref | A self-reference path that describes how you can request the individual job |
jobTemplateUri | The URI of the job template used to run this job, i.e., the job template’s sref. The job template contains the parameters defines how the job should run. |
runType |
How the job ran:
|
testRunsUri | The URI of how to discover the test runs (results) for this job |
Limit Jobs by Date and Time
You can restrict the search for jobs by the date and time they happened. You can specify the fromDate, the toDate, or both together. All dates and times are inclusive and are specified using the standard date/time format the API returns data in, but must be URL encoded and sent as a query string.
Request
Method | GET |
Path | /jobs?fromDate=from_date&toDate=to_date |
Header |
Realm: account_realm Authorization: Bearer access_token |
All date/times must be URL encoded, so, for example, if you wanted to search for all jobs that ran before January 1, 2017, (represented as 2017-01-01T00:00:00+00:00 in ISO date format), you would make the following request:
Path | /jobs?fromDate=2017-01-01T00%3A00%3A00%2B00%3A00 |
Response
The returned pagination will honor the date and time range you have specified, meaning you can retrieve all of the data from that date or time range, even if it spans multiple paginated pages. The response will include the date ranges specified, as well as the total number of results in the meta section:
Body |
"meta": { "fromDate": "2017-03-01T00:00:00+00:00", "toDate": "2017-03-01T23:59:59+00:00", "paginationTotalResults": 66, "response_in_sec": 0.28 }, |