thousandeyes-sdk-python/thousandeyes-sdk-bgp-monitors/docs/BGPMonitorsApi.md
Miguel Pragosa cafc4e63c7
Some checks failed
Python CI / build (push) Has been cancelled
[GitHub Bot] Generated python SDK (#80)
Co-authored-by: API Team <api-team@thousandeyes.com>
2024-10-15 10:56:27 +01:00

93 lines
3.5 KiB
Markdown

# thousandeyes_sdk.bgp_monitors.BGPMonitorsApi
All URIs are relative to *https://api.thousandeyes.com/v7*
Method | HTTP request | Description
------------- | ------------- | -------------
[**get_bgp_monitors**](BGPMonitorsApi.md#get_bgp_monitors) | **GET** /monitors | List BGP monitors
# **get_bgp_monitors**
> Monitors get_bgp_monitors(aid=aid)
List BGP monitors
Retrieves a list of BGP monitors available to your account in ThousandEyes, including public and private feeds.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.bgp_monitors
from thousandeyes_sdk.bgp_monitors.models.monitors import Monitors
from thousandeyes_sdk.bgp_monitors.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com/v7
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com/v7"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.bgp_monitors.BGPMonitorsApi(api_client)
aid = '1234' # str | 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. (optional)
try:
# List BGP monitors
api_response = api_instance.get_bgp_monitors(aid=aid)
print("The response of BGPMonitorsApi->get_bgp_monitors:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling BGPMonitorsApi->get_bgp_monitors: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; 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. | [optional]
### Return type
[**Monitors**](Monitors.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)