mirror of
https://github.com/thousandeyes/thousandeyes-sdk-python.git
synced 2026-08-04 00:46:52 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75929e93d0 | ||
|
|
7e7c1c4c0a | ||
|
|
5168916842 | ||
|
|
e75e6a7f2f |
@ -12,13 +12,13 @@ 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:
|
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||||
|
|
||||||
- API version: 7.0.93
|
- API version: 7.0.96
|
||||||
- Generator version: 7.6.0
|
- Generator version: 7.6.0
|
||||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||||
|
|
||||||
## Requirements.
|
## Requirements.
|
||||||
|
|
||||||
Python 3.8+
|
Python 3.9+
|
||||||
|
|
||||||
## Installation & Usage
|
## Installation & Usage
|
||||||
### pip install
|
### pip install
|
||||||
|
|||||||
@ -7,9 +7,9 @@ authors = [
|
|||||||
]
|
]
|
||||||
description = "ThousandEyes SDK Administrative API"
|
description = "ThousandEyes SDK Administrative API"
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
requires-python = ">= 3.8"
|
requires-python = ">= 3.9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"urllib3 >= 2.0.0",
|
"urllib3 >= 2.6.3",
|
||||||
"python-dateutil >=2.8.2",
|
"python-dateutil >=2.8.2",
|
||||||
"pydantic >=2.1.0",
|
"pydantic >=2.1.0",
|
||||||
"typing-extensions >=4.7.1",
|
"typing-extensions >=4.7.1",
|
||||||
|
|||||||
@ -5,13 +5,13 @@ 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:
|
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||||
|
|
||||||
- API version: 7.0.93
|
- API version: 7.0.96
|
||||||
- Generator version: 7.6.0
|
- Generator version: 7.6.0
|
||||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||||
|
|
||||||
## Requirements.
|
## Requirements.
|
||||||
|
|
||||||
Python 3.8+
|
Python 3.9+
|
||||||
|
|
||||||
## Installation & Usage
|
## Installation & Usage
|
||||||
### pip install
|
### pip install
|
||||||
|
|||||||
@ -7,9 +7,9 @@ authors = [
|
|||||||
]
|
]
|
||||||
description = "ThousandEyes SDK Agents API"
|
description = "ThousandEyes SDK Agents API"
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
requires-python = ">= 3.8"
|
requires-python = ">= 3.9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"urllib3 >= 2.0.0",
|
"urllib3 >= 2.6.3",
|
||||||
"python-dateutil >=2.8.2",
|
"python-dateutil >=2.8.2",
|
||||||
"pydantic >=2.1.0",
|
"pydantic >=2.1.0",
|
||||||
"typing-extensions >=4.7.1",
|
"typing-extensions >=4.7.1",
|
||||||
|
|||||||
@ -14,13 +14,13 @@ 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:
|
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||||
|
|
||||||
- API version: 7.0.93
|
- API version: 7.0.96
|
||||||
- Generator version: 7.6.0
|
- Generator version: 7.6.0
|
||||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||||
|
|
||||||
## Requirements.
|
## Requirements.
|
||||||
|
|
||||||
Python 3.8+
|
Python 3.9+
|
||||||
|
|
||||||
## Installation & Usage
|
## Installation & Usage
|
||||||
### pip install
|
### pip install
|
||||||
|
|||||||
@ -7,9 +7,9 @@ authors = [
|
|||||||
]
|
]
|
||||||
description = "ThousandEyes SDK Alerts API"
|
description = "ThousandEyes SDK Alerts API"
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
requires-python = ">= 3.8"
|
requires-python = ">= 3.9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"urllib3 >= 2.0.0",
|
"urllib3 >= 2.6.3",
|
||||||
"python-dateutil >=2.8.2",
|
"python-dateutil >=2.8.2",
|
||||||
"pydantic >=2.1.0",
|
"pydantic >=2.1.0",
|
||||||
"typing-extensions >=4.7.1",
|
"typing-extensions >=4.7.1",
|
||||||
|
|||||||
@ -10,13 +10,13 @@ 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:
|
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||||
|
|
||||||
- API version: 7.0.93
|
- API version: 7.0.96
|
||||||
- Generator version: 7.6.0
|
- Generator version: 7.6.0
|
||||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||||
|
|
||||||
## Requirements.
|
## Requirements.
|
||||||
|
|
||||||
Python 3.8+
|
Python 3.9+
|
||||||
|
|
||||||
## Installation & Usage
|
## Installation & Usage
|
||||||
### pip install
|
### pip install
|
||||||
|
|||||||
@ -7,9 +7,9 @@ authors = [
|
|||||||
]
|
]
|
||||||
description = "ThousandEyes SDK BGP Monitors API"
|
description = "ThousandEyes SDK BGP Monitors API"
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
requires-python = ">= 3.8"
|
requires-python = ">= 3.9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"urllib3 >= 2.0.0",
|
"urllib3 >= 2.6.3",
|
||||||
"python-dateutil >=2.8.2",
|
"python-dateutil >=2.8.2",
|
||||||
"pydantic >=2.1.0",
|
"pydantic >=2.1.0",
|
||||||
"typing-extensions >=4.7.1",
|
"typing-extensions >=4.7.1",
|
||||||
|
|||||||
@ -6,13 +6,13 @@ Manage connectors and operations.
|
|||||||
|
|
||||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||||
|
|
||||||
- API version: 7.0.93
|
- API version: 7.0.96
|
||||||
- Generator version: 7.6.0
|
- Generator version: 7.6.0
|
||||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||||
|
|
||||||
## Requirements.
|
## Requirements.
|
||||||
|
|
||||||
Python 3.8+
|
Python 3.9+
|
||||||
|
|
||||||
## Installation & Usage
|
## Installation & Usage
|
||||||
### pip install
|
### pip install
|
||||||
|
|||||||
@ -7,9 +7,9 @@ authors = [
|
|||||||
]
|
]
|
||||||
description = "ThousandEyes SDK Integrations API"
|
description = "ThousandEyes SDK Integrations API"
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
requires-python = ">= 3.8"
|
requires-python = ">= 3.9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"urllib3 >= 2.0.0",
|
"urllib3 >= 2.6.3",
|
||||||
"python-dateutil >=2.8.2",
|
"python-dateutil >=2.8.2",
|
||||||
"pydantic >=2.1.0",
|
"pydantic >=2.1.0",
|
||||||
"typing-extensions >=4.7.1",
|
"typing-extensions >=4.7.1",
|
||||||
|
|||||||
@ -9,7 +9,7 @@ description = "ThousandEyes SDK Core"
|
|||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
requires-python = ">= 3.8"
|
requires-python = ">= 3.8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"urllib3 >= 2.0.0",
|
"urllib3 >= 2.6.3",
|
||||||
"python-dateutil >=2.8.2",
|
"python-dateutil >=2.8.2",
|
||||||
"pydantic >=2.1.0",
|
"pydantic >=2.1.0",
|
||||||
"typing-extensions >=4.7.1",
|
"typing-extensions >=4.7.1",
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional, Type
|
||||||
|
|
||||||
from typing_extensions import Self
|
from typing_extensions import Self
|
||||||
|
|
||||||
@ -135,6 +135,22 @@ class ApiException(OpenApiException):
|
|||||||
pass
|
pass
|
||||||
self.headers = http_resp.getheaders()
|
self.headers = http_resp.getheaders()
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def exception_class_for_http_status(cls, status: int) -> Type["ApiException"]:
|
||||||
|
if status == 400:
|
||||||
|
return BadRequestException
|
||||||
|
if status == 401:
|
||||||
|
return UnauthorizedException
|
||||||
|
if status == 403:
|
||||||
|
return ForbiddenException
|
||||||
|
if status == 404:
|
||||||
|
return NotFoundException
|
||||||
|
if status == 429:
|
||||||
|
return TooManyRequestsException
|
||||||
|
if 500 <= status <= 599:
|
||||||
|
return ServiceException
|
||||||
|
return ApiException
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_response(
|
def from_response(
|
||||||
cls,
|
cls,
|
||||||
@ -143,24 +159,8 @@ class ApiException(OpenApiException):
|
|||||||
body: Optional[str],
|
body: Optional[str],
|
||||||
data: Optional[Any],
|
data: Optional[Any],
|
||||||
) -> Self:
|
) -> Self:
|
||||||
if http_resp.status == 400:
|
exc_class = cls.exception_class_for_http_status(http_resp.status)
|
||||||
raise BadRequestException(http_resp=http_resp, body=body, data=data)
|
raise exc_class(http_resp=http_resp, body=body, data=data)
|
||||||
|
|
||||||
if http_resp.status == 401:
|
|
||||||
raise UnauthorizedException(http_resp=http_resp, body=body, data=data)
|
|
||||||
|
|
||||||
if http_resp.status == 403:
|
|
||||||
raise ForbiddenException(http_resp=http_resp, body=body, data=data)
|
|
||||||
|
|
||||||
if http_resp.status == 404:
|
|
||||||
raise NotFoundException(http_resp=http_resp, body=body, data=data)
|
|
||||||
|
|
||||||
if http_resp.status == 429:
|
|
||||||
raise TooManyRequestsException(http_resp=http_resp, body=body, data=data)
|
|
||||||
|
|
||||||
if 500 <= http_resp.status <= 599:
|
|
||||||
raise ServiceException(http_resp=http_resp, body=body, data=data)
|
|
||||||
raise ApiException(http_resp=http_resp, body=body, data=data)
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
"""Custom error messages for exception"""
|
"""Custom error messages for exception"""
|
||||||
|
|||||||
@ -48,11 +48,12 @@ class ThousandEyesRetry(Retry):
|
|||||||
history: Optional[tuple[RequestHistory, ...]] = None,
|
history: Optional[tuple[RequestHistory, ...]] = None,
|
||||||
respect_retry_after_header: bool = True,
|
respect_retry_after_header: bool = True,
|
||||||
remove_headers_on_redirect: Collection[str] = Retry.DEFAULT_REMOVE_HEADERS_ON_REDIRECT,
|
remove_headers_on_redirect: Collection[str] = Retry.DEFAULT_REMOVE_HEADERS_ON_REDIRECT,
|
||||||
backoff_jitter: float = 0.0) -> None:
|
backoff_jitter: float = 0.0,
|
||||||
|
retry_after_max: int = Retry.DEFAULT_RETRY_AFTER_MAX) -> None:
|
||||||
super().__init__(total, connect, read, redirect, status, other, allowed_methods,
|
super().__init__(total, connect, read, redirect, status, other, allowed_methods,
|
||||||
status_forcelist, backoff_factor, backoff_max, raise_on_redirect,
|
status_forcelist, backoff_factor, backoff_max, raise_on_redirect,
|
||||||
raise_on_status, history, respect_retry_after_header,
|
raise_on_status, history, respect_retry_after_header,
|
||||||
remove_headers_on_redirect, backoff_jitter)
|
remove_headers_on_redirect, backoff_jitter, retry_after_max)
|
||||||
|
|
||||||
def is_retry(self, method: str, status_code: int, has_retry_after: bool = False) -> bool:
|
def is_retry(self, method: str, status_code: int, has_retry_after: bool = False) -> bool:
|
||||||
# Always retry on 429, regardless of method or status_forcelist
|
# Always retry on 429, regardless of method or status_forcelist
|
||||||
|
|||||||
6
thousandeyes-sdk-core/test/conftest.py
Normal file
6
thousandeyes-sdk-core/test/conftest.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
_core_test_support = Path(__file__).resolve().parent
|
||||||
|
if str(_core_test_support) not in sys.path:
|
||||||
|
sys.path.insert(0, str(_core_test_support))
|
||||||
1
thousandeyes-sdk-core/test/sdk_test_support/__init__.py
Normal file
1
thousandeyes-sdk-core/test/sdk_test_support/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
# Test-only helpers for SDK integration tests. Not shipped in the published package.
|
||||||
228
thousandeyes-sdk-core/test/sdk_test_support/mock_server.py
Normal file
228
thousandeyes-sdk-core/test/sdk_test_support/mock_server.py
Normal file
@ -0,0 +1,228 @@
|
|||||||
|
# Copyright 2024 Cisco Systems, Inc. and its affiliates
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
import re
|
||||||
|
import threading
|
||||||
|
from datetime import datetime
|
||||||
|
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
|
||||||
|
from typing import Any, Dict, Mapping, Optional
|
||||||
|
from urllib.parse import urlparse
|
||||||
|
|
||||||
|
from sdk_test_support.mock_server_types import OperationExpectation
|
||||||
|
|
||||||
|
OPERATION_ID_HEADER = "X-TE-Operation-Id"
|
||||||
|
ERROR_STATUS_HEADER = "X-TE-Error-Status"
|
||||||
|
AUTHORIZATION_HEADER = "Authorization"
|
||||||
|
|
||||||
|
|
||||||
|
def _normalize_scalar(value: Any) -> Any:
|
||||||
|
if isinstance(value, str) and "T" in value:
|
||||||
|
try:
|
||||||
|
return datetime.fromisoformat(value.replace("Z", "+00:00")).isoformat().replace("+00:00", "Z")
|
||||||
|
except ValueError:
|
||||||
|
return value
|
||||||
|
return value
|
||||||
|
|
||||||
|
|
||||||
|
def _normalize_json(value: Any) -> Any:
|
||||||
|
if isinstance(value, dict):
|
||||||
|
return {key: _normalize_json(value[key]) for key in sorted(value.keys())}
|
||||||
|
if isinstance(value, list):
|
||||||
|
return [_normalize_json(item) for item in value]
|
||||||
|
return _normalize_scalar(value)
|
||||||
|
|
||||||
|
|
||||||
|
def _json_body_matches(expected: Any, actual: Any) -> bool:
|
||||||
|
if isinstance(expected, dict) and isinstance(actual, dict):
|
||||||
|
for key in actual:
|
||||||
|
if key not in expected:
|
||||||
|
return False
|
||||||
|
if not _json_body_matches(expected[key], actual[key]):
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
if isinstance(expected, list) and isinstance(actual, list):
|
||||||
|
if len(expected) != len(actual):
|
||||||
|
return False
|
||||||
|
return all(_json_body_matches(expected_item, actual_item)
|
||||||
|
for expected_item, actual_item in zip(expected, actual))
|
||||||
|
return _normalize_json(expected) == _normalize_json(actual)
|
||||||
|
|
||||||
|
|
||||||
|
class MockApiServer:
|
||||||
|
def __init__(self, manifest: Mapping[str, OperationExpectation], host: str = "127.0.0.1", port: int = 0):
|
||||||
|
self._manifest = dict(manifest)
|
||||||
|
self._host = host
|
||||||
|
self._port = port
|
||||||
|
self._server: Optional[ThreadingHTTPServer] = None
|
||||||
|
self._thread: Optional[threading.Thread] = None
|
||||||
|
|
||||||
|
@property
|
||||||
|
def base_url(self) -> str:
|
||||||
|
if self._server is None:
|
||||||
|
raise RuntimeError("MockApiServer has not been started")
|
||||||
|
return f"http://{self._host}:{self._server.server_port}"
|
||||||
|
|
||||||
|
def start(self) -> None:
|
||||||
|
if self._server is not None:
|
||||||
|
return
|
||||||
|
|
||||||
|
manifest = self._manifest
|
||||||
|
handler = _build_handler(manifest)
|
||||||
|
self._server = ThreadingHTTPServer((self._host, self._port), handler)
|
||||||
|
self._thread = threading.Thread(target=self._server.serve_forever, daemon=True)
|
||||||
|
self._thread.start()
|
||||||
|
|
||||||
|
def stop(self) -> None:
|
||||||
|
if self._server is None:
|
||||||
|
return
|
||||||
|
self._server.shutdown()
|
||||||
|
self._server.server_close()
|
||||||
|
if self._thread is not None:
|
||||||
|
self._thread.join(timeout=5)
|
||||||
|
self._server = None
|
||||||
|
self._thread = None
|
||||||
|
|
||||||
|
def __enter__(self) -> "MockApiServer":
|
||||||
|
self.start()
|
||||||
|
return self
|
||||||
|
|
||||||
|
def __exit__(self, exc_type, exc, tb) -> None:
|
||||||
|
self.stop()
|
||||||
|
|
||||||
|
|
||||||
|
def _build_handler(manifest: Mapping[str, OperationExpectation]):
|
||||||
|
class MockApiRequestHandler(BaseHTTPRequestHandler):
|
||||||
|
def log_message(self, format: str, *args) -> None:
|
||||||
|
return
|
||||||
|
|
||||||
|
def do_GET(self) -> None:
|
||||||
|
self._handle_request("GET")
|
||||||
|
|
||||||
|
def do_POST(self) -> None:
|
||||||
|
self._handle_request("POST")
|
||||||
|
|
||||||
|
def do_PUT(self) -> None:
|
||||||
|
self._handle_request("PUT")
|
||||||
|
|
||||||
|
def do_PATCH(self) -> None:
|
||||||
|
self._handle_request("PATCH")
|
||||||
|
|
||||||
|
def do_DELETE(self) -> None:
|
||||||
|
self._handle_request("DELETE")
|
||||||
|
|
||||||
|
def _handle_request(self, method: str) -> None:
|
||||||
|
auth_error = _validate_authorization(self.headers.get(AUTHORIZATION_HEADER))
|
||||||
|
if auth_error is not None:
|
||||||
|
self._write_json(auth_error, 401)
|
||||||
|
return
|
||||||
|
|
||||||
|
operation_id = self.headers.get(OPERATION_ID_HEADER)
|
||||||
|
if not operation_id:
|
||||||
|
self._write_json({"detail": f"Missing required header {OPERATION_ID_HEADER}"}, 400)
|
||||||
|
return
|
||||||
|
|
||||||
|
expectation = manifest.get(operation_id)
|
||||||
|
if expectation is None:
|
||||||
|
self._write_json({"detail": f"Unknown operation id {operation_id}"}, 400)
|
||||||
|
return
|
||||||
|
|
||||||
|
if expectation.method.upper() != method.upper():
|
||||||
|
self._write_json(
|
||||||
|
{"detail": f"Unexpected HTTP method {method} for operation {operation_id}"},
|
||||||
|
400,
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
|
parsed = urlparse(self.path)
|
||||||
|
if not _path_matches(expectation.path, parsed.path):
|
||||||
|
self._write_json({"detail": "Path does not match operation expectation"}, 400)
|
||||||
|
return
|
||||||
|
|
||||||
|
error_status_header = self.headers.get(ERROR_STATUS_HEADER)
|
||||||
|
if error_status_header:
|
||||||
|
self._handle_error_response(expectation, error_status_header)
|
||||||
|
return
|
||||||
|
|
||||||
|
body_bytes = _read_body(self)
|
||||||
|
if expectation.request_body_example is not None:
|
||||||
|
if not body_bytes:
|
||||||
|
self._write_json({"detail": "Expected request body"}, 400)
|
||||||
|
return
|
||||||
|
try:
|
||||||
|
request_json = json.loads(body_bytes.decode("utf-8"))
|
||||||
|
except json.JSONDecodeError:
|
||||||
|
self._write_json({"detail": "Invalid JSON request body"}, 400)
|
||||||
|
return
|
||||||
|
if not _json_body_matches(expectation.request_body_example, request_json):
|
||||||
|
self._write_json({"detail": "Request body does not match OAS example"}, 400)
|
||||||
|
return
|
||||||
|
|
||||||
|
if expectation.success_body is None:
|
||||||
|
self.send_response(expectation.success_status)
|
||||||
|
self.end_headers()
|
||||||
|
return
|
||||||
|
|
||||||
|
self._write_json(
|
||||||
|
expectation.success_body,
|
||||||
|
expectation.success_status,
|
||||||
|
expectation.success_content_type,
|
||||||
|
)
|
||||||
|
|
||||||
|
def _handle_error_response(self, expectation: OperationExpectation, error_status_header: str) -> None:
|
||||||
|
error_response = expectation.error_responses.get(error_status_header)
|
||||||
|
if error_response is None:
|
||||||
|
self._write_json(
|
||||||
|
{"detail": f"No configured error response for status {error_status_header}"},
|
||||||
|
400,
|
||||||
|
)
|
||||||
|
return
|
||||||
|
if error_response.body is None:
|
||||||
|
self.send_response(error_response.status)
|
||||||
|
self.end_headers()
|
||||||
|
return
|
||||||
|
self._write_json(error_response.body, error_response.status, error_response.content_type)
|
||||||
|
|
||||||
|
def _write_json(self, body: Any, status: int, content_type: str = "application/json") -> None:
|
||||||
|
payload = json.dumps(body).encode("utf-8")
|
||||||
|
self.send_response(status)
|
||||||
|
self.send_header("Content-Type", content_type)
|
||||||
|
self.send_header("Content-Length", str(len(payload)))
|
||||||
|
self.end_headers()
|
||||||
|
self.wfile.write(payload)
|
||||||
|
|
||||||
|
return MockApiRequestHandler
|
||||||
|
|
||||||
|
|
||||||
|
def _validate_authorization(value: Optional[str]) -> Optional[Dict[str, str]]:
|
||||||
|
if value is None or not value.strip():
|
||||||
|
return {"detail": f"Missing or empty required header {AUTHORIZATION_HEADER}"}
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def _read_body(handler: BaseHTTPRequestHandler) -> bytes:
|
||||||
|
length = handler.headers.get("Content-Length")
|
||||||
|
if not length:
|
||||||
|
return b""
|
||||||
|
return handler.rfile.read(int(length))
|
||||||
|
|
||||||
|
|
||||||
|
def _path_matches(template: str, actual_path: str) -> bool:
|
||||||
|
pattern = re.sub(r"\{[^/]+\}", r"[^/]+", template)
|
||||||
|
pattern = f"^{pattern}$"
|
||||||
|
return re.match(pattern, actual_path) is not None
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
# Copyright 2024 Cisco Systems, Inc. and its affiliates
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from dataclasses import dataclass, field
|
||||||
|
from typing import Any, Dict
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class ErrorResponseExpectation:
|
||||||
|
status: int
|
||||||
|
body: Any
|
||||||
|
content_type: str = "application/problem+json"
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class OperationExpectation:
|
||||||
|
operation_id: str
|
||||||
|
method: str
|
||||||
|
path: str
|
||||||
|
success_status: int
|
||||||
|
success_body: Any = None
|
||||||
|
success_content_type: str = "application/json"
|
||||||
|
request_body_example: Any = None
|
||||||
|
path_param_examples: Dict[str, str] = field(default_factory=dict)
|
||||||
|
query_param_examples: Dict[str, str] = field(default_factory=dict)
|
||||||
|
error_responses: Dict[str, ErrorResponseExpectation] = field(default_factory=dict)
|
||||||
28
thousandeyes-sdk-core/test/test_exceptions.py
Normal file
28
thousandeyes-sdk-core/test/test_exceptions.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import pytest
|
||||||
|
|
||||||
|
from thousandeyes_sdk.core.exceptions import (
|
||||||
|
ApiException,
|
||||||
|
BadRequestException,
|
||||||
|
ForbiddenException,
|
||||||
|
NotFoundException,
|
||||||
|
ServiceException,
|
||||||
|
TooManyRequestsException,
|
||||||
|
UnauthorizedException,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
("status", "expected"),
|
||||||
|
[
|
||||||
|
(400, BadRequestException),
|
||||||
|
(401, UnauthorizedException),
|
||||||
|
(403, ForbiddenException),
|
||||||
|
(404, NotFoundException),
|
||||||
|
(429, TooManyRequestsException),
|
||||||
|
(500, ServiceException),
|
||||||
|
(503, ServiceException),
|
||||||
|
(418, ApiException),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
def test_exception_class_for_http_status(status, expected):
|
||||||
|
assert ApiException.exception_class_for_http_status(status) is expected
|
||||||
315
thousandeyes-sdk-core/test/test_mock_server.py
Normal file
315
thousandeyes-sdk-core/test/test_mock_server.py
Normal file
@ -0,0 +1,315 @@
|
|||||||
|
import json
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
from sdk_test_support.mock_server import (
|
||||||
|
AUTHORIZATION_HEADER,
|
||||||
|
ERROR_STATUS_HEADER,
|
||||||
|
OPERATION_ID_HEADER,
|
||||||
|
MockApiServer,
|
||||||
|
)
|
||||||
|
from sdk_test_support.mock_server_types import ErrorResponseExpectation, OperationExpectation
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def manifest():
|
||||||
|
return {
|
||||||
|
"createAlertRule": OperationExpectation(
|
||||||
|
operation_id="createAlertRule",
|
||||||
|
method="POST",
|
||||||
|
path="/alerts/rules",
|
||||||
|
request_body_example={"ruleName": "Example"},
|
||||||
|
success_status=201,
|
||||||
|
success_body={"ruleId": "1"},
|
||||||
|
error_responses={
|
||||||
|
"400": ErrorResponseExpectation(
|
||||||
|
status=400,
|
||||||
|
body={"title": "Bad Request", "status": 400},
|
||||||
|
)
|
||||||
|
},
|
||||||
|
),
|
||||||
|
"deleteAlertRule": OperationExpectation(
|
||||||
|
operation_id="deleteAlertRule",
|
||||||
|
method="DELETE",
|
||||||
|
path="/alerts/rules/{ruleId}",
|
||||||
|
path_param_examples={"ruleId": "127094"},
|
||||||
|
success_status=204,
|
||||||
|
success_body=None,
|
||||||
|
),
|
||||||
|
"getAlertRule": OperationExpectation(
|
||||||
|
operation_id="getAlertRule",
|
||||||
|
method="GET",
|
||||||
|
path="/alerts/rules/{ruleId}",
|
||||||
|
path_param_examples={"ruleId": "127094"},
|
||||||
|
success_status=200,
|
||||||
|
success_body={"ruleId": "127094", "ruleName": "Example"},
|
||||||
|
),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def _request(server: MockApiServer, *, method: str, path: str, headers=None, body=None):
|
||||||
|
import urllib.request
|
||||||
|
|
||||||
|
request_headers = {
|
||||||
|
AUTHORIZATION_HEADER: "Bearer test-token",
|
||||||
|
OPERATION_ID_HEADER: "createAlertRule",
|
||||||
|
}
|
||||||
|
if headers:
|
||||||
|
request_headers.update(headers)
|
||||||
|
|
||||||
|
data = None
|
||||||
|
if body is not None:
|
||||||
|
data = json.dumps(body).encode("utf-8")
|
||||||
|
request_headers["Content-Type"] = "application/json"
|
||||||
|
|
||||||
|
request = urllib.request.Request(
|
||||||
|
server.base_url + path,
|
||||||
|
data=data,
|
||||||
|
headers=request_headers,
|
||||||
|
method=method,
|
||||||
|
)
|
||||||
|
try:
|
||||||
|
with urllib.request.urlopen(request) as response:
|
||||||
|
return response.status, response.read()
|
||||||
|
except urllib.error.HTTPError as exc:
|
||||||
|
return exc.code, exc.read()
|
||||||
|
|
||||||
|
|
||||||
|
def test_mock_server_happy_path(manifest):
|
||||||
|
with MockApiServer(manifest) as server:
|
||||||
|
status, body = _request(
|
||||||
|
server,
|
||||||
|
method="POST",
|
||||||
|
path="/alerts/rules",
|
||||||
|
body={"ruleName": "Example"},
|
||||||
|
)
|
||||||
|
assert status == 201
|
||||||
|
assert json.loads(body.decode("utf-8")) == {"ruleId": "1"}
|
||||||
|
|
||||||
|
|
||||||
|
def test_mock_server_rejects_missing_authorization(manifest):
|
||||||
|
with MockApiServer(manifest) as server:
|
||||||
|
status, _ = _request(
|
||||||
|
server,
|
||||||
|
method="POST",
|
||||||
|
path="/alerts/rules",
|
||||||
|
headers={AUTHORIZATION_HEADER: ""},
|
||||||
|
body={"ruleName": "Example"},
|
||||||
|
)
|
||||||
|
assert status == 401
|
||||||
|
|
||||||
|
|
||||||
|
def test_mock_server_rejects_invalid_request_body(manifest):
|
||||||
|
with MockApiServer(manifest) as server:
|
||||||
|
status, _ = _request(
|
||||||
|
server,
|
||||||
|
method="POST",
|
||||||
|
path="/alerts/rules",
|
||||||
|
body={"ruleName": "Wrong"},
|
||||||
|
)
|
||||||
|
assert status == 400
|
||||||
|
|
||||||
|
|
||||||
|
def test_mock_server_error_path(manifest):
|
||||||
|
with MockApiServer(manifest) as server:
|
||||||
|
status, body = _request(
|
||||||
|
server,
|
||||||
|
method="POST",
|
||||||
|
path="/alerts/rules",
|
||||||
|
headers={ERROR_STATUS_HEADER: "400"},
|
||||||
|
body={"unexpected": True},
|
||||||
|
)
|
||||||
|
assert status == 400
|
||||||
|
assert json.loads(body.decode("utf-8"))["title"] == "Bad Request"
|
||||||
|
|
||||||
|
|
||||||
|
def test_mock_server_ignores_readonly_fields_in_expected_body(manifest):
|
||||||
|
readonly_manifest = {
|
||||||
|
**manifest,
|
||||||
|
"createAlertRule": OperationExpectation(
|
||||||
|
operation_id="createAlertRule",
|
||||||
|
method="POST",
|
||||||
|
path="/alerts/rules",
|
||||||
|
request_body_example={"ruleName": "Example", "ruleId": "read-only"},
|
||||||
|
success_status=201,
|
||||||
|
success_body={"ruleId": "1"},
|
||||||
|
),
|
||||||
|
}
|
||||||
|
with MockApiServer(readonly_manifest) as server:
|
||||||
|
status, body = _request(
|
||||||
|
server,
|
||||||
|
method="POST",
|
||||||
|
path="/alerts/rules",
|
||||||
|
body={"ruleName": "Example"},
|
||||||
|
)
|
||||||
|
assert status == 201
|
||||||
|
assert json.loads(body.decode("utf-8")) == {"ruleId": "1"}
|
||||||
|
|
||||||
|
|
||||||
|
def test_mock_server_no_content_response(manifest):
|
||||||
|
with MockApiServer(manifest) as server:
|
||||||
|
import urllib.request
|
||||||
|
|
||||||
|
request = urllib.request.Request(
|
||||||
|
server.base_url + "/alerts/rules/127094",
|
||||||
|
headers={
|
||||||
|
AUTHORIZATION_HEADER: "Bearer test-token",
|
||||||
|
OPERATION_ID_HEADER: "deleteAlertRule",
|
||||||
|
},
|
||||||
|
method="DELETE",
|
||||||
|
)
|
||||||
|
with urllib.request.urlopen(request) as response:
|
||||||
|
assert response.status == 204
|
||||||
|
assert response.read() == b""
|
||||||
|
|
||||||
|
|
||||||
|
def test_mock_server_matches_path_variable(manifest):
|
||||||
|
with MockApiServer(manifest) as server:
|
||||||
|
status, body = _request(
|
||||||
|
server,
|
||||||
|
method="GET",
|
||||||
|
path="/alerts/rules/127094",
|
||||||
|
headers={OPERATION_ID_HEADER: "getAlertRule"},
|
||||||
|
)
|
||||||
|
assert status == 200
|
||||||
|
assert json.loads(body.decode("utf-8")) == {"ruleId": "127094", "ruleName": "Example"}
|
||||||
|
|
||||||
|
|
||||||
|
def test_mock_server_rejects_path_missing_path_variable(manifest):
|
||||||
|
with MockApiServer(manifest) as server:
|
||||||
|
status, body = _request(
|
||||||
|
server,
|
||||||
|
method="GET",
|
||||||
|
path="/alerts/rules",
|
||||||
|
headers={OPERATION_ID_HEADER: "getAlertRule"},
|
||||||
|
)
|
||||||
|
assert status == 400
|
||||||
|
assert json.loads(body.decode("utf-8"))["detail"] == "Path does not match operation expectation"
|
||||||
|
|
||||||
|
|
||||||
|
def test_mock_server_accepts_equivalent_iso8601_datetime_formats(manifest):
|
||||||
|
datetime_manifest = {
|
||||||
|
**manifest,
|
||||||
|
"createAlertRule": OperationExpectation(
|
||||||
|
operation_id="createAlertRule",
|
||||||
|
method="POST",
|
||||||
|
path="/alerts/rules",
|
||||||
|
request_body_example={
|
||||||
|
"ruleName": "Example",
|
||||||
|
"startDate": "2017-07-01T05:00:00Z",
|
||||||
|
},
|
||||||
|
success_status=201,
|
||||||
|
success_body={"ruleId": "1"},
|
||||||
|
),
|
||||||
|
}
|
||||||
|
with MockApiServer(datetime_manifest) as server:
|
||||||
|
status, body = _request(
|
||||||
|
server,
|
||||||
|
method="POST",
|
||||||
|
path="/alerts/rules",
|
||||||
|
body={
|
||||||
|
"ruleName": "Example",
|
||||||
|
"startDate": "2017-07-01T05:00:00+00:00",
|
||||||
|
},
|
||||||
|
)
|
||||||
|
assert status == 201
|
||||||
|
assert json.loads(body.decode("utf-8")) == {"ruleId": "1"}
|
||||||
|
|
||||||
|
|
||||||
|
def test_mock_server_ignores_readonly_fields_in_nested_request_objects(manifest):
|
||||||
|
nested_manifest = {
|
||||||
|
**manifest,
|
||||||
|
"createAlertRule": OperationExpectation(
|
||||||
|
operation_id="createAlertRule",
|
||||||
|
method="POST",
|
||||||
|
path="/alerts/rules",
|
||||||
|
request_body_example={
|
||||||
|
"ruleName": "Example",
|
||||||
|
"widgets": [
|
||||||
|
{
|
||||||
|
"title": "Widget Title",
|
||||||
|
"id": "read-only-id",
|
||||||
|
"embedUrl": "https://example.com/embed",
|
||||||
|
}
|
||||||
|
],
|
||||||
|
},
|
||||||
|
success_status=201,
|
||||||
|
success_body={"ruleId": "1"},
|
||||||
|
),
|
||||||
|
}
|
||||||
|
with MockApiServer(nested_manifest) as server:
|
||||||
|
status, body = _request(
|
||||||
|
server,
|
||||||
|
method="POST",
|
||||||
|
path="/alerts/rules",
|
||||||
|
body={
|
||||||
|
"ruleName": "Example",
|
||||||
|
"widgets": [{"title": "Widget Title"}],
|
||||||
|
},
|
||||||
|
)
|
||||||
|
assert status == 201
|
||||||
|
assert json.loads(body.decode("utf-8")) == {"ruleId": "1"}
|
||||||
|
|
||||||
|
|
||||||
|
def test_integration_error_assertion_fails_when_deserialized_error_does_not_match_oas_example():
|
||||||
|
"""Generated error-path tests compare ApiException.data to the OAS error example."""
|
||||||
|
import unittest
|
||||||
|
import urllib.error
|
||||||
|
import urllib.request
|
||||||
|
|
||||||
|
from pydantic import BaseModel, ConfigDict
|
||||||
|
|
||||||
|
class Error(BaseModel):
|
||||||
|
title: str
|
||||||
|
status: int
|
||||||
|
|
||||||
|
model_config = ConfigDict(extra="allow")
|
||||||
|
|
||||||
|
def to_json(self) -> str:
|
||||||
|
return self.model_dump_json()
|
||||||
|
|
||||||
|
mismatched_manifest = {
|
||||||
|
"createAlertRule": OperationExpectation(
|
||||||
|
operation_id="createAlertRule",
|
||||||
|
method="POST",
|
||||||
|
path="/alerts/rules",
|
||||||
|
request_body_example={"ruleName": "Example"},
|
||||||
|
success_status=201,
|
||||||
|
success_body={"ruleId": "1"},
|
||||||
|
error_responses={
|
||||||
|
"400": ErrorResponseExpectation(
|
||||||
|
status=400,
|
||||||
|
body={"title": "Wrong Title", "status": 400},
|
||||||
|
)
|
||||||
|
},
|
||||||
|
),
|
||||||
|
}
|
||||||
|
oas_example = {"title": "Bad Request", "status": 400}
|
||||||
|
|
||||||
|
with MockApiServer(mismatched_manifest) as server:
|
||||||
|
request = urllib.request.Request(
|
||||||
|
server.base_url + "/alerts/rules",
|
||||||
|
data=json.dumps({"unexpected": True}).encode("utf-8"),
|
||||||
|
headers={
|
||||||
|
AUTHORIZATION_HEADER: "Bearer test-token",
|
||||||
|
OPERATION_ID_HEADER: "createAlertRule",
|
||||||
|
ERROR_STATUS_HEADER: "400",
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
method="POST",
|
||||||
|
)
|
||||||
|
with pytest.raises(urllib.error.HTTPError) as http_error:
|
||||||
|
urllib.request.urlopen(request)
|
||||||
|
wire_body = json.loads(http_error.value.read().decode("utf-8"))
|
||||||
|
|
||||||
|
exception_data = Error.model_validate(wire_body)
|
||||||
|
|
||||||
|
def assert_constructed_model_matches_example_json(model, loaded_json):
|
||||||
|
test_case = unittest.TestCase()
|
||||||
|
test_case.assertEqual(
|
||||||
|
json.dumps(loaded_json, sort_keys=True),
|
||||||
|
json.dumps(json.loads(model.to_json()), sort_keys=True),
|
||||||
|
)
|
||||||
|
|
||||||
|
with pytest.raises(AssertionError):
|
||||||
|
assert_constructed_model_matches_example_json(exception_data, oas_example)
|
||||||
@ -41,3 +41,19 @@ def test_parse_reset_header_invalid():
|
|||||||
retry = ThousandEyesRetry()
|
retry = ThousandEyesRetry()
|
||||||
assert retry._parse_reset_header("invalid") is None
|
assert retry._parse_reset_header("invalid") is None
|
||||||
assert retry._parse_reset_header(None) is None
|
assert retry._parse_reset_header(None) is None
|
||||||
|
|
||||||
|
|
||||||
|
def test_retry_new_clones_with_retry_after_max():
|
||||||
|
retry = ThousandEyesRetry(retry_after_max=3600)
|
||||||
|
cloned = retry.new()
|
||||||
|
assert isinstance(cloned, ThousandEyesRetry)
|
||||||
|
assert cloned.retry_after_max == 3600
|
||||||
|
|
||||||
|
|
||||||
|
def test_retry_increment_on_429():
|
||||||
|
response = Mock(spec=HTTPResponse)
|
||||||
|
response.status = 429
|
||||||
|
response.headers = {"Retry-After": "0"}
|
||||||
|
retry = ThousandEyesRetry(total=1)
|
||||||
|
new_retry = retry.increment(method="GET", url="/test", response=response)
|
||||||
|
assert isinstance(new_retry, ThousandEyesRetry)
|
||||||
|
|||||||
@ -13,13 +13,13 @@ 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:
|
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||||
|
|
||||||
- API version: 7.0.93
|
- API version: 7.0.96
|
||||||
- Generator version: 7.6.0
|
- Generator version: 7.6.0
|
||||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||||
|
|
||||||
## Requirements.
|
## Requirements.
|
||||||
|
|
||||||
Python 3.8+
|
Python 3.9+
|
||||||
|
|
||||||
## Installation & Usage
|
## Installation & Usage
|
||||||
### pip install
|
### pip install
|
||||||
|
|||||||
@ -7,9 +7,9 @@ authors = [
|
|||||||
]
|
]
|
||||||
description = "ThousandEyes SDK Credentials API"
|
description = "ThousandEyes SDK Credentials API"
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
requires-python = ">= 3.8"
|
requires-python = ">= 3.9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"urllib3 >= 2.0.0",
|
"urllib3 >= 2.6.3",
|
||||||
"python-dateutil >=2.8.2",
|
"python-dateutil >=2.8.2",
|
||||||
"pydantic >=2.1.0",
|
"pydantic >=2.1.0",
|
||||||
"typing-extensions >=4.7.1",
|
"typing-extensions >=4.7.1",
|
||||||
|
|||||||
@ -3,13 +3,13 @@ Manage ThousandEyes Dashboards.
|
|||||||
|
|
||||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||||
|
|
||||||
- API version: 7.0.93
|
- API version: 7.0.96
|
||||||
- Generator version: 7.6.0
|
- Generator version: 7.6.0
|
||||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||||
|
|
||||||
## Requirements.
|
## Requirements.
|
||||||
|
|
||||||
Python 3.8+
|
Python 3.9+
|
||||||
|
|
||||||
## Installation & Usage
|
## Installation & Usage
|
||||||
### pip install
|
### pip install
|
||||||
|
|||||||
@ -7,9 +7,9 @@ authors = [
|
|||||||
]
|
]
|
||||||
description = "ThousandEyes SDK Dashboards API"
|
description = "ThousandEyes SDK Dashboards API"
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
requires-python = ">= 3.8"
|
requires-python = ">= 3.9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"urllib3 >= 2.0.0",
|
"urllib3 >= 2.6.3",
|
||||||
"python-dateutil >=2.8.2",
|
"python-dateutil >=2.8.2",
|
||||||
"pydantic >=2.1.0",
|
"pydantic >=2.1.0",
|
||||||
"typing-extensions >=4.7.1",
|
"typing-extensions >=4.7.1",
|
||||||
|
|||||||
@ -11,13 +11,13 @@ 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:
|
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||||
|
|
||||||
- API version: 7.0.93
|
- API version: 7.0.96
|
||||||
- Generator version: 7.6.0
|
- Generator version: 7.6.0
|
||||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||||
|
|
||||||
## Requirements.
|
## Requirements.
|
||||||
|
|
||||||
Python 3.8+
|
Python 3.9+
|
||||||
|
|
||||||
## Installation & Usage
|
## Installation & Usage
|
||||||
### pip install
|
### pip install
|
||||||
|
|||||||
@ -7,9 +7,9 @@ authors = [
|
|||||||
]
|
]
|
||||||
description = "ThousandEyes SDK Emulation API"
|
description = "ThousandEyes SDK Emulation API"
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
requires-python = ">= 3.8"
|
requires-python = ">= 3.9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"urllib3 >= 2.0.0",
|
"urllib3 >= 2.6.3",
|
||||||
"python-dateutil >=2.8.2",
|
"python-dateutil >=2.8.2",
|
||||||
"pydantic >=2.1.0",
|
"pydantic >=2.1.0",
|
||||||
"typing-extensions >=4.7.1",
|
"typing-extensions >=4.7.1",
|
||||||
|
|||||||
@ -24,6 +24,10 @@ docs/ConnectionString.md
|
|||||||
docs/EndpointAgent.md
|
docs/EndpointAgent.md
|
||||||
docs/EndpointAgentEthernetProfile.md
|
docs/EndpointAgentEthernetProfile.md
|
||||||
docs/EndpointAgentLocation.md
|
docs/EndpointAgentLocation.md
|
||||||
|
docs/EndpointAgentLogItem.md
|
||||||
|
docs/EndpointAgentLogItemType.md
|
||||||
|
docs/EndpointAgentLogItemsApi.md
|
||||||
|
docs/EndpointAgentLogItemsResponse.md
|
||||||
docs/EndpointAgentUpdate.md
|
docs/EndpointAgentUpdate.md
|
||||||
docs/EndpointAgents.md
|
docs/EndpointAgents.md
|
||||||
docs/EndpointAgentsApi.md
|
docs/EndpointAgentsApi.md
|
||||||
@ -31,8 +35,24 @@ docs/EndpointAgentsTransferApi.md
|
|||||||
docs/EndpointAsnDetails.md
|
docs/EndpointAsnDetails.md
|
||||||
docs/EndpointBrowserExtension.md
|
docs/EndpointBrowserExtension.md
|
||||||
docs/EndpointClient.md
|
docs/EndpointClient.md
|
||||||
|
docs/EndpointOnlineOfflineLogItem.md
|
||||||
|
docs/EndpointOnlineOfflineLogItemType.md
|
||||||
|
docs/EndpointProxiesApi.md
|
||||||
|
docs/EndpointProxiesResponse.md
|
||||||
|
docs/EndpointProxy.md
|
||||||
|
docs/EndpointProxyAuthType.md
|
||||||
|
docs/EndpointProxyType.md
|
||||||
|
docs/EndpointStateChangesLogItem.md
|
||||||
|
docs/EndpointStateChangesLogItemType.md
|
||||||
docs/EndpointUserProfile.md
|
docs/EndpointUserProfile.md
|
||||||
|
docs/EndpointVpnLogItem.md
|
||||||
|
docs/EndpointVpnLogItemType.md
|
||||||
docs/EndpointVpnProfile.md
|
docs/EndpointVpnProfile.md
|
||||||
|
docs/EndpointVpnType.md
|
||||||
|
docs/EndpointWifiLogItem.md
|
||||||
|
docs/EndpointWifiLogItemType.md
|
||||||
|
docs/EndpointWirelessConnectionFailure.md
|
||||||
|
docs/EndpointWirelessConnectionFailureType.md
|
||||||
docs/Error.md
|
docs/Error.md
|
||||||
docs/ExpandEndpointAgentOptions.md
|
docs/ExpandEndpointAgentOptions.md
|
||||||
docs/ExternalMetadataItem.md
|
docs/ExternalMetadataItem.md
|
||||||
@ -57,8 +77,10 @@ pyproject.toml
|
|||||||
setup.cfg
|
setup.cfg
|
||||||
src/thousandeyes_sdk/endpoint_agents/__init__.py
|
src/thousandeyes_sdk/endpoint_agents/__init__.py
|
||||||
src/thousandeyes_sdk/endpoint_agents/api/__init__.py
|
src/thousandeyes_sdk/endpoint_agents/api/__init__.py
|
||||||
|
src/thousandeyes_sdk/endpoint_agents/api/endpoint_agent_log_items_api.py
|
||||||
src/thousandeyes_sdk/endpoint_agents/api/endpoint_agents_api.py
|
src/thousandeyes_sdk/endpoint_agents/api/endpoint_agents_api.py
|
||||||
src/thousandeyes_sdk/endpoint_agents/api/endpoint_agents_transfer_api.py
|
src/thousandeyes_sdk/endpoint_agents/api/endpoint_agents_transfer_api.py
|
||||||
|
src/thousandeyes_sdk/endpoint_agents/api/endpoint_proxies_api.py
|
||||||
src/thousandeyes_sdk/endpoint_agents/models/__init__.py
|
src/thousandeyes_sdk/endpoint_agents/models/__init__.py
|
||||||
src/thousandeyes_sdk/endpoint_agents/models/address_profile.py
|
src/thousandeyes_sdk/endpoint_agents/models/address_profile.py
|
||||||
src/thousandeyes_sdk/endpoint_agents/models/address_type.py
|
src/thousandeyes_sdk/endpoint_agents/models/address_type.py
|
||||||
@ -83,13 +105,31 @@ src/thousandeyes_sdk/endpoint_agents/models/connection_string.py
|
|||||||
src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent.py
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent.py
|
||||||
src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent_ethernet_profile.py
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent_ethernet_profile.py
|
||||||
src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent_location.py
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent_location.py
|
||||||
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent_log_item.py
|
||||||
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent_log_item_type.py
|
||||||
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent_log_items_response.py
|
||||||
src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent_update.py
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_agent_update.py
|
||||||
src/thousandeyes_sdk/endpoint_agents/models/endpoint_agents.py
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_agents.py
|
||||||
src/thousandeyes_sdk/endpoint_agents/models/endpoint_asn_details.py
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_asn_details.py
|
||||||
src/thousandeyes_sdk/endpoint_agents/models/endpoint_browser_extension.py
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_browser_extension.py
|
||||||
src/thousandeyes_sdk/endpoint_agents/models/endpoint_client.py
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_client.py
|
||||||
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_online_offline_log_item.py
|
||||||
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_online_offline_log_item_type.py
|
||||||
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_proxies_response.py
|
||||||
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_proxy.py
|
||||||
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_proxy_auth_type.py
|
||||||
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_proxy_type.py
|
||||||
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_state_changes_log_item.py
|
||||||
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_state_changes_log_item_type.py
|
||||||
src/thousandeyes_sdk/endpoint_agents/models/endpoint_user_profile.py
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_user_profile.py
|
||||||
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_vpn_log_item.py
|
||||||
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_vpn_log_item_type.py
|
||||||
src/thousandeyes_sdk/endpoint_agents/models/endpoint_vpn_profile.py
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_vpn_profile.py
|
||||||
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_vpn_type.py
|
||||||
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_wifi_log_item.py
|
||||||
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_wifi_log_item_type.py
|
||||||
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_wireless_connection_failure.py
|
||||||
|
src/thousandeyes_sdk/endpoint_agents/models/endpoint_wireless_connection_failure_type.py
|
||||||
src/thousandeyes_sdk/endpoint_agents/models/error.py
|
src/thousandeyes_sdk/endpoint_agents/models/error.py
|
||||||
src/thousandeyes_sdk/endpoint_agents/models/expand_endpoint_agent_options.py
|
src/thousandeyes_sdk/endpoint_agents/models/expand_endpoint_agent_options.py
|
||||||
src/thousandeyes_sdk/endpoint_agents/models/external_metadata_item.py
|
src/thousandeyes_sdk/endpoint_agents/models/external_metadata_item.py
|
||||||
@ -112,6 +152,8 @@ src/thousandeyes_sdk/endpoint_agents/models/vpn_type.py
|
|||||||
src/thousandeyes_sdk/endpoint_agents/models/wireless_profile.py
|
src/thousandeyes_sdk/endpoint_agents/models/wireless_profile.py
|
||||||
src/thousandeyes_sdk/endpoint_agents/py.typed
|
src/thousandeyes_sdk/endpoint_agents/py.typed
|
||||||
test/__init__.py
|
test/__init__.py
|
||||||
|
test/test_endpoint_agent_log_items_api.py
|
||||||
test/test_endpoint_agents_api.py
|
test/test_endpoint_agents_api.py
|
||||||
test/test_endpoint_agents_transfer_api.py
|
test/test_endpoint_agents_transfer_api.py
|
||||||
|
test/test_endpoint_proxies_api.py
|
||||||
test/test_utils.py
|
test/test_utils.py
|
||||||
|
|||||||
@ -7,13 +7,13 @@ 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:
|
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||||
|
|
||||||
- API version: 7.0.93
|
- API version: 7.0.96
|
||||||
- Generator version: 7.6.0
|
- Generator version: 7.6.0
|
||||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||||
|
|
||||||
## Requirements.
|
## Requirements.
|
||||||
|
|
||||||
Python 3.8+
|
Python 3.9+
|
||||||
|
|
||||||
## Installation & Usage
|
## Installation & Usage
|
||||||
### pip install
|
### pip install
|
||||||
@ -79,16 +79,22 @@ configuration = thousandeyes_sdk.core.Configuration(
|
|||||||
# Enter a context with an instance of the API client
|
# Enter a context with an instance of the API client
|
||||||
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
||||||
# Create an instance of the API class
|
# Create an instance of the API class
|
||||||
api_instance = thousandeyes_sdk.endpoint_agents.EndpointAgentsApi(api_client)
|
api_instance = thousandeyes_sdk.endpoint_agents.EndpointAgentLogItemsApi(api_client)
|
||||||
agent_id = 'agent_id_example' # str | The identifier of the agent to operate on.
|
agent_id = 'agent_id_example' # str | The identifier of the agent to operate on.
|
||||||
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)
|
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)
|
||||||
expand = [thousandeyes_sdk.endpoint_agents.ExpandEndpointAgentOptions()] # List[ExpandEndpointAgentOptions] | This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. (optional)
|
max = 1000 # int | Maximum number of log items returned per page. (optional) (default to 1000)
|
||||||
|
cursor = 'WyIxNzA5MjQwMDAwMDAwIl0=' # str | Opaque cursor from the `_links.next.href` URL in the previous response. (optional)
|
||||||
|
window = '12h' # str | A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional)
|
||||||
|
start_date = '2022-07-17T22:00:54Z' # datetime | Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional)
|
||||||
|
end_date = '2022-07-18T22:00:54Z' # datetime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Delete endpoint agent
|
# List endpoint agent log items
|
||||||
api_instance.delete_endpoint_agent(agent_id, aid=aid, expand=expand)
|
api_response = api_instance.get_endpoint_agent_log_items(agent_id, aid=aid, max=max, cursor=cursor, window=window, start_date=start_date, end_date=end_date)
|
||||||
|
print("The response of EndpointAgentLogItemsApi->get_endpoint_agent_log_items:\n")
|
||||||
|
pprint(api_response)
|
||||||
except ApiException as e:
|
except ApiException as e:
|
||||||
print("Exception when calling EndpointAgentsApi->delete_endpoint_agent: %s\n" % e)
|
print("Exception when calling EndpointAgentLogItemsApi->get_endpoint_agent_log_items: %s\n" % e)
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -98,6 +104,7 @@ All URIs are relative to *https://api.thousandeyes.com/v7*
|
|||||||
|
|
||||||
Class | Method | HTTP request | Description
|
Class | Method | HTTP request | Description
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
|
*EndpointAgentLogItemsApi* | [**get_endpoint_agent_log_items**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentLogItemsApi.md#get_endpoint_agent_log_items) | **GET** /endpoint/agents/{agentId}/logs | List endpoint agent log items
|
||||||
*EndpointAgentsApi* | [**delete_endpoint_agent**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentsApi.md#delete_endpoint_agent) | **DELETE** /endpoint/agents/{agentId} | Delete endpoint agent
|
*EndpointAgentsApi* | [**delete_endpoint_agent**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentsApi.md#delete_endpoint_agent) | **DELETE** /endpoint/agents/{agentId} | Delete endpoint agent
|
||||||
*EndpointAgentsApi* | [**disable_endpoint_agent**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentsApi.md#disable_endpoint_agent) | **POST** /endpoint/agents/{agentId}/disable | Disable endpoint agent
|
*EndpointAgentsApi* | [**disable_endpoint_agent**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentsApi.md#disable_endpoint_agent) | **POST** /endpoint/agents/{agentId}/disable | Disable endpoint agent
|
||||||
*EndpointAgentsApi* | [**enable_endpoint_agent**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentsApi.md#enable_endpoint_agent) | **POST** /endpoint/agents/{agentId}/enable | Enable endpoint agent
|
*EndpointAgentsApi* | [**enable_endpoint_agent**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentsApi.md#enable_endpoint_agent) | **POST** /endpoint/agents/{agentId}/enable | Enable endpoint agent
|
||||||
@ -108,6 +115,7 @@ Class | Method | HTTP request | Description
|
|||||||
*EndpointAgentsApi* | [**update_endpoint_agent**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentsApi.md#update_endpoint_agent) | **PATCH** /endpoint/agents/{agentId} | Update endpoint agent
|
*EndpointAgentsApi* | [**update_endpoint_agent**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentsApi.md#update_endpoint_agent) | **PATCH** /endpoint/agents/{agentId} | Update endpoint agent
|
||||||
*EndpointAgentsTransferApi* | [**transfer_endpoint_agent**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentsTransferApi.md#transfer_endpoint_agent) | **POST** /endpoint/agents/{agentId}/transfer | Transfer endpoint agent
|
*EndpointAgentsTransferApi* | [**transfer_endpoint_agent**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentsTransferApi.md#transfer_endpoint_agent) | **POST** /endpoint/agents/{agentId}/transfer | Transfer endpoint agent
|
||||||
*EndpointAgentsTransferApi* | [**transfer_endpoint_agents**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentsTransferApi.md#transfer_endpoint_agents) | **POST** /endpoint/agents/transfer/bulk | Bulk transfer agents
|
*EndpointAgentsTransferApi* | [**transfer_endpoint_agents**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentsTransferApi.md#transfer_endpoint_agents) | **POST** /endpoint/agents/transfer/bulk | Bulk transfer agents
|
||||||
|
*EndpointProxiesApi* | [**get_endpoint_proxies**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointProxiesApi.md#get_endpoint_proxies) | **GET** /endpoint/proxies | List endpoint proxy settings
|
||||||
|
|
||||||
|
|
||||||
## Documentation For Models
|
## Documentation For Models
|
||||||
@ -135,13 +143,31 @@ Class | Method | HTTP request | Description
|
|||||||
- [EndpointAgent](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgent.md)
|
- [EndpointAgent](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgent.md)
|
||||||
- [EndpointAgentEthernetProfile](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentEthernetProfile.md)
|
- [EndpointAgentEthernetProfile](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentEthernetProfile.md)
|
||||||
- [EndpointAgentLocation](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentLocation.md)
|
- [EndpointAgentLocation](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentLocation.md)
|
||||||
|
- [EndpointAgentLogItem](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentLogItem.md)
|
||||||
|
- [EndpointAgentLogItemType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentLogItemType.md)
|
||||||
|
- [EndpointAgentLogItemsResponse](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentLogItemsResponse.md)
|
||||||
- [EndpointAgentUpdate](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentUpdate.md)
|
- [EndpointAgentUpdate](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgentUpdate.md)
|
||||||
- [EndpointAgents](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgents.md)
|
- [EndpointAgents](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAgents.md)
|
||||||
- [EndpointAsnDetails](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAsnDetails.md)
|
- [EndpointAsnDetails](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointAsnDetails.md)
|
||||||
- [EndpointBrowserExtension](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointBrowserExtension.md)
|
- [EndpointBrowserExtension](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointBrowserExtension.md)
|
||||||
- [EndpointClient](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointClient.md)
|
- [EndpointClient](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointClient.md)
|
||||||
|
- [EndpointOnlineOfflineLogItem](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointOnlineOfflineLogItem.md)
|
||||||
|
- [EndpointOnlineOfflineLogItemType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointOnlineOfflineLogItemType.md)
|
||||||
|
- [EndpointProxiesResponse](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointProxiesResponse.md)
|
||||||
|
- [EndpointProxy](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointProxy.md)
|
||||||
|
- [EndpointProxyAuthType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointProxyAuthType.md)
|
||||||
|
- [EndpointProxyType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointProxyType.md)
|
||||||
|
- [EndpointStateChangesLogItem](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointStateChangesLogItem.md)
|
||||||
|
- [EndpointStateChangesLogItemType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointStateChangesLogItemType.md)
|
||||||
- [EndpointUserProfile](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointUserProfile.md)
|
- [EndpointUserProfile](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointUserProfile.md)
|
||||||
|
- [EndpointVpnLogItem](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointVpnLogItem.md)
|
||||||
|
- [EndpointVpnLogItemType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointVpnLogItemType.md)
|
||||||
- [EndpointVpnProfile](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointVpnProfile.md)
|
- [EndpointVpnProfile](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointVpnProfile.md)
|
||||||
|
- [EndpointVpnType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointVpnType.md)
|
||||||
|
- [EndpointWifiLogItem](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointWifiLogItem.md)
|
||||||
|
- [EndpointWifiLogItemType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointWifiLogItemType.md)
|
||||||
|
- [EndpointWirelessConnectionFailure](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointWirelessConnectionFailure.md)
|
||||||
|
- [EndpointWirelessConnectionFailureType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/EndpointWirelessConnectionFailureType.md)
|
||||||
- [Error](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/Error.md)
|
- [Error](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/Error.md)
|
||||||
- [ExpandEndpointAgentOptions](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/ExpandEndpointAgentOptions.md)
|
- [ExpandEndpointAgentOptions](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/ExpandEndpointAgentOptions.md)
|
||||||
- [ExternalMetadataItem](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/ExternalMetadataItem.md)
|
- [ExternalMetadataItem](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-agents/docs/ExternalMetadataItem.md)
|
||||||
|
|||||||
@ -0,0 +1,35 @@
|
|||||||
|
# EndpointAgentLogItem
|
||||||
|
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | **str** | Unique ID of the log item. | [optional] [readonly]
|
||||||
|
**agent_log_item_type** | [**EndpointAgentLogItemType**](EndpointAgentLogItemType.md) | | [optional]
|
||||||
|
**timestamp_ms** | **int** | Time when the log item was recorded, in milliseconds since the Unix epoch. | [optional] [readonly]
|
||||||
|
**wifi_log_item** | [**EndpointWifiLogItem**](EndpointWifiLogItem.md) | | [optional]
|
||||||
|
**vpn_log_item** | [**EndpointVpnLogItem**](EndpointVpnLogItem.md) | | [optional]
|
||||||
|
**online_offline_log_item** | [**EndpointOnlineOfflineLogItem**](EndpointOnlineOfflineLogItem.md) | | [optional]
|
||||||
|
**state_changes_log_item** | [**EndpointStateChangesLogItem**](EndpointStateChangesLogItem.md) | | [optional]
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_log_item import EndpointAgentLogItem
|
||||||
|
|
||||||
|
# TODO update the JSON string below
|
||||||
|
json = "{}"
|
||||||
|
# create an instance of EndpointAgentLogItem from a JSON string
|
||||||
|
endpoint_agent_log_item_instance = EndpointAgentLogItem.from_json(json)
|
||||||
|
# print the JSON string representation of the object
|
||||||
|
print(EndpointAgentLogItem.to_json())
|
||||||
|
|
||||||
|
# convert the object into a dict
|
||||||
|
endpoint_agent_log_item_dict = endpoint_agent_log_item_instance.to_dict()
|
||||||
|
# create an instance of EndpointAgentLogItem from a dict
|
||||||
|
endpoint_agent_log_item_from_dict = EndpointAgentLogItem.from_dict(endpoint_agent_log_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)
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
# EndpointAgentLogItemType
|
||||||
|
|
||||||
|
Agent log item category.
|
||||||
|
|
||||||
|
## 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)
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
# thousandeyes_sdk.endpoint_agents.EndpointAgentLogItemsApi
|
||||||
|
|
||||||
|
All URIs are relative to *https://api.thousandeyes.com/v7*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**get_endpoint_agent_log_items**](EndpointAgentLogItemsApi.md#get_endpoint_agent_log_items) | **GET** /endpoint/agents/{agentId}/logs | List endpoint agent log items
|
||||||
|
|
||||||
|
|
||||||
|
# **get_endpoint_agent_log_items**
|
||||||
|
> EndpointAgentLogItemsResponse get_endpoint_agent_log_items(agent_id, aid=aid, max=max, cursor=cursor, window=window, start_date=start_date, end_date=end_date)
|
||||||
|
|
||||||
|
List endpoint agent log items
|
||||||
|
|
||||||
|
Returns paginated logs for an endpoint agent within the requested time range.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
* Bearer Authentication (BearerAuth):
|
||||||
|
|
||||||
|
```python
|
||||||
|
import thousandeyes_sdk.endpoint_agents
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_log_items_response import EndpointAgentLogItemsResponse
|
||||||
|
from thousandeyes_sdk.endpoint_agents.rest import ApiException
|
||||||
|
from pprint import pprint
|
||||||
|
|
||||||
|
# Defining the host is optional and defaults to https://api.thousandeyes.com/v7
|
||||||
|
# See configuration.py for a list of all supported configuration parameters.
|
||||||
|
configuration = thousandeyes_sdk.core.Configuration(
|
||||||
|
host = "https://api.thousandeyes.com/v7"
|
||||||
|
)
|
||||||
|
|
||||||
|
# The client must configure the authentication and authorization parameters
|
||||||
|
# in accordance with the API server security policy.
|
||||||
|
# Examples for each auth method are provided below, use the example that
|
||||||
|
# satisfies your auth use case.
|
||||||
|
|
||||||
|
# Configure Bearer authorization: BearerAuth
|
||||||
|
configuration = thousandeyes_sdk.core.Configuration(
|
||||||
|
access_token = os.environ["BEARER_TOKEN"]
|
||||||
|
)
|
||||||
|
|
||||||
|
# Enter a context with an instance of the API client
|
||||||
|
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
||||||
|
# Create an instance of the API class
|
||||||
|
api_instance = thousandeyes_sdk.endpoint_agents.EndpointAgentLogItemsApi(api_client)
|
||||||
|
agent_id = 'agent_id_example' # str | The identifier of the agent to operate on.
|
||||||
|
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
|
||||||
|
max = 1000 # int | Maximum number of log items returned per page. (optional) (default to 1000)
|
||||||
|
cursor = 'WyIxNzA5MjQwMDAwMDAwIl0=' # str | Opaque cursor from the `_links.next.href` URL in the previous response. (optional)
|
||||||
|
window = '12h' # str | A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional)
|
||||||
|
start_date = '2022-07-17T22:00:54Z' # datetime | Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional)
|
||||||
|
end_date = '2022-07-18T22:00:54Z' # datetime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional)
|
||||||
|
|
||||||
|
try:
|
||||||
|
# List endpoint agent log items
|
||||||
|
api_response = api_instance.get_endpoint_agent_log_items(agent_id, aid=aid, max=max, cursor=cursor, window=window, start_date=start_date, end_date=end_date)
|
||||||
|
print("The response of EndpointAgentLogItemsApi->get_endpoint_agent_log_items:\n")
|
||||||
|
pprint(api_response)
|
||||||
|
except Exception as e:
|
||||||
|
print("Exception when calling EndpointAgentLogItemsApi->get_endpoint_agent_log_items: %s\n" % e)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**agent_id** | **str**| The identifier of the agent to operate on. |
|
||||||
|
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
|
||||||
|
**max** | **int**| Maximum number of log items returned per page. | [optional] [default to 1000]
|
||||||
|
**cursor** | **str**| Opaque cursor from the `_links.next.href` URL in the previous response. | [optional]
|
||||||
|
**window** | **str**| A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. | [optional]
|
||||||
|
**start_date** | **datetime**| Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional]
|
||||||
|
**end_date** | **datetime**| Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**EndpointAgentLogItemsResponse**](EndpointAgentLogItemsResponse.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[BearerAuth](../README.md#BearerAuth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/hal+json, application/json, application/problem+json
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
**200** | Paginated logs for the endpoint agent. | - |
|
||||||
|
**400** | Bad Request | - |
|
||||||
|
**401** | Unauthorized | - |
|
||||||
|
**403** | Insufficient permissions to query endpoint | - |
|
||||||
|
**429** | Exhausted rate limit for the organization | - |
|
||||||
|
**500** | Internal server error | - |
|
||||||
|
**502** | Bad Gateway | - |
|
||||||
|
**0** | An error occurred | - |
|
||||||
|
|
||||||
|
[[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)
|
||||||
|
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
# EndpointAgentLogItemsResponse
|
||||||
|
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**logs** | [**List[EndpointAgentLogItem]**](EndpointAgentLogItem.md) | Log items for the endpoint agent. |
|
||||||
|
**links** | [**PaginationNextAndSelfLink**](PaginationNextAndSelfLink.md) | | [optional]
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_log_items_response import EndpointAgentLogItemsResponse
|
||||||
|
|
||||||
|
# TODO update the JSON string below
|
||||||
|
json = "{}"
|
||||||
|
# create an instance of EndpointAgentLogItemsResponse from a JSON string
|
||||||
|
endpoint_agent_log_items_response_instance = EndpointAgentLogItemsResponse.from_json(json)
|
||||||
|
# print the JSON string representation of the object
|
||||||
|
print(EndpointAgentLogItemsResponse.to_json())
|
||||||
|
|
||||||
|
# convert the object into a dict
|
||||||
|
endpoint_agent_log_items_response_dict = endpoint_agent_log_items_response_instance.to_dict()
|
||||||
|
# create an instance of EndpointAgentLogItemsResponse from a dict
|
||||||
|
endpoint_agent_log_items_response_from_dict = EndpointAgentLogItemsResponse.from_dict(endpoint_agent_log_items_response_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)
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
# EndpointOnlineOfflineLogItem
|
||||||
|
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**log_item_type** | [**EndpointOnlineOfflineLogItemType**](EndpointOnlineOfflineLogItemType.md) | | [optional]
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_online_offline_log_item import EndpointOnlineOfflineLogItem
|
||||||
|
|
||||||
|
# TODO update the JSON string below
|
||||||
|
json = "{}"
|
||||||
|
# create an instance of EndpointOnlineOfflineLogItem from a JSON string
|
||||||
|
endpoint_online_offline_log_item_instance = EndpointOnlineOfflineLogItem.from_json(json)
|
||||||
|
# print the JSON string representation of the object
|
||||||
|
print(EndpointOnlineOfflineLogItem.to_json())
|
||||||
|
|
||||||
|
# convert the object into a dict
|
||||||
|
endpoint_online_offline_log_item_dict = endpoint_online_offline_log_item_instance.to_dict()
|
||||||
|
# create an instance of EndpointOnlineOfflineLogItem from a dict
|
||||||
|
endpoint_online_offline_log_item_from_dict = EndpointOnlineOfflineLogItem.from_dict(endpoint_online_offline_log_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)
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
# EndpointOnlineOfflineLogItemType
|
||||||
|
|
||||||
|
Online/offline log item type.
|
||||||
|
|
||||||
|
## 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)
|
||||||
|
|
||||||
|
|
||||||
92
thousandeyes-sdk-endpoint-agents/docs/EndpointProxiesApi.md
Normal file
92
thousandeyes-sdk-endpoint-agents/docs/EndpointProxiesApi.md
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
# thousandeyes_sdk.endpoint_agents.EndpointProxiesApi
|
||||||
|
|
||||||
|
All URIs are relative to *https://api.thousandeyes.com/v7*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**get_endpoint_proxies**](EndpointProxiesApi.md#get_endpoint_proxies) | **GET** /endpoint/proxies | List endpoint proxy settings
|
||||||
|
|
||||||
|
|
||||||
|
# **get_endpoint_proxies**
|
||||||
|
> EndpointProxiesResponse get_endpoint_proxies(aid=aid)
|
||||||
|
|
||||||
|
List endpoint proxy settings
|
||||||
|
|
||||||
|
Returns proxy settings for endpoint agents. Proxy passwords are never returned.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
* Bearer Authentication (BearerAuth):
|
||||||
|
|
||||||
|
```python
|
||||||
|
import thousandeyes_sdk.endpoint_agents
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_proxies_response import EndpointProxiesResponse
|
||||||
|
from thousandeyes_sdk.endpoint_agents.rest import ApiException
|
||||||
|
from pprint import pprint
|
||||||
|
|
||||||
|
# Defining the host is optional and defaults to https://api.thousandeyes.com/v7
|
||||||
|
# See configuration.py for a list of all supported configuration parameters.
|
||||||
|
configuration = thousandeyes_sdk.core.Configuration(
|
||||||
|
host = "https://api.thousandeyes.com/v7"
|
||||||
|
)
|
||||||
|
|
||||||
|
# The client must configure the authentication and authorization parameters
|
||||||
|
# in accordance with the API server security policy.
|
||||||
|
# Examples for each auth method are provided below, use the example that
|
||||||
|
# satisfies your auth use case.
|
||||||
|
|
||||||
|
# Configure Bearer authorization: BearerAuth
|
||||||
|
configuration = thousandeyes_sdk.core.Configuration(
|
||||||
|
access_token = os.environ["BEARER_TOKEN"]
|
||||||
|
)
|
||||||
|
|
||||||
|
# Enter a context with an instance of the API client
|
||||||
|
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
||||||
|
# Create an instance of the API class
|
||||||
|
api_instance = thousandeyes_sdk.endpoint_agents.EndpointProxiesApi(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 endpoint proxy settings
|
||||||
|
api_response = api_instance.get_endpoint_proxies(aid=aid)
|
||||||
|
print("The response of EndpointProxiesApi->get_endpoint_proxies:\n")
|
||||||
|
pprint(api_response)
|
||||||
|
except Exception as e:
|
||||||
|
print("Exception when calling EndpointProxiesApi->get_endpoint_proxies: %s\n" % e)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**aid** | **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]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**EndpointProxiesResponse**](EndpointProxiesResponse.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[BearerAuth](../README.md#BearerAuth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json, application/problem+json
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
**200** | Proxy settings for endpoint agents. | - |
|
||||||
|
**401** | Unauthorized | - |
|
||||||
|
**403** | Insufficient permissions to query endpoint | - |
|
||||||
|
**429** | Exhausted rate limit for the organization | - |
|
||||||
|
**500** | Internal server error | - |
|
||||||
|
**0** | An error occurred | - |
|
||||||
|
|
||||||
|
[[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)
|
||||||
|
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
# EndpointProxiesResponse
|
||||||
|
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**proxies** | [**List[EndpointProxy]**](EndpointProxy.md) | Proxy settings configured for endpoint agents. |
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_proxies_response import EndpointProxiesResponse
|
||||||
|
|
||||||
|
# TODO update the JSON string below
|
||||||
|
json = "{}"
|
||||||
|
# create an instance of EndpointProxiesResponse from a JSON string
|
||||||
|
endpoint_proxies_response_instance = EndpointProxiesResponse.from_json(json)
|
||||||
|
# print the JSON string representation of the object
|
||||||
|
print(EndpointProxiesResponse.to_json())
|
||||||
|
|
||||||
|
# convert the object into a dict
|
||||||
|
endpoint_proxies_response_dict = endpoint_proxies_response_instance.to_dict()
|
||||||
|
# create an instance of EndpointProxiesResponse from a dict
|
||||||
|
endpoint_proxies_response_from_dict = EndpointProxiesResponse.from_dict(endpoint_proxies_response_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)
|
||||||
|
|
||||||
|
|
||||||
39
thousandeyes-sdk-endpoint-agents/docs/EndpointProxy.md
Normal file
39
thousandeyes-sdk-endpoint-agents/docs/EndpointProxy.md
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# EndpointProxy
|
||||||
|
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**proxy_id** | **str** | Unique ID of the proxy setting. | [optional] [readonly]
|
||||||
|
**name** | **str** | Proxy setting name. | [optional] [readonly]
|
||||||
|
**type** | [**EndpointProxyType**](EndpointProxyType.md) | | [optional]
|
||||||
|
**host** | **str** | Static proxy host name or IP address. | [optional] [readonly]
|
||||||
|
**port** | **int** | Static proxy port. | [optional] [readonly]
|
||||||
|
**pac** | **str** | PAC URL or PAC script location. | [optional] [readonly]
|
||||||
|
**user_name** | **str** | Proxy authentication user name. | [optional] [readonly]
|
||||||
|
**bypass_list** | **str** | Comma-separated proxy bypass list. | [optional] [readonly]
|
||||||
|
**auth_type** | [**EndpointProxyAuthType**](EndpointProxyAuthType.md) | | [optional]
|
||||||
|
**agent_ids** | **List[str]** | Endpoint Agent IDs assigned to the proxy setting. | [optional]
|
||||||
|
**test_ids** | **List[str]** | Endpoint scheduled test IDs assigned to the proxy setting. | [optional]
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_proxy import EndpointProxy
|
||||||
|
|
||||||
|
# TODO update the JSON string below
|
||||||
|
json = "{}"
|
||||||
|
# create an instance of EndpointProxy from a JSON string
|
||||||
|
endpoint_proxy_instance = EndpointProxy.from_json(json)
|
||||||
|
# print the JSON string representation of the object
|
||||||
|
print(EndpointProxy.to_json())
|
||||||
|
|
||||||
|
# convert the object into a dict
|
||||||
|
endpoint_proxy_dict = endpoint_proxy_instance.to_dict()
|
||||||
|
# create an instance of EndpointProxy from a dict
|
||||||
|
endpoint_proxy_from_dict = EndpointProxy.from_dict(endpoint_proxy_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)
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
# EndpointProxyAuthType
|
||||||
|
|
||||||
|
Proxy authentication type.
|
||||||
|
|
||||||
|
## 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)
|
||||||
|
|
||||||
|
|
||||||
12
thousandeyes-sdk-endpoint-agents/docs/EndpointProxyType.md
Normal file
12
thousandeyes-sdk-endpoint-agents/docs/EndpointProxyType.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# EndpointProxyType
|
||||||
|
|
||||||
|
Proxy setting type.
|
||||||
|
|
||||||
|
## 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)
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
# EndpointStateChangesLogItem
|
||||||
|
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**log_item_type** | [**EndpointStateChangesLogItemType**](EndpointStateChangesLogItemType.md) | | [optional]
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_state_changes_log_item import EndpointStateChangesLogItem
|
||||||
|
|
||||||
|
# TODO update the JSON string below
|
||||||
|
json = "{}"
|
||||||
|
# create an instance of EndpointStateChangesLogItem from a JSON string
|
||||||
|
endpoint_state_changes_log_item_instance = EndpointStateChangesLogItem.from_json(json)
|
||||||
|
# print the JSON string representation of the object
|
||||||
|
print(EndpointStateChangesLogItem.to_json())
|
||||||
|
|
||||||
|
# convert the object into a dict
|
||||||
|
endpoint_state_changes_log_item_dict = endpoint_state_changes_log_item_instance.to_dict()
|
||||||
|
# create an instance of EndpointStateChangesLogItem from a dict
|
||||||
|
endpoint_state_changes_log_item_from_dict = EndpointStateChangesLogItem.from_dict(endpoint_state_changes_log_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)
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
# EndpointStateChangesLogItemType
|
||||||
|
|
||||||
|
State change log item type.
|
||||||
|
|
||||||
|
## 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)
|
||||||
|
|
||||||
|
|
||||||
32
thousandeyes-sdk-endpoint-agents/docs/EndpointVpnLogItem.md
Normal file
32
thousandeyes-sdk-endpoint-agents/docs/EndpointVpnLogItem.md
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# EndpointVpnLogItem
|
||||||
|
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**log_item_type** | [**EndpointVpnLogItemType**](EndpointVpnLogItemType.md) | | [optional]
|
||||||
|
**vpn_type** | [**EndpointVpnType**](EndpointVpnType.md) | | [optional]
|
||||||
|
**vpn_server_name** | **str** | VPN server name. | [optional] [readonly]
|
||||||
|
**vpn_server_address** | **str** | VPN server address. | [optional] [readonly]
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_vpn_log_item import EndpointVpnLogItem
|
||||||
|
|
||||||
|
# TODO update the JSON string below
|
||||||
|
json = "{}"
|
||||||
|
# create an instance of EndpointVpnLogItem from a JSON string
|
||||||
|
endpoint_vpn_log_item_instance = EndpointVpnLogItem.from_json(json)
|
||||||
|
# print the JSON string representation of the object
|
||||||
|
print(EndpointVpnLogItem.to_json())
|
||||||
|
|
||||||
|
# convert the object into a dict
|
||||||
|
endpoint_vpn_log_item_dict = endpoint_vpn_log_item_instance.to_dict()
|
||||||
|
# create an instance of EndpointVpnLogItem from a dict
|
||||||
|
endpoint_vpn_log_item_from_dict = EndpointVpnLogItem.from_dict(endpoint_vpn_log_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)
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
# EndpointVpnLogItemType
|
||||||
|
|
||||||
|
VPN log item type.
|
||||||
|
|
||||||
|
## 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)
|
||||||
|
|
||||||
|
|
||||||
12
thousandeyes-sdk-endpoint-agents/docs/EndpointVpnType.md
Normal file
12
thousandeyes-sdk-endpoint-agents/docs/EndpointVpnType.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# EndpointVpnType
|
||||||
|
|
||||||
|
VPN vendor or type.
|
||||||
|
|
||||||
|
## 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)
|
||||||
|
|
||||||
|
|
||||||
37
thousandeyes-sdk-endpoint-agents/docs/EndpointWifiLogItem.md
Normal file
37
thousandeyes-sdk-endpoint-agents/docs/EndpointWifiLogItem.md
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# EndpointWifiLogItem
|
||||||
|
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**log_item_type** | [**EndpointWifiLogItemType**](EndpointWifiLogItemType.md) | | [optional]
|
||||||
|
**ssid** | **str** | Wireless network SSID. | [optional] [readonly]
|
||||||
|
**bssid** | **str** | Wireless access point BSSID. | [optional] [readonly]
|
||||||
|
**bssid_from** | **str** | Previous wireless access point BSSID. | [optional] [readonly]
|
||||||
|
**channel** | **str** | Wireless channel. | [optional] [readonly]
|
||||||
|
**channel_from** | **str** | Previous wireless channel. | [optional] [readonly]
|
||||||
|
**physical_mode** | **str** | Wireless physical mode. | [optional] [readonly]
|
||||||
|
**physical_mode_from** | **str** | Previous wireless physical mode. | [optional] [readonly]
|
||||||
|
**failure** | [**EndpointWirelessConnectionFailure**](EndpointWirelessConnectionFailure.md) | | [optional]
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_wifi_log_item import EndpointWifiLogItem
|
||||||
|
|
||||||
|
# TODO update the JSON string below
|
||||||
|
json = "{}"
|
||||||
|
# create an instance of EndpointWifiLogItem from a JSON string
|
||||||
|
endpoint_wifi_log_item_instance = EndpointWifiLogItem.from_json(json)
|
||||||
|
# print the JSON string representation of the object
|
||||||
|
print(EndpointWifiLogItem.to_json())
|
||||||
|
|
||||||
|
# convert the object into a dict
|
||||||
|
endpoint_wifi_log_item_dict = endpoint_wifi_log_item_instance.to_dict()
|
||||||
|
# create an instance of EndpointWifiLogItem from a dict
|
||||||
|
endpoint_wifi_log_item_from_dict = EndpointWifiLogItem.from_dict(endpoint_wifi_log_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)
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
# EndpointWifiLogItemType
|
||||||
|
|
||||||
|
Wi-Fi log item type.
|
||||||
|
|
||||||
|
## 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)
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
# EndpointWirelessConnectionFailure
|
||||||
|
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**type** | [**EndpointWirelessConnectionFailureType**](EndpointWirelessConnectionFailureType.md) | | [optional]
|
||||||
|
**context** | **str** | Additional context for the wireless connection failure. | [optional] [readonly]
|
||||||
|
**code** | **int** | Wireless connection failure code. | [optional] [readonly]
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_wireless_connection_failure import EndpointWirelessConnectionFailure
|
||||||
|
|
||||||
|
# TODO update the JSON string below
|
||||||
|
json = "{}"
|
||||||
|
# create an instance of EndpointWirelessConnectionFailure from a JSON string
|
||||||
|
endpoint_wireless_connection_failure_instance = EndpointWirelessConnectionFailure.from_json(json)
|
||||||
|
# print the JSON string representation of the object
|
||||||
|
print(EndpointWirelessConnectionFailure.to_json())
|
||||||
|
|
||||||
|
# convert the object into a dict
|
||||||
|
endpoint_wireless_connection_failure_dict = endpoint_wireless_connection_failure_instance.to_dict()
|
||||||
|
# create an instance of EndpointWirelessConnectionFailure from a dict
|
||||||
|
endpoint_wireless_connection_failure_from_dict = EndpointWirelessConnectionFailure.from_dict(endpoint_wireless_connection_failure_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)
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
# EndpointWirelessConnectionFailureType
|
||||||
|
|
||||||
|
Wireless connection failure phase.
|
||||||
|
|
||||||
|
## 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)
|
||||||
|
|
||||||
|
|
||||||
@ -7,9 +7,9 @@ authors = [
|
|||||||
]
|
]
|
||||||
description = "ThousandEyes SDK Endpoint Agents API"
|
description = "ThousandEyes SDK Endpoint Agents API"
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
requires-python = ">= 3.8"
|
requires-python = ">= 3.9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"urllib3 >= 2.0.0",
|
"urllib3 >= 2.6.3",
|
||||||
"python-dateutil >=2.8.2",
|
"python-dateutil >=2.8.2",
|
||||||
"pydantic >=2.1.0",
|
"pydantic >=2.1.0",
|
||||||
"typing-extensions >=4.7.1",
|
"typing-extensions >=4.7.1",
|
||||||
|
|||||||
@ -14,8 +14,10 @@
|
|||||||
|
|
||||||
|
|
||||||
# import apis into sdk package
|
# import apis into sdk package
|
||||||
|
from thousandeyes_sdk.endpoint_agents.api.endpoint_agent_log_items_api import EndpointAgentLogItemsApi
|
||||||
from thousandeyes_sdk.endpoint_agents.api.endpoint_agents_api import EndpointAgentsApi
|
from thousandeyes_sdk.endpoint_agents.api.endpoint_agents_api import EndpointAgentsApi
|
||||||
from thousandeyes_sdk.endpoint_agents.api.endpoint_agents_transfer_api import EndpointAgentsTransferApi
|
from thousandeyes_sdk.endpoint_agents.api.endpoint_agents_transfer_api import EndpointAgentsTransferApi
|
||||||
|
from thousandeyes_sdk.endpoint_agents.api.endpoint_proxies_api import EndpointProxiesApi
|
||||||
|
|
||||||
|
|
||||||
# import models into sdk package
|
# import models into sdk package
|
||||||
@ -42,13 +44,31 @@ from thousandeyes_sdk.endpoint_agents.models.connection_string import Connection
|
|||||||
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent import EndpointAgent
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent import EndpointAgent
|
||||||
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_ethernet_profile import EndpointAgentEthernetProfile
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_ethernet_profile import EndpointAgentEthernetProfile
|
||||||
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_location import EndpointAgentLocation
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_location import EndpointAgentLocation
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_log_item import EndpointAgentLogItem
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_log_item_type import EndpointAgentLogItemType
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_log_items_response import EndpointAgentLogItemsResponse
|
||||||
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_update import EndpointAgentUpdate
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_update import EndpointAgentUpdate
|
||||||
from thousandeyes_sdk.endpoint_agents.models.endpoint_agents import EndpointAgents
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_agents import EndpointAgents
|
||||||
from thousandeyes_sdk.endpoint_agents.models.endpoint_asn_details import EndpointAsnDetails
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_asn_details import EndpointAsnDetails
|
||||||
from thousandeyes_sdk.endpoint_agents.models.endpoint_browser_extension import EndpointBrowserExtension
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_browser_extension import EndpointBrowserExtension
|
||||||
from thousandeyes_sdk.endpoint_agents.models.endpoint_client import EndpointClient
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_client import EndpointClient
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_online_offline_log_item import EndpointOnlineOfflineLogItem
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_online_offline_log_item_type import EndpointOnlineOfflineLogItemType
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_proxies_response import EndpointProxiesResponse
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_proxy import EndpointProxy
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_proxy_auth_type import EndpointProxyAuthType
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_proxy_type import EndpointProxyType
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_state_changes_log_item import EndpointStateChangesLogItem
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_state_changes_log_item_type import EndpointStateChangesLogItemType
|
||||||
from thousandeyes_sdk.endpoint_agents.models.endpoint_user_profile import EndpointUserProfile
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_user_profile import EndpointUserProfile
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_vpn_log_item import EndpointVpnLogItem
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_vpn_log_item_type import EndpointVpnLogItemType
|
||||||
from thousandeyes_sdk.endpoint_agents.models.endpoint_vpn_profile import EndpointVpnProfile
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_vpn_profile import EndpointVpnProfile
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_vpn_type import EndpointVpnType
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_wifi_log_item import EndpointWifiLogItem
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_wifi_log_item_type import EndpointWifiLogItemType
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_wireless_connection_failure import EndpointWirelessConnectionFailure
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_wireless_connection_failure_type import EndpointWirelessConnectionFailureType
|
||||||
from thousandeyes_sdk.endpoint_agents.models.error import Error
|
from thousandeyes_sdk.endpoint_agents.models.error import Error
|
||||||
from thousandeyes_sdk.endpoint_agents.models.expand_endpoint_agent_options import ExpandEndpointAgentOptions
|
from thousandeyes_sdk.endpoint_agents.models.expand_endpoint_agent_options import ExpandEndpointAgentOptions
|
||||||
from thousandeyes_sdk.endpoint_agents.models.external_metadata_item import ExternalMetadataItem
|
from thousandeyes_sdk.endpoint_agents.models.external_metadata_item import ExternalMetadataItem
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
# flake8: noqa
|
# flake8: noqa
|
||||||
|
|
||||||
# import apis into api package
|
# import apis into api package
|
||||||
|
from thousandeyes_sdk.endpoint_agents.api.endpoint_agent_log_items_api import EndpointAgentLogItemsApi
|
||||||
from thousandeyes_sdk.endpoint_agents.api.endpoint_agents_api import EndpointAgentsApi
|
from thousandeyes_sdk.endpoint_agents.api.endpoint_agents_api import EndpointAgentsApi
|
||||||
from thousandeyes_sdk.endpoint_agents.api.endpoint_agents_transfer_api import EndpointAgentsTransferApi
|
from thousandeyes_sdk.endpoint_agents.api.endpoint_agents_transfer_api import EndpointAgentsTransferApi
|
||||||
|
from thousandeyes_sdk.endpoint_agents.api.endpoint_proxies_api import EndpointProxiesApi
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,517 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
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.endpoint_agents.models
|
||||||
|
|
||||||
|
from datetime import datetime
|
||||||
|
from pydantic import Field, StrictStr, field_validator
|
||||||
|
from typing import Optional
|
||||||
|
from typing_extensions import Annotated
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_log_items_response import EndpointAgentLogItemsResponse
|
||||||
|
|
||||||
|
from thousandeyes_sdk.core.api_client import ApiClient, RequestSerialized
|
||||||
|
from thousandeyes_sdk.core.api_response import ApiResponse
|
||||||
|
from thousandeyes_sdk.core.pagination_iterable import PaginationIterable
|
||||||
|
from thousandeyes_sdk.core.rest import RESTResponseType
|
||||||
|
|
||||||
|
|
||||||
|
class EndpointAgentLogItemsApi:
|
||||||
|
"""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-endpoint-agents"))
|
||||||
|
self.api_client = api_client
|
||||||
|
|
||||||
|
@validate_call
|
||||||
|
def get_endpoint_agent_log_items_paginated(
|
||||||
|
self,
|
||||||
|
agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")],
|
||||||
|
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,
|
||||||
|
max: Annotated[Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]], Field(description="Maximum number of log items returned per page.")] = None,
|
||||||
|
cursor: Annotated[Optional[StrictStr], Field(description="Opaque cursor from the `_links.next.href` URL in the previous response.")] = None,
|
||||||
|
window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None,
|
||||||
|
start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
|
||||||
|
end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
|
||||||
|
_request_timeout: Union[
|
||||||
|
None,
|
||||||
|
Annotated[StrictFloat, Field(gt=0)],
|
||||||
|
Tuple[
|
||||||
|
Annotated[StrictFloat, Field(gt=0)],
|
||||||
|
Annotated[StrictFloat, Field(gt=0)]
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
|
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
||||||
|
_content_type: Optional[StrictStr] = None,
|
||||||
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||||
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||||
|
) -> PaginationIterable:
|
||||||
|
"""List endpoint agent log items
|
||||||
|
|
||||||
|
Returns paginated logs for an endpoint agent within the requested time range.
|
||||||
|
|
||||||
|
:param agent_id: The identifier of the agent to operate on. (required)
|
||||||
|
:type agent_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 max: Maximum number of log items returned per page.
|
||||||
|
:type max: int
|
||||||
|
:param cursor: Opaque cursor from the `_links.next.href` URL in the previous response.
|
||||||
|
:type cursor: str
|
||||||
|
:param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.
|
||||||
|
:type window: str
|
||||||
|
:param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
|
||||||
|
:type start_date: datetime
|
||||||
|
:param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
|
||||||
|
:type end_date: datetime
|
||||||
|
:param _request_timeout: timeout setting for this request. If one
|
||||||
|
number provided, it will be total request
|
||||||
|
timeout. It can also be a pair (tuple) of
|
||||||
|
(connection, read) timeouts.
|
||||||
|
:type _request_timeout: int, tuple(int, int), optional
|
||||||
|
:param _request_auth: set to override the auth_settings for an a single
|
||||||
|
request; this effectively ignores the
|
||||||
|
authentication in the spec for a single request.
|
||||||
|
:type _request_auth: dict, optional
|
||||||
|
:param _content_type: force content-type for the request.
|
||||||
|
:type _content_type: str, Optional
|
||||||
|
:param _headers: set to override the headers for a single
|
||||||
|
request; this effectively ignores the headers
|
||||||
|
in the spec for a single request.
|
||||||
|
:type _headers: dict, optional
|
||||||
|
:param _host_index: set to override the host_index for a single
|
||||||
|
request; this effectively ignores the host_index
|
||||||
|
in the spec for a single request.
|
||||||
|
:type _host_index: int, optional
|
||||||
|
:return: Returns the result object.
|
||||||
|
""" # noqa: E501
|
||||||
|
return PaginationIterable(
|
||||||
|
self.get_endpoint_agent_log_items,
|
||||||
|
lambda data: data.logs if data and data.logs else [],
|
||||||
|
agent_id = agent_id, aid = aid, max = max, cursor = cursor, window = window, start_date = start_date, end_date = end_date,
|
||||||
|
_request_timeout=_request_timeout,
|
||||||
|
_request_auth=_request_auth,
|
||||||
|
_content_type=_content_type,
|
||||||
|
_headers=_headers,
|
||||||
|
_host_index=_host_index
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@validate_call
|
||||||
|
def get_endpoint_agent_log_items(
|
||||||
|
self,
|
||||||
|
agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")],
|
||||||
|
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,
|
||||||
|
max: Annotated[Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]], Field(description="Maximum number of log items returned per page.")] = None,
|
||||||
|
cursor: Annotated[Optional[StrictStr], Field(description="Opaque cursor from the `_links.next.href` URL in the previous response.")] = None,
|
||||||
|
window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None,
|
||||||
|
start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
|
||||||
|
end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
|
||||||
|
_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,
|
||||||
|
) -> EndpointAgentLogItemsResponse:
|
||||||
|
"""List endpoint agent log items
|
||||||
|
|
||||||
|
Returns paginated logs for an endpoint agent within the requested time range.
|
||||||
|
|
||||||
|
:param agent_id: The identifier of the agent to operate on. (required)
|
||||||
|
:type agent_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 max: Maximum number of log items returned per page.
|
||||||
|
:type max: int
|
||||||
|
:param cursor: Opaque cursor from the `_links.next.href` URL in the previous response.
|
||||||
|
:type cursor: str
|
||||||
|
:param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.
|
||||||
|
:type window: str
|
||||||
|
:param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
|
||||||
|
:type start_date: datetime
|
||||||
|
:param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
|
||||||
|
:type end_date: datetime
|
||||||
|
:param _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_endpoint_agent_log_items_serialize(
|
||||||
|
agent_id=agent_id,
|
||||||
|
aid=aid,
|
||||||
|
max=max,
|
||||||
|
cursor=cursor,
|
||||||
|
window=window,
|
||||||
|
start_date=start_date,
|
||||||
|
end_date=end_date,
|
||||||
|
_request_auth=_request_auth,
|
||||||
|
_content_type=_content_type,
|
||||||
|
_headers=_headers,
|
||||||
|
_host_index=_host_index
|
||||||
|
)
|
||||||
|
|
||||||
|
_response_types_map: Dict[str, Optional[str]] = {
|
||||||
|
'200': "EndpointAgentLogItemsResponse",
|
||||||
|
'400': "ValidationError",
|
||||||
|
'401': "UnauthorizedError",
|
||||||
|
'403': "Error",
|
||||||
|
'429': "Error",
|
||||||
|
'500': "Error",
|
||||||
|
'502': "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.endpoint_agents.models,
|
||||||
|
).data
|
||||||
|
|
||||||
|
|
||||||
|
@validate_call
|
||||||
|
def get_endpoint_agent_log_items_with_http_info(
|
||||||
|
self,
|
||||||
|
agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")],
|
||||||
|
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,
|
||||||
|
max: Annotated[Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]], Field(description="Maximum number of log items returned per page.")] = None,
|
||||||
|
cursor: Annotated[Optional[StrictStr], Field(description="Opaque cursor from the `_links.next.href` URL in the previous response.")] = None,
|
||||||
|
window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None,
|
||||||
|
start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
|
||||||
|
end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
|
||||||
|
_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[EndpointAgentLogItemsResponse]:
|
||||||
|
"""List endpoint agent log items
|
||||||
|
|
||||||
|
Returns paginated logs for an endpoint agent within the requested time range.
|
||||||
|
|
||||||
|
:param agent_id: The identifier of the agent to operate on. (required)
|
||||||
|
:type agent_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 max: Maximum number of log items returned per page.
|
||||||
|
:type max: int
|
||||||
|
:param cursor: Opaque cursor from the `_links.next.href` URL in the previous response.
|
||||||
|
:type cursor: str
|
||||||
|
:param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.
|
||||||
|
:type window: str
|
||||||
|
:param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
|
||||||
|
:type start_date: datetime
|
||||||
|
:param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
|
||||||
|
:type end_date: datetime
|
||||||
|
:param _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_endpoint_agent_log_items_serialize(
|
||||||
|
agent_id=agent_id,
|
||||||
|
aid=aid,
|
||||||
|
max=max,
|
||||||
|
cursor=cursor,
|
||||||
|
window=window,
|
||||||
|
start_date=start_date,
|
||||||
|
end_date=end_date,
|
||||||
|
_request_auth=_request_auth,
|
||||||
|
_content_type=_content_type,
|
||||||
|
_headers=_headers,
|
||||||
|
_host_index=_host_index
|
||||||
|
)
|
||||||
|
|
||||||
|
_response_types_map: Dict[str, Optional[str]] = {
|
||||||
|
'200': "EndpointAgentLogItemsResponse",
|
||||||
|
'400': "ValidationError",
|
||||||
|
'401': "UnauthorizedError",
|
||||||
|
'403': "Error",
|
||||||
|
'429': "Error",
|
||||||
|
'500': "Error",
|
||||||
|
'502': "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.endpoint_agents.models,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@validate_call
|
||||||
|
def get_endpoint_agent_log_items_without_preload_content(
|
||||||
|
self,
|
||||||
|
agent_id: Annotated[StrictStr, Field(description="The identifier of the agent to operate on.")],
|
||||||
|
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,
|
||||||
|
max: Annotated[Optional[Annotated[int, Field(le=5000, strict=True, ge=1)]], Field(description="Maximum number of log items returned per page.")] = None,
|
||||||
|
cursor: Annotated[Optional[StrictStr], Field(description="Opaque cursor from the `_links.next.href` URL in the previous response.")] = None,
|
||||||
|
window: Annotated[Optional[Annotated[str, Field(strict=True)]], Field(description="A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.")] = None,
|
||||||
|
start_date: Annotated[Optional[datetime], Field(description="Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
|
||||||
|
end_date: Annotated[Optional[datetime], Field(description="Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.")] = None,
|
||||||
|
_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:
|
||||||
|
"""List endpoint agent log items
|
||||||
|
|
||||||
|
Returns paginated logs for an endpoint agent within the requested time range.
|
||||||
|
|
||||||
|
:param agent_id: The identifier of the agent to operate on. (required)
|
||||||
|
:type agent_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 max: Maximum number of log items returned per page.
|
||||||
|
:type max: int
|
||||||
|
:param cursor: Opaque cursor from the `_links.next.href` URL in the previous response.
|
||||||
|
:type cursor: str
|
||||||
|
:param window: A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`.
|
||||||
|
:type window: str
|
||||||
|
:param start_date: Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
|
||||||
|
:type start_date: datetime
|
||||||
|
:param end_date: Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
|
||||||
|
:type end_date: datetime
|
||||||
|
:param _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_endpoint_agent_log_items_serialize(
|
||||||
|
agent_id=agent_id,
|
||||||
|
aid=aid,
|
||||||
|
max=max,
|
||||||
|
cursor=cursor,
|
||||||
|
window=window,
|
||||||
|
start_date=start_date,
|
||||||
|
end_date=end_date,
|
||||||
|
_request_auth=_request_auth,
|
||||||
|
_content_type=_content_type,
|
||||||
|
_headers=_headers,
|
||||||
|
_host_index=_host_index
|
||||||
|
)
|
||||||
|
|
||||||
|
_response_types_map: Dict[str, Optional[str]] = {
|
||||||
|
'200': "EndpointAgentLogItemsResponse",
|
||||||
|
'400': "ValidationError",
|
||||||
|
'401': "UnauthorizedError",
|
||||||
|
'403': "Error",
|
||||||
|
'429': "Error",
|
||||||
|
'500': "Error",
|
||||||
|
'502': "Error",
|
||||||
|
}
|
||||||
|
response_data = self.api_client.call_api(
|
||||||
|
*_param,
|
||||||
|
_request_timeout=_request_timeout
|
||||||
|
)
|
||||||
|
return response_data.response
|
||||||
|
|
||||||
|
|
||||||
|
def _get_endpoint_agent_log_items_serialize(
|
||||||
|
self,
|
||||||
|
agent_id,
|
||||||
|
aid,
|
||||||
|
max,
|
||||||
|
cursor,
|
||||||
|
window,
|
||||||
|
start_date,
|
||||||
|
end_date,
|
||||||
|
_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 agent_id is not None:
|
||||||
|
_path_params['agentId'] = agent_id
|
||||||
|
# process the query parameters
|
||||||
|
if aid is not None:
|
||||||
|
|
||||||
|
_query_params.append(('aid', aid))
|
||||||
|
|
||||||
|
if max is not None:
|
||||||
|
|
||||||
|
_query_params.append(('max', max))
|
||||||
|
|
||||||
|
if cursor is not None:
|
||||||
|
|
||||||
|
_query_params.append(('cursor', cursor))
|
||||||
|
|
||||||
|
if window is not None:
|
||||||
|
|
||||||
|
_query_params.append(('window', window))
|
||||||
|
|
||||||
|
if start_date is not None:
|
||||||
|
if isinstance(start_date, datetime):
|
||||||
|
_query_params.append(
|
||||||
|
(
|
||||||
|
'startDate',
|
||||||
|
start_date.strftime(
|
||||||
|
self.api_client.configuration.datetime_format
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
_query_params.append(('startDate', start_date))
|
||||||
|
|
||||||
|
if end_date is not None:
|
||||||
|
if isinstance(end_date, datetime):
|
||||||
|
_query_params.append(
|
||||||
|
(
|
||||||
|
'endDate',
|
||||||
|
end_date.strftime(
|
||||||
|
self.api_client.configuration.datetime_format
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
_query_params.append(('endDate', end_date))
|
||||||
|
|
||||||
|
# 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/hal+json',
|
||||||
|
'application/json',
|
||||||
|
'application/problem+json'
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# authentication setting
|
||||||
|
_auth_settings: List[str] = [
|
||||||
|
'BearerAuth'
|
||||||
|
]
|
||||||
|
|
||||||
|
return self.api_client.param_serialize(
|
||||||
|
method='GET',
|
||||||
|
resource_path='/endpoint/agents/{agentId}/logs',
|
||||||
|
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
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,318 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
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.endpoint_agents.models
|
||||||
|
|
||||||
|
from pydantic import Field, StrictStr
|
||||||
|
from typing import Optional
|
||||||
|
from typing_extensions import Annotated
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_proxies_response import EndpointProxiesResponse
|
||||||
|
|
||||||
|
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 EndpointProxiesApi:
|
||||||
|
"""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-endpoint-agents"))
|
||||||
|
self.api_client = api_client
|
||||||
|
|
||||||
|
|
||||||
|
@validate_call
|
||||||
|
def get_endpoint_proxies(
|
||||||
|
self,
|
||||||
|
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||||
|
_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,
|
||||||
|
) -> EndpointProxiesResponse:
|
||||||
|
"""List endpoint proxy settings
|
||||||
|
|
||||||
|
Returns proxy settings for endpoint agents. Proxy passwords are never returned.
|
||||||
|
|
||||||
|
: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_endpoint_proxies_serialize(
|
||||||
|
aid=aid,
|
||||||
|
_request_auth=_request_auth,
|
||||||
|
_content_type=_content_type,
|
||||||
|
_headers=_headers,
|
||||||
|
_host_index=_host_index
|
||||||
|
)
|
||||||
|
|
||||||
|
_response_types_map: Dict[str, Optional[str]] = {
|
||||||
|
'200': "EndpointProxiesResponse",
|
||||||
|
'401': "UnauthorizedError",
|
||||||
|
'403': "Error",
|
||||||
|
'429': "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.endpoint_agents.models,
|
||||||
|
).data
|
||||||
|
|
||||||
|
|
||||||
|
@validate_call
|
||||||
|
def get_endpoint_proxies_with_http_info(
|
||||||
|
self,
|
||||||
|
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||||
|
_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[EndpointProxiesResponse]:
|
||||||
|
"""List endpoint proxy settings
|
||||||
|
|
||||||
|
Returns proxy settings for endpoint agents. Proxy passwords are never returned.
|
||||||
|
|
||||||
|
: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_endpoint_proxies_serialize(
|
||||||
|
aid=aid,
|
||||||
|
_request_auth=_request_auth,
|
||||||
|
_content_type=_content_type,
|
||||||
|
_headers=_headers,
|
||||||
|
_host_index=_host_index
|
||||||
|
)
|
||||||
|
|
||||||
|
_response_types_map: Dict[str, Optional[str]] = {
|
||||||
|
'200': "EndpointProxiesResponse",
|
||||||
|
'401': "UnauthorizedError",
|
||||||
|
'403': "Error",
|
||||||
|
'429': "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.endpoint_agents.models,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@validate_call
|
||||||
|
def get_endpoint_proxies_without_preload_content(
|
||||||
|
self,
|
||||||
|
aid: Annotated[Optional[StrictStr], Field(description="A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response.")] = None,
|
||||||
|
_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:
|
||||||
|
"""List endpoint proxy settings
|
||||||
|
|
||||||
|
Returns proxy settings for endpoint agents. Proxy passwords are never returned.
|
||||||
|
|
||||||
|
: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_endpoint_proxies_serialize(
|
||||||
|
aid=aid,
|
||||||
|
_request_auth=_request_auth,
|
||||||
|
_content_type=_content_type,
|
||||||
|
_headers=_headers,
|
||||||
|
_host_index=_host_index
|
||||||
|
)
|
||||||
|
|
||||||
|
_response_types_map: Dict[str, Optional[str]] = {
|
||||||
|
'200': "EndpointProxiesResponse",
|
||||||
|
'401': "UnauthorizedError",
|
||||||
|
'403': "Error",
|
||||||
|
'429': "Error",
|
||||||
|
'500': "Error",
|
||||||
|
}
|
||||||
|
response_data = self.api_client.call_api(
|
||||||
|
*_param,
|
||||||
|
_request_timeout=_request_timeout
|
||||||
|
)
|
||||||
|
return response_data.response
|
||||||
|
|
||||||
|
|
||||||
|
def _get_endpoint_proxies_serialize(
|
||||||
|
self,
|
||||||
|
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
|
||||||
|
# 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/json',
|
||||||
|
'application/problem+json'
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# authentication setting
|
||||||
|
_auth_settings: List[str] = [
|
||||||
|
'BearerAuth'
|
||||||
|
]
|
||||||
|
|
||||||
|
return self.api_client.param_serialize(
|
||||||
|
method='GET',
|
||||||
|
resource_path='/endpoint/proxies',
|
||||||
|
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
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -36,13 +36,31 @@ from thousandeyes_sdk.endpoint_agents.models.connection_string import Connection
|
|||||||
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent import EndpointAgent
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent import EndpointAgent
|
||||||
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_ethernet_profile import EndpointAgentEthernetProfile
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_ethernet_profile import EndpointAgentEthernetProfile
|
||||||
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_location import EndpointAgentLocation
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_location import EndpointAgentLocation
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_log_item import EndpointAgentLogItem
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_log_item_type import EndpointAgentLogItemType
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_log_items_response import EndpointAgentLogItemsResponse
|
||||||
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_update import EndpointAgentUpdate
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_agent_update import EndpointAgentUpdate
|
||||||
from thousandeyes_sdk.endpoint_agents.models.endpoint_agents import EndpointAgents
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_agents import EndpointAgents
|
||||||
from thousandeyes_sdk.endpoint_agents.models.endpoint_asn_details import EndpointAsnDetails
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_asn_details import EndpointAsnDetails
|
||||||
from thousandeyes_sdk.endpoint_agents.models.endpoint_browser_extension import EndpointBrowserExtension
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_browser_extension import EndpointBrowserExtension
|
||||||
from thousandeyes_sdk.endpoint_agents.models.endpoint_client import EndpointClient
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_client import EndpointClient
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_online_offline_log_item import EndpointOnlineOfflineLogItem
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_online_offline_log_item_type import EndpointOnlineOfflineLogItemType
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_proxies_response import EndpointProxiesResponse
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_proxy import EndpointProxy
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_proxy_auth_type import EndpointProxyAuthType
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_proxy_type import EndpointProxyType
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_state_changes_log_item import EndpointStateChangesLogItem
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_state_changes_log_item_type import EndpointStateChangesLogItemType
|
||||||
from thousandeyes_sdk.endpoint_agents.models.endpoint_user_profile import EndpointUserProfile
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_user_profile import EndpointUserProfile
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_vpn_log_item import EndpointVpnLogItem
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_vpn_log_item_type import EndpointVpnLogItemType
|
||||||
from thousandeyes_sdk.endpoint_agents.models.endpoint_vpn_profile import EndpointVpnProfile
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_vpn_profile import EndpointVpnProfile
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_vpn_type import EndpointVpnType
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_wifi_log_item import EndpointWifiLogItem
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_wifi_log_item_type import EndpointWifiLogItemType
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_wireless_connection_failure import EndpointWirelessConnectionFailure
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_wireless_connection_failure_type import EndpointWirelessConnectionFailureType
|
||||||
from thousandeyes_sdk.endpoint_agents.models.error import Error
|
from thousandeyes_sdk.endpoint_agents.models.error import Error
|
||||||
from thousandeyes_sdk.endpoint_agents.models.expand_endpoint_agent_options import ExpandEndpointAgentOptions
|
from thousandeyes_sdk.endpoint_agents.models.expand_endpoint_agent_options import ExpandEndpointAgentOptions
|
||||||
from thousandeyes_sdk.endpoint_agents.models.external_metadata_item import ExternalMetadataItem
|
from thousandeyes_sdk.endpoint_agents.models.external_metadata_item import ExternalMetadataItem
|
||||||
|
|||||||
@ -0,0 +1,140 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
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.endpoint_agents.models.endpoint_agent_log_item_type import EndpointAgentLogItemType
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_online_offline_log_item import EndpointOnlineOfflineLogItem
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_state_changes_log_item import EndpointStateChangesLogItem
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_vpn_log_item import EndpointVpnLogItem
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_wifi_log_item import EndpointWifiLogItem
|
||||||
|
from typing import Optional, Set
|
||||||
|
from typing_extensions import Self
|
||||||
|
|
||||||
|
class EndpointAgentLogItem(BaseModel):
|
||||||
|
"""
|
||||||
|
EndpointAgentLogItem
|
||||||
|
""" # noqa: E501
|
||||||
|
id: Optional[StrictStr] = Field(default=None, description="Unique ID of the log item.")
|
||||||
|
agent_log_item_type: Optional[EndpointAgentLogItemType] = Field(default=None, alias="agentLogItemType")
|
||||||
|
timestamp_ms: Optional[StrictInt] = Field(default=None, description="Time when the log item was recorded, in milliseconds since the Unix epoch.", alias="timestampMs")
|
||||||
|
wifi_log_item: Optional[EndpointWifiLogItem] = Field(default=None, alias="wifiLogItem")
|
||||||
|
vpn_log_item: Optional[EndpointVpnLogItem] = Field(default=None, alias="vpnLogItem")
|
||||||
|
online_offline_log_item: Optional[EndpointOnlineOfflineLogItem] = Field(default=None, alias="onlineOfflineLogItem")
|
||||||
|
state_changes_log_item: Optional[EndpointStateChangesLogItem] = Field(default=None, alias="stateChangesLogItem")
|
||||||
|
__properties: ClassVar[List[str]] = ["id", "agentLogItemType", "timestampMs", "wifiLogItem", "vpnLogItem", "onlineOfflineLogItem", "stateChangesLogItem"]
|
||||||
|
|
||||||
|
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 EndpointAgentLogItem 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",
|
||||||
|
"timestamp_ms",
|
||||||
|
])
|
||||||
|
|
||||||
|
_dict = self.model_dump(
|
||||||
|
by_alias=True,
|
||||||
|
exclude=excluded_fields,
|
||||||
|
exclude_none=True,
|
||||||
|
)
|
||||||
|
# override the default output from pydantic by calling `to_dict()` of wifi_log_item
|
||||||
|
if self.wifi_log_item:
|
||||||
|
_dict['wifiLogItem'] = self.wifi_log_item.to_dict()
|
||||||
|
# override the default output from pydantic by calling `to_dict()` of vpn_log_item
|
||||||
|
if self.vpn_log_item:
|
||||||
|
_dict['vpnLogItem'] = self.vpn_log_item.to_dict()
|
||||||
|
# override the default output from pydantic by calling `to_dict()` of online_offline_log_item
|
||||||
|
if self.online_offline_log_item:
|
||||||
|
_dict['onlineOfflineLogItem'] = self.online_offline_log_item.to_dict()
|
||||||
|
# override the default output from pydantic by calling `to_dict()` of state_changes_log_item
|
||||||
|
if self.state_changes_log_item:
|
||||||
|
_dict['stateChangesLogItem'] = self.state_changes_log_item.to_dict()
|
||||||
|
# set to None if wifi_log_item (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.wifi_log_item is None and "wifi_log_item" in self.model_fields_set:
|
||||||
|
_dict['wifiLogItem'] = None
|
||||||
|
|
||||||
|
# set to None if vpn_log_item (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.vpn_log_item is None and "vpn_log_item" in self.model_fields_set:
|
||||||
|
_dict['vpnLogItem'] = None
|
||||||
|
|
||||||
|
# set to None if online_offline_log_item (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.online_offline_log_item is None and "online_offline_log_item" in self.model_fields_set:
|
||||||
|
_dict['onlineOfflineLogItem'] = None
|
||||||
|
|
||||||
|
# set to None if state_changes_log_item (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.state_changes_log_item is None and "state_changes_log_item" in self.model_fields_set:
|
||||||
|
_dict['stateChangesLogItem'] = None
|
||||||
|
|
||||||
|
return _dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||||
|
"""Create an instance of EndpointAgentLogItem 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"),
|
||||||
|
"agentLogItemType": obj.get("agentLogItemType"),
|
||||||
|
"timestampMs": obj.get("timestampMs"),
|
||||||
|
"wifiLogItem": EndpointWifiLogItem.from_dict(obj["wifiLogItem"]) if obj.get("wifiLogItem") is not None else None,
|
||||||
|
"vpnLogItem": EndpointVpnLogItem.from_dict(obj["vpnLogItem"]) if obj.get("vpnLogItem") is not None else None,
|
||||||
|
"onlineOfflineLogItem": EndpointOnlineOfflineLogItem.from_dict(obj["onlineOfflineLogItem"]) if obj.get("onlineOfflineLogItem") is not None else None,
|
||||||
|
"stateChangesLogItem": EndpointStateChangesLogItem.from_dict(obj["stateChangesLogItem"]) if obj.get("stateChangesLogItem") is not None else None
|
||||||
|
})
|
||||||
|
return _obj
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
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 EndpointAgentLogItemType(str, Enum):
|
||||||
|
"""
|
||||||
|
Agent log item category.
|
||||||
|
"""
|
||||||
|
|
||||||
|
"""
|
||||||
|
allowed enum values
|
||||||
|
"""
|
||||||
|
WIFI = 'wifi'
|
||||||
|
VPN = 'vpn'
|
||||||
|
ONLINE_MINUS_OFFLINE = 'online-offline'
|
||||||
|
STATE_MINUS_CHANGES = 'state-changes'
|
||||||
|
UNKNOWN = 'unknown'
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_json(cls, json_str: str) -> Self:
|
||||||
|
"""Create an instance of EndpointAgentLogItemType from a JSON string"""
|
||||||
|
return cls(json.loads(json_str))
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def _missing_(cls, value):
|
||||||
|
"""Handle unknown values"""
|
||||||
|
return cls.UNKNOWN
|
||||||
|
|
||||||
@ -0,0 +1,101 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
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.endpoint_agents.models.endpoint_agent_log_item import EndpointAgentLogItem
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.pagination_next_and_self_link import PaginationNextAndSelfLink
|
||||||
|
from typing import Optional, Set
|
||||||
|
from typing_extensions import Self
|
||||||
|
|
||||||
|
class EndpointAgentLogItemsResponse(BaseModel):
|
||||||
|
"""
|
||||||
|
EndpointAgentLogItemsResponse
|
||||||
|
""" # noqa: E501
|
||||||
|
logs: List[EndpointAgentLogItem] = Field(description="Log items for the endpoint agent.")
|
||||||
|
links: Optional[PaginationNextAndSelfLink] = Field(default=None, alias="_links")
|
||||||
|
__properties: ClassVar[List[str]] = ["logs", "_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 EndpointAgentLogItemsResponse 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 logs (list)
|
||||||
|
_items = []
|
||||||
|
if self.logs:
|
||||||
|
for _item in self.logs:
|
||||||
|
if _item:
|
||||||
|
_items.append(_item.to_dict())
|
||||||
|
_dict['logs'] = _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 EndpointAgentLogItemsResponse from a dict"""
|
||||||
|
if obj is None:
|
||||||
|
return None
|
||||||
|
|
||||||
|
if not isinstance(obj, dict):
|
||||||
|
return cls.model_validate(obj)
|
||||||
|
|
||||||
|
_obj = cls.model_validate({
|
||||||
|
"logs": [EndpointAgentLogItem.from_dict(_item) for _item in obj["logs"]] if obj.get("logs") is not None else None,
|
||||||
|
"_links": PaginationNextAndSelfLink.from_dict(obj["_links"]) if obj.get("_links") is not None else None
|
||||||
|
})
|
||||||
|
return _obj
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,88 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
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.endpoint_agents.models.endpoint_online_offline_log_item_type import EndpointOnlineOfflineLogItemType
|
||||||
|
from typing import Optional, Set
|
||||||
|
from typing_extensions import Self
|
||||||
|
|
||||||
|
class EndpointOnlineOfflineLogItem(BaseModel):
|
||||||
|
"""
|
||||||
|
EndpointOnlineOfflineLogItem
|
||||||
|
""" # noqa: E501
|
||||||
|
log_item_type: Optional[EndpointOnlineOfflineLogItemType] = Field(default=None, alias="logItemType")
|
||||||
|
__properties: ClassVar[List[str]] = ["logItemType"]
|
||||||
|
|
||||||
|
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 EndpointOnlineOfflineLogItem 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 EndpointOnlineOfflineLogItem from a dict"""
|
||||||
|
if obj is None:
|
||||||
|
return None
|
||||||
|
|
||||||
|
if not isinstance(obj, dict):
|
||||||
|
return cls.model_validate(obj)
|
||||||
|
|
||||||
|
_obj = cls.model_validate({
|
||||||
|
"logItemType": obj.get("logItemType")
|
||||||
|
})
|
||||||
|
return _obj
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
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 EndpointOnlineOfflineLogItemType(str, Enum):
|
||||||
|
"""
|
||||||
|
Online/offline log item type.
|
||||||
|
"""
|
||||||
|
|
||||||
|
"""
|
||||||
|
allowed enum values
|
||||||
|
"""
|
||||||
|
ONLINE = 'online'
|
||||||
|
OFFLINE = 'offline'
|
||||||
|
UNKNOWN = 'unknown'
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_json(cls, json_str: str) -> Self:
|
||||||
|
"""Create an instance of EndpointOnlineOfflineLogItemType from a JSON string"""
|
||||||
|
return cls(json.loads(json_str))
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def _missing_(cls, value):
|
||||||
|
"""Handle unknown values"""
|
||||||
|
return cls.UNKNOWN
|
||||||
|
|
||||||
@ -0,0 +1,95 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
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
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_proxy import EndpointProxy
|
||||||
|
from typing import Optional, Set
|
||||||
|
from typing_extensions import Self
|
||||||
|
|
||||||
|
class EndpointProxiesResponse(BaseModel):
|
||||||
|
"""
|
||||||
|
EndpointProxiesResponse
|
||||||
|
""" # noqa: E501
|
||||||
|
proxies: List[EndpointProxy] = Field(description="Proxy settings configured for endpoint agents.")
|
||||||
|
__properties: ClassVar[List[str]] = ["proxies"]
|
||||||
|
|
||||||
|
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 EndpointProxiesResponse 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 proxies (list)
|
||||||
|
_items = []
|
||||||
|
if self.proxies:
|
||||||
|
for _item in self.proxies:
|
||||||
|
if _item:
|
||||||
|
_items.append(_item.to_dict())
|
||||||
|
_dict['proxies'] = _items
|
||||||
|
return _dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||||
|
"""Create an instance of EndpointProxiesResponse from a dict"""
|
||||||
|
if obj is None:
|
||||||
|
return None
|
||||||
|
|
||||||
|
if not isinstance(obj, dict):
|
||||||
|
return cls.model_validate(obj)
|
||||||
|
|
||||||
|
_obj = cls.model_validate({
|
||||||
|
"proxies": [EndpointProxy.from_dict(_item) for _item in obj["proxies"]] if obj.get("proxies") is not None else None
|
||||||
|
})
|
||||||
|
return _obj
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,158 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
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.endpoint_agents.models.endpoint_proxy_auth_type import EndpointProxyAuthType
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_proxy_type import EndpointProxyType
|
||||||
|
from typing import Optional, Set
|
||||||
|
from typing_extensions import Self
|
||||||
|
|
||||||
|
class EndpointProxy(BaseModel):
|
||||||
|
"""
|
||||||
|
EndpointProxy
|
||||||
|
""" # noqa: E501
|
||||||
|
proxy_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the proxy setting.", alias="proxyId")
|
||||||
|
name: Optional[StrictStr] = Field(default=None, description="Proxy setting name.")
|
||||||
|
type: Optional[EndpointProxyType] = None
|
||||||
|
host: Optional[StrictStr] = Field(default=None, description="Static proxy host name or IP address.")
|
||||||
|
port: Optional[StrictInt] = Field(default=None, description="Static proxy port.")
|
||||||
|
pac: Optional[StrictStr] = Field(default=None, description="PAC URL or PAC script location.")
|
||||||
|
user_name: Optional[StrictStr] = Field(default=None, description="Proxy authentication user name.", alias="userName")
|
||||||
|
bypass_list: Optional[StrictStr] = Field(default=None, description="Comma-separated proxy bypass list.", alias="bypassList")
|
||||||
|
auth_type: Optional[EndpointProxyAuthType] = Field(default=None, alias="authType")
|
||||||
|
agent_ids: Optional[List[StrictStr]] = Field(default=None, description="Endpoint Agent IDs assigned to the proxy setting.", alias="agentIds")
|
||||||
|
test_ids: Optional[List[StrictStr]] = Field(default=None, description="Endpoint scheduled test IDs assigned to the proxy setting.", alias="testIds")
|
||||||
|
__properties: ClassVar[List[str]] = ["proxyId", "name", "type", "host", "port", "pac", "userName", "bypassList", "authType", "agentIds", "testIds"]
|
||||||
|
|
||||||
|
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 EndpointProxy 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.
|
||||||
|
* OpenAPI `readOnly` fields are excluded.
|
||||||
|
* OpenAPI `readOnly` fields are excluded.
|
||||||
|
* OpenAPI `readOnly` fields are excluded.
|
||||||
|
* OpenAPI `readOnly` fields are excluded.
|
||||||
|
* OpenAPI `readOnly` fields are excluded.
|
||||||
|
"""
|
||||||
|
excluded_fields: Set[str] = set([
|
||||||
|
"proxy_id",
|
||||||
|
"name",
|
||||||
|
"host",
|
||||||
|
"port",
|
||||||
|
"pac",
|
||||||
|
"user_name",
|
||||||
|
"bypass_list",
|
||||||
|
])
|
||||||
|
|
||||||
|
_dict = self.model_dump(
|
||||||
|
by_alias=True,
|
||||||
|
exclude=excluded_fields,
|
||||||
|
exclude_none=True,
|
||||||
|
)
|
||||||
|
# set to None if host (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.host is None and "host" in self.model_fields_set:
|
||||||
|
_dict['host'] = None
|
||||||
|
|
||||||
|
# set to None if port (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.port is None and "port" in self.model_fields_set:
|
||||||
|
_dict['port'] = None
|
||||||
|
|
||||||
|
# set to None if pac (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.pac is None and "pac" in self.model_fields_set:
|
||||||
|
_dict['pac'] = None
|
||||||
|
|
||||||
|
# set to None if user_name (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.user_name is None and "user_name" in self.model_fields_set:
|
||||||
|
_dict['userName'] = None
|
||||||
|
|
||||||
|
# set to None if bypass_list (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.bypass_list is None and "bypass_list" in self.model_fields_set:
|
||||||
|
_dict['bypassList'] = None
|
||||||
|
|
||||||
|
# set to None if agent_ids (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.agent_ids is None and "agent_ids" in self.model_fields_set:
|
||||||
|
_dict['agentIds'] = None
|
||||||
|
|
||||||
|
# set to None if test_ids (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.test_ids is None and "test_ids" in self.model_fields_set:
|
||||||
|
_dict['testIds'] = None
|
||||||
|
|
||||||
|
return _dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||||
|
"""Create an instance of EndpointProxy from a dict"""
|
||||||
|
if obj is None:
|
||||||
|
return None
|
||||||
|
|
||||||
|
if not isinstance(obj, dict):
|
||||||
|
return cls.model_validate(obj)
|
||||||
|
|
||||||
|
_obj = cls.model_validate({
|
||||||
|
"proxyId": obj.get("proxyId"),
|
||||||
|
"name": obj.get("name"),
|
||||||
|
"type": obj.get("type"),
|
||||||
|
"host": obj.get("host"),
|
||||||
|
"port": obj.get("port"),
|
||||||
|
"pac": obj.get("pac"),
|
||||||
|
"userName": obj.get("userName"),
|
||||||
|
"bypassList": obj.get("bypassList"),
|
||||||
|
"authType": obj.get("authType"),
|
||||||
|
"agentIds": obj.get("agentIds"),
|
||||||
|
"testIds": obj.get("testIds")
|
||||||
|
})
|
||||||
|
return _obj
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
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 EndpointProxyAuthType(str, Enum):
|
||||||
|
"""
|
||||||
|
Proxy authentication type.
|
||||||
|
"""
|
||||||
|
|
||||||
|
"""
|
||||||
|
allowed enum values
|
||||||
|
"""
|
||||||
|
NONE = 'none'
|
||||||
|
BASIC = 'basic'
|
||||||
|
NTLM = 'ntlm'
|
||||||
|
UNKNOWN = 'unknown'
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_json(cls, json_str: str) -> Self:
|
||||||
|
"""Create an instance of EndpointProxyAuthType from a JSON string"""
|
||||||
|
return cls(json.loads(json_str))
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def _missing_(cls, value):
|
||||||
|
"""Handle unknown values"""
|
||||||
|
return cls.UNKNOWN
|
||||||
|
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
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 EndpointProxyType(str, Enum):
|
||||||
|
"""
|
||||||
|
Proxy setting type.
|
||||||
|
"""
|
||||||
|
|
||||||
|
"""
|
||||||
|
allowed enum values
|
||||||
|
"""
|
||||||
|
STATIC = 'static'
|
||||||
|
PAC = 'pac'
|
||||||
|
DIRECT = 'direct'
|
||||||
|
SYSTEM = 'system'
|
||||||
|
INTERACTIVE_MINUS_USER_MINUS_PROXY = 'interactive-user-proxy'
|
||||||
|
UNKNOWN = 'unknown'
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_json(cls, json_str: str) -> Self:
|
||||||
|
"""Create an instance of EndpointProxyType from a JSON string"""
|
||||||
|
return cls(json.loads(json_str))
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def _missing_(cls, value):
|
||||||
|
"""Handle unknown values"""
|
||||||
|
return cls.UNKNOWN
|
||||||
|
|
||||||
@ -0,0 +1,88 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
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.endpoint_agents.models.endpoint_state_changes_log_item_type import EndpointStateChangesLogItemType
|
||||||
|
from typing import Optional, Set
|
||||||
|
from typing_extensions import Self
|
||||||
|
|
||||||
|
class EndpointStateChangesLogItem(BaseModel):
|
||||||
|
"""
|
||||||
|
EndpointStateChangesLogItem
|
||||||
|
""" # noqa: E501
|
||||||
|
log_item_type: Optional[EndpointStateChangesLogItemType] = Field(default=None, alias="logItemType")
|
||||||
|
__properties: ClassVar[List[str]] = ["logItemType"]
|
||||||
|
|
||||||
|
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 EndpointStateChangesLogItem 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 EndpointStateChangesLogItem from a dict"""
|
||||||
|
if obj is None:
|
||||||
|
return None
|
||||||
|
|
||||||
|
if not isinstance(obj, dict):
|
||||||
|
return cls.model_validate(obj)
|
||||||
|
|
||||||
|
_obj = cls.model_validate({
|
||||||
|
"logItemType": obj.get("logItemType")
|
||||||
|
})
|
||||||
|
return _obj
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
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 EndpointStateChangesLogItemType(str, Enum):
|
||||||
|
"""
|
||||||
|
State change log item type.
|
||||||
|
"""
|
||||||
|
|
||||||
|
"""
|
||||||
|
allowed enum values
|
||||||
|
"""
|
||||||
|
RECOVER = 'recover'
|
||||||
|
ENABLED = 'enabled'
|
||||||
|
DELETED = 'deleted'
|
||||||
|
DISABLED = 'disabled'
|
||||||
|
UNKNOWN = 'unknown'
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_json(cls, json_str: str) -> Self:
|
||||||
|
"""Create an instance of EndpointStateChangesLogItemType from a JSON string"""
|
||||||
|
return cls(json.loads(json_str))
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def _missing_(cls, value):
|
||||||
|
"""Handle unknown values"""
|
||||||
|
return cls.UNKNOWN
|
||||||
|
|
||||||
@ -0,0 +1,109 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
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.endpoint_agents.models.endpoint_vpn_log_item_type import EndpointVpnLogItemType
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_vpn_type import EndpointVpnType
|
||||||
|
from typing import Optional, Set
|
||||||
|
from typing_extensions import Self
|
||||||
|
|
||||||
|
class EndpointVpnLogItem(BaseModel):
|
||||||
|
"""
|
||||||
|
EndpointVpnLogItem
|
||||||
|
""" # noqa: E501
|
||||||
|
log_item_type: Optional[EndpointVpnLogItemType] = Field(default=None, alias="logItemType")
|
||||||
|
vpn_type: Optional[EndpointVpnType] = Field(default=None, alias="vpnType")
|
||||||
|
vpn_server_name: Optional[StrictStr] = Field(default=None, description="VPN server name.", alias="vpnServerName")
|
||||||
|
vpn_server_address: Optional[StrictStr] = Field(default=None, description="VPN server address.", alias="vpnServerAddress")
|
||||||
|
__properties: ClassVar[List[str]] = ["logItemType", "vpnType", "vpnServerName", "vpnServerAddress"]
|
||||||
|
|
||||||
|
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 EndpointVpnLogItem 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([
|
||||||
|
"vpn_server_name",
|
||||||
|
"vpn_server_address",
|
||||||
|
])
|
||||||
|
|
||||||
|
_dict = self.model_dump(
|
||||||
|
by_alias=True,
|
||||||
|
exclude=excluded_fields,
|
||||||
|
exclude_none=True,
|
||||||
|
)
|
||||||
|
# set to None if vpn_server_name (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.vpn_server_name is None and "vpn_server_name" in self.model_fields_set:
|
||||||
|
_dict['vpnServerName'] = None
|
||||||
|
|
||||||
|
# set to None if vpn_server_address (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.vpn_server_address is None and "vpn_server_address" in self.model_fields_set:
|
||||||
|
_dict['vpnServerAddress'] = None
|
||||||
|
|
||||||
|
return _dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||||
|
"""Create an instance of EndpointVpnLogItem from a dict"""
|
||||||
|
if obj is None:
|
||||||
|
return None
|
||||||
|
|
||||||
|
if not isinstance(obj, dict):
|
||||||
|
return cls.model_validate(obj)
|
||||||
|
|
||||||
|
_obj = cls.model_validate({
|
||||||
|
"logItemType": obj.get("logItemType"),
|
||||||
|
"vpnType": obj.get("vpnType"),
|
||||||
|
"vpnServerName": obj.get("vpnServerName"),
|
||||||
|
"vpnServerAddress": obj.get("vpnServerAddress")
|
||||||
|
})
|
||||||
|
return _obj
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
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 EndpointVpnLogItemType(str, Enum):
|
||||||
|
"""
|
||||||
|
VPN log item type.
|
||||||
|
"""
|
||||||
|
|
||||||
|
"""
|
||||||
|
allowed enum values
|
||||||
|
"""
|
||||||
|
VPN_MINUS_CONNECT = 'vpn-connect'
|
||||||
|
VPN_MINUS_DISCONNECT = 'vpn-disconnect'
|
||||||
|
UNKNOWN = 'unknown'
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_json(cls, json_str: str) -> Self:
|
||||||
|
"""Create an instance of EndpointVpnLogItemType from a JSON string"""
|
||||||
|
return cls(json.loads(json_str))
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def _missing_(cls, value):
|
||||||
|
"""Handle unknown values"""
|
||||||
|
return cls.UNKNOWN
|
||||||
|
|
||||||
@ -0,0 +1,51 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
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 EndpointVpnType(str, Enum):
|
||||||
|
"""
|
||||||
|
VPN vendor or type.
|
||||||
|
"""
|
||||||
|
|
||||||
|
"""
|
||||||
|
allowed enum values
|
||||||
|
"""
|
||||||
|
OPENVPN = 'openvpn'
|
||||||
|
CISCO_MINUS_ANYCONNECT = 'cisco-anyconnect'
|
||||||
|
PALO_MINUS_ALTO_MINUS_GLOBALPROTECT = 'palo-alto-globalprotect'
|
||||||
|
VISCOSITY = 'viscosity'
|
||||||
|
IVANTI_MINUS_CONNECT_MINUS_SECURE = 'ivanti-connect-secure'
|
||||||
|
ZSCALER_MINUS_INTERNET_MINUS_ACCESS = 'zscaler-internet-access'
|
||||||
|
F5_MINUS_BIG_MINUS_IP = 'f5-big-ip'
|
||||||
|
PPTP = 'pptp'
|
||||||
|
L2TP = 'l2tp'
|
||||||
|
SSTP = 'sstp'
|
||||||
|
IKEV2 = 'ikev2'
|
||||||
|
AUTO = 'auto'
|
||||||
|
UNKNOWN = 'unknown'
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_json(cls, json_str: str) -> Self:
|
||||||
|
"""Create an instance of EndpointVpnType from a JSON string"""
|
||||||
|
return cls(json.loads(json_str))
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def _missing_(cls, value):
|
||||||
|
"""Handle unknown values"""
|
||||||
|
return cls.UNKNOWN
|
||||||
|
|
||||||
@ -0,0 +1,162 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
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.endpoint_agents.models.endpoint_wifi_log_item_type import EndpointWifiLogItemType
|
||||||
|
from thousandeyes_sdk.endpoint_agents.models.endpoint_wireless_connection_failure import EndpointWirelessConnectionFailure
|
||||||
|
from typing import Optional, Set
|
||||||
|
from typing_extensions import Self
|
||||||
|
|
||||||
|
class EndpointWifiLogItem(BaseModel):
|
||||||
|
"""
|
||||||
|
EndpointWifiLogItem
|
||||||
|
""" # noqa: E501
|
||||||
|
log_item_type: Optional[EndpointWifiLogItemType] = Field(default=None, alias="logItemType")
|
||||||
|
ssid: Optional[StrictStr] = Field(default=None, description="Wireless network SSID.")
|
||||||
|
bssid: Optional[StrictStr] = Field(default=None, description="Wireless access point BSSID.")
|
||||||
|
bssid_from: Optional[StrictStr] = Field(default=None, description="Previous wireless access point BSSID.", alias="bssidFrom")
|
||||||
|
channel: Optional[StrictStr] = Field(default=None, description="Wireless channel.")
|
||||||
|
channel_from: Optional[StrictStr] = Field(default=None, description="Previous wireless channel.", alias="channelFrom")
|
||||||
|
physical_mode: Optional[StrictStr] = Field(default=None, description="Wireless physical mode.", alias="physicalMode")
|
||||||
|
physical_mode_from: Optional[StrictStr] = Field(default=None, description="Previous wireless physical mode.", alias="physicalModeFrom")
|
||||||
|
failure: Optional[EndpointWirelessConnectionFailure] = None
|
||||||
|
__properties: ClassVar[List[str]] = ["logItemType", "ssid", "bssid", "bssidFrom", "channel", "channelFrom", "physicalMode", "physicalModeFrom", "failure"]
|
||||||
|
|
||||||
|
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 EndpointWifiLogItem 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.
|
||||||
|
* OpenAPI `readOnly` fields are excluded.
|
||||||
|
* OpenAPI `readOnly` fields are excluded.
|
||||||
|
* OpenAPI `readOnly` fields are excluded.
|
||||||
|
* OpenAPI `readOnly` fields are excluded.
|
||||||
|
* OpenAPI `readOnly` fields are excluded.
|
||||||
|
"""
|
||||||
|
excluded_fields: Set[str] = set([
|
||||||
|
"ssid",
|
||||||
|
"bssid",
|
||||||
|
"bssid_from",
|
||||||
|
"channel",
|
||||||
|
"channel_from",
|
||||||
|
"physical_mode",
|
||||||
|
"physical_mode_from",
|
||||||
|
])
|
||||||
|
|
||||||
|
_dict = self.model_dump(
|
||||||
|
by_alias=True,
|
||||||
|
exclude=excluded_fields,
|
||||||
|
exclude_none=True,
|
||||||
|
)
|
||||||
|
# override the default output from pydantic by calling `to_dict()` of failure
|
||||||
|
if self.failure:
|
||||||
|
_dict['failure'] = self.failure.to_dict()
|
||||||
|
# set to None if ssid (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.ssid is None and "ssid" in self.model_fields_set:
|
||||||
|
_dict['ssid'] = None
|
||||||
|
|
||||||
|
# set to None if bssid (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.bssid is None and "bssid" in self.model_fields_set:
|
||||||
|
_dict['bssid'] = None
|
||||||
|
|
||||||
|
# set to None if bssid_from (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.bssid_from is None and "bssid_from" in self.model_fields_set:
|
||||||
|
_dict['bssidFrom'] = None
|
||||||
|
|
||||||
|
# set to None if channel (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.channel is None and "channel" in self.model_fields_set:
|
||||||
|
_dict['channel'] = None
|
||||||
|
|
||||||
|
# set to None if channel_from (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.channel_from is None and "channel_from" in self.model_fields_set:
|
||||||
|
_dict['channelFrom'] = None
|
||||||
|
|
||||||
|
# set to None if physical_mode (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.physical_mode is None and "physical_mode" in self.model_fields_set:
|
||||||
|
_dict['physicalMode'] = None
|
||||||
|
|
||||||
|
# set to None if physical_mode_from (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.physical_mode_from is None and "physical_mode_from" in self.model_fields_set:
|
||||||
|
_dict['physicalModeFrom'] = None
|
||||||
|
|
||||||
|
# set to None if failure (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.failure is None and "failure" in self.model_fields_set:
|
||||||
|
_dict['failure'] = None
|
||||||
|
|
||||||
|
return _dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||||
|
"""Create an instance of EndpointWifiLogItem from a dict"""
|
||||||
|
if obj is None:
|
||||||
|
return None
|
||||||
|
|
||||||
|
if not isinstance(obj, dict):
|
||||||
|
return cls.model_validate(obj)
|
||||||
|
|
||||||
|
_obj = cls.model_validate({
|
||||||
|
"logItemType": obj.get("logItemType"),
|
||||||
|
"ssid": obj.get("ssid"),
|
||||||
|
"bssid": obj.get("bssid"),
|
||||||
|
"bssidFrom": obj.get("bssidFrom"),
|
||||||
|
"channel": obj.get("channel"),
|
||||||
|
"channelFrom": obj.get("channelFrom"),
|
||||||
|
"physicalMode": obj.get("physicalMode"),
|
||||||
|
"physicalModeFrom": obj.get("physicalModeFrom"),
|
||||||
|
"failure": EndpointWirelessConnectionFailure.from_dict(obj["failure"]) if obj.get("failure") is not None else None
|
||||||
|
})
|
||||||
|
return _obj
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
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 EndpointWifiLogItemType(str, Enum):
|
||||||
|
"""
|
||||||
|
Wi-Fi log item type.
|
||||||
|
"""
|
||||||
|
|
||||||
|
"""
|
||||||
|
allowed enum values
|
||||||
|
"""
|
||||||
|
WIFI_MINUS_CHANGE = 'wifi-change'
|
||||||
|
WIFI_MINUS_CONNECT = 'wifi-connect'
|
||||||
|
WIFI_MINUS_DISCONNECT = 'wifi-disconnect'
|
||||||
|
WIFI_MINUS_CONNECTION_MINUS_FAILURE = 'wifi-connection-failure'
|
||||||
|
UNKNOWN = 'unknown'
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_json(cls, json_str: str) -> Self:
|
||||||
|
"""Create an instance of EndpointWifiLogItemType from a JSON string"""
|
||||||
|
return cls(json.loads(json_str))
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def _missing_(cls, value):
|
||||||
|
"""Handle unknown values"""
|
||||||
|
return cls.UNKNOWN
|
||||||
|
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
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.endpoint_agents.models.endpoint_wireless_connection_failure_type import EndpointWirelessConnectionFailureType
|
||||||
|
from typing import Optional, Set
|
||||||
|
from typing_extensions import Self
|
||||||
|
|
||||||
|
class EndpointWirelessConnectionFailure(BaseModel):
|
||||||
|
"""
|
||||||
|
EndpointWirelessConnectionFailure
|
||||||
|
""" # noqa: E501
|
||||||
|
type: Optional[EndpointWirelessConnectionFailureType] = None
|
||||||
|
context: Optional[StrictStr] = Field(default=None, description="Additional context for the wireless connection failure.")
|
||||||
|
code: Optional[StrictInt] = Field(default=None, description="Wireless connection failure code.")
|
||||||
|
__properties: ClassVar[List[str]] = ["type", "context", "code"]
|
||||||
|
|
||||||
|
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 EndpointWirelessConnectionFailure 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([
|
||||||
|
"context",
|
||||||
|
"code",
|
||||||
|
])
|
||||||
|
|
||||||
|
_dict = self.model_dump(
|
||||||
|
by_alias=True,
|
||||||
|
exclude=excluded_fields,
|
||||||
|
exclude_none=True,
|
||||||
|
)
|
||||||
|
# set to None if context (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.context is None and "context" in self.model_fields_set:
|
||||||
|
_dict['context'] = None
|
||||||
|
|
||||||
|
# set to None if code (nullable) is None
|
||||||
|
# and model_fields_set contains the field
|
||||||
|
if self.code is None and "code" in self.model_fields_set:
|
||||||
|
_dict['code'] = None
|
||||||
|
|
||||||
|
return _dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
||||||
|
"""Create an instance of EndpointWirelessConnectionFailure 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"),
|
||||||
|
"context": obj.get("context"),
|
||||||
|
"code": obj.get("code")
|
||||||
|
})
|
||||||
|
return _obj
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
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 EndpointWirelessConnectionFailureType(str, Enum):
|
||||||
|
"""
|
||||||
|
Wireless connection failure phase.
|
||||||
|
"""
|
||||||
|
|
||||||
|
"""
|
||||||
|
allowed enum values
|
||||||
|
"""
|
||||||
|
INIT = 'init'
|
||||||
|
AUTH = 'auth'
|
||||||
|
ASSOC = 'assoc'
|
||||||
|
EAP = 'eap'
|
||||||
|
DHCP = 'dhcp'
|
||||||
|
UNKNOWN = 'unknown'
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_json(cls, json_str: str) -> Self:
|
||||||
|
"""Create an instance of EndpointWirelessConnectionFailureType from a JSON string"""
|
||||||
|
return cls(json.loads(json_str))
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def _missing_(cls, value):
|
||||||
|
"""Handle unknown values"""
|
||||||
|
return cls.UNKNOWN
|
||||||
|
|
||||||
@ -30,6 +30,7 @@ class Platform(str, Enum):
|
|||||||
PHONEOS = 'phoneos'
|
PHONEOS = 'phoneos'
|
||||||
ELUX = 'elux'
|
ELUX = 'elux'
|
||||||
CISCO_MINUS_WIRELESS = 'cisco-wireless'
|
CISCO_MINUS_WIRELESS = 'cisco-wireless'
|
||||||
|
CISCO_MINUS_WIRELESS_MINUS_CLOUD = 'cisco-wireless-cloud'
|
||||||
LINUX = 'linux'
|
LINUX = 'linux'
|
||||||
MAC = 'mac'
|
MAC = 'mac'
|
||||||
ANDROID = 'android'
|
ANDROID = 'android'
|
||||||
|
|||||||
@ -0,0 +1,129 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
|
||||||
|
Do not edit the class manually.
|
||||||
|
""" # noqa: E501
|
||||||
|
|
||||||
|
|
||||||
|
import json
|
||||||
|
import unittest
|
||||||
|
import thousandeyes_sdk.endpoint_agents.models
|
||||||
|
|
||||||
|
from .test_utils import assert_constructed_model_matches_example_json
|
||||||
|
from thousandeyes_sdk.endpoint_agents.api.endpoint_agent_log_items_api import EndpointAgentLogItemsApi
|
||||||
|
|
||||||
|
|
||||||
|
class TestEndpointAgentLogItemsApi(unittest.TestCase):
|
||||||
|
"""EndpointAgentLogItemsApi unit test stubs"""
|
||||||
|
|
||||||
|
def setUp(self) -> None:
|
||||||
|
self.api = EndpointAgentLogItemsApi()
|
||||||
|
|
||||||
|
def tearDown(self) -> None:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def test_get_endpoint_agent_log_items_models_validation(self) -> None:
|
||||||
|
"""Test case for get_endpoint_agent_log_items request and response models"""
|
||||||
|
|
||||||
|
response_body_json = """
|
||||||
|
{
|
||||||
|
"_links" : {
|
||||||
|
"next" : {
|
||||||
|
"hreflang" : "hreflang",
|
||||||
|
"templated" : true,
|
||||||
|
"profile" : "profile",
|
||||||
|
"name" : "name",
|
||||||
|
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
||||||
|
"type" : "type",
|
||||||
|
"deprecation" : "deprecation",
|
||||||
|
"title" : "title"
|
||||||
|
},
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"logs" : [ {
|
||||||
|
"wifiLogItem" : {
|
||||||
|
"bssidFrom" : "00:11:22:33:44:54",
|
||||||
|
"bssid" : "00:11:22:33:44:55",
|
||||||
|
"failure" : {
|
||||||
|
"code" : 4,
|
||||||
|
"context" : "WPA authentication failed",
|
||||||
|
"type" : "auth"
|
||||||
|
},
|
||||||
|
"logItemType" : "wifi-connect",
|
||||||
|
"channel" : "36",
|
||||||
|
"physicalMode" : "802.11ac",
|
||||||
|
"physicalModeFrom" : "802.11n",
|
||||||
|
"ssid" : "CorpWiFi",
|
||||||
|
"channelFrom" : "11"
|
||||||
|
},
|
||||||
|
"agentLogItemType" : "wifi",
|
||||||
|
"onlineOfflineLogItem" : {
|
||||||
|
"logItemType" : "online"
|
||||||
|
},
|
||||||
|
"id" : "8d23f1b7-74ef-4e0c-925c-58601fc0662d",
|
||||||
|
"vpnLogItem" : {
|
||||||
|
"logItemType" : "vpn-connect",
|
||||||
|
"vpnServerName" : "vpn-us-west",
|
||||||
|
"vpnType" : "cisco-anyconnect",
|
||||||
|
"vpnServerAddress" : "192.0.2.10"
|
||||||
|
},
|
||||||
|
"stateChangesLogItem" : {
|
||||||
|
"logItemType" : "enabled"
|
||||||
|
},
|
||||||
|
"timestampMs" : 1709240000000
|
||||||
|
}, {
|
||||||
|
"wifiLogItem" : {
|
||||||
|
"bssidFrom" : "00:11:22:33:44:54",
|
||||||
|
"bssid" : "00:11:22:33:44:55",
|
||||||
|
"failure" : {
|
||||||
|
"code" : 4,
|
||||||
|
"context" : "WPA authentication failed",
|
||||||
|
"type" : "auth"
|
||||||
|
},
|
||||||
|
"logItemType" : "wifi-connect",
|
||||||
|
"channel" : "36",
|
||||||
|
"physicalMode" : "802.11ac",
|
||||||
|
"physicalModeFrom" : "802.11n",
|
||||||
|
"ssid" : "CorpWiFi",
|
||||||
|
"channelFrom" : "11"
|
||||||
|
},
|
||||||
|
"agentLogItemType" : "wifi",
|
||||||
|
"onlineOfflineLogItem" : {
|
||||||
|
"logItemType" : "online"
|
||||||
|
},
|
||||||
|
"id" : "8d23f1b7-74ef-4e0c-925c-58601fc0662d",
|
||||||
|
"vpnLogItem" : {
|
||||||
|
"logItemType" : "vpn-connect",
|
||||||
|
"vpnServerName" : "vpn-us-west",
|
||||||
|
"vpnType" : "cisco-anyconnect",
|
||||||
|
"vpnServerAddress" : "192.0.2.10"
|
||||||
|
},
|
||||||
|
"stateChangesLogItem" : {
|
||||||
|
"logItemType" : "enabled"
|
||||||
|
},
|
||||||
|
"timestampMs" : 1709240000000
|
||||||
|
} ]
|
||||||
|
}"""
|
||||||
|
|
||||||
|
response_loaded_json = json.loads(response_body_json)
|
||||||
|
response_from_json = thousandeyes_sdk.endpoint_agents.models.EndpointAgentLogItemsResponse.from_json(response_body_json)
|
||||||
|
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
|
||||||
|
"""
|
||||||
|
Endpoint Agents API
|
||||||
|
|
||||||
|
**Note:** The Endpoint Agents Transfer APIs are not available for ThousandEyes for Government instance. Manage ThousandEyes Endpoint Agents using this API. For more information about Endpoint Agents, see [Endpoint Agents](https://docs.thousandeyes.com/product-documentation/global-vantage-points/endpoint-agents).
|
||||||
|
|
||||||
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||||
|
|
||||||
|
Do not edit the class manually.
|
||||||
|
""" # noqa: E501
|
||||||
|
|
||||||
|
|
||||||
|
import json
|
||||||
|
import unittest
|
||||||
|
import thousandeyes_sdk.endpoint_agents.models
|
||||||
|
|
||||||
|
from .test_utils import assert_constructed_model_matches_example_json
|
||||||
|
from thousandeyes_sdk.endpoint_agents.api.endpoint_proxies_api import EndpointProxiesApi
|
||||||
|
|
||||||
|
|
||||||
|
class TestEndpointProxiesApi(unittest.TestCase):
|
||||||
|
"""EndpointProxiesApi unit test stubs"""
|
||||||
|
|
||||||
|
def setUp(self) -> None:
|
||||||
|
self.api = EndpointProxiesApi()
|
||||||
|
|
||||||
|
def tearDown(self) -> None:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def test_get_endpoint_proxies_models_validation(self) -> None:
|
||||||
|
"""Test case for get_endpoint_proxies request and response models"""
|
||||||
|
|
||||||
|
response_body_json = """
|
||||||
|
{
|
||||||
|
"proxies" : [ {
|
||||||
|
"testIds" : [ "9923667", "9923667" ],
|
||||||
|
"agentIds" : [ "861b7557-cd57-4bbb-b648-00bddf88ef49", "861b7557-cd57-4bbb-b648-00bddf88ef49" ],
|
||||||
|
"pac" : "https://example.com/proxy.pac",
|
||||||
|
"port" : 8080,
|
||||||
|
"name" : "Local Mitmproxy",
|
||||||
|
"host" : "localhost",
|
||||||
|
"type" : "static",
|
||||||
|
"userName" : "endpoint-proxy-user",
|
||||||
|
"authType" : "none",
|
||||||
|
"bypassList" : "localhost,127.0.0.1",
|
||||||
|
"proxyId" : "101498"
|
||||||
|
}, {
|
||||||
|
"testIds" : [ "9923667", "9923667" ],
|
||||||
|
"agentIds" : [ "861b7557-cd57-4bbb-b648-00bddf88ef49", "861b7557-cd57-4bbb-b648-00bddf88ef49" ],
|
||||||
|
"pac" : "https://example.com/proxy.pac",
|
||||||
|
"port" : 8080,
|
||||||
|
"name" : "Local Mitmproxy",
|
||||||
|
"host" : "localhost",
|
||||||
|
"type" : "static",
|
||||||
|
"userName" : "endpoint-proxy-user",
|
||||||
|
"authType" : "none",
|
||||||
|
"bypassList" : "localhost,127.0.0.1",
|
||||||
|
"proxyId" : "101498"
|
||||||
|
} ]
|
||||||
|
}"""
|
||||||
|
|
||||||
|
response_loaded_json = json.loads(response_body_json)
|
||||||
|
response_from_json = thousandeyes_sdk.endpoint_agents.models.EndpointProxiesResponse.from_json(response_body_json)
|
||||||
|
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
@ -12,13 +12,13 @@ The URLs for these API test data endpoints are provided within the test definiti
|
|||||||
|
|
||||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||||
|
|
||||||
- API version: 7.0.93
|
- API version: 7.0.96
|
||||||
- Generator version: 7.6.0
|
- Generator version: 7.6.0
|
||||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||||
|
|
||||||
## Requirements.
|
## Requirements.
|
||||||
|
|
||||||
Python 3.8+
|
Python 3.9+
|
||||||
|
|
||||||
## Installation & Usage
|
## Installation & Usage
|
||||||
### pip install
|
### pip install
|
||||||
|
|||||||
@ -7,9 +7,9 @@ authors = [
|
|||||||
]
|
]
|
||||||
description = "ThousandEyes SDK Endpoint Instant Scheduled Tests API"
|
description = "ThousandEyes SDK Endpoint Instant Scheduled Tests API"
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
requires-python = ">= 3.8"
|
requires-python = ">= 3.9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"urllib3 >= 2.0.0",
|
"urllib3 >= 2.6.3",
|
||||||
"python-dateutil >=2.8.2",
|
"python-dateutil >=2.8.2",
|
||||||
"pydantic >=2.1.0",
|
"pydantic >=2.1.0",
|
||||||
"typing-extensions >=4.7.1",
|
"typing-extensions >=4.7.1",
|
||||||
|
|||||||
@ -4,13 +4,13 @@ Manage labels applied to endpoint agents using this API.
|
|||||||
|
|
||||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||||
|
|
||||||
- API version: 7.0.93
|
- API version: 7.0.96
|
||||||
- Generator version: 7.6.0
|
- Generator version: 7.6.0
|
||||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||||
|
|
||||||
## Requirements.
|
## Requirements.
|
||||||
|
|
||||||
Python 3.8+
|
Python 3.9+
|
||||||
|
|
||||||
## Installation & Usage
|
## Installation & Usage
|
||||||
### pip install
|
### pip install
|
||||||
|
|||||||
@ -7,9 +7,9 @@ authors = [
|
|||||||
]
|
]
|
||||||
description = "ThousandEyes SDK Endpoint Agent Labels API"
|
description = "ThousandEyes SDK Endpoint Agent Labels API"
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
requires-python = ">= 3.8"
|
requires-python = ">= 3.9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"urllib3 >= 2.0.0",
|
"urllib3 >= 2.6.3",
|
||||||
"python-dateutil >=2.8.2",
|
"python-dateutil >=2.8.2",
|
||||||
"pydantic >=2.1.0",
|
"pydantic >=2.1.0",
|
||||||
"typing-extensions >=4.7.1",
|
"typing-extensions >=4.7.1",
|
||||||
|
|||||||
@ -3,13 +3,13 @@ Retrieve results for scheduled and dynamic tests on endpoint agents.
|
|||||||
|
|
||||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||||
|
|
||||||
- API version: 7.0.93
|
- API version: 7.0.96
|
||||||
- Generator version: 7.6.0
|
- Generator version: 7.6.0
|
||||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||||
|
|
||||||
## Requirements.
|
## Requirements.
|
||||||
|
|
||||||
Python 3.8+
|
Python 3.9+
|
||||||
|
|
||||||
## Installation & Usage
|
## Installation & Usage
|
||||||
### pip install
|
### pip install
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**results** | [**List[HttpEndpointTestResult]**](HttpEndpointTestResult.md) | | [optional]
|
**results** | [**List[HttpEndpointTestResult]**](HttpEndpointTestResult.md) | | [optional]
|
||||||
|
**total_hits** | **int** | Total number of measurements that match the search criteria. | [optional]
|
||||||
**test** | [**EndpointHttpServerTest**](EndpointHttpServerTest.md) | | [optional]
|
**test** | [**EndpointHttpServerTest**](EndpointHttpServerTest.md) | | [optional]
|
||||||
**start_date** | **datetime** | (Optional) When passing `window` or `startDate` parameter, the client will also receive the `startDate` field indicating the UTC start date of the data's time range being retrieved (ISO date-time format). | [optional] [readonly]
|
**start_date** | **datetime** | (Optional) When passing `window` or `startDate` parameter, the client will also receive the `startDate` field indicating the UTC start date of the data's time range being retrieved (ISO date-time format). | [optional] [readonly]
|
||||||
**end_date** | **datetime** | (Optional) When passing `window` or `endDate` parameter, the client will also receive the `endDate` field indicating the UTC end date of the data's time range being retrieved (ISO date-time format). | [optional] [readonly]
|
**end_date** | **datetime** | (Optional) When passing `window` or `endDate` parameter, the client will also receive the `endDate` field indicating the UTC end date of the data's time range being retrieved (ISO date-time format). | [optional] [readonly]
|
||||||
|
|||||||
@ -11,6 +11,7 @@ Name | Type | Description | Notes
|
|||||||
**phy_mode** | **str** | Wireless network PHY mode. | [optional] [readonly]
|
**phy_mode** | **str** | Wireless network PHY mode. | [optional] [readonly]
|
||||||
**rssi** | **int** | Wireless network RSSI. | [optional] [readonly]
|
**rssi** | **int** | Wireless network RSSI. | [optional] [readonly]
|
||||||
**noise** | **int** | Wireless network noise. | [optional] [readonly]
|
**noise** | **int** | Wireless network noise. | [optional] [readonly]
|
||||||
|
**snr** | **int** | Wireless network signal-to-noise ratio (SNR), in dB. | [optional] [readonly]
|
||||||
**quality** | **int** | Wireless network quality. | [optional] [readonly]
|
**quality** | **int** | Wireless network quality. | [optional] [readonly]
|
||||||
**tx_rate** | **int** | Wireless network transmitted rate. | [optional] [readonly]
|
**tx_rate** | **int** | Wireless network transmitted rate. | [optional] [readonly]
|
||||||
**vendor** | **str** | Wireless network device vendor. | [optional] [readonly]
|
**vendor** | **str** | Wireless network device vendor. | [optional] [readonly]
|
||||||
|
|||||||
@ -7,9 +7,9 @@ authors = [
|
|||||||
]
|
]
|
||||||
description = "ThousandEyes SDK Endpoint Test Results API"
|
description = "ThousandEyes SDK Endpoint Test Results API"
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
requires-python = ">= 3.8"
|
requires-python = ">= 3.9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"urllib3 >= 2.0.0",
|
"urllib3 >= 2.6.3",
|
||||||
"python-dateutil >=2.8.2",
|
"python-dateutil >=2.8.2",
|
||||||
"pydantic >=2.1.0",
|
"pydantic >=2.1.0",
|
||||||
"typing-extensions >=4.7.1",
|
"typing-extensions >=4.7.1",
|
||||||
|
|||||||
@ -17,7 +17,7 @@ import re # noqa: F401
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from pydantic import BaseModel, ConfigDict, Field
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
from typing import Any, ClassVar, Dict, List, Optional
|
||||||
from thousandeyes_sdk.endpoint_test_results.models.endpoint_http_server_test import EndpointHttpServerTest
|
from thousandeyes_sdk.endpoint_test_results.models.endpoint_http_server_test import EndpointHttpServerTest
|
||||||
from thousandeyes_sdk.endpoint_test_results.models.http_endpoint_test_result import HttpEndpointTestResult
|
from thousandeyes_sdk.endpoint_test_results.models.http_endpoint_test_result import HttpEndpointTestResult
|
||||||
@ -30,11 +30,12 @@ class HttpEndpointTestResults(BaseModel):
|
|||||||
HttpEndpointTestResults
|
HttpEndpointTestResults
|
||||||
""" # noqa: E501
|
""" # noqa: E501
|
||||||
results: Optional[List[HttpEndpointTestResult]] = None
|
results: Optional[List[HttpEndpointTestResult]] = None
|
||||||
|
total_hits: Optional[StrictInt] = Field(default=None, description="Total number of measurements that match the search criteria.", alias="totalHits")
|
||||||
test: Optional[EndpointHttpServerTest] = None
|
test: Optional[EndpointHttpServerTest] = None
|
||||||
start_date: Optional[datetime] = Field(default=None, description="(Optional) When passing `window` or `startDate` parameter, the client will also receive the `startDate` field indicating the UTC start date of the data's time range being retrieved (ISO date-time format).", alias="startDate")
|
start_date: Optional[datetime] = Field(default=None, description="(Optional) When passing `window` or `startDate` parameter, the client will also receive the `startDate` field indicating the UTC start date of the data's time range being retrieved (ISO date-time format).", alias="startDate")
|
||||||
end_date: Optional[datetime] = Field(default=None, description="(Optional) When passing `window` or `endDate` parameter, the client will also receive the `endDate` field indicating the UTC end date of the data's time range being retrieved (ISO date-time format).", alias="endDate")
|
end_date: Optional[datetime] = Field(default=None, description="(Optional) When passing `window` or `endDate` parameter, the client will also receive the `endDate` field indicating the UTC end date of the data's time range being retrieved (ISO date-time format).", alias="endDate")
|
||||||
links: Optional[PaginationNextAndSelfLink] = Field(default=None, alias="_links")
|
links: Optional[PaginationNextAndSelfLink] = Field(default=None, alias="_links")
|
||||||
__properties: ClassVar[List[str]] = ["results", "test", "startDate", "endDate", "_links"]
|
__properties: ClassVar[List[str]] = ["results", "totalHits", "test", "startDate", "endDate", "_links"]
|
||||||
|
|
||||||
model_config = ConfigDict(
|
model_config = ConfigDict(
|
||||||
populate_by_name=True,
|
populate_by_name=True,
|
||||||
@ -106,6 +107,7 @@ class HttpEndpointTestResults(BaseModel):
|
|||||||
|
|
||||||
_obj = cls.model_validate({
|
_obj = cls.model_validate({
|
||||||
"results": [HttpEndpointTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None,
|
"results": [HttpEndpointTestResult.from_dict(_item) for _item in obj["results"]] if obj.get("results") is not None else None,
|
||||||
|
"totalHits": obj.get("totalHits"),
|
||||||
"test": EndpointHttpServerTest.from_dict(obj["test"]) if obj.get("test") is not None else None,
|
"test": EndpointHttpServerTest.from_dict(obj["test"]) if obj.get("test") is not None else None,
|
||||||
"startDate": obj.get("startDate"),
|
"startDate": obj.get("startDate"),
|
||||||
"endDate": obj.get("endDate"),
|
"endDate": obj.get("endDate"),
|
||||||
|
|||||||
@ -31,10 +31,11 @@ class NetworkWirelessProfile(BaseModel):
|
|||||||
phy_mode: Optional[StrictStr] = Field(default=None, description="Wireless network PHY mode.", alias="phyMode")
|
phy_mode: Optional[StrictStr] = Field(default=None, description="Wireless network PHY mode.", alias="phyMode")
|
||||||
rssi: Optional[StrictInt] = Field(default=None, description="Wireless network RSSI.")
|
rssi: Optional[StrictInt] = Field(default=None, description="Wireless network RSSI.")
|
||||||
noise: Optional[StrictInt] = Field(default=None, description="Wireless network noise.")
|
noise: Optional[StrictInt] = Field(default=None, description="Wireless network noise.")
|
||||||
|
snr: Optional[StrictInt] = Field(default=None, description="Wireless network signal-to-noise ratio (SNR), in dB.")
|
||||||
quality: Optional[StrictInt] = Field(default=None, description="Wireless network quality.")
|
quality: Optional[StrictInt] = Field(default=None, description="Wireless network quality.")
|
||||||
tx_rate: Optional[StrictInt] = Field(default=None, description="Wireless network transmitted rate.", alias="txRate")
|
tx_rate: Optional[StrictInt] = Field(default=None, description="Wireless network transmitted rate.", alias="txRate")
|
||||||
vendor: Optional[StrictStr] = Field(default=None, description="Wireless network device vendor.")
|
vendor: Optional[StrictStr] = Field(default=None, description="Wireless network device vendor.")
|
||||||
__properties: ClassVar[List[str]] = ["ssid", "bssid", "channel", "phyMode", "rssi", "noise", "quality", "txRate", "vendor"]
|
__properties: ClassVar[List[str]] = ["ssid", "bssid", "channel", "phyMode", "rssi", "noise", "snr", "quality", "txRate", "vendor"]
|
||||||
|
|
||||||
model_config = ConfigDict(
|
model_config = ConfigDict(
|
||||||
populate_by_name=True,
|
populate_by_name=True,
|
||||||
@ -76,6 +77,7 @@ class NetworkWirelessProfile(BaseModel):
|
|||||||
* OpenAPI `readOnly` fields are excluded.
|
* OpenAPI `readOnly` fields are excluded.
|
||||||
* OpenAPI `readOnly` fields are excluded.
|
* OpenAPI `readOnly` fields are excluded.
|
||||||
* OpenAPI `readOnly` fields are excluded.
|
* OpenAPI `readOnly` fields are excluded.
|
||||||
|
* OpenAPI `readOnly` fields are excluded.
|
||||||
"""
|
"""
|
||||||
excluded_fields: Set[str] = set([
|
excluded_fields: Set[str] = set([
|
||||||
"ssid",
|
"ssid",
|
||||||
@ -84,6 +86,7 @@ class NetworkWirelessProfile(BaseModel):
|
|||||||
"phy_mode",
|
"phy_mode",
|
||||||
"rssi",
|
"rssi",
|
||||||
"noise",
|
"noise",
|
||||||
|
"snr",
|
||||||
"quality",
|
"quality",
|
||||||
"tx_rate",
|
"tx_rate",
|
||||||
"vendor",
|
"vendor",
|
||||||
@ -112,6 +115,7 @@ class NetworkWirelessProfile(BaseModel):
|
|||||||
"phyMode": obj.get("phyMode"),
|
"phyMode": obj.get("phyMode"),
|
||||||
"rssi": obj.get("rssi"),
|
"rssi": obj.get("rssi"),
|
||||||
"noise": obj.get("noise"),
|
"noise": obj.get("noise"),
|
||||||
|
"snr": obj.get("snr"),
|
||||||
"quality": obj.get("quality"),
|
"quality": obj.get("quality"),
|
||||||
"txRate": obj.get("txRate"),
|
"txRate": obj.get("txRate"),
|
||||||
"vendor": obj.get("vendor")
|
"vendor": obj.get("vendor")
|
||||||
|
|||||||
@ -30,6 +30,7 @@ class Platform(str, Enum):
|
|||||||
PHONEOS = 'phoneos'
|
PHONEOS = 'phoneos'
|
||||||
ELUX = 'elux'
|
ELUX = 'elux'
|
||||||
CISCO_MINUS_WIRELESS = 'cisco-wireless'
|
CISCO_MINUS_WIRELESS = 'cisco-wireless'
|
||||||
|
CISCO_MINUS_WIRELESS_MINUS_CLOUD = 'cisco-wireless-cloud'
|
||||||
LINUX = 'linux'
|
LINUX = 'linux'
|
||||||
MAC = 'mac'
|
MAC = 'mac'
|
||||||
ANDROID = 'android'
|
ANDROID = 'android'
|
||||||
|
|||||||
@ -93,6 +93,7 @@ class TestHTTPServerEndpointScheduledTestResultsApi(unittest.TestCase):
|
|||||||
"username" : "username",
|
"username" : "username",
|
||||||
"sslVersionId" : "0"
|
"sslVersionId" : "0"
|
||||||
},
|
},
|
||||||
|
"totalHits" : 12,
|
||||||
"endDate" : "2022-07-18T22:00:54Z",
|
"endDate" : "2022-07-18T22:00:54Z",
|
||||||
"_links" : {
|
"_links" : {
|
||||||
"next" : {
|
"next" : {
|
||||||
@ -193,6 +194,7 @@ class TestHTTPServerEndpointScheduledTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
@ -321,6 +323,7 @@ class TestHTTPServerEndpointScheduledTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
@ -518,6 +521,7 @@ class TestHTTPServerEndpointScheduledTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
@ -646,6 +650,7 @@ class TestHTTPServerEndpointScheduledTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
@ -843,6 +848,7 @@ class TestHTTPServerEndpointScheduledTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
@ -971,6 +977,7 @@ class TestHTTPServerEndpointScheduledTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
|
|||||||
@ -553,6 +553,7 @@ class TestLocalNetworkEndpointTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
@ -836,6 +837,7 @@ class TestLocalNetworkEndpointTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
|
|||||||
@ -206,6 +206,7 @@ class TestNetworkDynamicEndpointTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
@ -347,6 +348,7 @@ class TestNetworkDynamicEndpointTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
@ -676,6 +678,7 @@ class TestNetworkDynamicEndpointTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
@ -890,6 +893,7 @@ class TestNetworkDynamicEndpointTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
@ -1115,6 +1119,7 @@ class TestNetworkDynamicEndpointTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
@ -1257,6 +1262,7 @@ class TestNetworkDynamicEndpointTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
|
|||||||
@ -228,6 +228,7 @@ class TestNetworkEndpointScheduledTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
@ -358,6 +359,7 @@ class TestNetworkEndpointScheduledTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
@ -546,6 +548,7 @@ class TestNetworkEndpointScheduledTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
@ -676,6 +679,7 @@ class TestNetworkEndpointScheduledTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
@ -967,6 +971,7 @@ class TestNetworkEndpointScheduledTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
@ -1170,6 +1175,7 @@ class TestNetworkEndpointScheduledTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
@ -1384,6 +1390,7 @@ class TestNetworkEndpointScheduledTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
@ -1515,6 +1522,7 @@ class TestNetworkEndpointScheduledTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
|
|||||||
@ -717,6 +717,7 @@ class TestRealUserEndpointTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
@ -911,6 +912,7 @@ class TestRealUserEndpointTestResultsApi(unittest.TestCase):
|
|||||||
"wirelessProfile" : {
|
"wirelessProfile" : {
|
||||||
"rssi" : -38,
|
"rssi" : -38,
|
||||||
"bssid" : "4c:ba:ba:f4:fa:fa",
|
"bssid" : "4c:ba:ba:f4:fa:fa",
|
||||||
|
"snr" : 57,
|
||||||
"vendor" : "Cisco",
|
"vendor" : "Cisco",
|
||||||
"txRate" : 130,
|
"txRate" : 130,
|
||||||
"channel" : 1,
|
"channel" : 1,
|
||||||
|
|||||||
@ -25,7 +25,12 @@ docs/EndpointHttpServerTests.md
|
|||||||
docs/EndpointHttpTestUpdate.md
|
docs/EndpointHttpTestUpdate.md
|
||||||
docs/EndpointInstantTest.md
|
docs/EndpointInstantTest.md
|
||||||
docs/EndpointIpVersionIn.md
|
docs/EndpointIpVersionIn.md
|
||||||
|
docs/EndpointMonitoringSettings.md
|
||||||
|
docs/EndpointMonitoringSettingsType.md
|
||||||
docs/EndpointNetworkTestUpdate.md
|
docs/EndpointNetworkTestUpdate.md
|
||||||
|
docs/EndpointRealUserTest.md
|
||||||
|
docs/EndpointRealUserTestsApi.md
|
||||||
|
docs/EndpointRealUserTestsResponse.md
|
||||||
docs/EndpointScheduledTestType.md
|
docs/EndpointScheduledTestType.md
|
||||||
docs/EndpointScheduledTestsApi.md
|
docs/EndpointScheduledTestsApi.md
|
||||||
docs/EndpointSpecificAgentsSelectorConfig.md
|
docs/EndpointSpecificAgentsSelectorConfig.md
|
||||||
@ -55,6 +60,7 @@ src/thousandeyes_sdk/endpoint_tests/__init__.py
|
|||||||
src/thousandeyes_sdk/endpoint_tests/api/__init__.py
|
src/thousandeyes_sdk/endpoint_tests/api/__init__.py
|
||||||
src/thousandeyes_sdk/endpoint_tests/api/agent_to_server_endpoint_dynamic_tests_api.py
|
src/thousandeyes_sdk/endpoint_tests/api/agent_to_server_endpoint_dynamic_tests_api.py
|
||||||
src/thousandeyes_sdk/endpoint_tests/api/agent_to_server_endpoint_scheduled_tests_api.py
|
src/thousandeyes_sdk/endpoint_tests/api/agent_to_server_endpoint_scheduled_tests_api.py
|
||||||
|
src/thousandeyes_sdk/endpoint_tests/api/endpoint_real_user_tests_api.py
|
||||||
src/thousandeyes_sdk/endpoint_tests/api/endpoint_scheduled_tests_api.py
|
src/thousandeyes_sdk/endpoint_tests/api/endpoint_scheduled_tests_api.py
|
||||||
src/thousandeyes_sdk/endpoint_tests/api/http_server_endpoint_scheduled_tests_api.py
|
src/thousandeyes_sdk/endpoint_tests/api/http_server_endpoint_scheduled_tests_api.py
|
||||||
src/thousandeyes_sdk/endpoint_tests/models/__init__.py
|
src/thousandeyes_sdk/endpoint_tests/models/__init__.py
|
||||||
@ -80,7 +86,11 @@ src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_server_tests.py
|
|||||||
src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_test_update.py
|
src/thousandeyes_sdk/endpoint_tests/models/endpoint_http_test_update.py
|
||||||
src/thousandeyes_sdk/endpoint_tests/models/endpoint_instant_test.py
|
src/thousandeyes_sdk/endpoint_tests/models/endpoint_instant_test.py
|
||||||
src/thousandeyes_sdk/endpoint_tests/models/endpoint_ip_version_in.py
|
src/thousandeyes_sdk/endpoint_tests/models/endpoint_ip_version_in.py
|
||||||
|
src/thousandeyes_sdk/endpoint_tests/models/endpoint_monitoring_settings.py
|
||||||
|
src/thousandeyes_sdk/endpoint_tests/models/endpoint_monitoring_settings_type.py
|
||||||
src/thousandeyes_sdk/endpoint_tests/models/endpoint_network_test_update.py
|
src/thousandeyes_sdk/endpoint_tests/models/endpoint_network_test_update.py
|
||||||
|
src/thousandeyes_sdk/endpoint_tests/models/endpoint_real_user_test.py
|
||||||
|
src/thousandeyes_sdk/endpoint_tests/models/endpoint_real_user_tests_response.py
|
||||||
src/thousandeyes_sdk/endpoint_tests/models/endpoint_scheduled_test_type.py
|
src/thousandeyes_sdk/endpoint_tests/models/endpoint_scheduled_test_type.py
|
||||||
src/thousandeyes_sdk/endpoint_tests/models/endpoint_specific_agents_selector_config.py
|
src/thousandeyes_sdk/endpoint_tests/models/endpoint_specific_agents_selector_config.py
|
||||||
src/thousandeyes_sdk/endpoint_tests/models/endpoint_test.py
|
src/thousandeyes_sdk/endpoint_tests/models/endpoint_test.py
|
||||||
@ -106,6 +116,7 @@ src/thousandeyes_sdk/endpoint_tests/py.typed
|
|||||||
test/__init__.py
|
test/__init__.py
|
||||||
test/test_agent_to_server_endpoint_dynamic_tests_api.py
|
test/test_agent_to_server_endpoint_dynamic_tests_api.py
|
||||||
test/test_agent_to_server_endpoint_scheduled_tests_api.py
|
test/test_agent_to_server_endpoint_scheduled_tests_api.py
|
||||||
|
test/test_endpoint_real_user_tests_api.py
|
||||||
test/test_endpoint_scheduled_tests_api.py
|
test/test_endpoint_scheduled_tests_api.py
|
||||||
test/test_http_server_endpoint_scheduled_tests_api.py
|
test/test_http_server_endpoint_scheduled_tests_api.py
|
||||||
test/test_utils.py
|
test/test_utils.py
|
||||||
|
|||||||
@ -4,13 +4,13 @@ Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API.
|
|||||||
|
|
||||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||||
|
|
||||||
- API version: 7.0.93
|
- API version: 7.0.96
|
||||||
- Generator version: 7.6.0
|
- Generator version: 7.6.0
|
||||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
||||||
|
|
||||||
## Requirements.
|
## Requirements.
|
||||||
|
|
||||||
Python 3.8+
|
Python 3.9+
|
||||||
|
|
||||||
## Installation & Usage
|
## Installation & Usage
|
||||||
### pip install
|
### pip install
|
||||||
@ -106,6 +106,7 @@ Class | Method | HTTP request | Description
|
|||||||
*AgentToServerEndpointScheduledTestsApi* | [**get_agent_to_server_endpoint_scheduled_test**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/AgentToServerEndpointScheduledTestsApi.md#get_agent_to_server_endpoint_scheduled_test) | **GET** /endpoint/tests/scheduled-tests/agent-to-server/{testId} | Retrieve agent to server endpoint scheduled test
|
*AgentToServerEndpointScheduledTestsApi* | [**get_agent_to_server_endpoint_scheduled_test**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/AgentToServerEndpointScheduledTestsApi.md#get_agent_to_server_endpoint_scheduled_test) | **GET** /endpoint/tests/scheduled-tests/agent-to-server/{testId} | Retrieve agent to server endpoint scheduled test
|
||||||
*AgentToServerEndpointScheduledTestsApi* | [**get_agent_to_server_endpoint_scheduled_tests**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/AgentToServerEndpointScheduledTestsApi.md#get_agent_to_server_endpoint_scheduled_tests) | **GET** /endpoint/tests/scheduled-tests/agent-to-server | List agent to server endpoint scheduled tests
|
*AgentToServerEndpointScheduledTestsApi* | [**get_agent_to_server_endpoint_scheduled_tests**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/AgentToServerEndpointScheduledTestsApi.md#get_agent_to_server_endpoint_scheduled_tests) | **GET** /endpoint/tests/scheduled-tests/agent-to-server | List agent to server endpoint scheduled tests
|
||||||
*AgentToServerEndpointScheduledTestsApi* | [**update_agent_to_server_endpoint_scheduled_test**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/AgentToServerEndpointScheduledTestsApi.md#update_agent_to_server_endpoint_scheduled_test) | **PATCH** /endpoint/tests/scheduled-tests/agent-to-server/{testId} | Update agent to server endpoint scheduled test
|
*AgentToServerEndpointScheduledTestsApi* | [**update_agent_to_server_endpoint_scheduled_test**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/AgentToServerEndpointScheduledTestsApi.md#update_agent_to_server_endpoint_scheduled_test) | **PATCH** /endpoint/tests/scheduled-tests/agent-to-server/{testId} | Update agent to server endpoint scheduled test
|
||||||
|
*EndpointRealUserTestsApi* | [**get_endpoint_real_user_tests**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointRealUserTestsApi.md#get_endpoint_real_user_tests) | **GET** /endpoint/tests/real-user-tests | List endpoint real user tests
|
||||||
*EndpointScheduledTestsApi* | [**get_endpoint_scheduled_tests**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointScheduledTestsApi.md#get_endpoint_scheduled_tests) | **GET** /endpoint/tests/scheduled-tests | List endpoint scheduled tests
|
*EndpointScheduledTestsApi* | [**get_endpoint_scheduled_tests**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointScheduledTestsApi.md#get_endpoint_scheduled_tests) | **GET** /endpoint/tests/scheduled-tests | List endpoint scheduled tests
|
||||||
*HTTPServerEndpointScheduledTestsApi* | [**create_http_server_endpoint_scheduled_test**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/HTTPServerEndpointScheduledTestsApi.md#create_http_server_endpoint_scheduled_test) | **POST** /endpoint/tests/scheduled-tests/http-server | Create HTTP server endpoint scheduled test
|
*HTTPServerEndpointScheduledTestsApi* | [**create_http_server_endpoint_scheduled_test**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/HTTPServerEndpointScheduledTestsApi.md#create_http_server_endpoint_scheduled_test) | **POST** /endpoint/tests/scheduled-tests/http-server | Create HTTP server endpoint scheduled test
|
||||||
*HTTPServerEndpointScheduledTestsApi* | [**delete_http_server_endpoint_scheduled_test**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/HTTPServerEndpointScheduledTestsApi.md#delete_http_server_endpoint_scheduled_test) | **DELETE** /endpoint/tests/scheduled-tests/http-server/{testId} | Delete HTTP server scheduled test
|
*HTTPServerEndpointScheduledTestsApi* | [**delete_http_server_endpoint_scheduled_test**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/HTTPServerEndpointScheduledTestsApi.md#delete_http_server_endpoint_scheduled_test) | **DELETE** /endpoint/tests/scheduled-tests/http-server/{testId} | Delete HTTP server scheduled test
|
||||||
@ -138,7 +139,11 @@ Class | Method | HTTP request | Description
|
|||||||
- [EndpointHttpTestUpdate](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointHttpTestUpdate.md)
|
- [EndpointHttpTestUpdate](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointHttpTestUpdate.md)
|
||||||
- [EndpointInstantTest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointInstantTest.md)
|
- [EndpointInstantTest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointInstantTest.md)
|
||||||
- [EndpointIpVersionIn](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointIpVersionIn.md)
|
- [EndpointIpVersionIn](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointIpVersionIn.md)
|
||||||
|
- [EndpointMonitoringSettings](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointMonitoringSettings.md)
|
||||||
|
- [EndpointMonitoringSettingsType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointMonitoringSettingsType.md)
|
||||||
- [EndpointNetworkTestUpdate](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointNetworkTestUpdate.md)
|
- [EndpointNetworkTestUpdate](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointNetworkTestUpdate.md)
|
||||||
|
- [EndpointRealUserTest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointRealUserTest.md)
|
||||||
|
- [EndpointRealUserTestsResponse](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointRealUserTestsResponse.md)
|
||||||
- [EndpointScheduledTestType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointScheduledTestType.md)
|
- [EndpointScheduledTestType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointScheduledTestType.md)
|
||||||
- [EndpointSpecificAgentsSelectorConfig](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointSpecificAgentsSelectorConfig.md)
|
- [EndpointSpecificAgentsSelectorConfig](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointSpecificAgentsSelectorConfig.md)
|
||||||
- [EndpointTest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointTest.md)
|
- [EndpointTest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-endpoint-tests/docs/EndpointTest.md)
|
||||||
|
|||||||
@ -0,0 +1,33 @@
|
|||||||
|
# EndpointMonitoringSettings
|
||||||
|
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**monitoring_settings_id** | **str** | Unique ID of the monitoring settings. | [optional] [readonly]
|
||||||
|
**monitoring_settings_type** | [**EndpointMonitoringSettingsType**](EndpointMonitoringSettingsType.md) | |
|
||||||
|
**agent_ids** | **List[str]** | Endpoint Agent IDs selected by the monitoring settings. | [optional]
|
||||||
|
**tag_ids** | **List[str]** | Endpoint Agent tag IDs selected by the monitoring settings. | [optional]
|
||||||
|
**label_ids** | **List[str]** | Legacy Endpoint Agent label IDs selected by the monitoring settings. | [optional]
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from thousandeyes_sdk.endpoint_tests.models.endpoint_monitoring_settings import EndpointMonitoringSettings
|
||||||
|
|
||||||
|
# TODO update the JSON string below
|
||||||
|
json = "{}"
|
||||||
|
# create an instance of EndpointMonitoringSettings from a JSON string
|
||||||
|
endpoint_monitoring_settings_instance = EndpointMonitoringSettings.from_json(json)
|
||||||
|
# print the JSON string representation of the object
|
||||||
|
print(EndpointMonitoringSettings.to_json())
|
||||||
|
|
||||||
|
# convert the object into a dict
|
||||||
|
endpoint_monitoring_settings_dict = endpoint_monitoring_settings_instance.to_dict()
|
||||||
|
# create an instance of EndpointMonitoringSettings from a dict
|
||||||
|
endpoint_monitoring_settings_from_dict = EndpointMonitoringSettings.from_dict(endpoint_monitoring_settings_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)
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
# EndpointMonitoringSettingsType
|
||||||
|
|
||||||
|
Endpoint Agent selector type used by the monitoring settings.
|
||||||
|
|
||||||
|
## 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)
|
||||||
|
|
||||||
|
|
||||||
34
thousandeyes-sdk-endpoint-tests/docs/EndpointRealUserTest.md
Normal file
34
thousandeyes-sdk-endpoint-tests/docs/EndpointRealUserTest.md
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# EndpointRealUserTest
|
||||||
|
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**profile_id** | **str** | Unique ID of the monitoring profile. | [readonly]
|
||||||
|
**aid** | **str** | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. |
|
||||||
|
**name** | **str** | Monitoring profile name. | [readonly]
|
||||||
|
**included_domains** | **List[str]** | Domains included in real user monitoring. |
|
||||||
|
**excluded_domains** | **List[str]** | Domains excluded from real user monitoring. |
|
||||||
|
**monitoring_settings** | [**EndpointMonitoringSettings**](EndpointMonitoringSettings.md) | |
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from thousandeyes_sdk.endpoint_tests.models.endpoint_real_user_test import EndpointRealUserTest
|
||||||
|
|
||||||
|
# TODO update the JSON string below
|
||||||
|
json = "{}"
|
||||||
|
# create an instance of EndpointRealUserTest from a JSON string
|
||||||
|
endpoint_real_user_test_instance = EndpointRealUserTest.from_json(json)
|
||||||
|
# print the JSON string representation of the object
|
||||||
|
print(EndpointRealUserTest.to_json())
|
||||||
|
|
||||||
|
# convert the object into a dict
|
||||||
|
endpoint_real_user_test_dict = endpoint_real_user_test_instance.to_dict()
|
||||||
|
# create an instance of EndpointRealUserTest from a dict
|
||||||
|
endpoint_real_user_test_from_dict = EndpointRealUserTest.from_dict(endpoint_real_user_test_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)
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,92 @@
|
|||||||
|
# thousandeyes_sdk.endpoint_tests.EndpointRealUserTestsApi
|
||||||
|
|
||||||
|
All URIs are relative to *https://api.thousandeyes.com/v7*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**get_endpoint_real_user_tests**](EndpointRealUserTestsApi.md#get_endpoint_real_user_tests) | **GET** /endpoint/tests/real-user-tests | List endpoint real user tests
|
||||||
|
|
||||||
|
|
||||||
|
# **get_endpoint_real_user_tests**
|
||||||
|
> EndpointRealUserTestsResponse get_endpoint_real_user_tests(aid=aid)
|
||||||
|
|
||||||
|
List endpoint real user tests
|
||||||
|
|
||||||
|
Returns real user test domain monitoring profiles for endpoint agents.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
* Bearer Authentication (BearerAuth):
|
||||||
|
|
||||||
|
```python
|
||||||
|
import thousandeyes_sdk.endpoint_tests
|
||||||
|
from thousandeyes_sdk.endpoint_tests.models.endpoint_real_user_tests_response import EndpointRealUserTestsResponse
|
||||||
|
from thousandeyes_sdk.endpoint_tests.rest import ApiException
|
||||||
|
from pprint import pprint
|
||||||
|
|
||||||
|
# Defining the host is optional and defaults to https://api.thousandeyes.com/v7
|
||||||
|
# See configuration.py for a list of all supported configuration parameters.
|
||||||
|
configuration = thousandeyes_sdk.core.Configuration(
|
||||||
|
host = "https://api.thousandeyes.com/v7"
|
||||||
|
)
|
||||||
|
|
||||||
|
# The client must configure the authentication and authorization parameters
|
||||||
|
# in accordance with the API server security policy.
|
||||||
|
# Examples for each auth method are provided below, use the example that
|
||||||
|
# satisfies your auth use case.
|
||||||
|
|
||||||
|
# Configure Bearer authorization: BearerAuth
|
||||||
|
configuration = thousandeyes_sdk.core.Configuration(
|
||||||
|
access_token = os.environ["BEARER_TOKEN"]
|
||||||
|
)
|
||||||
|
|
||||||
|
# Enter a context with an instance of the API client
|
||||||
|
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
||||||
|
# Create an instance of the API class
|
||||||
|
api_instance = thousandeyes_sdk.endpoint_tests.EndpointRealUserTestsApi(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 endpoint real user tests
|
||||||
|
api_response = api_instance.get_endpoint_real_user_tests(aid=aid)
|
||||||
|
print("The response of EndpointRealUserTestsApi->get_endpoint_real_user_tests:\n")
|
||||||
|
pprint(api_response)
|
||||||
|
except Exception as e:
|
||||||
|
print("Exception when calling EndpointRealUserTestsApi->get_endpoint_real_user_tests: %s\n" % e)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**aid** | **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]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**EndpointRealUserTestsResponse**](EndpointRealUserTestsResponse.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[BearerAuth](../README.md#BearerAuth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json, application/problem+json
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
**200** | Real user test domain monitoring profiles. | - |
|
||||||
|
**401** | Unauthorized | - |
|
||||||
|
**403** | Insufficient permissions to query endpoint | - |
|
||||||
|
**429** | Exhausted rate limit for the organization | - |
|
||||||
|
**500** | Internal server error | - |
|
||||||
|
**0** | An error occurred | - |
|
||||||
|
|
||||||
|
[[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)
|
||||||
|
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
# EndpointRealUserTestsResponse
|
||||||
|
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**real_user_tests** | [**List[EndpointRealUserTest]**](EndpointRealUserTest.md) | Real user test domain monitoring profiles. |
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
from thousandeyes_sdk.endpoint_tests.models.endpoint_real_user_tests_response import EndpointRealUserTestsResponse
|
||||||
|
|
||||||
|
# TODO update the JSON string below
|
||||||
|
json = "{}"
|
||||||
|
# create an instance of EndpointRealUserTestsResponse from a JSON string
|
||||||
|
endpoint_real_user_tests_response_instance = EndpointRealUserTestsResponse.from_json(json)
|
||||||
|
# print the JSON string representation of the object
|
||||||
|
print(EndpointRealUserTestsResponse.to_json())
|
||||||
|
|
||||||
|
# convert the object into a dict
|
||||||
|
endpoint_real_user_tests_response_dict = endpoint_real_user_tests_response_instance.to_dict()
|
||||||
|
# create an instance of EndpointRealUserTestsResponse from a dict
|
||||||
|
endpoint_real_user_tests_response_from_dict = EndpointRealUserTestsResponse.from_dict(endpoint_real_user_tests_response_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)
|
||||||
|
|
||||||
|
|
||||||
@ -7,9 +7,9 @@ authors = [
|
|||||||
]
|
]
|
||||||
description = "ThousandEyes SDK Endpoint Tests API"
|
description = "ThousandEyes SDK Endpoint Tests API"
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
requires-python = ">= 3.8"
|
requires-python = ">= 3.9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"urllib3 >= 2.0.0",
|
"urllib3 >= 2.6.3",
|
||||||
"python-dateutil >=2.8.2",
|
"python-dateutil >=2.8.2",
|
||||||
"pydantic >=2.1.0",
|
"pydantic >=2.1.0",
|
||||||
"typing-extensions >=4.7.1",
|
"typing-extensions >=4.7.1",
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
# import apis into sdk package
|
# import apis into sdk package
|
||||||
from thousandeyes_sdk.endpoint_tests.api.agent_to_server_endpoint_dynamic_tests_api import AgentToServerEndpointDynamicTestsApi
|
from thousandeyes_sdk.endpoint_tests.api.agent_to_server_endpoint_dynamic_tests_api import AgentToServerEndpointDynamicTestsApi
|
||||||
from thousandeyes_sdk.endpoint_tests.api.agent_to_server_endpoint_scheduled_tests_api import AgentToServerEndpointScheduledTestsApi
|
from thousandeyes_sdk.endpoint_tests.api.agent_to_server_endpoint_scheduled_tests_api import AgentToServerEndpointScheduledTestsApi
|
||||||
|
from thousandeyes_sdk.endpoint_tests.api.endpoint_real_user_tests_api import EndpointRealUserTestsApi
|
||||||
from thousandeyes_sdk.endpoint_tests.api.endpoint_scheduled_tests_api import EndpointScheduledTestsApi
|
from thousandeyes_sdk.endpoint_tests.api.endpoint_scheduled_tests_api import EndpointScheduledTestsApi
|
||||||
from thousandeyes_sdk.endpoint_tests.api.http_server_endpoint_scheduled_tests_api import HTTPServerEndpointScheduledTestsApi
|
from thousandeyes_sdk.endpoint_tests.api.http_server_endpoint_scheduled_tests_api import HTTPServerEndpointScheduledTestsApi
|
||||||
|
|
||||||
@ -43,7 +44,11 @@ from thousandeyes_sdk.endpoint_tests.models.endpoint_http_server_tests import En
|
|||||||
from thousandeyes_sdk.endpoint_tests.models.endpoint_http_test_update import EndpointHttpTestUpdate
|
from thousandeyes_sdk.endpoint_tests.models.endpoint_http_test_update import EndpointHttpTestUpdate
|
||||||
from thousandeyes_sdk.endpoint_tests.models.endpoint_instant_test import EndpointInstantTest
|
from thousandeyes_sdk.endpoint_tests.models.endpoint_instant_test import EndpointInstantTest
|
||||||
from thousandeyes_sdk.endpoint_tests.models.endpoint_ip_version_in import EndpointIpVersionIn
|
from thousandeyes_sdk.endpoint_tests.models.endpoint_ip_version_in import EndpointIpVersionIn
|
||||||
|
from thousandeyes_sdk.endpoint_tests.models.endpoint_monitoring_settings import EndpointMonitoringSettings
|
||||||
|
from thousandeyes_sdk.endpoint_tests.models.endpoint_monitoring_settings_type import EndpointMonitoringSettingsType
|
||||||
from thousandeyes_sdk.endpoint_tests.models.endpoint_network_test_update import EndpointNetworkTestUpdate
|
from thousandeyes_sdk.endpoint_tests.models.endpoint_network_test_update import EndpointNetworkTestUpdate
|
||||||
|
from thousandeyes_sdk.endpoint_tests.models.endpoint_real_user_test import EndpointRealUserTest
|
||||||
|
from thousandeyes_sdk.endpoint_tests.models.endpoint_real_user_tests_response import EndpointRealUserTestsResponse
|
||||||
from thousandeyes_sdk.endpoint_tests.models.endpoint_scheduled_test_type import EndpointScheduledTestType
|
from thousandeyes_sdk.endpoint_tests.models.endpoint_scheduled_test_type import EndpointScheduledTestType
|
||||||
from thousandeyes_sdk.endpoint_tests.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig
|
from thousandeyes_sdk.endpoint_tests.models.endpoint_specific_agents_selector_config import EndpointSpecificAgentsSelectorConfig
|
||||||
from thousandeyes_sdk.endpoint_tests.models.endpoint_test import EndpointTest
|
from thousandeyes_sdk.endpoint_tests.models.endpoint_test import EndpointTest
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user