Go to main content

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

Exit Print View

Updated: December 2017
 
 

List All Running Scripts

Use the following command to list all running scripts.

A root user can view and access all scripts uploaded to the appliance. A non-root user can only view and access their own scripts.

For more information on scripting, see Working with CLI Scripting in Oracle ZFS Storage Appliance Administration Guide, Release OS8.7.x

Example Request:

$ curl -kv --user root:pw https://hostname:215/api/workflow/v1/scripts

GET /api/workflow/v1/scripts HTTP/1.1
Host: hostname:215
Authorization: Basic cm9vdDpsMWE=
User-Agent: curl/7.45.0
Accept: */*

Example Result:

HTTP/1.1 200 OK
Date: Mon, 27 Mar 2017 22:41:06 GMT
Content-Length: 96
X-Zfssa-Workflow-Api: 1.1
X-Zfssa-Api-Version: 1.0
Content-Type: application/json; charset=utf-8

{
    "scripts": [
        {
            "time": 4,
            "href": "/api/workflow/v1/scripts/1",
            "user": "root",
            "script": "1"
        },
        {
              "time": 39, 
              "href": "/api/workflow/v1/scripts/9", 
              "user": "root", 
              "script": "9"
        }
    ]
}