Log entries can be returned from the specified appliance log. Each log entry returns the date/time of the entry along with log specific content properties.
|
The start index defaults to the value of 0, which returns the first log that was generated. Negative values and values greater than or equal to the log size are not allowed. The start index can also be a time string; for example, 20130724T03:21:55.
Example Request:
GET /api/log/v1/logs/audit?limit=4&start=1000 HTTP/1.1 Authorization: Basic abcd45sMWE= Host: zfs-storage.example.com:215 Accept: application/json
Example Result:
HTTP/1.1 200 OK X-Zfssa-Appliance-Api: 1.0 Content-Type: application/json X-Zfssa-Api: development Transfer-Encoding: chunked { "logs": [ { "address": "192.0.2.0", "annotation": "", "summary": "User logged in", "timestamp": "20131022T22:54:19", "user": "root" }, { "address": "192.0.2.0", "annotation": "", "summary": "Destroyed share \"zfs-storage-1:tst.volumes.py.34111.project/tst.volumes.py.34111.lun.7\"", "timestamp": "20131022T22:52:34", "user": "root" }, { "summary": "Joined workgroup \"RESTTESTWG\"", "timestamp": "20131022T22:54:23", "user": "<system>" }, { "address": "192.0.2.0", "annotation": "", "summary": "User logged in", "timestamp": "20131022T22:54:19", "user": "root" } ] }