---
title: "Lists BGP route policies configured in BGP Control Plane."
method: GET
path: "/bgp/route-policies"
tags: ["bgp"]
deprecated: true
---

# Lists BGP route policies configured in BGP Control Plane.

`GET /bgp/route-policies`

> **Deprecated.**

Retrieves route policies from BGP Control Plane.
Deprecated: This will be removed in the future.

## Query parameters

- `router_asn` integer

## Response `200`

Success

- BgpRoutePolicy[]
  - `router-asn` integer — Autonomous System Number (ASN) identifying a BGP virtual router instance
  - `name` string — Name of the route policy
  - `type` 'export' | 'import' — Type of the route policy
  - `statements` BgpRoutePolicyStatement[] — List of the route policy statements
    - `match-neighbors` BgpRoutePolicyNeighborMatch — Matches a neighbor in a BGP route policy
      - `type` 'any' | 'all' | 'invert' — Defines BGP route policy matching logic in case of multiple match elements.
      - `neighbors` string[] — Neighbor IP addresses to match with
    - `match-families` BgpFamily[] — Matches any of the provided address families. If empty matches all address families.
      - `afi` string — Address Family Indicator (AFI) of the path
      - `safi` string — Subsequent Address Family Indicator (SAFI) of the path
    - `match-prefixes` BgpRoutePolicyPrefixMatch — Matches a CIDR prefix in a BGP route policy
      - `type` 'any' | 'all' | 'invert' — Defines BGP route policy matching logic in case of multiple match elements.
      - `prefixes` BgpRoutePolicyPrefix[] — Prefixes to match with
        - `cidr` string — CIDR prefix to match with
        - `prefix-len-min` integer — Minimal prefix length that will match if it falls under CIDR
        - `prefix-len-max` integer — Maximal prefix length that will match if it falls under CIDR
    - `route-action` 'none' | 'accept' | 'reject' — RIB processing action taken on the matched route
    - `add-communities` string[] — List of BGP standard community values to be added to the matched route
    - `add-large-communities` string[] — List of BGP large community values to be added to the matched route
    - `set-local-preference` integer — BGP local preference value to be set on the matched route
    - `nexthop` BgpRoutePolicyNexthopAction — BGP nexthop action
      - `self` boolean — Set nexthop to the IP address of itself
      - `unchanged` boolean — Don't change nexthop

## 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/versions/351336b27221/schema)
