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

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

Storage Pool Operations

List Pools

Get Pool

Configure Pool

Add Storage to a Pool

Pool Scrub

Unconfigure Pool

Project Operations

List Projects

Get Project Properties

Create Project

Modify Project

Delete Project

Project Usage

Filesystem Operations

List Filesystems

Get Filesystem

Create Filesystem

Modify Filesystem

Delete Filesystem

Filesystem Quota and Usage

LUN Operations

List LUNS

Get LUN

Create a New LUN

Modify LUN

Delete Lun

Snapshot and Clone Operations

List Snapshots

Get Snapshot

Create Snapshot

Rename Snapshot

Clone Snapshot

Rollback Snapshot

Delete a Snapshot

List Snapshot Dependents

Schema

List Properties

Get Property

Create Property

Modify Property

Delete Property

Replication

Get Replication Service

Modify Replication Service State

Replication Targets

List Replication Targets

Get Replication Target

Create Replication Target

Delete Replication Target

Replication Actions

List Replication Actions

Get Replication Action

Create Replication Action

Modify Replication Action

Cancel Update

Send Update

Delete a Replication Action

Replication Packages

List Replication Sources

List Replication Packages

Modify Package

Delete Package

Cancel Update

Clone Package

Sever Package

Reverse Package

Chapter 13 System Commands

Chapter 14 User Service

Chapter 15 Workflow Commands

Chapter 16 RESTful Clients

List Projects

This command lists all of the projects in a given pool. Each returned project contains the list of modifiable properties listed above as well as the pool name, creation time, loading state, replication actions and data usage.

Query Parameters filter – A simple string match filter that requires a property within the project to contain the same filter string within its value.

Table 12-5  URI Parameters
Parameter
Description
pool
Storage pool name

Example Request:

GET /api/storage/v1/pools/gold/projects HTTP/1.1
Host: zfs-storage.example.com
Accept: application/json

On a successful get an HTTP code 200 (OK) is returned along with an array of project properties in JSON format.

Example Result:

HTTP/1.1 200 OK
Content-Type: application/json

{
    “projects”: [{
        “name”: “proj-01”,
        ...
    }, {
        “name”: “proj-02”,
        ...
    }
}

A list of all projects across all pools is also supported; the URI would contain only the /projects path.

Example Request to Get all Projects with "backup" as Part its Properties:

GET /projects?filter=backup HTTP/1.1
Host: zfs-storage.example.com
Accept: application/json

Get Project Properties

This command lists the properties for a single project in a given pool. Successful get returns HTTP Code 200 (OK) along with the project properties in JSON format.

Table 12-6  Get Project URI Parameters
Parameter
Description
pool
Storage pool name
project
The project name

Example Request to List Project Named "proj-01" in the "gold" Pool:

GET /api/storage/v1/pools/gold/projects/proj-01 HTTP/1.1
Host: zfs-storage.example.com
Accept: application/json

Example Response:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "project": {
        "default_volblocksize": 8192.0,
        "logbias": "latency",
        "creation": "20130411T20:02:35",
        "nodestroy": false,
        "dedup": false,
        "sharenfs": "on",
        "sharesmb": "off",
        "default_permissions": "700",
        "mountpoint": "/export",
        "snaplabel": "",
        "id": "042919bb-0882-d903-0000-000000000000",
        "readonly": false,
        "rrsrc_actions": [],
        "compression": "off",
        "sharetftp": "",
        "default_sparse": false,
        "snapdir": "hidden",
        "aclmode": "discard",
        "copies": 1,
        "aclinherit": "restricted",
        "shareftp": "",
        "canonical_name": "gold/local/default",
        "recordsize": 131072.0,
        "usage": {
            "available": 1758424767306.0,
            "loading": false,
            "quota": 0.0,
            "snapshots": 0.0,
           "compressratio": 100.0,
           "child_reservation": 0.0,
           "reservation": 0.0,
           "total": 45960.0,
            "data": 45960.0
        },
        "default_volsize": 0.0,
        "secondarycache": "all",
        "collection": "local",
        "exported": true,
        "vscan": false,
        "reservation": 0.0,
        "atime": true,
        "pool": "gold",
        "default_user": "nobody",
        "name": "default",
        "checksum": "fletcher4",
        "default_group": "other",
        "sharesftp": "",
        "nbmand": false,
        "sharedav": "",
        "rstchown": true
    }
}