The api/audit/sessions/<session-id>/trail_downloads endpoint lists the details of audit-trail downloads in this session (if any). For details on downloading audit trails, see Local services: configuring the indexer.
URL
GET https://<IP-address-of-SPS>/api/audit/sessions/<session-id>/trail_downloads
Cookies
Cookie name | Description | Required | Values |
---|---|---|---|
session_id | Contains the authentication token of the user | Required |
The value of the session ID cookie received from the REST server in the authentication response, for example, a1f71d030e657634730b9e887cb59a5e56162860. For details on authentication, see Authenticate to the SPS REST API. Note that this session ID refers to the connection between the REST client and the SPS REST API. It is not related to the sessions that SPS records (and which also have a session ID, but in a different format). |
Sample request
The following command lists the indexing-related details of a session.
curl --cookie cookies "https://<IP-address-of-SPS>/api/audit/sessions/<session-id>/trail_downloads"
Response
The following is a sample response received when listing the indexing-related details of a session.
For details of the meta object, see Message format.
{ "items": [ { "from_api": false, "ip_address": "10.20.30.40", "time": "2018-11-20T11:10:19.000Z", "username": "admin" }, { "from_api": false, "ip_address": "10.20.30.40", "time": "2018-11-20T11:10:38.000Z", "username": "admin" } ], "meta": { "first": "/api/audit/sessions/c7e51cebad1a3e2ade480909f7687b16/indexer?limit=500&offset=0", "href": "/api/audit/sessions/c7e51cebad1a3e2ade480909f7687b16/indexer", "last": "/api/audit/sessions/c7e51cebad1a3e2ade480909f7687b16/indexer?limit=500&offset=0", "limit": 5, "match_count": 2, "next": null, "offset": 0, "parent": "/api/audit/sessions/rUhhQZ3jYsY1NDWYp9DEpq", "previous": null, "remaining_seconds": 599 } }
Element | Type | Description | |
---|---|---|---|
items | list | Top level element, a list containing the indexing-related details of the session. | |
from_api | boolean | True, if the audit trail was not downloaded from the GUI, but through SOAP or REST API. | |
ip_address | string | The IP address of the client that downloaded the audit trail. | |
time | boolean | The exact time when the user downloaded the audit trail file. | |
username | string | The user name of the user who downloaded the audit trail. |
Changing the display limit
You can use the ?limit option to change the number of items displayed at once. The default limit is 500.
?limit=1000
To navigate beyond the displayed set, use the offset option.
Navigating large datasets
You can use the ?offset option to navigate data sets that extend beyond the display limit. The default value of the offset is 0, this is the initially displayed set. To move to other items beyond the initial set, increase the value to a number that corresponds to the item where you want to start displaying results from.
Example: the display limit is the default 500, and the number of sessions is 1012. The initial 500 sessions are listed at:
?offset=0
To view sessions from 501 to 1000, change the offset to 501:
?offset=501
To display the remaining 12 sessions, change the offset to 1001:
?offset=1001