---
title: "Get a list of Switches"
method: GET
path: "/network-monitoring/v1/switches"
tags: ["Switch"]
---

# Get a list of Switches

`GET /network-monitoring/v1/switches`

## Request

- Base URL: `https://sso.common.cloud.hpe.com`
- URL: `https://sso.common.cloud.hpe.com/network-monitoring/v1/switches`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://sso.common.cloud.hpe.com/as/token.oauth2`
- TypeScript: <https://skmtc.dev/arubanetworks/apis/authorization/docs/network-monitoring/v1/switches/get.ts> (a function with typed inputs; its response is checked against the schema)

This API endpoint retrieves a list of switches associated to a customer, based on the query parameters provided. Each switch in the returned list includes comprehensive details like serial number, name, MAC address, siteId, status etc.

## Query parameters

- `limit` integer
- `next` string, int32: Specifies the pagination cursor for the next page of resources.
- `filter` string, const
- `sort` string, const

## Response `200`

Object containing list of switches.

- SwitchListResponse: Fields appended to a list to facilitate paging.
  - `items` object[], required
    - `id` string, const, required: Serial of the switch.
    - `type` string, const, required: API type.
    - `serialNumber` string, const, required
    - `macAddress` string, required: The MAC address of the switch
    - `deviceName` string, required: Name of the switch
    - `model` string: Model of the switch
    - `deployment` string: Deployment mode of the switch
    - `stackId` string: StackId of the switch in the network
    - `switchType` string: StackId of the switch in the network
    - `siteName` string: SiteName
    - `firmwareVersion` string: Current firmware version of the switch
    - `deviceFunction` string: Device Function (Persona identifier) for the switch.
    - `partNumber` string: Part number of the switch
    - `ipv4` string: The switch IP address in IPv4 format
    - `status` string: The status of the switch
    - `ipv6` string: The switch IP address in IPv6 format
    - `siteId` string, const, required
    - `uptimeInMillis` number, float: The elapsed time in milliseconds since the last boot.
    - `lastSeenAt` number, float: Timestamp when the switch was last seen online
    - `switchTrends` SwitchTrends
      - `serialNumber` string, const
      - `switchRole` string: Role of the switch.
      - `cpuUtilization` number: CPU Utilization of the switch.
      - `memoryUtilization` number: Memory Utilization of the switch.
      - `poeAvailable` number: Total Poe available.
      - `poeConsumption` number: Poe drawn.
      - `powerConsumption` number: Total power available.
      - `totalPowerConsumption` number: Total power consumed.
      - `systemTemperature` number: Temperature of the switch.
      - `upLinkPorts` string: Uplink ports for the switch.
      - `usage` number: Total sum of the inrate and outrate for the switch.
  - `count` integer, required: The number of objects returned in the current list.
  - `total` integer, required: The total number of objects contained in the datastore.
  - `next` string, int32, required: Indicate the next page number, null if there are no further pages.

## Other responses

- `400`: Invalid input received.
- `401`: Unauthorized. Authentication credentials are required or invalid.
- `403`: Forbidden: Access is denied.
- `429`: Too Many Requests. The user has sent too many requests in a given amount of time.
- `500`: Internal Server Error. An unexpected error occurred on the server.

---

[API](https://skmtc.dev/arubanetworks/apis/authorization.md) - [All operations](https://skmtc.dev/arubanetworks/apis/authorization/llms.txt) - [OpenAPI document](https://skmtc.dev/arubanetworks/apis/authorization/revisions/74c95058b11f?raw)
