REST Resources
/api/space/audit-log-management/audit-logs
The following operation is supported on this resource:
- GET - Get all audit logs in Junos Space
GET /audit-logs | Version 1 |
This API retrieves all audit log entries stored in the database. It returns record entries along with a link to an individual entry. It supports filtering, sorting, and paging.
Filtering and sorting is supported on the following fields:
- userName
- userIpAddr
- description
- logTime
- applicationName
- taskName
- result
Notes:
- The 'logTime' field is a timestamp field. By default, 'logTime' is returned for the UTC time zone, but clients can get 'logTime' in their time zone by sending an x-date header in the HTTP request.
- The 'logTime' field supports . For
example:
/api/space/audit-log-management/audit-logs?filter=(logTime eq timestamp('2011-08-29 11:01:25'))
/api/space/audit-log-management/audit-logs?filter=(logTime gt timestamp('2011-08-29 11:01:25'))
For more information about timestamp filtering, see the Junos Space SDK Application Developer Guide.
Sample Usage
GET /audit-logs
- Accept Headers:
application/vnd.net.juniper.space.audit-log-management.audit-logs+xml;version=1
application/vnd.net.juniper.space.audit-log-management.audit-logs+json;version=1
<audit-logs uri="/api/space/audit-log-management/audit-logs" size="2">
<audit-log
href="/api/space/audit-log-management/audit-logs/262840"
uri="/api/space/audit-log-management/audit-logs/262840" key="262840">
<userName>super</userName>
<userIpAddr>172.16.100.2</userIpAddr>
<description>Job: Run Device Discovery Profile.</description>
<logTime>2011-08-29 10:16:18 IST</logTime>
<workSpaceName>Devices</workSpaceName>
<applicationName>Network Management Platform</applicationName>
<taskName>Login</taskName>
<result>Job Scheduled</result>
<jobId>360450</jobId>
<domainId>32769</domainId>
<domainName>Global</domainName>
</audit-log>
</audit-logs>
{
"audit-logs": {
"@uri":
"/api/space/audit-log-management/audit-logs",
"@size":"2",
"audit-log":[
{
"@href":"/api/space/audit-log-management/audit-logs/589830",
"@uri":"/api/space/audit-log-management/audit-logs/589830",
"@key":"589830",
"userName":"super",
"userIpAddr":"172.16.100.2",
"description":"Job: Run Device Discovery Profile.",
"workSpaceName":"Devices",
"logTime":"2011-08-29 11:09:18 IST",
"applicationName":"Network Management Platform",
"taskName":"Run Now Device Discovery Profile",
"result":"Job Scheduled" ,
"jobId":"1081344" ,
"domainId":"32769",
"domainName":"Global"
}
]
}
}
Access Control
The following capabilities are required to access this API: ReadAuditLogs