---
title: "Get a list of Switch VLANs"
method: GET
path: "/network-monitoring/v1/switches/{serial-number}/vlans"
tags: ["Switch"]
---

# Get a list of Switch VLANs

`GET /network-monitoring/v1/switches/{serial-number}/vlans`

## Request

- Base URL: `https://sso.common.cloud.hpe.com`
- URL: `https://sso.common.cloud.hpe.com/network-monitoring/v1/switches/{serial-number}/vlans`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://sso.common.cloud.hpe.com/as/token.oauth2`

This API returns a list of VLANs for the specified serial number or stack id. Conductor serial may also be used instead of a stack id

## Path parameters

- `serial-number` string, const, required: The device serial number.

## Query parameters

- `limit` integer
- `offset` integer: Specifies the zero-based resource offset from which to start the response.
- `filter` string, const
- `search` string, const
- `sort` string, const

## Response `200`

Object containing the vlans information.

- SwitchVlanResponse: Fields appended to a list to facilitate paging.
  - `items` SwitchVlan[], required
    - `id` string, required: identifier.
    - `type` string, required: Type of the vlan.
    - `name` string: vlan name.
    - `status` string: vlan status.
    - `ipv4` string: ipv4.
    - `voice` string: voice.
    - `interfaces` string[]: interfaces list.
  - `count` integer, required: The number of objects returned in the current list.
  - `total` integer, required: The total number of objects contained in the datastore.
  - `offset` string, 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.

## Other responses

- `400`: Invalid input received.
- `401`: Unauthorized. Authentication credentials are required or invalid.
- `403`: Forbidden: Access is denied.
- `404`: Device with serial number not found.
- `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)
