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
The create project command creates a project with a given name residing in the given storage pool. The new project with default properties is returned.
|
JSON Body Request Parameters:
name – The project name must be supplied to create a project.
project properties – Any of the project properties can be set as the new project"s initial values.
Example Request to Create a Project Named "proj-01":
POST /api/storage/v1/pools/gold/projects HTTP/1.1 Hosta: zfs-storage.example.com Content-Type: application/json Accept: application/json { “name”: “proj-01”, “sharenfs”: “ro” }
Successful creation returns HTTP Status 201 (Created) with the location header containing the URI of the new project. The body contains all of the project properties in JSON format.
Example Results:
HTTP/1.1 201 Created Content-Type: application/json Location: http://zfs-storage.example.com:215 /pools/gold/projects/proj-01 { “project”: { “name”: “proj-01”, "href": "/api/storage/v1/pools/gold/projects/proj-01", “mountpoint”: “/export/acme/gold”, ... } }