Skip Navigation Links | |
Exit Print View | |
![]() |
Oracle® ZFS Storage Appliance RESTful Application Programming Interface |
Chapter 2 Working with the API
Chapter 3 Alert Service Commands
Chapter 8 Problem Service Commands
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.
|
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
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.
|
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 } }