Getting a log for a job session

You can get a detailed log for a job session. You can get a log in JSON format or CSV format.

Method and URI

To get a log of job sessions in JSON format, use a GET method and a URI:

GET     https://{hostname|IPv4}/api/endeavour/log/job

To get a log of job sessions in CSV format, use a GET method and a URI:

GET     https://{hostname|IPv4}/api/endeavour/log/job/download/csv

Tip

To get a {jobsessionId}, follow the instructions in Getting job session information.

Parameters

Parameter: filter

Filter results by specifying criteria.

  • Example value: Use the following value to get results for a job session with a {jobsessionId} of 1577841955375:

"filter": [
    {
        "property": "jobsessionId",
        "value":    "1577841955375",
        "op":       "="
    }
]
  • Type: List. Required.

Data

None.

Example: Get a log for a job session in CSV format

A Python snippet that is similar to the following example can be used to request a log for a job session ({jobsessionId} 1577841955375):

jobsession_id = "1577841955375"

_params = {
    "filter": f'''[
        {{
            "property": "jobsessionId",
            "value":    "{jobsession_id}",
            "op":       "="
        }}
    ]'''
}

_response = requests.get('https://' + spp_ipv4
    + '/api/endeavour/log/job/download/csv',
    headers={...}, params=_params, verify=...)

print(_response.text)

The request prompts a response that is structured as shown, with the HTTP status of 200 (OK).

Type,Time,Server Time,Task ID,Message ID,Message
SUMMARY,1577841955375,Wed 1 Jan 2020 01:25:55 UTC,,CTGGA2399,Starting job ...
DETAIL,1577841957287,Wed 1 Jan 2020 01:25:57 UTC,2,CTGGA0171,Job options : ...
...