v1

latestOpenAPI 3.0.02026-07-243339471.1 MB
Switch

Get 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

get/network-monitoring/v1/switches/{serial-number}/interfaces

Path parameters

serial-numberstring const required

The device serial number.

Example:AP00000001

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

limitinteger

Denotes the number of interfaces that needs to be fetched. Fetches all by default.

offsetinteger

Specifies the zero-based resource offset from which to start the response.

Example:10

Denotes the offset from where the interfaces need to be fetched or the number of interfaces to skip.

filterstring const

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.

FieldOperators
nameeq and in
speedeq and in
statuseq and in
connectoreq and in
duplexeq and in
lageq and in
vlanmodeeq and in
neighbourFamilyeq and in
neighbourFunctioneq and in
poeClasseq and in
poeStatuseq and in
operStatuseq 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.

searchstring const

Partial or full string free text search.

sortstring const

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

countinteger required

The number of objects returned in the current list.

totalinteger required

The total number of objects contained in the datastore.

offsetstring const required

An offset which could be passed in the next query to fetch the next page. Set to null when no more pages remain.

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
}