管理定制模式属性。
|
通过在定制属性名称中添加前缀 "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