Manages custom schema properties.
|
Each custom schema property can be set on projects, filesystems, and LUNs by adding the prefix “custom:” to the custom property name.
For example, the following "PUT" body modifies a customer int property named "priority":
{"custom:priority": 5}
|
Lists schema properties.
Example Request:
GET /api/storage/v1/schema
Example Result:
{
"properties": [{
"description": "bob",
"href": "/api/storage/v1/schema/bob",
"property": "bob",
"type": "String"
},{
"description": "boo",
"href": "/api/storage/v1/schema/boo",
"property": "boo",
"type": "String"
}]
}
Gets a schema property.
Example Request:
GET /api/storage/v1/schema/priority
Example Result:
{
"property": {
"description": "priority",
"href": "/api/storage/v1/schema/priority",
"property": "bob",
"type": "Integer"
}
}
Creates a new schema property.
Example Request:
POST /api/storage/v1/schema HTTP/1.1
Host: zfssa.example.com:215
Content-Type: application/json
Content-Length: 64
{"property":"priority", "type":"Integer", "description":"Oh my"}
Example Result:
HTTP/1.1 201 Created
Content-Length: 89
X-Zfssa-Nas-Api: 1.0
Content-Type: application/json
Location: /api/storage/v1/schema/priority
{
"property": {
"href": "/api/storage/v1/schema",
"type": "Integer",
"description": "Oh my"
}
}
Modifies a schema property.
Example Request:
PUT /api/storage/v1/schema/priority
{"description":"My custom priority level"}
Example Result:
HTTP/1.1 202 Accepted
X-Zfssa-Nas-Api: 1.0
Content-Type: application/json
Content-Length: 90
{
"property": {
"href": "//api/storage/v1/schema/priority",
"type": "Integer",
"description": "My custom priority level"
}
}
Deletes a schema property
Example Request:
DELETE /api/storage/v1/schema/me HTTP/1.1
Example Result:
HTTP/1.1 204 No Content