---
title: "Lists BGP routes from BGP Control Plane RIB."
method: GET
path: "/bgp/routes"
tags: ["bgp"]
deprecated: true
---

# Lists BGP routes from BGP Control Plane RIB.

`GET /bgp/routes`

> **Deprecated.**

Retrieves routes from BGP Control Plane RIB filtered by parameters you specify.
Deprecated: This will be removed in the future.

## Query parameters

- `table_type` 'loc-rib' | 'adj-rib-in' | 'adj-rib-out', required
- `afi` string, required
- `safi` string, required
- `router_asn` integer
- `neighbor` string

## Response `200`

Success

- BgpRoute[]
  - `router-asn` integer — Autonomous System Number (ASN) identifying a BGP virtual router instance
  - `neighbor` string — IP address specifying a BGP neighbor if the source table type is adj-rib-in or adj-rib-out
  - `prefix` string — IP prefix of the route
  - `paths` BgpPath[] — List of routing paths leading towards the prefix
    - `family` BgpFamily — Address Family Indicator (AFI) and Subsequent Address Family Indicator (SAFI) of the path
      - `afi` string — Address Family Indicator (AFI) of the path
      - `safi` string — Subsequent Address Family Indicator (SAFI) of the path
    - `nlri` BgpNlri — Network Layer Reachability Information (NLRI) of the path
      - `base64` string — Base64-encoded NLRI in the BGP UPDATE message format
    - `path-attributes` BgpPathAttribute[] — List of BGP path attributes specific for the path
      - `base64` string — Base64-encoded BGP path attribute in the BGP UPDATE message format
    - `age-nanoseconds` integer — Age of the path (time since its creation) in nanoseconds
    - `best` boolean — True value flags the best path towards the destination prefix
    - `stale` boolean — True value marks the path as stale

## Other responses

- `500` — Internal Server Error
- `501` — BGP Control Plane disabled

---

[API](https://skmtc.net/cilium/apis/cilium-api.md) · [All operations](https://skmtc.net/cilium/apis/cilium-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cilium/cilium-api/revisions/351336b27221/schema)
