カスタムのスキーマプロパティーを管理します。
|
カスタムプロパティー名に接頭辞「custom:」を追加すると、プロジェクト、ファイルシステム、および LUN に各カスタムのスキーマプロパティーを設定できます。
たとえば、次の「PUT」本文は、「priority」というカスタム int プロパティーを変更します。
{"custom:priority": 5}
|
スキーマプロパティーを一覧表示します。
リクエストの例:
GET /api/storage/v1/schema
結果例:
{
"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"
}]
}
スキーマプロパティーを取得します。
リクエストの例:
GET /api/storage/v1/schema/priority
結果例:
{
"property": {
"description": "priority",
"href": "/api/storage/v1/schema/priority",
"property": "bob",
"type": "Integer"
}
}
新しいスキーマプロパティーを作成します。
リクエストの例:
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"}
結果例:
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"
}
}
スキーマプロパティーを変更します。
リクエストの例:
PUT /api/storage/v1/schema/priority
{"description":"My custom priority level"}
結果例:
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"
}
}
スキーマプロパティーを削除します。
リクエストの例:
DELETE /api/storage/v1/schema/me HTTP/1.1
結果例:
HTTP/1.1 204 No Content