Go to main content

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

退出打印视图

更新时间: 2018 年 11 月
 
 

获取服务命令

get service 命令返回该服务的相关信息,包括所有可用命令的列表。

请求示例:

GET /api/appliance/v1 HTTP/1.1
Host: zfs-storage.example.com
X-Auth-Session: guigqpQRE4g89ngb

响应示例:

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

{
    "service": {
        "name": "appliance",
        "methods": [
            {
                "description": "Get appliance RESTful services",
                "path": "/apis",
                "request": "GET"
            },
            {
                "description": "Get appliance RESTful service properties",
                "path": "/apis/<api:path>",
                "request": "GET"
            },
            {
                "description": "Create a new alert threshold watch",
                "path": "/alerts/thresholds",
                "request": "POST"
            }, ... ]
    }
}