This article covers how to get started with the BGP Monitoring APIs.
Notes:
The API Tester in the v4 Portal enables you to securely call the methods of these APIs using your organization's Kentik data.
BGP monitoring is supported in the Kentik portal via BGP Monitor tests, which report on BGP reachability, path changes, and events. For more information, see BGP Monitor Details Page.
Protobuf and OpenAPI specifications for Kentik’s v6 APIs are available in our api-schema-public repository.
BGP Monitoring Usage
The topics below provide important background information for the use of these APIs.
Overview
The BGP Monitoring API provides programmatic access to Kentik's BGP monitoring system. The APIs handle two distinct functions:
- Admin service: manages monitoring of advertised BGP prefixes as collected from global vantage points. 
- Data service: handles retrieval of two classes of data for any IP prefix: - metrics for reachability and path changes, which provide a time series for a specified interval; 
- routes, which provide a snapshot of routing information for particular timestamp. 
 
The services described above use the following endpoints:
| Endpoint | Purpose | 
|---|---|
| BgpMonitoringAdminService | CRUD operations for BGP monitors | 
| BgpMonitoringDataService | Retrieval of BGP monitoring data | 
Both REST endpoints and gRPC RPCs are provided.
Known Limitations
The API currently does not support retrieval of BGP event history.
BGP Monitoring Data
Kentik's BGP monitoring API provides the following information about network prefixes:
- Reachability: expressed as the percentage of vantage points reporting the prefix 
- Path changes: the number of changes in a given time range 
- Routes: AS Path, next hop 
Data Retrieval Limitations
The following considerations apply to data retrieval using these APIs:
- BGP metrics and routes can be retrieved for any prefix with prefix length greater than 14 and any time interval. Prefixes with smaller length must be split into subnets (sub-prefixes) and requested individually. 
- Requests for BGP metrics can can specify one or more metric types to be retrieved for a single prefix. Observed data are returned as a sequence of messages, one for each metric type and observation time. 
- Route requests retrieve snapshot of information for specified prefix and time. Responses contain also mapping of ASNs to AS names for convenience. 
Working with BGP Monitoring
The topics below cover important information related to using Kentik's BGP monitoring APIs.
BGP Prefixes
These APIs represent BGP prefixes using NLRI (Network Layer Reachability Information) objects. While NLRI objects allow representation of any type of network address, the system currently supports only IPv4 and IPv6 unicast in standard textual representation:
- IPv4: dotted-decimal notation 
- IPv6: RFC 5952 syntax 
BGP Monitor Tests
BGP Monitors enable the generation of alerts for group network prefixes (IPv4 or IPv6) based on the following factors:
- Visibility/reachability of prefixes 
- Mismatch of originating ASNs with a specified list of valid originators 
- Validity of advertisements with respect to RPKI (Resource Public Key Infrastructure) 
Configuration Limitations
The following considerations apply when configuring a BGP monitor test:
- Each BGP monitor instance can monitor up to 10 prefixes. 
- The length of each monitored (IPv4 or IPv6) prefix must be greater than 14. Prefixes with smaller length must be split into subnets (sub-prefixes). 
BGP Monitoring RPCs
The tables below provide a quick reference to key information about each Remote Procedure Call in these APIs. Use the links in the tables to see schemas for the request and/or response body (if any).
Note: To test methods using your own Kentik data, use the portal's API Tester.
ListMonitors
API: BgpMonitoringAdminService
| REST Method | REST Endpoint | Description | ||
|---|---|---|---|---|
| GET | /bgp_monitoring/v202210 | Returns list of all BGP monitors present in the account. | ||
| 
 | ||||
CreateMonitor
API: BgpMonitoringAdminService
| REST Method | REST Endpoint | Description | ||
|---|---|---|---|---|
| POST | /bgp_monitoring/v202210 | Creates new BGP Monitor and if successful returns its configuration. | ||
| 
 | ||||
GetMonitor
API: BgpMonitoringAdminService
| REST Method | REST Endpoint | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| GET | /bgp_monitoring/v202210 | Returns configuration of existing BGP monitor with specific ID. | ||||||||||
| 
   
 | ||||||||||||
DeleteMonitor
API: BgpMonitoringAdminService
| REST Method | REST Endpoint | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| DELETE | /bgp_monitoring/v202210 | Delete BGP monitor with with specific ID. | ||||||||||
| 
 
 
 | ||||||||||||
UpdateMonitor
API: BgpMonitoringAdminService
| REST Method | REST Endpoint | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PUT | /bgp_monitoring/v202210 | Updates configuration of BGP monitor with specific ID and returns updated configuration. | ||||||||||
| 
   
 | ||||||||||||
SetMonitorStatus
API: BgpMonitoringAdminService
| REST Method | REST Endpoint | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PUT | /bgp_monitoring/v202210 | Sets administrative status of BGP monitor with specific ID. | ||||||||||
| 
   
 | ||||||||||||
GetMetricsForTarget
API: BgpMonitoringDataService
| REST Method | REST Endpoint | Description | ||
|---|---|---|---|---|
| POST | /bgp_monitoring/v202210 | Retrieve metric data for single BGP prefix and time interval. | ||
| 
 | ||||
GetRoutesForTarget
API: BgpMonitoringDataService
| REST Method | REST Endpoint | Description | ||
|---|---|---|---|---|
| POST | /bgp_monitoring/v202210 | Retrieve snapshot of route information for single BGP prefix at specific time. | ||
| 
 | ||||
BGP Monitoring Schemas
This API uses the following schemas.
protobufAny
| Schema: protobufAny | Type: object | ||||||
| Properties: 
 | |||||||
rpcStatus
| Schema: rpcStatus | Type: object | ||||||||
| Properties: 
 | |||||||||
Afi
| Schema: v202104Afi | Type: string | ||||||
| Attributes: 
 | |||||||
RpkiStatus
| Schema: v202104RpkiStatus | Type: string | ||||||||
| Attributes: 
 | |||||||||
Safi
| Schema: v202104Safi | Type: string | ||||||
| 
 | |||||||
VantagePoint
| Schema: v202104VantagePoint | Type: object | ||||||||||
| Properties: 
 | |||||||||||
UserInfo
| Schema: v202202UserInfo | Type: object | ||||||||
| Properties: 
 | |||||||||
BgpHealthSettings
| Schema: v202210BgpHealthSettings | Type: object | ||||||
| Properties: 
 | |||||||
BgpMetric
| Schema: v202210BgpMetric | Type: object | ||||||||||
| Properties: 
 | |||||||||||
BgpMetricType
| Schema: v202210BgpMetricType | Type: string | ||||||||
| Attributes: 
 | |||||||||
BgpMonitor
| Schema: v202210BgpMonitor | Type: object | ||||||||||||||||||||
| Properties (* = required) 
 | |||||||||||||||||||||
BgpMonitorSettings
| Schema: v202210BgpMonitorSettings | Type: object | ||||||||||||||||||
| Properties (* = required) 
 | |||||||||||||||||||
BgpMonitorStatus
| Schema: v202210BgpMonitorStatus | Type: string | ||||||||
| Attributes: 
 | |||||||||
CreateMonitorRequest
| Schema: v202210CreateMonitorRequest | Type: object | ||||
| Properties: 
 | |||||
CreateMonitorResponse
| Schema: v202210CreateMonitorResponse | Type: object | ||||
| Properties: 
 | |||||
DeleteMonitorResponse
| Schema: v202210DeleteMonitorResponse | Type: object | 
| Properties: None. | |
GetMetricsForTargetRequest
| Schema: v202210GetMetricsForTargetRequest | Type: object | ||||||||||||
| Properties (* = required) 
 | |||||||||||||
GetMetricsForTargetResponse
| Schema: v202210GetMetricsForTargetResponse | Type: object | ||||
| Properties: 
 | |||||
GetMonitorResponse
| Schema: v202210GetMonitorResponse | Type: object | ||||
| Properties: 
 | |||||
GetRoutesForTargetRequest
| Schema: v202210GetRoutesForTargetRequest | Type: object | ||||||||||
| Properties (* = required) 
 | |||||||||||
GetRoutesForTargetResponse
| Schema: v202210GetRoutesForTargetResponse | Type: object | ||||||
| Properties: 
 | |||||||
ListMonitorsResponse
| Schema: v202210ListMonitorsResponse | Type: object | ||||||
| Properties: 
 | |||||||
Nlri
| Schema: v202210Nlri | Type: object | ||||||||
| Properties (* = required) 
 | |||||||||
RouteInfo
| Schema: v202210RouteInfo | Type: object | ||||||||||||||
| Properties: 
 | |||||||||||||||
SetMonitorStatusRequest
| Schema: v202210SetMonitorStatusRequest | Type: object | ||||||
| Properties (* = required) 
 | |||||||
SetMonitorStatusResponse
| Schema: v202210SetMonitorStatusResponse | Type: object | 
| Properties: None. | |
UpdateMonitorRequest
| Schema: v202210UpdateMonitorRequest | Type: object | ||||
| Properties: 
 | |||||
UpdateMonitorResponse
| Schema: v202210UpdateMonitorResponse | Type: object | ||||
| Properties: 
 | |||||
© 2014-25 Kentik
