Go to main content

Oracle® ZFS Storage Appliance RESTful API 指南,发行版 OS8.8.0

退出打印视图

更新时间: 2018 年 11 月
 
 

获取角色

检索单个角色的属性。要返回属性元数据,请将 props 查询参数设置为 true

请求示例:

GET /api/role/v1/roles/basic?props=true HTTP/1.1
Authorization: Basic abcefgMWE=
Host: zfs-storage.example.com:215
Accept: application/json

响应示例:

HTTP/1.1 200 OK
X-Zfssa-Appliance-Api: 1.0
Content-Type: application/json
Content-Length: 390

{
    "props": [{
        "immutable": true,
        "label": "Role name",
        "name": "name",
        "type": "String"
    }, {
        "label": "A description of this role",
        "name": "description",
        "type": "String"
    }],
    "role": {
        "authorizations": [],
        "description": "Basic administration",
        "href": "/api/role/v1/roles/basic",
        "name": "basic"
    }
}