thousandeyes-sdk-python/thousandeyes-sdk-bgp-updates/README.md
api-team-automation[bot] d4b7ca82b7
Some checks failed
Python CI / build (push) Has been cancelled
[GitHub Bot] Generated python SDK (#193)
Co-authored-by: API Team <api-team@thousandeyes.com>
2026-09-08 13:15:25 +01:00

150 lines
7.6 KiB
Markdown

# thousandeyes-sdk-bgp-updates
Retrieve BGP updates observed by BGP monitors tracking prefixes in your ThousandEyes account group.
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 7.0.104
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
## Requirements.
Python 3.9+
## Installation & Usage
### pip install
Install directly via PyPi:
```sh
pip install thousandeyes-sdk-bgp-updates
```
(you may need to run `pip` with root permission: `sudo pip install thousandeyes-sdk-bgp-updates`)
Then import the package:
```python
import thousandeyes_sdk.bgp_updates
```
### Setuptools
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)
Then import the package:
```python
import thousandeyes_sdk.bgp_updates
```
### Tests
Execute `pytest` to run the tests.
## Getting Started
Please follow the installation procedure and then run the following:
```python
import thousandeyes_sdk.core
import thousandeyes_sdk.bgp_updates
from thousandeyes_sdk.core.exceptions 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_updates.BGPUpdatesApi(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)
max = 20 # int | Maximum number of BGP updates to return. (optional) (default to 20)
cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional)
expand = ["monitor"] # List[BgpDataExpandOption] | Optional expansions. Pass `expand=monitor` to replace monitor IDs with full BGP monitor objects. (optional)
start_date = '2022-07-17T22:00:54Z' # datetime | Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional)
end_date = '2022-07-18T22:00:54Z' # datetime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional)
prefixes = ["192.0.2.0/24"] # List[str] | Prefix CIDR filters. Repeat the parameter to filter by multiple prefixes. (optional)
origin_ases = [64512] # List[int] | Origin AS filters. Repeat the parameter to filter by multiple ASNs. (optional)
as_paths = ["64512 64513"] # List[str] | AS path filters, expressed as a space-separated list of ASNs. Repeat the parameter to filter by multiple AS paths. (optional)
rpki_statuses = [
'Valid'
] # List[BgpRpkiStatus] | RPKI status filters. (optional)
update_type = [
'announcement'
] # List[BgpUpdateType] | BGP update type filters. (optional)
monitor_ids = ["101"] # List[str] | BGP monitor ID filters. Repeat the parameter to filter by multiple monitors. Get `monitorId` from the `/monitors` endpoint. (optional)
communities = ["64512:100"] # List[str] | BGP community filters. Repeat the parameter to filter by multiple communities. (optional)
try:
# List BGP updates
api_response = api_instance.get_bgp_updates(aid=aid, max=max, cursor=cursor, expand=expand, start_date=start_date, end_date=end_date, prefixes=prefixes, origin_ases=origin_ases, as_paths=as_paths, rpki_statuses=rpki_statuses, update_type=update_type, monitor_ids=monitor_ids, communities=communities)
print("The response of BGPUpdatesApi->get_bgp_updates:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling BGPUpdatesApi->get_bgp_updates: %s\n" % e)
```
## Documentation for API Endpoints
All URIs are relative to *https://api.thousandeyes.com/v7*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*BGPUpdatesApi* | [**get_bgp_updates**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/BGPUpdatesApi.md#get_bgp_updates) | **GET** /bgp/updates | List BGP updates
## Documentation For Models
- [BgpDataExpandOption](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/BgpDataExpandOption.md)
- [BgpMonitor](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/BgpMonitor.md)
- [BgpRpkiStatus](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/BgpRpkiStatus.md)
- [BgpUpdate](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/BgpUpdate.md)
- [BgpUpdateType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/BgpUpdateType.md)
- [BgpUpdates](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/BgpUpdates.md)
- [Error](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/Error.md)
- [Link](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/Link.md)
- [Monitor](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/Monitor.md)
- [MonitorType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/MonitorType.md)
- [PaginationLinks](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/PaginationLinks.md)
- [UnauthorizedError](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/UnauthorizedError.md)
- [ValidationError](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/ValidationError.md)
- [ValidationErrorItem](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-bgp-updates/docs/ValidationErrorItem.md)
<a id="documentation-for-authorization"></a>
## Documentation For Authorization
Authentication schemes defined for the API:
<a id="BearerAuth"></a>
### BearerAuth
- **Type**: Bearer authentication
## Author
<a href="mailto:api-team@thousandeyes.com">ThousandEyes API Team </a>