v1
latestOpenAPI 3.0.02026-07-243339471.1 MBGet a list of Switch interfaces
This API returns a list of interfaces for the specified serial number or stack id. Conductor serial may also be used instead of a stack id
Path parameters
The device serial number.
Serial Number of the switch in case of standalone, StackId or conductor serial in case of stack for which the device related information is requested.
Query parameters
Denotes the number of interfaces that needs to be fetched. Fetches all by default.
Specifies the zero-based resource offset from which to start the response.
Denotes the offset from where the interfaces need to be fetched or the number of interfaces to skip.
OData Version 4.0 filter string (limited functionality). Supports only 'and' conjunction ('or' and 'not' are NOT supported). Supported fields and operators are in the below given table.
| Field | Operators |
|---|---|
| name | eq and in |
| speed | eq and in |
| status | eq and in |
| connector | eq and in |
| duplex | eq and in |
| lag | eq and in |
| vlanmode | eq and in |
| neighbourFamily | eq and in |
| neighbourFunction | eq and in |
| poeClass | eq and in |
| poeStatus | eq and in |
| operStatus | eq and in |
The operators are implemented as follows:
-
eq: Only values exactly matching the given value are returned.
-
in: Only values present in the given list are returned.
Partial or full string free text search.
Comma separated list of sort expressions. Each sort expression is a property name optionally followed by a direction indicator asc (ascending) or desc (descending).
The first sort expression in the list defines the primary sort order, the second defines the secondary sort order, and so on. If a direction indicator is omitted the default direction is ascending.
Supported fields are port, speed, neighbour, neighbourFamily, nativeVlan, neighbourRole, alias, connector, lag, vlanMode, poeClass, ipv4 and mtu. Default sort by name.
Response
Object containing the interfaces information
Example response
{
"items": [
{
"id": "GigabitEthernet1/0/1",
"name": "GigabitEthernet1/0/1",
"index": 1,
"alias": "GE1",
"status": "Up",
"errorReason": null,
"description": "Uplink to Core Switch",
"adminStatus": "Up",
"operStatus": "Up",
"mtu": 1500,
"speed": 1000,
"connector": "RJ45",
"duplex": "Full",
"lag": null,
"vlanMode": "Access",
"allowedVlans": [
"VLAN10",
"VLAN20"
],
"allowedVlanIds": [
10,
20
],
"nativeVlan": 1,
"poeStatus": "Enabled",
"poeClass": "Class4",
"portAlignment": "Aligned",
"serialNumber": "CN31HKZ0CN",
"peerPort": "GigabitEthernet1/0/24",
"peerMemberId": 2,
"uplink": true,
"type": "GigabitEthernet",
"portError": [],
"module": "1",
"neighbour": "CoreSwitch",
"neighbourPort": "GigabitEthernet1/0/24",
"neighbourFamily": "Aruba",
"neighbourFunction": "Core",
"neighbourRole": "Core Switch",
"neighbourHealth": "Good",
"neighbourSerial": "CN32HKZ0DN",
"neighbourType": "Switch",
"isMultipleNeighbourClients": false,
"transceiverType": "SFP",
"transceiverSerial": "SFP123456",
"transceiverModel": "SFP-1G-LX",
"transceiverProductNumber": "J4859C",
"transceiverStatus": "Good",
"ipv4": "10.1.1.1",
"stpInstanceType": "RSTP",
"stpInstanceId": 0,
"stpPortRole": "Root",
"stpPortState": "Forwarding",
"stpPortInconsistent": "None"
}
],
"count": 1,
"total": 1
}