Go to main content

Oracle® ZFS Storage Appliance RESTful API Guide, Release OS8.7.x

Exit Print View

Updated: December 2017
 
 

Network Devices

Lists the physical network devices on the system. There are no modifiable properties on physical network devices.

Table 37  Network Commands
Request
Path /network/v1
Description
GET
/devices/<device>
Get the specified network device properties
GET
/devices
List all network device objects
Table 38  Network Device Properties
Name
Description
active
Boolean flag indicating if device is active
duplex
Duplex of device
factory_mac
Factory MAC address
media
Device media
speed
Device speed, in megabits/second
up
Boolean flag indicating if device is operational

List Network Devices

Lists all network devices.

Example Request:

GET /api/network/v1/devices HTTP/1.1
Authorization: Basic ab6rt4psMWE=
Host: example.zfssa.com:215
Accept: application/json

Example Result:

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

{
    "devices": [{
        "href": "/api/network/v1/devices/ixgbe0",
        ....
    }, {
        "href": "/api/network/v1/devices/ixgbe1",
        ...
    }, {
        "href": "/api/network/v1/devices/ixgbe2",
        ...
    }, {
        "href": "/api/network/v1/devices/ixgbe3",
        ...
    }]
}

Get Network Device

Gets the properties from a single network device.

Example Request:

GET /api/network/v1/devices/ixgbe0 HTTP/1.1
Authorization: Basic ab6rt4psMWE=
Host: example.zfssa.com:215
Accept: application/json

Example Result:

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

{
    "devices": {
        "active": false,
        "device": "ixgbe0",
        "duplex": "full-duplex",
        "factory_mac": "0:21:28:a1:d9:68",
        "href": "/api/network/v1/devices/ixgbe0",
        "media": "Ethernet",
        "speed": "1000 Mbit/s",
        "up": true
    }
}