| 
 | 
| 
 | 
列出所有已配置网络接口。
请求示例:
GET /api/network/v1/interfaces HTTP/1.1 Authorization: Basic abcd1234MWE= Host: zfssa.example.com:215 Accept: application/json
响应示例:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 369
{
    "interfaces": {[
        "href": "/api/network/v1/interfaces/ixgbe0",
        "v4addrs": ["10.80.231.58/24"]
        ...
    }, {
        "href": "/api/network/v1/interfaces/ixgbe1",
        "v4addrs": ["10.80.231.59/24"]
        ...
    }, {
        "href": "/api/network/v1/interfaces/ixgbe2",
        "v4addrs": ["10.80.231.60/24"]
        ...
    }, {
        "href": "/api/network/v1/interfaces/ixgbe3",
        "v4addrs": ["10.80.231.61/24"]
        ...
    }]
}
            
            
                获取指定的网络接口的完整属性列表。
请求示例:
GET /api/network/v1/interfaces/ixgbe0 HTTP/1.1 Authorization: Basic abcd1234MWE= Host: zfssa.example.com:215 Accept: application/json
响应示例:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 292
{
    "interface": {
        "admin": true,
        "class": "ip",
        "curaddrs": ["10.80.231.58/24"],
        "enable": true,
        "href": "/api/network/v1/interfaces/ixgbe0",
        "interface": "ixgbe0",
        "label": "Untitled Interface",
        "links": ["ixgbe0"],
        "state": "up",
        "v4addrs": ["10.80.231.58/24"],
        "v4dhcp": false,
        "v6addrs": [],
        "v6dhcp": false
    }
}
            
            
                创建新的网络接口。
请求示例:
POST /api/network/v1/interfaces HTTP/1.1
Host: zfssa.example.com:215
X-Auth-User: root
X-Auth-Key: letmein
Content-Type: application/json
Content-Length: 78
{
    "class": "ip",
    "links": ["ixgbe3"],
    "v4addrs":"192.168.1.9/24"
}
                响应示例:
HTTP/1.1 201 Created X-Zfssa-Appliance-Api: 1.0 Location: /api/network/v1/interfaces/ixgbe3
修改现有的网络接口。
请求示例:
PUT /api/network/v1/interfaces/ixgbe3 HTTP/1.1
{
    "v4addrs": ["192.168.1.99/24"],
    "interface": "Demo Rest"
}
                响应示例:
HTTP/1.1 202 Accepted
X-Zfssa-Appliance-Api: 1.0
Content-Type: application/json
Content-Length: 219
{
    "admin": true,
    "class": "ip",
    "curaddrs": ["192.168.1.9/24"],
    "enable": true,
    "href": "/api/network/v1/interfaces/ixgbe3",
    "interface": "ixgbe3",
    "label": "Demo Rest",
    "links": ["ixgbe3"],
    "state": "failed",
    "v4addrs": ["192.168.1.99/24"]
    "v4dhcp": false,
    "v6addrs": [],
    "v6dhcp": false
}
            
            
                删除现有的网络接口。
请求示例:
DELETE /api/network/v1/interfaces/ixgbe3 HTTP/1.1 Authorization: Basic abcd1234MWE= Host: zfssa.example.com:215
结果示例:
HTTP/1.1 204 No Content