Go to main content

Oracle® ZFS Storage Appliance RESTful API Guide, Release OS8.8.0

Exit Print View

Updated: November 2018
 
 

Analytics Worksheets

A worksheet is the BUI screen on which statistics are graphed. Multiple statistics can be plotted at the same time, and worksheets can be assigned a title and saved for future viewing. The act of saving a worksheet automatically executes the archive action on all open statistics, meaning that whatever statistics were open continue to be read and archived forever. The worksheet commands can be used to manage the worksheets available from the BUI.

The following table shows properties that are used in analytics worksheets.

Property
Description
ctime
Time and date when this worksheet was created
mtime
Time and date when this worksheet was last modified
name
Name of this worksheet
owner
Owner of this worksheet
uuid
Universal unique identifier for this worksheet

List Worksheets

Lists all currently configured analytics worksheets.

Example Request:

GET /api/analytics/v1/worksheets HTTP/1.1
Authorization: Basic ab6rt4psMWE=
Host: zfs-storage.example.com:215
Accept: application/json

Example Response:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 237
X-Zfssa-Analytics-Api: 1.0

{
    "worksheets": [{
        "href": "/api/analytics/v1/worksheets/ab59bcbc...",
        "uuid": "ab59bcbc-080a-cf1a-98c9-9f485bc3a43d"
    }, {
        "href": "/api/analytics/v1/worksheets/bb3ee729...",
        "uuid": "bb3ee729-080a-cf1a-98c9-9f485bc3a43d"
    }]
}

Get Analytics Worksheet

Gets a single analytics worksheet.

Example Request:

GET /api/analytics/v1/worksheets/ab59bcbc-080a-cf1a-98c9-9f485bc3a43d
    HTTP/1.1
Authorization: Basic ab6rt4psMWE=
Host: zfs-storage.example.com:215
Accept: application/json

Example Response:

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 237
X-Zfssa-Analytics-Api: 1.0

{
    "worksheet": {
        "ctime": "Thu Jun 13 2013 02:17:14 GMT+0000 (UTC)",
        "href": "/api/analytics/v1/worksheets
                 /ab59bcbc-080a-cf1a-98c9-9f485bc3a43d",
        "mtime": "Sun Jun 23 2013 16:22:01 GMT+0000 (UTC)",
        "name": "myworksheet",
        "owner": "root",
        "uuid": "ab59bcbc-080a-cf1a-98c9-9f485bc3a43d"
    }
}

Create Worksheets

Creates a new analytics worksheet.

Example Request:

POST /api/analytics/v1/worksheets HTTP/1.1
Authorization: Basic ab6rt4psMWE=
Content-Type: application/json
Content-Length: 26

{"name": "myworksheet"}

Example Results:

HTTP/1.1 201 Created
Content-Length: 280
Location: /api/analytics/v1/worksheets/bb3ee729-4480-4609-89b2-fae2dc016bec

{
    "worksheet": {
        "uuid": "bb3ee729-4480-4609-89b2-fae2dc016bec",
        "name": "myworksheet",
        "owner": "root",
        "ctime": "Fri Aug 23 2013 20:35:00 GMT+0000 (UTC)",
        "mtime": "Fri Aug 23 2013 20:35:00 GMT+0000 (UTC)",
        "href": "/api/analytics/v1/worksheets
                 /bb3ee729-4480-4609-89b2-fae2dc016bec"
    }
}

Rename Worksheets

Renames a saved worksheet.

Example Request:

PUT /api/analytics/v1/worksheets/a442e761-4048-4738-b95f-be0824d7ed09
Authorization: Basic ab6rt4psMWE=
Content-Type: application/json
Content-Length: 26

{"name": "test"}

Example Response:

HTTP/1.1 202 Accepted
Date: Tue, 20 Dec 2016 00:33:06 GMT
Server: TwistedWeb/192.0.2
Content-Length: 279
X-Zfssa-Version: user/generic@2013.06.05.7.0,1-1.12
X-Zfssa-Analytics-Api: 1.1
X-Zfssa-Api-Version: 1.0
Content-Type: application/json; charset=utf-8

{
    "worksheet": {
        "href": "/api/analytics/v1/worksheets/a442e761-4048-4738-b95f-be0824d7ed09",
        "uuid": "a442e761-4048-4738-b95f-be0824d7ed09",
        "name": "test",
        "owner": "root",
        "ctime": "Wed Dec 14 2016 03:58:28 GMT+0000 (UTC)",
        "mtime": "Tue Dec 20 2016 00:25:57 GMT+0000 (UTC)"
    }
}

Destroy Worksheets

Destroys an analytics worksheet. In this example, the worksheet name is used as the worksheet identifier but the uuid identified in the href can also be used. The behavior of this command matches the behavior of the CLI command that destroys worksheets.

Example Request:

DELETE /api/analytics/v1/worksheets/name=myworksheet HTTP/1.1
Authorization: Basic ab6rt4psMWE=
Content-Type: application/json
Content-Length: 26

Example Response:

HTTP/1.1 204 No Content
X-Zfssa-Analytics-Api: 1.0

List Worksheet Datasets

Lists all datasets in the specified worksheet.

The following table shows properties that are used in dataset configuration.

Property
Description
name
Name of the underlying statistic for this dataset
drilldowns
Drilldowns currently highlighted, if any
seconds
Number of seconds being displayed for this dataset

Example Request:

GET /api/analytics/v1/worksheets/name=myworksheet/datasets HTTP/1.1
Authorization: Basic ab6rt4psMWE=
Host: zfs-storage.example.com:215
Accept: application/json

Add Worksheet Dataset

Creates a worksheet dataset.

Example Request:

POST /api/analytics/v1/worksheets/name=myworksheet/datasets HTTP/1.1
Authorization: Basic ab6rt4psMWE=
Content-Type: application/json
Content-Length: 26

{"name": "nfs4.ops", "seconds": 300}

Example Results:

HTTP/1.1 201 Created
Content-Type: application/json
X-Zfssa-Analytics-Api: 1.0
Location: /api/analytics/v1/worksheets/name=me/datasets/nfs4.ops
Content-Length: 162

{
    "dataset": {
        "href": "/api/analytics/v1/worksheets/name=me/datasets/dataset-008",
        "name": "nfs4.ops",
        "width": 0,
        "drilldowns": [],
        "seconds": 300,
        "time": ""
    }
}

Modify Worksheet Dataset

Modifies an existing worksheet dataset.

Example Request:

PUT /api/analytics/v1/worksheets/name=myworksheet/datasets/dataset-008
    HTTP/1.1
Authorization: Basic ab6rt4psMWE=
Content-Type: application/json
Content-Length: 26

{"seconds": 60}

Example Results:

HTTP/1.1 202 Accepted
Content-Type: application/json
Content-Length: 161
X-Zfssa-Analytics-Api: 1.0

{
    "dataset": {
        "href": "/api/analytics/v1/worksheets/name=me/datasets/dataset-008",
        "name": "nfs4.ops",
        "width": 0,
        "drilldowns": [],
        "seconds": 60,
        "time": ""
    }
}