JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle® ZFS Storage Appliance RESTful Application Programming Interface
Oracle Technology Network
Library
PDF
Print View
Feedback
search filter icon
search icon

Document Information

Using This Documentation

Chapter 1 Overview

Chapter 2 Working with the API

Chapter 3 Alert Service Commands

Chapter 4 Analytics Services

Chapter 5 Hardware Services

Chapter 6 Log Commands

Log Commands

List Logs

Get Log Entries

Download Logs

Download Log

Chapter 7 Network Commands

Chapter 8 Problem Service Commands

Chapter 9 Role Service

Chapter 10 SAN Services

Chapter 11 Service Commands

Chapter 12 Storage Services

Chapter 13 System Commands

Chapter 14 User Service

Chapter 15 Workflow Commands

Chapter 16 RESTful Clients

Get Log Entries

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. Note: Depending on the number of logs, older log entries might now be available due to memory constraints. This same limit occurs in the BUI and CLI. To obtain all system logs, they should be downloaded using the collect function described below.

Property
Description
start=<index>
Start returning logs from the given index/time
limit=<number>
Limit number of log entries returned

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.

Note: Time values that are older than one month from the current time are not accepted. Retrieval of older logs must use an index number for the start value. The limit value limits the number of logs returned for a given request. No more than the given limit value is returned.

Example Request:

GET /api/log/v1/logs/audit?limit=4&start=1000 HTTP/1.1
Authorization: Basic abcd45sMWE=
Host: tanana: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": "10.159.84.34",
            "annotation": "",
            "summary": "User logged in",
            "timestamp": "20131022T22:54:19",
            "user": "root"
        }, {
            "address": "10.159.84.34",
            "annotation": "",
            "summary": "Destroyed share \"gold: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": "10.159.84.34",
            "annotation": "",
            "summary": "User logged in",
            "timestamp": "20131022T22:54:19",
            "user": "root"
        }
    ]
}