---
title: "Get interface trends for a Switch"
method: GET
path: "/network-monitoring/v1/switches/{serial-number}/interface-trends"
tags: ["Switch"]
---

# Get interface trends for a Switch

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

## Request

- Base URL: `https://sso.common.cloud.hpe.com`
- URL: `https://sso.common.cloud.hpe.com/network-monitoring/v1/switches/{serial-number}/interface-trends`
- 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/:serial-number/interface-trends/get.ts> (a function with typed inputs; its response is checked against the schema)

This API provides interface trend data for a given site based on a serial number or stack id. When a stack id or conductor serial is provided, the trends are aggregated across the entire stack. When a member serial is provided, the trends are aggregated for that specific member. Supported metrics include RX bytes, TX bytes, discards, giants, errors, runts, and collisions.

## Path parameters

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

## Query parameters

- `site-id` string, const
- `interface-id` string
- `uplink` boolean
- `filter` string, const

## Response `200`

Object containing interface trends related to the switch.

- InterfaceTrendsResponse: Response containing interface trends related to the switch.
  - `id` string, required: identifier.
  - `type` string, required: Device type of monitoring.
  - `metric` string: Trends name.
  - `interfaceId` string: Interface name for which the api called.
  - `uplink` boolean: To identify uplink interfaces.
  - `keys` string[]: Trends list.
  - `samples` Sample[]: Samples for the interface trends in the key list.
    - `data` number[]: Samples list.
    - `timestamp` number: Timestamp for the samples.
  - `units` string[]: Units for the interface trends in the keys list.

## 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)
