[GitHub Bot] Generated python SDK

This commit is contained in:
API Team 2026-02-02 14:36:36 +00:00
parent 06c43bb06e
commit e733d4ca8c
175 changed files with 11788 additions and 22 deletions

View File

@ -12,7 +12,7 @@ This API provides the following operations to manage your organization:
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 7.0.73
- API version: 7.0.74
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

View File

@ -29,6 +29,7 @@ from thousandeyes_sdk.administrative.models.expand_account_group_options import
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType

View File

@ -25,6 +25,7 @@ from thousandeyes_sdk.administrative.models.permissions import Permissions
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType

View File

@ -27,6 +27,7 @@ from thousandeyes_sdk.administrative.models.roles import Roles
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType

View File

@ -26,6 +26,7 @@ from thousandeyes_sdk.administrative.models.audit_user_events import AuditUserEv
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.pagination_iterable import PaginationIterable
from thousandeyes_sdk.core.rest import RESTResponseType
@ -42,6 +43,76 @@ class UserEventsApi:
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-administrative"))
self.api_client = api_client
@validate_call
def get_user_events_paginated(
self,
aid: Annotated[Optional[StrictStr], Field(description="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.")] = None,
use_all_permitted_aids: Annotated[Optional[StrictBool], Field(description="Set to `true` to load data from all accounts the user has access to.")] = None,
window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None,
start_date: Annotated[Optional[datetime], Field(description="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`.")] = None,
end_date: Annotated[Optional[datetime], Field(description="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`.")] = None,
cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> PaginationIterable:
"""List activity log events
Returns a list of activity log events in the current account group. If `useAllPermittedAids=true` query parameter is passed and the user has permission `View activity log for all users in account group` the logs returned include events across all the account groups they belong to. For more information about changing the account group context, see [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext).
:param aid: 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.
:type aid: str
:param use_all_permitted_aids: Set to `true` to load data from all accounts the user has access to.
:type use_all_permitted_aids: bool
:param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.
:type window: str
:param start_date: 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`.
:type start_date: datetime
:param end_date: 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`.
:type end_date: datetime
:param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.
:type cursor: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
return PaginationIterable(
self.get_user_events,
lambda data: data.audit_events if data and data.audit_events else [],
aid = aid, use_all_permitted_aids = use_all_permitted_aids, window = window, start_date = start_date, end_date = end_date, cursor = cursor,
_request_timeout=_request_timeout,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
@validate_call
def get_user_events(

View File

@ -28,6 +28,7 @@ from thousandeyes_sdk.administrative.models.users import Users
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType

View File

@ -5,7 +5,7 @@ Manage Cloud and Enterprise Agents available to your account in ThousandEyes.
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 7.0.73
- API version: 7.0.74
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

View File

@ -25,6 +25,7 @@ from thousandeyes_sdk.agents.models.agent_proxies import AgentProxies
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType

View File

@ -26,6 +26,7 @@ from thousandeyes_sdk.agents.models.notification_rule_detail import Notification
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType

View File

@ -30,6 +30,7 @@ from thousandeyes_sdk.agents.models.cloud_enterprise_agents import CloudEnterpri
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType

View File

@ -29,6 +29,7 @@ from thousandeyes_sdk.agents.models.cloud_enterprise_agents import CloudEnterpri
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType

View File

@ -26,6 +26,7 @@ from thousandeyes_sdk.agents.models.agent_tests_assign_request import AgentTests
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType

View File

@ -12,7 +12,7 @@ For more information about the alerts, see [Alerts](https://docs.thousandeyes.co
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 7.0.73
- API version: 7.0.74
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

View File

@ -28,6 +28,7 @@ from thousandeyes_sdk.alerts.models.rules import Rules
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType

View File

@ -28,6 +28,7 @@ from thousandeyes_sdk.alerts.models.expand_alert_test_options import ExpandAlert
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType

View File

@ -27,6 +27,7 @@ from thousandeyes_sdk.alerts.models.alerts import Alerts
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.pagination_iterable import PaginationIterable
from thousandeyes_sdk.core.rest import RESTResponseType
@ -337,6 +338,79 @@ class AlertsApi:
@validate_call
def get_alerts_paginated(
self,
aid: Annotated[Optional[StrictStr], Field(description="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.")] = None,
window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None,
start_date: Annotated[Optional[datetime], Field(description="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`.")] = None,
end_date: Annotated[Optional[datetime], Field(description="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`.")] = None,
max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None,
cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None,
state: Annotated[Optional[Any], Field(description="Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> PaginationIterable:
"""List active alerts
Returns a list of active alerts. If no alerts are active within the specified time range, an empty response is returned. Note that time filters (`window`, `startDate`, or `endDate`) are only applied to cleared alerts.
:param aid: 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.
:type aid: str
:param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.
:type window: str
:param start_date: 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`.
:type start_date: datetime
:param end_date: 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`.
:type end_date: datetime
:param max: (Optional) Maximum number of objects to return.
:type max: int
:param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.
:type cursor: str
:param state: Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`.
:type state: State
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
return PaginationIterable(
self.get_alerts,
lambda data: data.alerts if data and data.alerts else [],
aid = aid, window = window, start_date = start_date, end_date = end_date, max = max, cursor = cursor, state = state,
_request_timeout=_request_timeout,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
@validate_call
def get_alerts(

View File

@ -9,7 +9,7 @@ For more information about monitors, see [Inside-Out BGP Visibility](https://doc
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 7.0.73
- API version: 7.0.74
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

View File

@ -25,6 +25,7 @@ from thousandeyes_sdk.bgp_monitors.models.monitors import Monitors
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType

View File

@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

View File

@ -0,0 +1,66 @@
.openapi-generator-ignore
MANIFEST.in
README.md
docs/Assignments.md
docs/AuthenticationType.md
docs/BasicAuthentication.md
docs/BearerTokenAuthentication.md
docs/ConnectorType.md
docs/Error.md
docs/GenericConnector.md
docs/GenericConnectorAuth.md
docs/GenericConnectors.md
docs/GenericConnectorsApi.md
docs/Header.md
docs/Link.md
docs/OauthClientCredentialsAuthentication.md
docs/OauthCodeAuthentication.md
docs/OperationCategory.md
docs/OperationConnectorsApi.md
docs/OperationStatus.md
docs/OperationType.md
docs/OtherTokenAuthentication.md
docs/SelfLinks.md
docs/UnauthorizedError.md
docs/ValidationError.md
docs/ValidationErrorItem.md
docs/WebhookOperation.md
docs/WebhookOperations.md
docs/WebhookOperationsApi.md
pyproject.toml
setup.cfg
src/thousandeyes_sdk/connectors/__init__.py
src/thousandeyes_sdk/connectors/api/__init__.py
src/thousandeyes_sdk/connectors/api/generic_connectors_api.py
src/thousandeyes_sdk/connectors/api/operation_connectors_api.py
src/thousandeyes_sdk/connectors/api/webhook_operations_api.py
src/thousandeyes_sdk/connectors/models/__init__.py
src/thousandeyes_sdk/connectors/models/assignments.py
src/thousandeyes_sdk/connectors/models/authentication_type.py
src/thousandeyes_sdk/connectors/models/basic_authentication.py
src/thousandeyes_sdk/connectors/models/bearer_token_authentication.py
src/thousandeyes_sdk/connectors/models/connector_type.py
src/thousandeyes_sdk/connectors/models/error.py
src/thousandeyes_sdk/connectors/models/generic_connector.py
src/thousandeyes_sdk/connectors/models/generic_connector_auth.py
src/thousandeyes_sdk/connectors/models/generic_connectors.py
src/thousandeyes_sdk/connectors/models/header.py
src/thousandeyes_sdk/connectors/models/link.py
src/thousandeyes_sdk/connectors/models/oauth_client_credentials_authentication.py
src/thousandeyes_sdk/connectors/models/oauth_code_authentication.py
src/thousandeyes_sdk/connectors/models/operation_category.py
src/thousandeyes_sdk/connectors/models/operation_status.py
src/thousandeyes_sdk/connectors/models/operation_type.py
src/thousandeyes_sdk/connectors/models/other_token_authentication.py
src/thousandeyes_sdk/connectors/models/self_links.py
src/thousandeyes_sdk/connectors/models/unauthorized_error.py
src/thousandeyes_sdk/connectors/models/validation_error.py
src/thousandeyes_sdk/connectors/models/validation_error_item.py
src/thousandeyes_sdk/connectors/models/webhook_operation.py
src/thousandeyes_sdk/connectors/models/webhook_operations.py
src/thousandeyes_sdk/connectors/py.typed
test/__init__.py
test/test_generic_connectors_api.py
test/test_operation_connectors_api.py
test/test_utils.py
test/test_webhook_operations_api.py

View File

@ -0,0 +1 @@
7.6.0

View File

@ -0,0 +1 @@
include docs/*

View File

@ -0,0 +1,142 @@
# thousandeyes-sdk-connectors
Manage connectors and operations.
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 7.0.74
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
## Requirements.
Python 3.8+
## Installation & Usage
### pip install
Install directly via PyPi:
```sh
pip install thousandeyes-sdk-connectors
```
(you may need to run `pip` with root permission: `sudo pip install thousandeyes-sdk-connectors`)
Then import the package:
```python
import thousandeyes_sdk.connectors
```
### 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.connectors
```
### 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.connectors
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"
)
# 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.connectors.GenericConnectorsApi(api_client)
generic_connector = thousandeyes_sdk.connectors.GenericConnector() # GenericConnector |
aid = 123456 # float | Account ID (optional)
try:
# Create connector
api_response = api_instance.create_generic_connector(generic_connector, aid=aid)
print("The response of GenericConnectorsApi->create_generic_connector:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling GenericConnectorsApi->create_generic_connector: %s\n" % e)
```
## Documentation for API Endpoints
All URIs are relative to *https://api.thousandeyes.com/v7*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*GenericConnectorsApi* | [**create_generic_connector**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#create_generic_connector) | **POST** /connectors/generic | Create connector
*GenericConnectorsApi* | [**delete_generic_connector**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#delete_generic_connector) | **DELETE** /connectors/generic/{id} | Delete connector
*GenericConnectorsApi* | [**get_generic_connector**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#get_generic_connector) | **GET** /connectors/generic/{id} | Retrieve connector
*GenericConnectorsApi* | [**get_generic_connectors**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#get_generic_connectors) | **GET** /connectors/generic | List connectors
*GenericConnectorsApi* | [**list_generic_connector_operations**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#list_generic_connector_operations) | **GET** /connectors/generic/{id}/operations | List operation IDs assigned to a connector
*GenericConnectorsApi* | [**set_generic_connector_operations**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#set_generic_connector_operations) | **PUT** /connectors/generic/{id}/operations | Assign operations to a connector
*GenericConnectorsApi* | [**update_generic_connector**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorsApi.md#update_generic_connector) | **PUT** /connectors/generic/{id} | Update connector
*OperationConnectorsApi* | [**get_operation_connectors**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OperationConnectorsApi.md#get_operation_connectors) | **GET** /operations/{type}/{id}/connectors | Retrieve connectors assigned to an operation
*OperationConnectorsApi* | [**set_operation_connectors**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OperationConnectorsApi.md#set_operation_connectors) | **PUT** /operations/{type}/{id}/connectors | Assign connectors to an operation
*WebhookOperationsApi* | [**create_webhook_operation**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md#create_webhook_operation) | **POST** /operations/webhooks | Create webhook operation
*WebhookOperationsApi* | [**delete_webhook_operation**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md#delete_webhook_operation) | **DELETE** /operations/webhooks/{id} | Delete webhook operation
*WebhookOperationsApi* | [**get_webhook_operation**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md#get_webhook_operation) | **GET** /operations/webhooks/{id} | Retrieve webhook operation
*WebhookOperationsApi* | [**get_webhook_operations**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md#get_webhook_operations) | **GET** /operations/webhooks | List webhook operations
*WebhookOperationsApi* | [**update_webhook_operation**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperationsApi.md#update_webhook_operation) | **PUT** /operations/webhooks/{id} | Update webhook operation
## Documentation For Models
- [Assignments](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/Assignments.md)
- [AuthenticationType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/AuthenticationType.md)
- [BasicAuthentication](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/BasicAuthentication.md)
- [BearerTokenAuthentication](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/BearerTokenAuthentication.md)
- [ConnectorType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/ConnectorType.md)
- [Error](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/Error.md)
- [GenericConnector](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnector.md)
- [GenericConnectorAuth](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectorAuth.md)
- [GenericConnectors](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/GenericConnectors.md)
- [Header](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/Header.md)
- [Link](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/Link.md)
- [OauthClientCredentialsAuthentication](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OauthClientCredentialsAuthentication.md)
- [OauthCodeAuthentication](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OauthCodeAuthentication.md)
- [OperationCategory](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OperationCategory.md)
- [OperationStatus](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OperationStatus.md)
- [OperationType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OperationType.md)
- [OtherTokenAuthentication](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/OtherTokenAuthentication.md)
- [SelfLinks](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/SelfLinks.md)
- [UnauthorizedError](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/UnauthorizedError.md)
- [ValidationError](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/ValidationError.md)
- [ValidationErrorItem](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/ValidationErrorItem.md)
- [WebhookOperation](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperation.md)
- [WebhookOperations](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-connectors/docs/WebhookOperations.md)
<a id="documentation-for-authorization"></a>
## Documentation For Authorization
Endpoints do not require authorization.
## Author
<a href="mailto:api-team@thousandeyes.com">ThousandEyes API Team </a>

View File

@ -0,0 +1,31 @@
# Assignments
A list of assigned items.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**items** | **List[str]** | | [optional]
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
## Example
```python
from thousandeyes_sdk.connectors.models.assignments import Assignments
# TODO update the JSON string below
json = "{}"
# create an instance of Assignments from a JSON string
assignments_instance = Assignments.from_json(json)
# print the JSON string representation of the object
print(Assignments.to_json())
# convert the object into a dict
assignments_dict = assignments_instance.to_dict()
# create an instance of Assignments from a dict
assignments_from_dict = Assignments.from_dict(assignments_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,11 @@
# AuthenticationType
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,31 @@
# BasicAuthentication
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**username** | **str** | |
**password** | **str** | |
**type** | [**AuthenticationType**](AuthenticationType.md) | |
## Example
```python
from thousandeyes_sdk.connectors.models.basic_authentication import BasicAuthentication
# TODO update the JSON string below
json = "{}"
# create an instance of BasicAuthentication from a JSON string
basic_authentication_instance = BasicAuthentication.from_json(json)
# print the JSON string representation of the object
print(BasicAuthentication.to_json())
# convert the object into a dict
basic_authentication_dict = basic_authentication_instance.to_dict()
# create an instance of BasicAuthentication from a dict
basic_authentication_from_dict = BasicAuthentication.from_dict(basic_authentication_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,30 @@
# BearerTokenAuthentication
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **str** | |
**type** | [**AuthenticationType**](AuthenticationType.md) | |
## Example
```python
from thousandeyes_sdk.connectors.models.bearer_token_authentication import BearerTokenAuthentication
# TODO update the JSON string below
json = "{}"
# create an instance of BearerTokenAuthentication from a JSON string
bearer_token_authentication_instance = BearerTokenAuthentication.from_json(json)
# print the JSON string representation of the object
print(BearerTokenAuthentication.to_json())
# convert the object into a dict
bearer_token_authentication_dict = bearer_token_authentication_instance.to_dict()
# create an instance of BearerTokenAuthentication from a dict
bearer_token_authentication_from_dict = BearerTokenAuthentication.from_dict(bearer_token_authentication_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,11 @@
# ConnectorType
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,33 @@
# Error
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **str** | A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \&quot;about:blank\&quot;. | [optional]
**title** | **str** | A short, human-readable summary of the problem type. | [optional]
**status** | **int** | The HTTP status code generated by the origin server for this occurrence of the problem. | [optional]
**detail** | **str** | A human-readable explanation specific to this occurrence of the problem. | [optional]
**instance** | **str** | A URI reference that identifies the specific occurrence of the problem. | [optional]
## Example
```python
from thousandeyes_sdk.connectors.models.error import Error
# TODO update the JSON string below
json = "{}"
# create an instance of Error from a JSON string
error_instance = Error.from_json(json)
# print the JSON string representation of the object
print(Error.to_json())
# convert the object into a dict
error_dict = error_instance.to_dict()
# create an instance of Error from a dict
error_from_dict = Error.from_dict(error_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,35 @@
# GenericConnector
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | | [optional] [readonly]
**type** | [**ConnectorType**](ConnectorType.md) | |
**name** | **str** | |
**target** | **str** | |
**authentication** | [**GenericConnectorAuth**](GenericConnectorAuth.md) | | [optional]
**last_modified_date** | **datetime** | The date when the connector was last modified. | [optional] [readonly]
**headers** | [**List[Header]**](Header.md) | | [optional]
## Example
```python
from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector
# TODO update the JSON string below
json = "{}"
# create an instance of GenericConnector from a JSON string
generic_connector_instance = GenericConnector.from_json(json)
# print the JSON string representation of the object
print(GenericConnector.to_json())
# convert the object into a dict
generic_connector_dict = generic_connector_instance.to_dict()
# create an instance of GenericConnector from a dict
generic_connector_from_dict = GenericConnector.from_dict(generic_connector_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,39 @@
# GenericConnectorAuth
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**username** | **str** | |
**password** | **str** | |
**type** | [**AuthenticationType**](AuthenticationType.md) | |
**token** | **str** | |
**refresh_token** | **str** | | [optional]
**oauth_client_id** | **str** | |
**oauth_auth_url** | **str** | |
**oauth_token_url** | **str** | |
**oauth_client_secret** | **str** | |
**code** | **str** | |
**redirect_uri** | **str** | |
## Example
```python
from thousandeyes_sdk.connectors.models.generic_connector_auth import GenericConnectorAuth
# TODO update the JSON string below
json = "{}"
# create an instance of GenericConnectorAuth from a JSON string
generic_connector_auth_instance = GenericConnectorAuth.from_json(json)
# print the JSON string representation of the object
print(GenericConnectorAuth.to_json())
# convert the object into a dict
generic_connector_auth_dict = generic_connector_auth_instance.to_dict()
# create an instance of GenericConnectorAuth from a dict
generic_connector_auth_from_dict = GenericConnectorAuth.from_dict(generic_connector_auth_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,30 @@
# GenericConnectors
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**items** | [**List[GenericConnector]**](GenericConnector.md) | | [optional]
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
## Example
```python
from thousandeyes_sdk.connectors.models.generic_connectors import GenericConnectors
# TODO update the JSON string below
json = "{}"
# create an instance of GenericConnectors from a JSON string
generic_connectors_instance = GenericConnectors.from_json(json)
# print the JSON string representation of the object
print(GenericConnectors.to_json())
# convert the object into a dict
generic_connectors_dict = generic_connectors_instance.to_dict()
# create an instance of GenericConnectors from a dict
generic_connectors_from_dict = GenericConnectors.from_dict(generic_connectors_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,539 @@
# thousandeyes_sdk.connectors.GenericConnectorsApi
All URIs are relative to *https://api.thousandeyes.com/v7*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_generic_connector**](GenericConnectorsApi.md#create_generic_connector) | **POST** /connectors/generic | Create connector
[**delete_generic_connector**](GenericConnectorsApi.md#delete_generic_connector) | **DELETE** /connectors/generic/{id} | Delete connector
[**get_generic_connector**](GenericConnectorsApi.md#get_generic_connector) | **GET** /connectors/generic/{id} | Retrieve connector
[**get_generic_connectors**](GenericConnectorsApi.md#get_generic_connectors) | **GET** /connectors/generic | List connectors
[**list_generic_connector_operations**](GenericConnectorsApi.md#list_generic_connector_operations) | **GET** /connectors/generic/{id}/operations | List operation IDs assigned to a connector
[**set_generic_connector_operations**](GenericConnectorsApi.md#set_generic_connector_operations) | **PUT** /connectors/generic/{id}/operations | Assign operations to a connector
[**update_generic_connector**](GenericConnectorsApi.md#update_generic_connector) | **PUT** /connectors/generic/{id} | Update connector
# **create_generic_connector**
> GenericConnector create_generic_connector(generic_connector, aid=aid)
Create connector
Creates a new connector.
### Example
```python
import thousandeyes_sdk.connectors
from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector
from thousandeyes_sdk.connectors.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"
)
# 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.connectors.GenericConnectorsApi(api_client)
generic_connector = thousandeyes_sdk.connectors.GenericConnector() # GenericConnector |
aid = 123456 # float | Account ID (optional)
try:
# Create connector
api_response = api_instance.create_generic_connector(generic_connector, aid=aid)
print("The response of GenericConnectorsApi->create_generic_connector:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling GenericConnectorsApi->create_generic_connector: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**generic_connector** | [**GenericConnector**](GenericConnector.md)| |
**aid** | **float**| Account ID | [optional]
### Return type
[**GenericConnector**](GenericConnector.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | The created connector. | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**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)
# **delete_generic_connector**
> delete_generic_connector(id, aid=aid)
Delete connector
Deletes the connector specified by ID.
### Example
```python
import thousandeyes_sdk.connectors
from thousandeyes_sdk.connectors.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"
)
# 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.connectors.GenericConnectorsApi(api_client)
id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The connector ID.
aid = 123456 # float | Account ID (optional)
try:
# Delete connector
api_instance.delete_generic_connector(id, aid=aid)
except Exception as e:
print("Exception when calling GenericConnectorsApi->delete_generic_connector: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| The connector ID. |
**aid** | **float**| Account ID | [optional]
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**204** | No Content | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**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)
# **get_generic_connector**
> GenericConnector get_generic_connector(id, aid=aid)
Retrieve connector
Retrieves details of a connector by its ID.
### Example
```python
import thousandeyes_sdk.connectors
from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector
from thousandeyes_sdk.connectors.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"
)
# 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.connectors.GenericConnectorsApi(api_client)
id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The connector ID.
aid = 123456 # float | Account ID (optional)
try:
# Retrieve connector
api_response = api_instance.get_generic_connector(id, aid=aid)
print("The response of GenericConnectorsApi->get_generic_connector:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling GenericConnectorsApi->get_generic_connector: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| The connector ID. |
**aid** | **float**| Account ID | [optional]
### Return type
[**GenericConnector**](GenericConnector.md)
### Authorization
No authorization required
### 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** | Connector details. | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**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)
# **get_generic_connectors**
> GenericConnectors get_generic_connectors(aid=aid)
List connectors
Returns a list of connectors in the specified account group. If no account group is specified, the users default account group is used.
### Example
```python
import thousandeyes_sdk.connectors
from thousandeyes_sdk.connectors.models.generic_connectors import GenericConnectors
from thousandeyes_sdk.connectors.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"
)
# 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.connectors.GenericConnectorsApi(api_client)
aid = 123456 # float | Account ID (optional)
try:
# List connectors
api_response = api_instance.get_generic_connectors(aid=aid)
print("The response of GenericConnectorsApi->get_generic_connectors:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling GenericConnectorsApi->get_generic_connectors: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**aid** | **float**| Account ID | [optional]
### Return type
[**GenericConnectors**](GenericConnectors.md)
### Authorization
No authorization required
### 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** | A list of connectors. | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**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)
# **list_generic_connector_operations**
> Assignments list_generic_connector_operations(id, aid=aid)
List operation IDs assigned to a connector
Returns a list of operation IDs assigned to a connector.
### Example
```python
import thousandeyes_sdk.connectors
from thousandeyes_sdk.connectors.models.assignments import Assignments
from thousandeyes_sdk.connectors.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"
)
# 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.connectors.GenericConnectorsApi(api_client)
id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The connector ID.
aid = 123456 # float | Account ID (optional)
try:
# List operation IDs assigned to a connector
api_response = api_instance.list_generic_connector_operations(id, aid=aid)
print("The response of GenericConnectorsApi->list_generic_connector_operations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling GenericConnectorsApi->list_generic_connector_operations: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| The connector ID. |
**aid** | **float**| Account ID | [optional]
### Return type
[**Assignments**](Assignments.md)
### Authorization
No authorization required
### 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** | A list of assigned operation IDs. | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**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)
# **set_generic_connector_operations**
> Assignments set_generic_connector_operations(id, request_body, aid=aid)
Assign operations to a connector
Assigns operations to a connector. This replaces any existing assignments.
### Example
```python
import thousandeyes_sdk.connectors
from thousandeyes_sdk.connectors.models.assignments import Assignments
from thousandeyes_sdk.connectors.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"
)
# 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.connectors.GenericConnectorsApi(api_client)
id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The connector ID.
request_body = ["ca39314d-eb4f-496f-9435-b5d20b1bfbff","a32cfbab-32f6-41d8-9027-7127cba965dd"] # List[str] | List of operation IDs to assign to the connector.
aid = 123456 # float | Account ID (optional)
try:
# Assign operations to a connector
api_response = api_instance.set_generic_connector_operations(id, request_body, aid=aid)
print("The response of GenericConnectorsApi->set_generic_connector_operations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling GenericConnectorsApi->set_generic_connector_operations: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| The connector ID. |
**request_body** | [**List[str]**](str.md)| List of operation IDs to assign to the connector. |
**aid** | **float**| Account ID | [optional]
### Return type
[**Assignments**](Assignments.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Operations assigned successfully. | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**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)
# **update_generic_connector**
> GenericConnector update_generic_connector(id, generic_connector, aid=aid)
Update connector
Updates the connector specified by ID.
### Example
```python
import thousandeyes_sdk.connectors
from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector
from thousandeyes_sdk.connectors.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"
)
# 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.connectors.GenericConnectorsApi(api_client)
id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The connector ID.
generic_connector = thousandeyes_sdk.connectors.GenericConnector() # GenericConnector |
aid = 123456 # float | Account ID (optional)
try:
# Update connector
api_response = api_instance.update_generic_connector(id, generic_connector, aid=aid)
print("The response of GenericConnectorsApi->update_generic_connector:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling GenericConnectorsApi->update_generic_connector: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| The connector ID. |
**generic_connector** | [**GenericConnector**](GenericConnector.md)| |
**aid** | **float**| Account ID | [optional]
### Return type
[**GenericConnector**](GenericConnector.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | The updated connector. | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**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)

View File

@ -0,0 +1,30 @@
# Header
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | |
**value** | **str** | The value of the header. Note that this value is obfuscated in the response, even when overwritten. |
## Example
```python
from thousandeyes_sdk.connectors.models.header import Header
# TODO update the JSON string below
json = "{}"
# create an instance of Header from a JSON string
header_instance = Header.from_json(json)
# print the JSON string representation of the object
print(Header.to_json())
# convert the object into a dict
header_dict = header_instance.to_dict()
# create an instance of Header from a dict
header_from_dict = Header.from_dict(header_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,37 @@
# Link
A hyperlink from the containing resource to a URI.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**href** | **str** | Its value is either a URI [RFC3986] or a URI template [RFC6570]. |
**templated** | **bool** | Should be true when the link object&#39;s \&quot;href\&quot; property is a URI template. | [optional]
**type** | **str** | Used as a hint to indicate the media type expected when dereferencing the target resource. | [optional]
**deprecation** | **str** | Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation. | [optional]
**name** | **str** | Its value may be used as a secondary key for selecting link objects that share the same relation type. | [optional]
**profile** | **str** | A URI that hints about the profile of the target resource. | [optional]
**title** | **str** | Intended for labelling the link with a human-readable identifier | [optional]
**hreflang** | **str** | Indicates the language of the target resource | [optional]
## Example
```python
from thousandeyes_sdk.connectors.models.link import Link
# TODO update the JSON string below
json = "{}"
# create an instance of Link from a JSON string
link_instance = Link.from_json(json)
# print the JSON string representation of the object
print(Link.to_json())
# convert the object into a dict
link_dict = link_instance.to_dict()
# create an instance of Link from a dict
link_from_dict = Link.from_dict(link_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,33 @@
# OauthClientCredentialsAuthentication
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **str** | | [optional]
**oauth_client_id** | **str** | |
**oauth_token_url** | **str** | |
**oauth_client_secret** | **str** | |
**type** | [**AuthenticationType**](AuthenticationType.md) | |
## Example
```python
from thousandeyes_sdk.connectors.models.oauth_client_credentials_authentication import OauthClientCredentialsAuthentication
# TODO update the JSON string below
json = "{}"
# create an instance of OauthClientCredentialsAuthentication from a JSON string
oauth_client_credentials_authentication_instance = OauthClientCredentialsAuthentication.from_json(json)
# print the JSON string representation of the object
print(OauthClientCredentialsAuthentication.to_json())
# convert the object into a dict
oauth_client_credentials_authentication_dict = oauth_client_credentials_authentication_instance.to_dict()
# create an instance of OauthClientCredentialsAuthentication from a dict
oauth_client_credentials_authentication_from_dict = OauthClientCredentialsAuthentication.from_dict(oauth_client_credentials_authentication_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,37 @@
# OauthCodeAuthentication
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **str** | | [optional]
**refresh_token** | **str** | | [optional]
**oauth_client_id** | **str** | |
**oauth_auth_url** | **str** | |
**oauth_token_url** | **str** | |
**oauth_client_secret** | **str** | |
**code** | **str** | |
**redirect_uri** | **str** | |
**type** | [**AuthenticationType**](AuthenticationType.md) | |
## Example
```python
from thousandeyes_sdk.connectors.models.oauth_code_authentication import OauthCodeAuthentication
# TODO update the JSON string below
json = "{}"
# create an instance of OauthCodeAuthentication from a JSON string
oauth_code_authentication_instance = OauthCodeAuthentication.from_json(json)
# print the JSON string representation of the object
print(OauthCodeAuthentication.to_json())
# convert the object into a dict
oauth_code_authentication_dict = oauth_code_authentication_instance.to_dict()
# create an instance of OauthCodeAuthentication from a dict
oauth_code_authentication_from_dict = OauthCodeAuthentication.from_dict(oauth_code_authentication_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,11 @@
# OperationCategory
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,166 @@
# thousandeyes_sdk.connectors.OperationConnectorsApi
All URIs are relative to *https://api.thousandeyes.com/v7*
Method | HTTP request | Description
------------- | ------------- | -------------
[**get_operation_connectors**](OperationConnectorsApi.md#get_operation_connectors) | **GET** /operations/{type}/{id}/connectors | Retrieve connectors assigned to an operation
[**set_operation_connectors**](OperationConnectorsApi.md#set_operation_connectors) | **PUT** /operations/{type}/{id}/connectors | Assign connectors to an operation
# **get_operation_connectors**
> Assignments get_operation_connectors(type, id, aid=aid)
Retrieve connectors assigned to an operation
Returns a list of connectors assigned to a specific operation.
### Example
```python
import thousandeyes_sdk.connectors
from thousandeyes_sdk.connectors.models.assignments import Assignments
from thousandeyes_sdk.connectors.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"
)
# 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.connectors.OperationConnectorsApi(api_client)
type = 'webhooks' # str | The operation type.
id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The operation ID.
aid = 123456 # float | Account ID (optional)
try:
# Retrieve connectors assigned to an operation
api_response = api_instance.get_operation_connectors(type, id, aid=aid)
print("The response of OperationConnectorsApi->get_operation_connectors:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OperationConnectorsApi->get_operation_connectors: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**type** | **str**| The operation type. |
**id** | **str**| The operation ID. |
**aid** | **float**| Account ID | [optional]
### Return type
[**Assignments**](Assignments.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/problem+json, application/hal+json, application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**404** | Not found | - |
**200** | A list of assigned connectors. | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**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)
# **set_operation_connectors**
> Assignments set_operation_connectors(type, id, request_body, aid=aid)
Assign connectors to an operation
Assigns one or more connectors to an operation. This replaces any existing assignments.
### Example
```python
import thousandeyes_sdk.connectors
from thousandeyes_sdk.connectors.models.assignments import Assignments
from thousandeyes_sdk.connectors.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"
)
# 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.connectors.OperationConnectorsApi(api_client)
type = 'webhooks' # str | The operation type.
id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The operation ID.
request_body = ["ca39314d-eb4f-496f-9435-b5d20b1bfbff"] # List[str] | List of connector IDs to assign to the operation.
aid = 123456 # float | Account ID (optional)
try:
# Assign connectors to an operation
api_response = api_instance.set_operation_connectors(type, id, request_body, aid=aid)
print("The response of OperationConnectorsApi->set_operation_connectors:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OperationConnectorsApi->set_operation_connectors: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**type** | **str**| The operation type. |
**id** | **str**| The operation ID. |
**request_body** | [**List[str]**](str.md)| List of connector IDs to assign to the operation. |
**aid** | **float**| Account ID | [optional]
### Return type
[**Assignments**](Assignments.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/problem+json, application/hal+json, application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**404** | Not found | - |
**200** | Operation Connectors updated successfully. | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**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)

View File

@ -0,0 +1,11 @@
# OperationStatus
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,11 @@
# OperationType
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,30 @@
# OtherTokenAuthentication
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **str** | |
**type** | [**AuthenticationType**](AuthenticationType.md) | |
## Example
```python
from thousandeyes_sdk.connectors.models.other_token_authentication import OtherTokenAuthentication
# TODO update the JSON string below
json = "{}"
# create an instance of OtherTokenAuthentication from a JSON string
other_token_authentication_instance = OtherTokenAuthentication.from_json(json)
# print the JSON string representation of the object
print(OtherTokenAuthentication.to_json())
# convert the object into a dict
other_token_authentication_dict = other_token_authentication_instance.to_dict()
# create an instance of OtherTokenAuthentication from a dict
other_token_authentication_from_dict = OtherTokenAuthentication.from_dict(other_token_authentication_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,30 @@
# SelfLinks
A links object containing the self link.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**var_self** | [**Link**](Link.md) | | [optional]
## Example
```python
from thousandeyes_sdk.connectors.models.self_links import SelfLinks
# TODO update the JSON string below
json = "{}"
# create an instance of SelfLinks from a JSON string
self_links_instance = SelfLinks.from_json(json)
# print the JSON string representation of the object
print(SelfLinks.to_json())
# convert the object into a dict
self_links_dict = self_links_instance.to_dict()
# create an instance of SelfLinks from a dict
self_links_from_dict = SelfLinks.from_dict(self_links_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,30 @@
# UnauthorizedError
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**error** | **str** | | [optional]
**error_description** | **str** | | [optional]
## Example
```python
from thousandeyes_sdk.connectors.models.unauthorized_error import UnauthorizedError
# TODO update the JSON string below
json = "{}"
# create an instance of UnauthorizedError from a JSON string
unauthorized_error_instance = UnauthorizedError.from_json(json)
# print the JSON string representation of the object
print(UnauthorizedError.to_json())
# convert the object into a dict
unauthorized_error_dict = unauthorized_error_instance.to_dict()
# create an instance of UnauthorizedError from a dict
unauthorized_error_from_dict = UnauthorizedError.from_dict(unauthorized_error_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,34 @@
# ValidationError
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **str** | A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \&quot;about:blank\&quot;. | [optional]
**title** | **str** | A short, human-readable summary of the problem type. | [optional]
**status** | **int** | The HTTP status code generated by the origin server for this occurrence of the problem. | [optional]
**detail** | **str** | A human-readable explanation specific to this occurrence of the problem. | [optional]
**instance** | **str** | A URI reference that identifies the specific occurrence of the problem. | [optional]
**errors** | [**List[ValidationErrorItem]**](ValidationErrorItem.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional]
## Example
```python
from thousandeyes_sdk.connectors.models.validation_error import ValidationError
# TODO update the JSON string below
json = "{}"
# create an instance of ValidationError from a JSON string
validation_error_instance = ValidationError.from_json(json)
# print the JSON string representation of the object
print(ValidationError.to_json())
# convert the object into a dict
validation_error_dict = validation_error_instance.to_dict()
# create an instance of ValidationError from a dict
validation_error_from_dict = ValidationError.from_dict(validation_error_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,31 @@
# ValidationErrorItem
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional]
**var_field** | **str** | Identifies the field that triggered this particular error. | [optional]
**message** | **str** | A short, human-readable summary of the error. | [optional]
## Example
```python
from thousandeyes_sdk.connectors.models.validation_error_item import ValidationErrorItem
# TODO update the JSON string below
json = "{}"
# create an instance of ValidationErrorItem from a JSON string
validation_error_item_instance = ValidationErrorItem.from_json(json)
# print the JSON string representation of the object
print(ValidationErrorItem.to_json())
# convert the object into a dict
validation_error_item_dict = validation_error_item_instance.to_dict()
# create an instance of ValidationErrorItem from a dict
validation_error_item_from_dict = ValidationErrorItem.from_dict(validation_error_item_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,39 @@
# WebhookOperation
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | | [optional] [readonly]
**name** | **str** | |
**enabled** | **bool** | | [optional]
**category** | [**OperationCategory**](OperationCategory.md) | |
**status** | [**OperationStatus**](OperationStatus.md) | |
**path** | **str** | | [optional]
**payload** | **str** | Handlebars template for the payload. | [optional]
**headers** | [**List[Header]**](Header.md) | | [optional]
**var_query_params** | **str** | Handlebars template for the query params. Most compile into a proper JSON object where each object property will define the query param name and the object property value define the corresponding query param value. | [optional]
**type** | [**OperationType**](OperationType.md) | | [optional]
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
## Example
```python
from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation
# TODO update the JSON string below
json = "{}"
# create an instance of WebhookOperation from a JSON string
webhook_operation_instance = WebhookOperation.from_json(json)
# print the JSON string representation of the object
print(WebhookOperation.to_json())
# convert the object into a dict
webhook_operation_dict = webhook_operation_instance.to_dict()
# create an instance of WebhookOperation from a dict
webhook_operation_from_dict = WebhookOperation.from_dict(webhook_operation_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,30 @@
# WebhookOperations
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**items** | [**List[WebhookOperation]**](WebhookOperation.md) | | [optional]
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
## Example
```python
from thousandeyes_sdk.connectors.models.webhook_operations import WebhookOperations
# TODO update the JSON string below
json = "{}"
# create an instance of WebhookOperations from a JSON string
webhook_operations_instance = WebhookOperations.from_json(json)
# print the JSON string representation of the object
print(WebhookOperations.to_json())
# convert the object into a dict
webhook_operations_dict = webhook_operations_instance.to_dict()
# create an instance of WebhookOperations from a dict
webhook_operations_from_dict = WebhookOperations.from_dict(webhook_operations_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,385 @@
# thousandeyes_sdk.connectors.WebhookOperationsApi
All URIs are relative to *https://api.thousandeyes.com/v7*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_webhook_operation**](WebhookOperationsApi.md#create_webhook_operation) | **POST** /operations/webhooks | Create webhook operation
[**delete_webhook_operation**](WebhookOperationsApi.md#delete_webhook_operation) | **DELETE** /operations/webhooks/{id} | Delete webhook operation
[**get_webhook_operation**](WebhookOperationsApi.md#get_webhook_operation) | **GET** /operations/webhooks/{id} | Retrieve webhook operation
[**get_webhook_operations**](WebhookOperationsApi.md#get_webhook_operations) | **GET** /operations/webhooks | List webhook operations
[**update_webhook_operation**](WebhookOperationsApi.md#update_webhook_operation) | **PUT** /operations/webhooks/{id} | Update webhook operation
# **create_webhook_operation**
> WebhookOperation create_webhook_operation(webhook_operation, aid=aid)
Create webhook operation
Creates a new webhook operation.
### Example
```python
import thousandeyes_sdk.connectors
from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation
from thousandeyes_sdk.connectors.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"
)
# 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.connectors.WebhookOperationsApi(api_client)
webhook_operation = thousandeyes_sdk.connectors.WebhookOperation() # WebhookOperation |
aid = 123456 # float | Account ID (optional)
try:
# Create webhook operation
api_response = api_instance.create_webhook_operation(webhook_operation, aid=aid)
print("The response of WebhookOperationsApi->create_webhook_operation:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhookOperationsApi->create_webhook_operation: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**webhook_operation** | [**WebhookOperation**](WebhookOperation.md)| |
**aid** | **float**| Account ID | [optional]
### Return type
[**WebhookOperation**](WebhookOperation.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | The created webhook operation. | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**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)
# **delete_webhook_operation**
> delete_webhook_operation(id, aid=aid)
Delete webhook operation
Deletes the webhook operation specified by ID.
### Example
```python
import thousandeyes_sdk.connectors
from thousandeyes_sdk.connectors.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"
)
# 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.connectors.WebhookOperationsApi(api_client)
id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The operation ID.
aid = 123456 # float | Account ID (optional)
try:
# Delete webhook operation
api_instance.delete_webhook_operation(id, aid=aid)
except Exception as e:
print("Exception when calling WebhookOperationsApi->delete_webhook_operation: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| The operation ID. |
**aid** | **float**| Account ID | [optional]
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**204** | No Content | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**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)
# **get_webhook_operation**
> WebhookOperation get_webhook_operation(id, aid=aid)
Retrieve webhook operation
Retrieves details of a webhook operation by its ID.
### Example
```python
import thousandeyes_sdk.connectors
from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation
from thousandeyes_sdk.connectors.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"
)
# 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.connectors.WebhookOperationsApi(api_client)
id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The operation ID.
aid = 123456 # float | Account ID (optional)
try:
# Retrieve webhook operation
api_response = api_instance.get_webhook_operation(id, aid=aid)
print("The response of WebhookOperationsApi->get_webhook_operation:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhookOperationsApi->get_webhook_operation: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| The operation ID. |
**aid** | **float**| Account ID | [optional]
### Return type
[**WebhookOperation**](WebhookOperation.md)
### Authorization
No authorization required
### 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** | Webhook operation with the given id. | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**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)
# **get_webhook_operations**
> WebhookOperations get_webhook_operations(aid=aid)
List webhook operations
Returns a list of webhook operations in the specified account group. If no account group is specified, the users default account group is used.
### Example
```python
import thousandeyes_sdk.connectors
from thousandeyes_sdk.connectors.models.webhook_operations import WebhookOperations
from thousandeyes_sdk.connectors.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"
)
# 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.connectors.WebhookOperationsApi(api_client)
aid = 123456 # float | Account ID (optional)
try:
# List webhook operations
api_response = api_instance.get_webhook_operations(aid=aid)
print("The response of WebhookOperationsApi->get_webhook_operations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhookOperationsApi->get_webhook_operations: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**aid** | **float**| Account ID | [optional]
### Return type
[**WebhookOperations**](WebhookOperations.md)
### Authorization
No authorization required
### 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** | A list of webhook operations. | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**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)
# **update_webhook_operation**
> WebhookOperation update_webhook_operation(id, webhook_operation, aid=aid)
Update webhook operation
Updates the webhook operation specified by ID.
### Example
```python
import thousandeyes_sdk.connectors
from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation
from thousandeyes_sdk.connectors.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"
)
# 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.connectors.WebhookOperationsApi(api_client)
id = 'cb1b8033-ea2d-4e9b-a920-fe87850693cf' # str | The operation ID.
webhook_operation = thousandeyes_sdk.connectors.WebhookOperation() # WebhookOperation |
aid = 123456 # float | Account ID (optional)
try:
# Update webhook operation
api_response = api_instance.update_webhook_operation(id, webhook_operation, aid=aid)
print("The response of WebhookOperationsApi->update_webhook_operation:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebhookOperationsApi->update_webhook_operation: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| The operation ID. |
**webhook_operation** | [**WebhookOperation**](WebhookOperation.md)| |
**aid** | **float**| Account ID | [optional]
### Return type
[**WebhookOperation**](WebhookOperation.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | The updated webhook operation. | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**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)

View File

@ -0,0 +1,82 @@
[project]
name = "thousandeyes-sdk-connectors"
dynamic = ["version"]
readme = "README.md"
authors = [
{ name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" }
]
description = "ThousandEyes SDK Integrations API"
license = { file = "LICENSE" }
requires-python = ">= 3.8"
dependencies = [
"urllib3 >= 2.0.0",
"python-dateutil >=2.8.2",
"pydantic >=2.1.0",
"typing-extensions >=4.7.1",
"thousandeyes-sdk-core",
]
[tool.setuptools.dynamic]
version = {file = ".version"}
[project.optional-dependencies]
test = [
"pytest~=7.1.3",
"pytest-cov>=2.8.1",
"pytest-randomly>=3.12.0",
"mypy>=1.4.1",
"types-python-dateutil>=2.8.19",
]
dev = [
"flake8>=4.0.0",
"mypy>=1.4.1",
"types-python-dateutil>=2.8.19",
]
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
include-package-data = true
[tool.pylint.'MESSAGES CONTROL']
extension-pkg-whitelist = "pydantic"
[tool.mypy]
files = [
"src",
#"test", # auto-generated tests
"tests", # hand-written tests
]
# TODO: enable "strict" once all these individual checks are passing
# strict = true
# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
## Getting these passing should be easy
strict_equality = true
strict_concatenate = true
## Strongly recommend enabling this one as soon as you can
check_untyped_defs = true
## These shouldn't be too much additional work, but may be tricky to
## get passing if you use a lot of untyped libraries
disallow_subclassing_any = true
disallow_untyped_decorators = true
disallow_any_generics = true
### These next few are various gradations of forcing use of type annotations
#disallow_untyped_calls = true
#disallow_incomplete_defs = true
#disallow_untyped_defs = true
#
### This one isn't too hard to get passing, but return on investment is lower
#no_implicit_reexport = true
#
### This one can be tricky to get passing if you use a lot of untyped libraries
#warn_return_any = true

View File

@ -0,0 +1,2 @@
[flake8]
max-line-length=99

View File

@ -0,0 +1,45 @@
# coding: utf-8
# flake8: noqa
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
# import apis into sdk package
from thousandeyes_sdk.connectors.api.generic_connectors_api import GenericConnectorsApi
from thousandeyes_sdk.connectors.api.operation_connectors_api import OperationConnectorsApi
from thousandeyes_sdk.connectors.api.webhook_operations_api import WebhookOperationsApi
# import models into sdk package
from thousandeyes_sdk.connectors.models.assignments import Assignments
from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType
from thousandeyes_sdk.connectors.models.basic_authentication import BasicAuthentication
from thousandeyes_sdk.connectors.models.bearer_token_authentication import BearerTokenAuthentication
from thousandeyes_sdk.connectors.models.connector_type import ConnectorType
from thousandeyes_sdk.connectors.models.error import Error
from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector
from thousandeyes_sdk.connectors.models.generic_connector_auth import GenericConnectorAuth
from thousandeyes_sdk.connectors.models.generic_connectors import GenericConnectors
from thousandeyes_sdk.connectors.models.header import Header
from thousandeyes_sdk.connectors.models.link import Link
from thousandeyes_sdk.connectors.models.oauth_client_credentials_authentication import OauthClientCredentialsAuthentication
from thousandeyes_sdk.connectors.models.oauth_code_authentication import OauthCodeAuthentication
from thousandeyes_sdk.connectors.models.operation_category import OperationCategory
from thousandeyes_sdk.connectors.models.operation_status import OperationStatus
from thousandeyes_sdk.connectors.models.operation_type import OperationType
from thousandeyes_sdk.connectors.models.other_token_authentication import OtherTokenAuthentication
from thousandeyes_sdk.connectors.models.self_links import SelfLinks
from thousandeyes_sdk.connectors.models.unauthorized_error import UnauthorizedError
from thousandeyes_sdk.connectors.models.validation_error import ValidationError
from thousandeyes_sdk.connectors.models.validation_error_item import ValidationErrorItem
from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation
from thousandeyes_sdk.connectors.models.webhook_operations import WebhookOperations

View File

@ -0,0 +1,7 @@
# flake8: noqa
# import apis into api package
from thousandeyes_sdk.connectors.api.generic_connectors_api import GenericConnectorsApi
from thousandeyes_sdk.connectors.api.operation_connectors_api import OperationConnectorsApi
from thousandeyes_sdk.connectors.api.webhook_operations_api import WebhookOperationsApi

View File

@ -0,0 +1,688 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from importlib.metadata import version
import thousandeyes_sdk.connectors.models
from pydantic import Field, StrictFloat, StrictInt, StrictStr
from typing import List, Optional, Union
from typing_extensions import Annotated
from thousandeyes_sdk.connectors.models.assignments import Assignments
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType
class OperationConnectorsApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
api_client.user_agent = "ThousandEyesSDK-Python/{0}".format(version("thousandeyes-sdk-connectors"))
self.api_client = api_client
@validate_call
def get_operation_connectors(
self,
type: Annotated[StrictStr, Field(description="The operation type.")],
id: Annotated[StrictStr, Field(description="The operation ID.")],
aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> Assignments:
"""Retrieve connectors assigned to an operation
Returns a list of connectors assigned to a specific operation.
:param type: The operation type. (required)
:type type: str
:param id: The operation ID. (required)
:type id: str
:param aid: Account ID
:type aid: float
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_operation_connectors_serialize(
type=type,
id=id,
aid=aid,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'404': "Error",
'200': "Assignments",
'400': "ValidationError",
'401': "UnauthorizedError",
'403': "Error",
'500': "Error",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
models=thousandeyes_sdk.connectors.models,
).data
@validate_call
def get_operation_connectors_with_http_info(
self,
type: Annotated[StrictStr, Field(description="The operation type.")],
id: Annotated[StrictStr, Field(description="The operation ID.")],
aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[Assignments]:
"""Retrieve connectors assigned to an operation
Returns a list of connectors assigned to a specific operation.
:param type: The operation type. (required)
:type type: str
:param id: The operation ID. (required)
:type id: str
:param aid: Account ID
:type aid: float
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_operation_connectors_serialize(
type=type,
id=id,
aid=aid,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'404': "Error",
'200': "Assignments",
'400': "ValidationError",
'401': "UnauthorizedError",
'403': "Error",
'500': "Error",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
models=thousandeyes_sdk.connectors.models,
)
@validate_call
def get_operation_connectors_without_preload_content(
self,
type: Annotated[StrictStr, Field(description="The operation type.")],
id: Annotated[StrictStr, Field(description="The operation ID.")],
aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Retrieve connectors assigned to an operation
Returns a list of connectors assigned to a specific operation.
:param type: The operation type. (required)
:type type: str
:param id: The operation ID. (required)
:type id: str
:param aid: Account ID
:type aid: float
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_operation_connectors_serialize(
type=type,
id=id,
aid=aid,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'404': "Error",
'200': "Assignments",
'400': "ValidationError",
'401': "UnauthorizedError",
'403': "Error",
'500': "Error",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_operation_connectors_serialize(
self,
type,
id,
aid,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_body_params: Optional[bytes] = None
# process the path parameters
if type is not None:
_path_params['type'] = type
if id is not None:
_path_params['id'] = id
# process the query parameters
if aid is not None:
_query_params.append(('aid', aid))
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/problem+json',
'application/hal+json',
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
]
return self.api_client.param_serialize(
method='GET',
resource_path='/operations/{type}/{id}/connectors',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)
@validate_call
def set_operation_connectors(
self,
type: Annotated[StrictStr, Field(description="The operation type.")],
id: Annotated[StrictStr, Field(description="The operation ID.")],
request_body: Annotated[List[StrictStr], Field(min_length=0, max_length=1, description="List of connector IDs to assign to the operation.")],
aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> Assignments:
"""Assign connectors to an operation
Assigns one or more connectors to an operation. This replaces any existing assignments.
:param type: The operation type. (required)
:type type: str
:param id: The operation ID. (required)
:type id: str
:param request_body: List of connector IDs to assign to the operation. (required)
:type request_body: List[str]
:param aid: Account ID
:type aid: float
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._set_operation_connectors_serialize(
type=type,
id=id,
request_body=request_body,
aid=aid,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'404': "Error",
'200': "Assignments",
'400': "ValidationError",
'401': "UnauthorizedError",
'403': "Error",
'500': "Error",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
models=thousandeyes_sdk.connectors.models,
).data
@validate_call
def set_operation_connectors_with_http_info(
self,
type: Annotated[StrictStr, Field(description="The operation type.")],
id: Annotated[StrictStr, Field(description="The operation ID.")],
request_body: Annotated[List[StrictStr], Field(min_length=0, max_length=1, description="List of connector IDs to assign to the operation.")],
aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[Assignments]:
"""Assign connectors to an operation
Assigns one or more connectors to an operation. This replaces any existing assignments.
:param type: The operation type. (required)
:type type: str
:param id: The operation ID. (required)
:type id: str
:param request_body: List of connector IDs to assign to the operation. (required)
:type request_body: List[str]
:param aid: Account ID
:type aid: float
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._set_operation_connectors_serialize(
type=type,
id=id,
request_body=request_body,
aid=aid,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'404': "Error",
'200': "Assignments",
'400': "ValidationError",
'401': "UnauthorizedError",
'403': "Error",
'500': "Error",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
models=thousandeyes_sdk.connectors.models,
)
@validate_call
def set_operation_connectors_without_preload_content(
self,
type: Annotated[StrictStr, Field(description="The operation type.")],
id: Annotated[StrictStr, Field(description="The operation ID.")],
request_body: Annotated[List[StrictStr], Field(min_length=0, max_length=1, description="List of connector IDs to assign to the operation.")],
aid: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Account ID")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""Assign connectors to an operation
Assigns one or more connectors to an operation. This replaces any existing assignments.
:param type: The operation type. (required)
:type type: str
:param id: The operation ID. (required)
:type id: str
:param request_body: List of connector IDs to assign to the operation. (required)
:type request_body: List[str]
:param aid: Account ID
:type aid: float
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._set_operation_connectors_serialize(
type=type,
id=id,
request_body=request_body,
aid=aid,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'404': "Error",
'200': "Assignments",
'400': "ValidationError",
'401': "UnauthorizedError",
'403': "Error",
'500': "Error",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _set_operation_connectors_serialize(
self,
type,
id,
request_body,
aid,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
'request_body': '',
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_body_params: Optional[bytes] = None
# process the path parameters
if type is not None:
_path_params['type'] = type
if id is not None:
_path_params['id'] = id
# process the query parameters
if aid is not None:
_query_params.append(('aid', aid))
# process the header parameters
# process the form parameters
# process the body parameter
if request_body is not None:
_body_params = request_body
# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/problem+json',
'application/hal+json',
'application/json'
]
)
# set the HTTP header `Content-Type`
if _content_type:
_header_params['Content-Type'] = _content_type
else:
_default_content_type = (
self.api_client.select_header_content_type(
[
'application/json'
]
)
)
if _default_content_type is not None:
_header_params['Content-Type'] = _default_content_type
# authentication setting
_auth_settings: List[str] = [
]
return self.api_client.param_serialize(
method='PUT',
resource_path='/operations/{type}/{id}/connectors',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)

View File

@ -0,0 +1,38 @@
# coding: utf-8
# flake8: noqa
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
# import models into model package
from thousandeyes_sdk.connectors.models.assignments import Assignments
from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType
from thousandeyes_sdk.connectors.models.basic_authentication import BasicAuthentication
from thousandeyes_sdk.connectors.models.bearer_token_authentication import BearerTokenAuthentication
from thousandeyes_sdk.connectors.models.connector_type import ConnectorType
from thousandeyes_sdk.connectors.models.error import Error
from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector
from thousandeyes_sdk.connectors.models.generic_connector_auth import GenericConnectorAuth
from thousandeyes_sdk.connectors.models.generic_connectors import GenericConnectors
from thousandeyes_sdk.connectors.models.header import Header
from thousandeyes_sdk.connectors.models.link import Link
from thousandeyes_sdk.connectors.models.oauth_client_credentials_authentication import OauthClientCredentialsAuthentication
from thousandeyes_sdk.connectors.models.oauth_code_authentication import OauthCodeAuthentication
from thousandeyes_sdk.connectors.models.operation_category import OperationCategory
from thousandeyes_sdk.connectors.models.operation_status import OperationStatus
from thousandeyes_sdk.connectors.models.operation_type import OperationType
from thousandeyes_sdk.connectors.models.other_token_authentication import OtherTokenAuthentication
from thousandeyes_sdk.connectors.models.self_links import SelfLinks
from thousandeyes_sdk.connectors.models.unauthorized_error import UnauthorizedError
from thousandeyes_sdk.connectors.models.validation_error import ValidationError
from thousandeyes_sdk.connectors.models.validation_error_item import ValidationErrorItem
from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation
from thousandeyes_sdk.connectors.models.webhook_operations import WebhookOperations

View File

@ -0,0 +1,93 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.connectors.models.self_links import SelfLinks
from typing import Optional, Set
from typing_extensions import Self
class Assignments(BaseModel):
"""
A list of assigned items.
""" # noqa: E501
items: Optional[List[StrictStr]] = None
links: Optional[SelfLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["items", "_links"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of Assignments from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of links
if self.links:
_dict['_links'] = self.links.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of Assignments from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"items": obj.get("items"),
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
})
return _obj

View File

@ -0,0 +1,44 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class AuthenticationType(str, Enum):
"""
AuthenticationType
"""
"""
allowed enum values
"""
BASIC = 'basic'
BEARER_MINUS_TOKEN = 'bearer-token'
OAUTH_MINUS_AUTH_MINUS_CODE = 'oauth-auth-code'
OAUTH_MINUS_CLIENT_MINUS_CREDENTIALS = 'oauth-client-credentials'
OTHER_MINUS_TOKEN = 'other-token'
UNKNOWN = 'unknown'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of AuthenticationType from a JSON string"""
return cls(json.loads(json_str))
@classmethod
def _missing_(cls, value):
"""Handle unknown values"""
return cls.UNKNOWN

View File

@ -0,0 +1,92 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List
from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType
from typing import Optional, Set
from typing_extensions import Self
class BasicAuthentication(BaseModel):
"""
BasicAuthentication
""" # noqa: E501
username: StrictStr
password: StrictStr
type: AuthenticationType
__properties: ClassVar[List[str]] = ["username", "password", "type"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of BasicAuthentication from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of BasicAuthentication from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"username": obj.get("username"),
"password": obj.get("password"),
"type": obj.get("type")
})
return _obj

View File

@ -0,0 +1,90 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List
from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType
from typing import Optional, Set
from typing_extensions import Self
class BearerTokenAuthentication(BaseModel):
"""
BearerTokenAuthentication
""" # noqa: E501
token: StrictStr
type: AuthenticationType
__properties: ClassVar[List[str]] = ["token", "type"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of BearerTokenAuthentication from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of BearerTokenAuthentication from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"token": obj.get("token"),
"type": obj.get("type")
})
return _obj

View File

@ -0,0 +1,40 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class ConnectorType(str, Enum):
"""
ConnectorType
"""
"""
allowed enum values
"""
GENERIC = 'generic'
UNKNOWN = 'unknown'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of ConnectorType from a JSON string"""
return cls(json.loads(json_str))
@classmethod
def _missing_(cls, value):
"""Handle unknown values"""
return cls.UNKNOWN

View File

@ -0,0 +1,95 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class Error(BaseModel):
"""
Error
""" # noqa: E501
type: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".")
title: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the problem type.")
status: Optional[StrictInt] = Field(default=None, description="The HTTP status code generated by the origin server for this occurrence of the problem.")
detail: Optional[StrictStr] = Field(default=None, description="A human-readable explanation specific to this occurrence of the problem.")
instance: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the specific occurrence of the problem.")
__properties: ClassVar[List[str]] = ["type", "title", "status", "detail", "instance"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of Error from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of Error from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"type": obj.get("type"),
"title": obj.get("title"),
"status": obj.get("status"),
"detail": obj.get("detail"),
"instance": obj.get("instance")
})
return _obj

View File

@ -0,0 +1,117 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.connectors.models.connector_type import ConnectorType
from thousandeyes_sdk.connectors.models.generic_connector_auth import GenericConnectorAuth
from thousandeyes_sdk.connectors.models.header import Header
from typing import Optional, Set
from typing_extensions import Self
class GenericConnector(BaseModel):
"""
GenericConnector
""" # noqa: E501
id: Optional[StrictStr] = None
type: ConnectorType
name: StrictStr
target: StrictStr
authentication: Optional[GenericConnectorAuth] = None
last_modified_date: Optional[datetime] = Field(default=None, description="The date when the connector was last modified.", alias="lastModifiedDate")
headers: Optional[List[Header]] = None
__properties: ClassVar[List[str]] = ["id", "type", "name", "target", "authentication", "lastModifiedDate", "headers"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of GenericConnector from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"id",
"last_modified_date",
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of authentication
if self.authentication:
_dict['authentication'] = self.authentication.to_dict()
# override the default output from pydantic by calling `to_dict()` of each item in headers (list)
_items = []
if self.headers:
for _item in self.headers:
if _item:
_items.append(_item.to_dict())
_dict['headers'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of GenericConnector from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"id": obj.get("id"),
"type": obj.get("type"),
"name": obj.get("name"),
"target": obj.get("target"),
"authentication": GenericConnectorAuth.from_dict(obj["authentication"]) if obj.get("authentication") is not None else None,
"lastModifiedDate": obj.get("lastModifiedDate"),
"headers": [Header.from_dict(_item) for _item in obj["headers"]] if obj.get("headers") is not None else None
})
return _obj

View File

@ -0,0 +1,185 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
import pprint
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
from typing import Any, List, Optional
from thousandeyes_sdk.connectors.models.basic_authentication import BasicAuthentication
from thousandeyes_sdk.connectors.models.bearer_token_authentication import BearerTokenAuthentication
from thousandeyes_sdk.connectors.models.oauth_client_credentials_authentication import OauthClientCredentialsAuthentication
from thousandeyes_sdk.connectors.models.oauth_code_authentication import OauthCodeAuthentication
from thousandeyes_sdk.connectors.models.other_token_authentication import OtherTokenAuthentication
from pydantic import StrictStr, Field, model_serializer
from typing import Union, List, Set, Optional, Dict
from typing_extensions import Literal, Self
GENERICCONNECTORAUTH_ONE_OF_SCHEMAS = ["BasicAuthentication", "BearerTokenAuthentication", "OauthClientCredentialsAuthentication", "OauthCodeAuthentication", "OtherTokenAuthentication"]
class GenericConnectorAuth(BaseModel):
"""
GenericConnectorAuth
"""
# data type: BasicAuthentication
oneof_schema_1_validator: Optional[BasicAuthentication] = None
# data type: BearerTokenAuthentication
oneof_schema_2_validator: Optional[BearerTokenAuthentication] = None
# data type: OtherTokenAuthentication
oneof_schema_3_validator: Optional[OtherTokenAuthentication] = None
# data type: OauthCodeAuthentication
oneof_schema_4_validator: Optional[OauthCodeAuthentication] = None
# data type: OauthClientCredentialsAuthentication
oneof_schema_5_validator: Optional[OauthClientCredentialsAuthentication] = None
actual_instance: Optional[Union[BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication]] = None
one_of_schemas: Set[str] = { "BasicAuthentication", "BearerTokenAuthentication", "OauthClientCredentialsAuthentication", "OauthCodeAuthentication", "OtherTokenAuthentication" }
model_config = ConfigDict(
validate_assignment=True,
protected_namespaces=(),
)
discriminator_value_class_map: Dict[str, str] = {
}
def __init__(self, *args, **kwargs) -> None:
if args:
if len(args) > 1:
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
if kwargs:
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
super().__init__(actual_instance=args[0])
else:
super().__init__(**kwargs)
@field_validator('actual_instance')
def actual_instance_must_validate_oneof(cls, v):
instance = GenericConnectorAuth.model_construct()
error_messages = []
match = 0
# validate data type: BasicAuthentication
if not isinstance(v, BasicAuthentication):
error_messages.append(f"Error! Input type `{type(v)}` is not `BasicAuthentication`")
else:
match += 1
# validate data type: BearerTokenAuthentication
if not isinstance(v, BearerTokenAuthentication):
error_messages.append(f"Error! Input type `{type(v)}` is not `BearerTokenAuthentication`")
else:
match += 1
# validate data type: OtherTokenAuthentication
if not isinstance(v, OtherTokenAuthentication):
error_messages.append(f"Error! Input type `{type(v)}` is not `OtherTokenAuthentication`")
else:
match += 1
# validate data type: OauthCodeAuthentication
if not isinstance(v, OauthCodeAuthentication):
error_messages.append(f"Error! Input type `{type(v)}` is not `OauthCodeAuthentication`")
else:
match += 1
# validate data type: OauthClientCredentialsAuthentication
if not isinstance(v, OauthClientCredentialsAuthentication):
error_messages.append(f"Error! Input type `{type(v)}` is not `OauthClientCredentialsAuthentication`")
else:
match += 1
if match > 1:
# more than 1 match
raise ValueError("Multiple matches found when setting `actual_instance` in GenericConnectorAuth with oneOf schemas: BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication. Details: " + ", ".join(error_messages))
elif match == 0:
# no match
raise ValueError("No match found when setting `actual_instance` in GenericConnectorAuth with oneOf schemas: BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication. Details: " + ", ".join(error_messages))
else:
return v
@classmethod
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
return cls.from_json(json.dumps(obj))
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Returns the object represented by the json string"""
instance = cls.model_construct()
error_messages = []
match = 0
# deserialize data into BasicAuthentication
try:
instance.actual_instance = BasicAuthentication.from_json(json_str)
match += 1
except (ValidationError, ValueError) as e:
error_messages.append(str(e))
# deserialize data into BearerTokenAuthentication
try:
instance.actual_instance = BearerTokenAuthentication.from_json(json_str)
match += 1
except (ValidationError, ValueError) as e:
error_messages.append(str(e))
# deserialize data into OtherTokenAuthentication
try:
instance.actual_instance = OtherTokenAuthentication.from_json(json_str)
match += 1
except (ValidationError, ValueError) as e:
error_messages.append(str(e))
# deserialize data into OauthCodeAuthentication
try:
instance.actual_instance = OauthCodeAuthentication.from_json(json_str)
match += 1
except (ValidationError, ValueError) as e:
error_messages.append(str(e))
# deserialize data into OauthClientCredentialsAuthentication
try:
instance.actual_instance = OauthClientCredentialsAuthentication.from_json(json_str)
match += 1
except (ValidationError, ValueError) as e:
error_messages.append(str(e))
if match > 1:
# more than 1 match
raise ValueError("Multiple matches found when deserializing the JSON string into GenericConnectorAuth with oneOf schemas: BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication. Details: " + ", ".join(error_messages))
elif match == 0:
# no match
raise ValueError("No match found when deserializing the JSON string into GenericConnectorAuth with oneOf schemas: BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication. Details: " + ", ".join(error_messages))
else:
return instance
@model_serializer(when_used="json")
def serialize_model(self):
return json.loads(self.to_json())
def to_json(self) -> str:
"""Returns the JSON representation of the actual instance"""
if self.actual_instance is None:
return "null"
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
return self.actual_instance.to_json()
else:
return json.dumps(self.actual_instance)
def to_dict(self) -> Optional[Union[Dict[str, Any], BasicAuthentication, BearerTokenAuthentication, OauthClientCredentialsAuthentication, OauthCodeAuthentication, OtherTokenAuthentication]]:
"""Returns the dict representation of the actual instance"""
if self.actual_instance is None:
return None
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
return self.actual_instance.to_dict()
else:
# primitive type
return self.actual_instance
def to_str(self) -> str:
"""Returns the string representation of the actual instance"""
return pprint.pformat(self.model_dump())

View File

@ -0,0 +1,101 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.connectors.models.generic_connector import GenericConnector
from thousandeyes_sdk.connectors.models.self_links import SelfLinks
from typing import Optional, Set
from typing_extensions import Self
class GenericConnectors(BaseModel):
"""
GenericConnectors
""" # noqa: E501
items: Optional[List[GenericConnector]] = None
links: Optional[SelfLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["items", "_links"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of GenericConnectors from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
_items = []
if self.items:
for _item in self.items:
if _item:
_items.append(_item.to_dict())
_dict['items'] = _items
# override the default output from pydantic by calling `to_dict()` of links
if self.links:
_dict['_links'] = self.links.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of GenericConnectors from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"items": [GenericConnector.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None,
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
})
return _obj

View File

@ -0,0 +1,89 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class Header(BaseModel):
"""
Header
""" # noqa: E501
name: StrictStr
value: StrictStr = Field(description="The value of the header. Note that this value is obfuscated in the response, even when overwritten.")
__properties: ClassVar[List[str]] = ["name", "value"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of Header from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of Header from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"name": obj.get("name"),
"value": obj.get("value")
})
return _obj

View File

@ -0,0 +1,101 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class Link(BaseModel):
"""
A hyperlink from the containing resource to a URI.
""" # noqa: E501
href: StrictStr = Field(description="Its value is either a URI [RFC3986] or a URI template [RFC6570].")
templated: Optional[StrictBool] = Field(default=None, description="Should be true when the link object's \"href\" property is a URI template.")
type: Optional[StrictStr] = Field(default=None, description="Used as a hint to indicate the media type expected when dereferencing the target resource.")
deprecation: Optional[StrictStr] = Field(default=None, description="Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation.")
name: Optional[StrictStr] = Field(default=None, description="Its value may be used as a secondary key for selecting link objects that share the same relation type.")
profile: Optional[StrictStr] = Field(default=None, description="A URI that hints about the profile of the target resource.")
title: Optional[StrictStr] = Field(default=None, description="Intended for labelling the link with a human-readable identifier")
hreflang: Optional[StrictStr] = Field(default=None, description="Indicates the language of the target resource")
__properties: ClassVar[List[str]] = ["href", "templated", "type", "deprecation", "name", "profile", "title", "hreflang"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of Link from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of Link from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"href": obj.get("href"),
"templated": obj.get("templated"),
"type": obj.get("type"),
"deprecation": obj.get("deprecation"),
"name": obj.get("name"),
"profile": obj.get("profile"),
"title": obj.get("title"),
"hreflang": obj.get("hreflang")
})
return _obj

View File

@ -0,0 +1,96 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType
from typing import Optional, Set
from typing_extensions import Self
class OauthClientCredentialsAuthentication(BaseModel):
"""
OauthClientCredentialsAuthentication
""" # noqa: E501
token: Optional[StrictStr] = None
oauth_client_id: StrictStr = Field(alias="oauthClientId")
oauth_token_url: StrictStr = Field(alias="oauthTokenUrl")
oauth_client_secret: StrictStr = Field(alias="oauthClientSecret")
type: AuthenticationType
__properties: ClassVar[List[str]] = ["token", "oauthClientId", "oauthTokenUrl", "oauthClientSecret", "type"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of OauthClientCredentialsAuthentication from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of OauthClientCredentialsAuthentication from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"token": obj.get("token"),
"oauthClientId": obj.get("oauthClientId"),
"oauthTokenUrl": obj.get("oauthTokenUrl"),
"oauthClientSecret": obj.get("oauthClientSecret"),
"type": obj.get("type")
})
return _obj

View File

@ -0,0 +1,104 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType
from typing import Optional, Set
from typing_extensions import Self
class OauthCodeAuthentication(BaseModel):
"""
OauthCodeAuthentication
""" # noqa: E501
token: Optional[StrictStr] = None
refresh_token: Optional[StrictStr] = Field(default=None, alias="refreshToken")
oauth_client_id: StrictStr = Field(alias="oauthClientId")
oauth_auth_url: StrictStr = Field(alias="oauthAuthUrl")
oauth_token_url: StrictStr = Field(alias="oauthTokenUrl")
oauth_client_secret: StrictStr = Field(alias="oauthClientSecret")
code: StrictStr
redirect_uri: StrictStr = Field(alias="redirectUri")
type: AuthenticationType
__properties: ClassVar[List[str]] = ["token", "refreshToken", "oauthClientId", "oauthAuthUrl", "oauthTokenUrl", "oauthClientSecret", "code", "redirectUri", "type"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of OauthCodeAuthentication from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of OauthCodeAuthentication from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"token": obj.get("token"),
"refreshToken": obj.get("refreshToken"),
"oauthClientId": obj.get("oauthClientId"),
"oauthAuthUrl": obj.get("oauthAuthUrl"),
"oauthTokenUrl": obj.get("oauthTokenUrl"),
"oauthClientSecret": obj.get("oauthClientSecret"),
"code": obj.get("code"),
"redirectUri": obj.get("redirectUri"),
"type": obj.get("type")
})
return _obj

View File

@ -0,0 +1,42 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class OperationCategory(str, Enum):
"""
OperationCategory
"""
"""
allowed enum values
"""
ALERTS = 'alerts'
RECOMMENDATIONS = 'recommendations'
TRAFFIC_MINUS_MONITORING = 'traffic-monitoring'
UNKNOWN = 'unknown'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of OperationCategory from a JSON string"""
return cls(json.loads(json_str))
@classmethod
def _missing_(cls, value):
"""Handle unknown values"""
return cls.UNKNOWN

View File

@ -0,0 +1,43 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class OperationStatus(str, Enum):
"""
OperationStatus
"""
"""
allowed enum values
"""
PENDING = 'pending'
CONNECTED = 'connected'
FAILING = 'failing'
UNVERIFIED = 'unverified'
UNKNOWN = 'unknown'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of OperationStatus from a JSON string"""
return cls(json.loads(json_str))
@classmethod
def _missing_(cls, value):
"""Handle unknown values"""
return cls.UNKNOWN

View File

@ -0,0 +1,40 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self
class OperationType(str, Enum):
"""
OperationType
"""
"""
allowed enum values
"""
WEBHOOK = 'webhook'
UNKNOWN = 'unknown'
@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of OperationType from a JSON string"""
return cls(json.loads(json_str))
@classmethod
def _missing_(cls, value):
"""Handle unknown values"""
return cls.UNKNOWN

View File

@ -0,0 +1,90 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List
from thousandeyes_sdk.connectors.models.authentication_type import AuthenticationType
from typing import Optional, Set
from typing_extensions import Self
class OtherTokenAuthentication(BaseModel):
"""
OtherTokenAuthentication
""" # noqa: E501
token: StrictStr
type: AuthenticationType
__properties: ClassVar[List[str]] = ["token", "type"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of OtherTokenAuthentication from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of OtherTokenAuthentication from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"token": obj.get("token"),
"type": obj.get("type")
})
return _obj

View File

@ -0,0 +1,91 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.connectors.models.link import Link
from typing import Optional, Set
from typing_extensions import Self
class SelfLinks(BaseModel):
"""
A links object containing the self link.
""" # noqa: E501
var_self: Optional[Link] = Field(default=None, alias="self")
__properties: ClassVar[List[str]] = ["self"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of SelfLinks from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of var_self
if self.var_self:
_dict['self'] = self.var_self.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of SelfLinks from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"self": Link.from_dict(obj["self"]) if obj.get("self") is not None else None
})
return _obj

View File

@ -0,0 +1,89 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class UnauthorizedError(BaseModel):
"""
UnauthorizedError
""" # noqa: E501
error: Optional[StrictStr] = None
error_description: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["error", "error_description"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of UnauthorizedError from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of UnauthorizedError from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"error": obj.get("error"),
"error_description": obj.get("error_description")
})
return _obj

View File

@ -0,0 +1,110 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.connectors.models.validation_error_item import ValidationErrorItem
from typing import Optional, Set
from typing_extensions import Self
class ValidationError(BaseModel):
"""
ValidationError
""" # noqa: E501
type: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".")
title: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the problem type.")
status: Optional[StrictInt] = Field(default=None, description="The HTTP status code generated by the origin server for this occurrence of the problem.")
detail: Optional[StrictStr] = Field(default=None, description="A human-readable explanation specific to this occurrence of the problem.")
instance: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the specific occurrence of the problem.")
errors: Optional[List[ValidationErrorItem]] = Field(default=None, description="(Optional) When multiple errors occur, the details for each error are listed.")
__properties: ClassVar[List[str]] = ["type", "title", "status", "detail", "instance", "errors"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of ValidationError from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in errors (list)
_items = []
if self.errors:
for _item in self.errors:
if _item:
_items.append(_item.to_dict())
_dict['errors'] = _items
# set to None if errors (nullable) is None
# and model_fields_set contains the field
if self.errors is None and "errors" in self.model_fields_set:
_dict['errors'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of ValidationError from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"type": obj.get("type"),
"title": obj.get("title"),
"status": obj.get("status"),
"detail": obj.get("detail"),
"instance": obj.get("instance"),
"errors": [ValidationErrorItem.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
})
return _obj

View File

@ -0,0 +1,91 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class ValidationErrorItem(BaseModel):
"""
ValidationErrorItem
""" # noqa: E501
code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.")
var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field")
message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.")
__properties: ClassVar[List[str]] = ["code", "field", "message"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of ValidationErrorItem from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of ValidationErrorItem from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"code": obj.get("code"),
"field": obj.get("field"),
"message": obj.get("message")
})
return _obj

View File

@ -0,0 +1,124 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.connectors.models.header import Header
from thousandeyes_sdk.connectors.models.operation_category import OperationCategory
from thousandeyes_sdk.connectors.models.operation_status import OperationStatus
from thousandeyes_sdk.connectors.models.operation_type import OperationType
from thousandeyes_sdk.connectors.models.self_links import SelfLinks
from typing import Optional, Set
from typing_extensions import Self
class WebhookOperation(BaseModel):
"""
WebhookOperation
""" # noqa: E501
id: Optional[StrictStr] = None
name: StrictStr
enabled: Optional[StrictBool] = None
category: OperationCategory
status: OperationStatus
path: Optional[StrictStr] = None
payload: Optional[StrictStr] = Field(default=None, description="Handlebars template for the payload.")
headers: Optional[List[Header]] = None
var_query_params: Optional[StrictStr] = Field(default=None, description="Handlebars template for the query params. Most compile into a proper JSON object where each object property will define the query param name and the object property value define the corresponding query param value.", alias="queryParams")
type: Optional[OperationType] = None
links: Optional[SelfLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["id", "name", "enabled", "category", "status", "path", "payload", "headers", "queryParams", "type", "_links"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of WebhookOperation from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"id",
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in headers (list)
_items = []
if self.headers:
for _item in self.headers:
if _item:
_items.append(_item.to_dict())
_dict['headers'] = _items
# override the default output from pydantic by calling `to_dict()` of links
if self.links:
_dict['_links'] = self.links.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of WebhookOperation from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"id": obj.get("id"),
"name": obj.get("name"),
"enabled": obj.get("enabled"),
"category": obj.get("category"),
"status": obj.get("status"),
"path": obj.get("path"),
"payload": obj.get("payload"),
"headers": [Header.from_dict(_item) for _item in obj["headers"]] if obj.get("headers") is not None else None,
"queryParams": obj.get("queryParams"),
"type": obj.get("type"),
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
})
return _obj

View File

@ -0,0 +1,101 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from thousandeyes_sdk.connectors.models.self_links import SelfLinks
from thousandeyes_sdk.connectors.models.webhook_operation import WebhookOperation
from typing import Optional, Set
from typing_extensions import Self
class WebhookOperations(BaseModel):
"""
WebhookOperations
""" # noqa: E501
items: Optional[List[WebhookOperation]] = None
links: Optional[SelfLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["items", "_links"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
extra="allow",
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of WebhookOperations from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in items (list)
_items = []
if self.items:
for _item in self.items:
if _item:
_items.append(_item.to_dict())
_dict['items'] = _items
# override the default output from pydantic by calling `to_dict()` of links
if self.links:
_dict['_links'] = self.links.to_dict()
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of WebhookOperations from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"items": [WebhookOperation.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None,
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
})
return _obj

View File

@ -0,0 +1,282 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import json
import unittest
import thousandeyes_sdk.connectors.models
from .test_utils import assert_constructed_model_matches_example_json
from thousandeyes_sdk.connectors.api.generic_connectors_api import GenericConnectorsApi
class TestGenericConnectorsApi(unittest.TestCase):
"""GenericConnectorsApi unit test stubs"""
def setUp(self) -> None:
self.api = GenericConnectorsApi()
def tearDown(self) -> None:
pass
def test_create_generic_connector_models_validation(self) -> None:
"""Test case for create_generic_connector request and response models"""
request_body_json = """
{
"headers" : [ {
"name" : "Content-Type",
"value" : "application/json"
}, {
"name" : "Content-Type",
"value" : "application/json"
} ],
"lastModifiedDate" : "2023-10-01T12:00:00Z",
"name" : "Cisco Slack",
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
"type" : "generic",
"target" : "https://hooks.slack.com/services/abc/xyz",
"authentication" : {
"password" : "abc123",
"type" : "basic",
"username" : "user1"
}
}"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.connectors.models.GenericConnector.from_json(request_body_json)
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
response_body_json = """
{
"headers" : [ {
"name" : "Content-Type",
"value" : "application/json"
}, {
"name" : "Content-Type",
"value" : "application/json"
} ],
"lastModifiedDate" : "2023-10-01T12:00:00Z",
"name" : "Cisco Slack",
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
"type" : "generic",
"target" : "https://hooks.slack.com/services/abc/xyz",
"authentication" : {
"password" : "abc123",
"type" : "basic",
"username" : "user1"
}
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.connectors.models.GenericConnector.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
def test_delete_generic_connector_models_validation(self) -> None:
"""Test case for delete_generic_connector request and response models"""
def test_get_generic_connector_models_validation(self) -> None:
"""Test case for get_generic_connector request and response models"""
response_body_json = """
{
"headers" : [ {
"name" : "Content-Type",
"value" : "application/json"
}, {
"name" : "Content-Type",
"value" : "application/json"
} ],
"lastModifiedDate" : "2023-10-01T12:00:00Z",
"name" : "Cisco Slack",
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
"type" : "generic",
"target" : "https://hooks.slack.com/services/abc/xyz",
"authentication" : {
"password" : "abc123",
"type" : "basic",
"username" : "user1"
}
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.connectors.models.GenericConnector.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
def test_get_generic_connectors_models_validation(self) -> None:
"""Test case for get_generic_connectors request and response models"""
response_body_json = """
{
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"items" : [ {
"headers" : [ {
"name" : "Content-Type",
"value" : "application/json"
}, {
"name" : "Content-Type",
"value" : "application/json"
} ],
"lastModifiedDate" : "2023-10-01T12:00:00Z",
"name" : "Cisco Slack",
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
"type" : "generic",
"target" : "https://hooks.slack.com/services/abc/xyz",
"authentication" : {
"password" : "abc123",
"type" : "basic",
"username" : "user1"
}
}, {
"headers" : [ {
"name" : "Content-Type",
"value" : "application/json"
}, {
"name" : "Content-Type",
"value" : "application/json"
} ],
"lastModifiedDate" : "2023-10-01T12:00:00Z",
"name" : "Cisco Slack",
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
"type" : "generic",
"target" : "https://hooks.slack.com/services/abc/xyz",
"authentication" : {
"password" : "abc123",
"type" : "basic",
"username" : "user1"
}
} ]
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.connectors.models.GenericConnectors.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
def test_list_generic_connector_operations_models_validation(self) -> None:
"""Test case for list_generic_connector_operations request and response models"""
response_body_json = """
{
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ]
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
def test_set_generic_connector_operations_models_validation(self) -> None:
"""Test case for set_generic_connector_operations request and response models"""
request_body_json = """
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.connectors.models.List[str].from_json(request_body_json)
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
response_body_json = """
{
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ]
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
def test_update_generic_connector_models_validation(self) -> None:
"""Test case for update_generic_connector request and response models"""
request_body_json = """
{
"headers" : [ {
"name" : "Content-Type",
"value" : "application/json"
}, {
"name" : "Content-Type",
"value" : "application/json"
} ],
"lastModifiedDate" : "2023-10-01T12:00:00Z",
"name" : "Cisco Slack",
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
"type" : "generic",
"target" : "https://hooks.slack.com/services/abc/xyz",
"authentication" : {
"password" : "abc123",
"type" : "basic",
"username" : "user1"
}
}"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.connectors.models.GenericConnector.from_json(request_body_json)
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
response_body_json = """
{
"headers" : [ {
"name" : "Content-Type",
"value" : "application/json"
}, {
"name" : "Content-Type",
"value" : "application/json"
} ],
"lastModifiedDate" : "2023-10-01T12:00:00Z",
"name" : "Cisco Slack",
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
"type" : "generic",
"target" : "https://hooks.slack.com/services/abc/xyz",
"authentication" : {
"password" : "abc123",
"type" : "basic",
"username" : "user1"
}
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.connectors.models.GenericConnector.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
if __name__ == '__main__':
unittest.main()

View File

@ -0,0 +1,86 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import json
import unittest
import thousandeyes_sdk.connectors.models
from .test_utils import assert_constructed_model_matches_example_json
from thousandeyes_sdk.connectors.api.operation_connectors_api import OperationConnectorsApi
class TestOperationConnectorsApi(unittest.TestCase):
"""OperationConnectorsApi unit test stubs"""
def setUp(self) -> None:
self.api = OperationConnectorsApi()
def tearDown(self) -> None:
pass
def test_get_operation_connectors_models_validation(self) -> None:
"""Test case for get_operation_connectors request and response models"""
response_body_json = """
{
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ]
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
def test_set_operation_connectors_models_validation(self) -> None:
"""Test case for set_operation_connectors request and response models"""
request_body_json = """
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.connectors.models.List[str].from_json(request_body_json)
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
response_body_json = """
{
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ]
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
if __name__ == '__main__':
unittest.main()

View File

@ -0,0 +1,16 @@
# coding: utf-8
import json
import unittest
from pydantic import BaseModel
def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict):
test_case = unittest.TestCase()
test_case.maxDiff = None
test_case.assertIsNotNone(model)
constructed_json = json.loads(model.to_json())
sorted_loaded_json = json.dumps(loaded_json, sort_keys=True)
sorted_constructed_json = json.dumps(constructed_json, sort_keys=True)
test_case.assertEqual(sorted_loaded_json, sorted_constructed_json)

View File

@ -0,0 +1,285 @@
# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import json
import unittest
import thousandeyes_sdk.connectors.models
from .test_utils import assert_constructed_model_matches_example_json
from thousandeyes_sdk.connectors.api.webhook_operations_api import WebhookOperationsApi
class TestWebhookOperationsApi(unittest.TestCase):
"""WebhookOperationsApi unit test stubs"""
def setUp(self) -> None:
self.api = WebhookOperationsApi()
def tearDown(self) -> None:
pass
def test_create_webhook_operation_models_validation(self) -> None:
"""Test case for create_webhook_operation request and response models"""
request_body_json = """
{
"path" : "/custom/path",
"headers" : [ {
"name" : "Content-Type",
"value" : "application/json"
} ],
"payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}",
"queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"name" : "My operation",
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
"category" : "alerts",
"type" : "webhook",
"enabled" : true,
"status" : "pending"
}"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.connectors.models.WebhookOperation.from_json(request_body_json)
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
response_body_json = """
{
"path" : "/custom/path",
"headers" : [ {
"name" : "Content-Type",
"value" : "application/json"
} ],
"payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}",
"queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"name" : "My operation",
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
"category" : "alerts",
"type" : "webhook",
"enabled" : true,
"status" : "pending"
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.connectors.models.WebhookOperation.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
def test_delete_webhook_operation_models_validation(self) -> None:
"""Test case for delete_webhook_operation request and response models"""
def test_get_webhook_operation_models_validation(self) -> None:
"""Test case for get_webhook_operation request and response models"""
response_body_json = """
{
"path" : "/custom/path",
"headers" : [ {
"name" : "Content-Type",
"value" : "application/json"
} ],
"payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}",
"queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"name" : "My operation",
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
"category" : "alerts",
"type" : "webhook",
"enabled" : true,
"status" : "pending"
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.connectors.models.WebhookOperation.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
def test_get_webhook_operations_models_validation(self) -> None:
"""Test case for get_webhook_operations request and response models"""
response_body_json = """
{
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"items" : [ {
"path" : "/custom/path",
"headers" : [ {
"name" : "Content-Type",
"value" : "application/json"
} ],
"payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}",
"queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"name" : "My operation",
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
"category" : "alerts",
"type" : "webhook",
"enabled" : true,
"status" : "pending"
}, {
"path" : "/custom/path",
"headers" : [ {
"name" : "Content-Type",
"value" : "application/json"
} ],
"payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}",
"queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"name" : "My operation",
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
"category" : "alerts",
"type" : "webhook",
"enabled" : true,
"status" : "pending"
} ]
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.connectors.models.WebhookOperations.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
def test_update_webhook_operation_models_validation(self) -> None:
"""Test case for update_webhook_operation request and response models"""
request_body_json = """
{
"path" : "/custom/path",
"headers" : [ {
"name" : "Content-Type",
"value" : "application/json"
} ],
"payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}",
"queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"name" : "My operation",
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
"category" : "alerts",
"type" : "webhook",
"enabled" : true,
"status" : "pending"
}"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.connectors.models.WebhookOperation.from_json(request_body_json)
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
response_body_json = """
{
"path" : "/custom/path",
"headers" : [ {
"name" : "Content-Type",
"value" : "application/json"
} ],
"payload" : "{\\"property1\\": {{numericVar}}, \\"property2\\": \\"{{stringVar}}\\"}",
"queryParams" : "{\\"queryParam1\\":\\"{{stringVar}}\\"}",
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"name" : "My operation",
"id" : "cb1b8033-ea2d-4e9b-a920-fe87850693cf",
"category" : "alerts",
"type" : "webhook",
"enabled" : true,
"status" : "pending"
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.connectors.models.WebhookOperation.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
if __name__ == '__main__':
unittest.main()

View File

@ -13,7 +13,7 @@ For more information about credentials, see [Working With Secure Credentials](ht
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 7.0.73
- API version: 7.0.74
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

View File

@ -28,6 +28,7 @@ from thousandeyes_sdk.credentials.models.credentials import Credentials
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType

View File

@ -3,7 +3,7 @@ Manage ThousandEyes Dashboards.
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 7.0.73
- API version: 7.0.74
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

View File

@ -30,6 +30,7 @@ from thousandeyes_sdk.dashboards.models.update_snapshot_expiration_date_api_requ
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.pagination_iterable import PaginationIterable
from thousandeyes_sdk.core.rest import RESTResponseType

View File

@ -31,6 +31,7 @@ from thousandeyes_sdk.dashboards.models.dashboard_order import DashboardOrder
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.pagination_iterable import PaginationIterable
from thousandeyes_sdk.core.rest import RESTResponseType

View File

@ -27,6 +27,7 @@ from thousandeyes_sdk.dashboards.models.api_context_filters_response import ApiC
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType

View File

@ -9,7 +9,7 @@ To access Emulation API operations, the following permissions are required:
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 7.0.73
- API version: 7.0.74
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

View File

@ -29,6 +29,7 @@ from thousandeyes_sdk.emulation.models.user_agents import UserAgents
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType

View File

@ -5,7 +5,7 @@ For more information about Endpoint Agents, see [Endpoint Agents](https://docs.t
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 7.0.73
- API version: 7.0.74
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

View File

@ -15,6 +15,7 @@ Name | Type | Description | Notes
**kernel_version** | **str** | | [optional] [readonly]
**manufacturer** | **str** | | [optional] [readonly]
**model** | **str** | | [optional] [readonly]
**serial_number** | **str** | | [optional] [readonly]
**last_seen** | **datetime** | The last time the agent checked-in. | [optional] [readonly]
**status** | [**Status**](Status.md) | | [optional]
**deleted** | **bool** | | [optional] [readonly]

View File

@ -31,6 +31,7 @@ from thousandeyes_sdk.endpoint_agents.models.list_endpoint_agents_response impor
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.pagination_iterable import PaginationIterable
from thousandeyes_sdk.core.rest import RESTResponseType
@ -937,6 +938,76 @@ class EndpointAgentsApi:
@validate_call
def filter_endpoint_agents_paginated(
self,
agent_search_request: Annotated[AgentSearchRequest, Field(description="The filter options for advanced search filtering for agents.")],
max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None,
cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None,
aid: Annotated[Optional[StrictStr], Field(description="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.")] = None,
expand: Annotated[Optional[List[ExpandEndpointAgentOptions]], Field(description="This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. ")] = None,
include_deleted: Annotated[Optional[StrictBool], Field(description="When requesting entities, set to `true` if you want to see deleted entities.")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> PaginationIterable:
"""Filter endpoint agents
Retrieves a list of endpoint agents within the specified account group that match the specified filters. If no agents meet the filter criteria, the API returns an empty array.
:param agent_search_request: The filter options for advanced search filtering for agents. (required)
:type agent_search_request: AgentSearchRequest
:param max: (Optional) Maximum number of objects to return.
:type max: int
:param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.
:type cursor: str
:param aid: 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.
:type aid: str
:param expand: This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent.
:type expand: List[ExpandEndpointAgentOptions]
:param include_deleted: When requesting entities, set to `true` if you want to see deleted entities.
:type include_deleted: bool
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
return PaginationIterable(
self.filter_endpoint_agents,
lambda data: data.agents if data and data.agents else [],
agent_search_request = agent_search_request, max = max, cursor = cursor, aid = aid, expand = expand, include_deleted = include_deleted,
_request_timeout=_request_timeout,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
@validate_call
def filter_endpoint_agents(
@ -1636,6 +1707,82 @@ class EndpointAgentsApi:
@validate_call
def get_endpoint_agents_paginated(
self,
max: Annotated[Optional[StrictInt], Field(description="(Optional) Maximum number of objects to return.")] = None,
cursor: Annotated[Optional[StrictStr], Field(description="(Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.")] = None,
aid: Annotated[Optional[StrictStr], Field(description="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.")] = None,
expand: Annotated[Optional[List[ExpandEndpointAgentOptions]], Field(description="This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. ")] = None,
include_deleted: Annotated[Optional[StrictBool], Field(description="When requesting entities, set to `true` if you want to see deleted entities.")] = None,
use_all_permitted_aids: Annotated[Optional[StrictBool], Field(description="Set to `true` to load data from all accounts the user has access to.")] = None,
agent_name: Annotated[Optional[StrictStr], Field(description="Returns only agents with the specified name. This is an exact match only. ")] = None,
computer_name: Annotated[Optional[StrictStr], Field(description="Returns only agents with the specified computer name. This is an exact match only. ")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> PaginationIterable:
"""List endpoint agents
Retrieves a list of endpoint agents in a given account group. If there are no agents in the specified account group, it returns an empty array.
:param max: (Optional) Maximum number of objects to return.
:type max: int
:param cursor: (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.
:type cursor: str
:param aid: 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.
:type aid: str
:param expand: This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent.
:type expand: List[ExpandEndpointAgentOptions]
:param include_deleted: When requesting entities, set to `true` if you want to see deleted entities.
:type include_deleted: bool
:param use_all_permitted_aids: Set to `true` to load data from all accounts the user has access to.
:type use_all_permitted_aids: bool
:param agent_name: Returns only agents with the specified name. This is an exact match only.
:type agent_name: str
:param computer_name: Returns only agents with the specified computer name. This is an exact match only.
:type computer_name: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
return PaginationIterable(
self.get_endpoint_agents,
lambda data: data.agents if data and data.agents else [],
max = max, cursor = cursor, aid = aid, expand = expand, include_deleted = include_deleted, use_all_permitted_aids = use_all_permitted_aids, agent_name = agent_name, computer_name = computer_name,
_request_timeout=_request_timeout,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
@validate_call
def get_endpoint_agents(

View File

@ -27,6 +27,7 @@ from thousandeyes_sdk.endpoint_agents.models.bulk_agent_transfer_response import
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
from thousandeyes_sdk.core.api_response import ApiResponse
from thousandeyes_sdk.core.rest import RESTResponseType

View File

@ -45,6 +45,7 @@ class EndpointAgent(BaseModel):
kernel_version: Optional[StrictStr] = Field(default=None, alias="kernelVersion")
manufacturer: Optional[StrictStr] = None
model: Optional[StrictStr] = None
serial_number: Optional[StrictStr] = Field(default=None, alias="serialNumber")
last_seen: Optional[datetime] = Field(default=None, description="The last time the agent checked-in.", alias="lastSeen")
status: Optional[Status] = None
deleted: Optional[StrictBool] = None
@ -65,7 +66,7 @@ class EndpointAgent(BaseModel):
tcp_driver_available: Optional[StrictBool] = Field(default=None, description="Status of TCP test support on the agent.", alias="tcpDriverAvailable")
npcap_version: Optional[StrictStr] = Field(default=None, description="For Windows agents, the version of the NPCAP driver that the agent has loaded.", alias="npcapVersion")
links: Optional[SelfLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["id", "aid", "name", "computerName", "osVersion", "platform", "kernelVersion", "manufacturer", "model", "lastSeen", "status", "deleted", "version", "targetVersion", "createdAt", "numberOfClients", "publicIP", "location", "clients", "totalMemory", "agentType", "vpnProfiles", "externalMetadata", "networkInterfaceProfiles", "asnDetails", "licenseType", "tcpDriverAvailable", "npcapVersion", "_links"]
__properties: ClassVar[List[str]] = ["id", "aid", "name", "computerName", "osVersion", "platform", "kernelVersion", "manufacturer", "model", "serialNumber", "lastSeen", "status", "deleted", "version", "targetVersion", "createdAt", "numberOfClients", "publicIP", "location", "clients", "totalMemory", "agentType", "vpnProfiles", "externalMetadata", "networkInterfaceProfiles", "asnDetails", "licenseType", "tcpDriverAvailable", "npcapVersion", "_links"]
model_config = ConfigDict(
populate_by_name=True,
@ -118,6 +119,7 @@ class EndpointAgent(BaseModel):
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"id",
@ -126,6 +128,7 @@ class EndpointAgent(BaseModel):
"kernel_version",
"manufacturer",
"model",
"serial_number",
"last_seen",
"deleted",
"version",
@ -205,6 +208,7 @@ class EndpointAgent(BaseModel):
"kernelVersion": obj.get("kernelVersion"),
"manufacturer": obj.get("manufacturer"),
"model": obj.get("model"),
"serialNumber": obj.get("serialNumber"),
"lastSeen": obj.get("lastSeen"),
"status": obj.get("status"),
"deleted": obj.get("deleted"),

View File

@ -108,6 +108,7 @@ class TestEndpointAgentsApi(unittest.TestCase):
"computerName" : "DESKJET-123",
"model" : "MacBookAir7,2",
"id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
"serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
"externalMetadata" : [ {
"key" : "anyConnectDeviceId",
"value" : "DF434343D"
@ -276,6 +277,7 @@ class TestEndpointAgentsApi(unittest.TestCase):
"computerName" : "DESKJET-123",
"model" : "MacBookAir7,2",
"id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
"serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
"externalMetadata" : [ {
"key" : "anyConnectDeviceId",
"value" : "DF434343D"
@ -498,6 +500,7 @@ class TestEndpointAgentsApi(unittest.TestCase):
"computerName" : "DESKJET-123",
"model" : "MacBookAir7,2",
"id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
"serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
"externalMetadata" : [ {
"key" : "anyConnectDeviceId",
"value" : "DF434343D"
@ -656,6 +659,7 @@ class TestEndpointAgentsApi(unittest.TestCase):
"computerName" : "DESKJET-123",
"model" : "MacBookAir7,2",
"id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
"serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
"externalMetadata" : [ {
"key" : "anyConnectDeviceId",
"value" : "DF434343D"
@ -825,6 +829,7 @@ class TestEndpointAgentsApi(unittest.TestCase):
"computerName" : "DESKJET-123",
"model" : "MacBookAir7,2",
"id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
"serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
"externalMetadata" : [ {
"key" : "anyConnectDeviceId",
"value" : "DF434343D"
@ -1017,6 +1022,7 @@ class TestEndpointAgentsApi(unittest.TestCase):
"computerName" : "DESKJET-123",
"model" : "MacBookAir7,2",
"id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
"serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
"externalMetadata" : [ {
"key" : "anyConnectDeviceId",
"value" : "DF434343D"
@ -1175,6 +1181,7 @@ class TestEndpointAgentsApi(unittest.TestCase):
"computerName" : "DESKJET-123",
"model" : "MacBookAir7,2",
"id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
"serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
"externalMetadata" : [ {
"key" : "anyConnectDeviceId",
"value" : "DF434343D"
@ -1377,6 +1384,7 @@ class TestEndpointAgentsApi(unittest.TestCase):
"computerName" : "DESKJET-123",
"model" : "MacBookAir7,2",
"id" : "861b7557-cd57-4bbb-b648-00bddf88ef49",
"serialNumber" : "xaab2ba4-d40f-4e80-9363-7e4826556055",
"externalMetadata" : [ {
"key" : "anyConnectDeviceId",
"value" : "DF434343D"

Some files were not shown because too many files have changed in this diff Show More