Compare commits

...

1 Commits
2.25.0 ... main

Author SHA1 Message Date
Miguel Pragosa
15ad3554e9
[GitHub Bot] Generated python SDK (#143)
Some checks failed
Python CI / build (push) Has been cancelled
Co-authored-by: API Team <api-team@thousandeyes.com>
2026-03-19 14:31:20 +00:00
196 changed files with 10999 additions and 203 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.75
- API version: 7.0.79
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

View File

@ -34,7 +34,8 @@ class TestAccountGroupsApi(unittest.TestCase):
{
"accountGroupName" : "My testing account group",
"agents" : [ "105", "719" ]
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.administrative.models.AccountGroupRequest.from_json(request_body_json)
@ -505,7 +506,8 @@ class TestAccountGroupsApi(unittest.TestCase):
{
"accountGroupName" : "My testing account group",
"agents" : [ "105", "719" ]
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.administrative.models.AccountGroupRequest.from_json(request_body_json)

View File

@ -34,7 +34,8 @@ class TestRolesApi(unittest.TestCase):
{
"permissions" : [ "56", "315" ],
"name" : "Organization Admin"
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.administrative.models.RoleRequestBody.from_json(request_body_json)
@ -155,7 +156,8 @@ class TestRolesApi(unittest.TestCase):
{
"permissions" : [ "56", "315" ],
"name" : "Organization Admin"
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.administrative.models.RoleRequestBody.from_json(request_body_json)

View File

@ -43,7 +43,8 @@ class TestUsersApi(unittest.TestCase):
"name" : "User X",
"allAccountGroupRoleIds" : [ "57", "1140" ],
"email" : "userx@thousandeyes.com"
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.administrative.models.UserRequest.from_json(request_body_json)
@ -336,7 +337,8 @@ class TestUsersApi(unittest.TestCase):
"name" : "User X",
"allAccountGroupRoleIds" : [ "57", "1140" ],
"email" : "userx@thousandeyes.com"
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.administrative.models.UserRequest.from_json(request_body_json)

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.75
- API version: 7.0.79
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

View File

@ -208,7 +208,8 @@ class TestCloudAndEnterpriseAgentsApi(unittest.TestCase):
"agentName" : "thousandeyes-stg-va-254",
"enabled" : true,
"accountGroups" : [ "1234", "1" ]
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.agents.models.AgentRequest.from_json(request_body_json)

View File

@ -33,7 +33,8 @@ class TestEnterpriseAgentClusterApi(unittest.TestCase):
request_body_json = """
{
"agents" : [ "281474976710706" ]
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.agents.models.AgentClusterAssignRequest.from_json(request_body_json)
@ -149,7 +150,8 @@ class TestEnterpriseAgentClusterApi(unittest.TestCase):
request_body_json = """
{
"members" : [ "281474976710706" ]
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.agents.models.AgentClusterUnassignRequest.from_json(request_body_json)

View File

@ -33,7 +33,8 @@ class TestTestsAssignmentOnAgentsApi(unittest.TestCase):
request_body_json = """
{
"testIds" : [ "281474976710706" ]
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.agents.models.AgentTestsAssignRequest.from_json(request_body_json)
@ -149,7 +150,8 @@ class TestTestsAssignmentOnAgentsApi(unittest.TestCase):
request_body_json = """
{
"testIds" : [ "281474976710706" ]
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.agents.models.AgentTestsAssignRequest.from_json(request_body_json)
@ -265,7 +267,8 @@ class TestTestsAssignmentOnAgentsApi(unittest.TestCase):
request_body_json = """
{
"testIds" : [ "281474976710706" ]
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.agents.models.AgentTestsAssignRequest.from_json(request_body_json)

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.75
- API version: 7.0.79
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

View File

@ -27,6 +27,7 @@ Name | Type | Description | Notes
**visited_sites_filter** | **List[str]** | A list of website domains visited during the session. This is applicable when &#x60;alertGroupType&#x60; is &#x60;browser-session&#x60;. | [optional]
**notifications** | [**AlertNotification**](AlertNotification.md) | | [optional]
**tests** | [**List[AlertSimpleTest]**](AlertSimpleTest.md) | | [optional] [readonly]
**test_ids** | **List[str]** | Array of test IDs to link to alert rule (get &#x60;testId&#x60; from &#x60;/tests&#x60; endpoint). | [optional] [readonly]
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
## Example

View File

@ -56,8 +56,9 @@ class RuleDetail(BaseModel):
visited_sites_filter: Optional[List[StrictStr]] = Field(default=None, description="A list of website domains visited during the session. This is applicable when `alertGroupType` is `browser-session`.", alias="visitedSitesFilter")
notifications: Optional[AlertNotification] = None
tests: Optional[List[AlertSimpleTest]] = None
test_ids: Optional[List[StrictStr]] = Field(default=None, description="Array of test IDs to link to alert rule (get `testId` from `/tests` endpoint).", alias="testIds")
links: Optional[SelfLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "description", "direction", "notifyOnClear", "isDefault", "alertType", "alertGroupType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "sensitivityLevel", "severity", "endpointAgentIds", "endpointLabelIds", "visitedSitesFilter", "notifications", "tests", "_links"]
__properties: ClassVar[List[str]] = ["ruleId", "ruleName", "expression", "description", "direction", "notifyOnClear", "isDefault", "alertType", "alertGroupType", "minimumSources", "minimumSourcesPct", "roundsViolatingMode", "roundsViolatingOutOf", "roundsViolatingRequired", "includeCoveredPrefixes", "sensitivityLevel", "severity", "endpointAgentIds", "endpointLabelIds", "visitedSitesFilter", "notifications", "tests", "testIds", "_links"]
model_config = ConfigDict(
populate_by_name=True,
@ -92,10 +93,12 @@ class RuleDetail(BaseModel):
are ignored.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set([
"rule_id",
"tests",
"test_ids",
])
_dict = self.model_dump(
@ -150,6 +153,7 @@ class RuleDetail(BaseModel):
"visitedSitesFilter": obj.get("visitedSitesFilter"),
"notifications": AlertNotification.from_dict(obj["notifications"]) if obj.get("notifications") is not None else None,
"tests": [AlertSimpleTest.from_dict(_item) for _item in obj["tests"]] if obj.get("tests") is not None else None,
"testIds": obj.get("testIds"),
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
})
return _obj

View File

@ -88,7 +88,8 @@ class TestAlertRulesApi(unittest.TestCase):
} ]
},
"direction" : "to-target"
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.alerts.models.RuleDetailUpdate.from_json(request_body_json)
@ -201,6 +202,7 @@ class TestAlertRulesApi(unittest.TestCase):
"sensitivityLevel" : "medium",
"alertGroupType" : "endpoint",
"notifyOnClear" : true,
"testIds" : [ "281474976710706", "271659" ],
"roundsViolatingOutOf" : 5,
"roundsViolatingRequired" : 2,
"isDefault" : true,
@ -441,7 +443,8 @@ class TestAlertRulesApi(unittest.TestCase):
} ]
},
"direction" : "to-target"
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.alerts.models.RuleDetailUpdate.from_json(request_body_json)

View File

@ -50,7 +50,8 @@ class TestAlertSuppressionWindowsApi(unittest.TestCase):
"name" : "Monthly maintenance",
"startDate" : "2017-07-01T05:00:00Z",
"status" : "ended"
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.alerts.models.AlertSuppressionWindowRequest.from_json(request_body_json)
@ -369,7 +370,8 @@ class TestAlertSuppressionWindowsApi(unittest.TestCase):
"name" : "Monthly maintenance",
"startDate" : "2017-07-01T05:00:00Z",
"status" : "ended"
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.alerts.models.AlertSuppressionWindowRequest.from_json(request_body_json)

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.75
- API version: 7.0.79
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

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.79
- 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 = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# 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** | **int** | The date when the connector was last modified (Unix timestamp in milliseconds). | [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 = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# 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** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**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 = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# 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** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
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 = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# 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** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**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 = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# List 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** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**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 = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# List 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** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**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 = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# 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** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**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 = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# 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** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**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 = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# 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** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**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 = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# 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** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**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,12 @@
# OperationStatus
The connectivity status of the operation to its target endpoint. Indicates whether the operation can successfully connect and communicate with the target URL. Values: 'pending' (initial state, not yet tested), 'connected' (successfully connected), 'failing' (connection or execution issues), 'unverified' (not yet verified/tested).
## 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 = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# 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** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**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 = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# 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** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
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 = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# 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** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**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 = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# List 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** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**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 = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# 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** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**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, StrictStr
from typing import List, Optional
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[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,
_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: 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 _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[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,
_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: 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 _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[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,
_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: 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 _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[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,
_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: 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 _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[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,
_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: 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 _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[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,
_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: 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 _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,45 @@
# 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'
CONJUR_MINUS_HOST = 'conjur-host'
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,116 @@
# 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.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[StrictInt] = Field(default=None, description="The date when the connector was last modified (Unix timestamp in milliseconds).", 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):
"""
The connectivity status of the operation to its target endpoint. Indicates whether the operation can successfully connect and communicate with the target URL. Values: 'pending' (initial state, not yet tested), 'connected' (successfully connected), 'failing' (connection or execution issues), 'unverified' (not yet verified/tested).
"""
"""
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,286 @@
# 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" : 1770293655756,
"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" : 1770293655756,
"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" : 1770293655756,
"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" : 1770293655756,
"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" : 1770293655756,
"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 = """
["ca39314d-eb4f-496f-9435-b5d20b1bfbff","a32cfbab-32f6-41d8-9027-7127cba965dd"]
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = json.loads(request_body_json)
self.assertEqual(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" : 1770293655756,
"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" : 1770293655756,
"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,88 @@
# 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 = """
["ca39314d-eb4f-496f-9435-b5d20b1bfbff"]
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = json.loads(request_body_json)
self.assertEqual(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,287 @@
# 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.75
- API version: 7.0.79
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

View File

@ -34,7 +34,8 @@ class TestCredentialsApi(unittest.TestCase):
{
"name" : "Example Credential 1",
"value" : "Example Credential 1 Password"
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.credentials.models.CredentialRequest.from_json(request_body_json)
@ -154,7 +155,8 @@ class TestCredentialsApi(unittest.TestCase):
{
"name" : "Example Credential 1",
"value" : "Example Credential 1 Password"
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.credentials.models.CredentialRequest.from_json(request_body_json)

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.75
- API version: 7.0.79
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

View File

@ -7,6 +7,7 @@ The data displayed on a numbers card.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**card_id** | **str** | Identifier of the card. | [optional]
**card_name** | **str** | Name of the card. | [optional]
**start_date** | **datetime** | UTC start date of the data shown in the API output (ISO date-time format). | [optional]
**end_date** | **datetime** | UTC end date of the data shown in the API output (ISO date-time format). | [optional]
**previous_value** | **float** | Previous value if &#x60;compareToPreviousValue &#x3D;&#x3D; true&#x60; in configuration. | [optional]

View File

@ -29,6 +29,7 @@ class ApiNumbersCardData(BaseModel):
The data displayed on a numbers card.
""" # noqa: E501
card_id: Optional[StrictStr] = Field(default=None, description="Identifier of the card.", alias="cardId")
card_name: Optional[StrictStr] = Field(default=None, description="Name of the card.", alias="cardName")
start_date: Optional[datetime] = Field(default=None, description="UTC start date of the data shown in the API output (ISO date-time format).", alias="startDate")
end_date: Optional[datetime] = Field(default=None, description="UTC end date of the data shown in the API output (ISO date-time format).", alias="endDate")
previous_value: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Previous value if `compareToPreviousValue == true` in configuration.", alias="previousValue")
@ -39,7 +40,7 @@ class ApiNumbersCardData(BaseModel):
status: Optional[StrictStr] = Field(default=None, description="Message for not fully configured card or no data.")
alert_suppression_windows: Optional[List[ApiDashboardAsw]] = Field(default=None, alias="alertSuppressionWindows")
links: Optional[SelfLinks] = Field(default=None, alias="_links")
__properties: ClassVar[List[str]] = ["cardId", "startDate", "endDate", "previousValue", "binSize", "timestamp", "numberOfDataPoints", "value", "status", "alertSuppressionWindows", "_links"]
__properties: ClassVar[List[str]] = ["cardId", "cardName", "startDate", "endDate", "previousValue", "binSize", "timestamp", "numberOfDataPoints", "value", "status", "alertSuppressionWindows", "_links"]
model_config = ConfigDict(
populate_by_name=True,
@ -104,6 +105,7 @@ class ApiNumbersCardData(BaseModel):
_obj = cls.model_validate({
"cardId": obj.get("cardId"),
"cardName": obj.get("cardName"),
"startDate": obj.get("startDate"),
"endDate": obj.get("endDate"),
"previousValue": obj.get("previousValue"),

View File

@ -39,7 +39,8 @@ class TestDashboardSnapshotsApi(unittest.TestCase):
"timezone" : "PST",
"startDate" : "2023-05-16T10:14:28Z",
"expirationDate" : "2023-05-16T10:14:28Z"
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.dashboards.models.GenerateDashboardSnapshotRequest.from_json(request_body_json)
@ -385,6 +386,7 @@ class TestDashboardSnapshotsApi(unittest.TestCase):
"totalAlerts" : 500,
"cards" : [ {
"numberOfDataPoints" : 24192,
"cardName" : "Card Name",
"endDate" : "2023-05-16T10:14:28Z",
"_links" : {
"self" : {
@ -426,6 +428,7 @@ class TestDashboardSnapshotsApi(unittest.TestCase):
"status" : "No data"
}, {
"numberOfDataPoints" : 24192,
"cardName" : "Card Name",
"endDate" : "2023-05-16T10:14:28Z",
"_links" : {
"self" : {
@ -1293,7 +1296,8 @@ class TestDashboardSnapshotsApi(unittest.TestCase):
{
"snapshotExpirationDate" : "2023-05-16T10:14:28Z",
"expirationDate" : "2023-05-16 10:14:28"
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.dashboards.models.UpdateSnapshotExpirationDateApiRequest.from_json(request_body_json)

View File

@ -151,7 +151,8 @@ class TestDashboardsApi(unittest.TestCase):
"modifiedBy" : "1",
"isGlobalOverride" : true,
"aid" : "1234"
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.dashboards.models.Dashboard.from_json(request_body_json)
@ -483,6 +484,7 @@ class TestDashboardsApi(unittest.TestCase):
"totalAlerts" : 500,
"cards" : [ {
"numberOfDataPoints" : 24192,
"cardName" : "Card Name",
"endDate" : "2023-05-16T10:14:28Z",
"_links" : {
"self" : {
@ -524,6 +526,7 @@ class TestDashboardsApi(unittest.TestCase):
"status" : "No data"
}, {
"numberOfDataPoints" : 24192,
"cardName" : "Card Name",
"endDate" : "2023-05-16T10:14:28Z",
"_links" : {
"self" : {
@ -1137,6 +1140,7 @@ class TestDashboardsApi(unittest.TestCase):
response_body_json = """
{
"numberOfDataPoints" : 24192,
"cardName" : "Card Name",
"endDate" : "2023-05-16T10:14:28Z",
"_links" : {
"self" : {
@ -1373,7 +1377,8 @@ class TestDashboardsApi(unittest.TestCase):
"modifiedBy" : "1",
"isGlobalOverride" : true,
"aid" : "1234"
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.dashboards.models.Dashboard.from_json(request_body_json)

View File

@ -57,7 +57,8 @@ class TestDashboardsFiltersApi(unittest.TestCase):
} ],
"name" : "cea-filter",
"description" : "Global filter for CEA widgets"
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.dashboards.models.ApiContextFilterRequest.from_json(request_body_json)
@ -325,7 +326,8 @@ class TestDashboardsFiltersApi(unittest.TestCase):
} ],
"name" : "cea-filter",
"description" : "Global filter for CEA widgets"
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.dashboards.models.ApiContextFilterRequest.from_json(request_body_json)

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.75
- API version: 7.0.79
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator

View File

@ -35,7 +35,8 @@ class TestEmulationApi(unittest.TestCase):
"width" : 1024,
"category" : "desktop",
"height" : 768
}"""
}
"""
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.emulation.models.EmulatedDevice.from_json(request_body_json)

View File

@ -13,9 +13,12 @@ docs/AgentThresholdFilters.md
docs/AgentTransfer.md
docs/AgentTransferRequest.md
docs/AgentTransferStatus.md
docs/BatteryLevel.md
docs/BatteryMetrics.md
docs/BrowserType.md
docs/BulkAgentTransferRequest.md
docs/BulkAgentTransferResponse.md
docs/CellularProfile.md
docs/ConditionalOperator.md
docs/ConnectionString.md
docs/EndpointAgent.md
@ -69,9 +72,12 @@ src/thousandeyes_sdk/endpoint_agents/models/agent_threshold_filters.py
src/thousandeyes_sdk/endpoint_agents/models/agent_transfer.py
src/thousandeyes_sdk/endpoint_agents/models/agent_transfer_request.py
src/thousandeyes_sdk/endpoint_agents/models/agent_transfer_status.py
src/thousandeyes_sdk/endpoint_agents/models/battery_level.py
src/thousandeyes_sdk/endpoint_agents/models/battery_metrics.py
src/thousandeyes_sdk/endpoint_agents/models/browser_type.py
src/thousandeyes_sdk/endpoint_agents/models/bulk_agent_transfer_request.py
src/thousandeyes_sdk/endpoint_agents/models/bulk_agent_transfer_response.py
src/thousandeyes_sdk/endpoint_agents/models/cellular_profile.py
src/thousandeyes_sdk/endpoint_agents/models/conditional_operator.py
src/thousandeyes_sdk/endpoint_agents/models/connection_string.py
src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent.py

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.75
- API version: 7.0.79
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
@ -122,9 +122,12 @@ Class | Method | HTTP request | Description
- [AgentTransfer](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/AgentTransfer.md)
- [AgentTransferRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/AgentTransferRequest.md)
- [AgentTransferStatus](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/AgentTransferStatus.md)
- [BatteryLevel](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/BatteryLevel.md)
- [BatteryMetrics](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/BatteryMetrics.md)
- [BrowserType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/BrowserType.md)
- [BulkAgentTransferRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/BulkAgentTransferRequest.md)
- [BulkAgentTransferResponse](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/BulkAgentTransferResponse.md)
- [CellularProfile](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/CellularProfile.md)
- [ConditionalOperator](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/ConditionalOperator.md)
- [ConnectionString](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/ConnectionString.md)
- [EndpointAgent](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgent.md)

View File

@ -0,0 +1,12 @@
# BatteryLevel
Battery level indicator.
## 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 @@
# BatteryMetrics
Battery metrics for the endpoint agent.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**battery_level** | [**BatteryLevel**](BatteryLevel.md) | |
**battery_level_normalized_percent** | **float** | Battery level as a normalized percentage (0-1). |
## Example
```python
from thousandeyes_sdk.endpoint_agents.models.battery_metrics import BatteryMetrics
# TODO update the JSON string below
json = "{}"
# create an instance of BatteryMetrics from a JSON string
battery_metrics_instance = BatteryMetrics.from_json(json)
# print the JSON string representation of the object
print(BatteryMetrics.to_json())
# convert the object into a dict
battery_metrics_dict = battery_metrics_instance.to_dict()
# create an instance of BatteryMetrics from a dict
battery_metrics_from_dict = BatteryMetrics.from_dict(battery_metrics_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 @@
# CellularProfile
Cellular network profile information for a mobile endpoint agent.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**carrier_name** | **str** | Carrier name | [optional]
**network_gen** | **str** | Cellular network generation. | [optional]
**network_subtype** | **str** | A real network subtype. It may be different from an advertised network type. | [optional]
**advertised_network_gen** | **str** | Cellular network generation. | [optional]
**advertised_network_subtype** | **str** | Advertised Network subtype | [optional]
**rssi** | **float** | Received Signal Strength Indicator in dBm. Values are always negative. | [optional]
**rsrp** | **float** | Reference Signal Received Power in dBm. Values are always negative. | [optional]
**rscp** | **float** | Received Signal Code Power in dBm. Values are always negative or zero. | [optional]
**rsrq** | **float** | Reference Signal Received Quality in dBm. Values are always negative. | [optional]
**sinr** | **float** | Signal to Interference and Noise Ratio in dBm. It can be negative or positive. | [optional]
## Example
```python
from thousandeyes_sdk.endpoint_agents.models.cellular_profile import CellularProfile
# TODO update the JSON string below
json = "{}"
# create an instance of CellularProfile from a JSON string
cellular_profile_instance = CellularProfile.from_json(json)
# print the JSON string representation of the object
print(CellularProfile.to_json())
# convert the object into a dict
cellular_profile_dict = cellular_profile_instance.to_dict()
# create an instance of CellularProfile from a dict
cellular_profile_from_dict = CellularProfile.from_dict(cellular_profile_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

@ -35,6 +35,8 @@ Name | Type | Description | Notes
**license_type** | [**AgentLicenseType**](AgentLicenseType.md) | | [optional]
**tcp_driver_available** | **bool** | Status of TCP test support on the agent. | [optional] [readonly]
**npcap_version** | **str** | For Windows agents, the version of the NPCAP driver that the agent has loaded. | [optional] [readonly]
**battery_metrics** | [**BatteryMetrics**](BatteryMetrics.md) | | [optional]
**cellular_profile** | [**CellularProfile**](CellularProfile.md) | | [optional]
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
## Example

View File

@ -97,7 +97,7 @@ void (empty response body)
Bulk transfer agents
Initiates the transfer of multiple agents between accounts. The following conditions apply: * The requester must possess 'write' permissions for both the 'from' and 'to' accounts involved in each transfer. * Multiple transfers may involve a mix of different source and destination accounts. * For each transfer request, the 'from' account must match the current account of the respective agent. * Transfers are executed asynchronously. * Progress tracking is not intended, but users can monitor the progress by periodically polling the 'get agent' endpoint. * Each transfer request is individually validated and completed; this operation is not atomic, meaning transfers can succeed or fail individually. * The API response provides the status of each transfer request.
Initiates the transfer of multiple agents between accounts. The following conditions apply: * The requester must possess 'write' permissions for both the 'from' and 'to' accounts involved in each transfer. * Multiple transfers may involve a mix of different source and destination accounts. * For each transfer request, the 'from' account must match the current account of the respective agent. * Transfers are executed asynchronously. * Progress tracking is not intended, but users can monitor the progress by periodically polling the 'get agent' endpoint. * Each transfer request is individually validated and completed; this operation is not atomic, meaning transfers can succeed or fail individually. * The API response provides the status of each transfer request. * There are no performance concerns for this API; any number of agents can be transferred in bulk.
### Example

View File

@ -31,9 +31,12 @@ from thousandeyes_sdk.endpoint_agents.models.agent_threshold_filters import Agen
from thousandeyes_sdk.endpoint_agents.models.agent_transfer import AgentTransfer
from thousandeyes_sdk.endpoint_agents.models.agent_transfer_request import AgentTransferRequest
from thousandeyes_sdk.endpoint_agents.models.agent_transfer_status import AgentTransferStatus
from thousandeyes_sdk.endpoint_agents.models.battery_level import BatteryLevel
from thousandeyes_sdk.endpoint_agents.models.battery_metrics import BatteryMetrics
from thousandeyes_sdk.endpoint_agents.models.browser_type import BrowserType
from thousandeyes_sdk.endpoint_agents.models.bulk_agent_transfer_request import BulkAgentTransferRequest
from thousandeyes_sdk.endpoint_agents.models.bulk_agent_transfer_response import BulkAgentTransferResponse
from thousandeyes_sdk.endpoint_agents.models.cellular_profile import CellularProfile
from thousandeyes_sdk.endpoint_agents.models.conditional_operator import ConditionalOperator
from thousandeyes_sdk.endpoint_agents.models.connection_string import ConnectionString
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent import EndpointAgent

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