BGP Monitors API
- API version: 7.0.93
Note: Private monitor data is not available for ThousandEyes for Government instance.
Retrieve information about BGP monitors available to your ThousandEyes account. ThousandEyes ingests BGP routing data from dozens of global BGP collectors and automatically integrates that visibility as a configurable layer under service, network, and path visualization layers.
When you specify a service URL in a test, layered BGP tests automatically track reachability and path changes for any relevant prefix. When you use an IP address as the target for a test, the ThousandEyes platform monitors the relevant internet-routed prefix. You can also create specific BGP monitoring for a prefix, and can alert on hijacks and leaks.
For more information about monitors, see Inside-Out BGP Visibility.
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- Java 11+
- Maven/Gradle
To install the API client library to your local Maven repository, simply execute:
mvn clean installTo deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deployRefer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependencies>
<dependency>
<groupId>com.thousandeyes.sdk</groupId>
<artifactId>bgp-monitors</artifactId>
<version>version</version>
</dependency>
<dependency>
<groupId>com.thousandeyes.sdk</groupId>
<artifactId>client</artifactId>
<version>version</version>
</dependency>
<!-- Example only, you can use your own client implementation -->
<dependency>
<groupId>com.thousandeyes.sdk</groupId>
<artifactId>client-native</artifactId>
<version>version</version>
</dependency>
</dependencies>
Add this dependency to your project's build file:
implementation "com.thousandeyes.sdk:client:<version>"
implementation "com.thousandeyes.sdk:client-native:<version>" #Example only, you can use your own client implementation
implementation "com.thousandeyes.sdk:bgp-monitors:<version>"At first generate the JAR by executing:
mvn clean packageThen manually install the following JARs:
target/bgp-monitors-version.jartarget/lib/*.jar
Please follow the installation instruction and execute the following Java code:
import com.thousandeyes.sdk.bgp.*;
import com.thousandeyes.sdk.bgp.client.*;
import com.thousandeyes.sdk.bgp.monitors.model.*;
import com.thousandeyes.sdk.bgp.monitors.BgpMonitorsApi;
public class BgpMonitorsApiExample {
public static void main(String[] args) {
// Configure clients using the `defaultClient` object, such as
// overriding the host and port, timeout, etc. In this example we are using the NativeApiClient
// but you can use your own client implementation
ApiClient defaultClient = NativeApiClient
.builder()
.baseUri("https://api.thousandeyes.com/v7")
.bearerToken("<bearer-token>")
.build();
BgpMonitorsApi apiInstance = new BgpMonitorsApi(defaultClient);
String aid = "1234"; // String | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.
try {
Monitors result = apiInstance.getBgpMonitors(aid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BgpMonitorsApi#getBgpMonitors");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}All URIs are relative to https://api.thousandeyes.com/v7
| Class | Method | HTTP request | Description |
|---|---|---|---|
| BgpMonitorsApi | getBgpMonitors | GET /monitors | List BGP monitors |
| BgpMonitorsApi | getBgpMonitorsWithHttpInfo | GET /monitors | List BGP monitors |
Authentication schemes defined for the API:
- Type: HTTP Bearer Token authentication
It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.
However, the instances of the api clients created from the ApiClient are thread-safe and can be re-used.