mirror of
https://github.com/thousandeyes/thousandeyes-sdk-python.git
synced 2025-12-06 06:26:51 +00:00
Deleted labels (that's deprecated in v7, being replaced by tags) & Updated some additional files
This commit is contained in:
parent
586dded76d
commit
c6c4e6f3ca
@ -15,6 +15,7 @@ Each of the APIs being published includes a README file with instructions on how
|
|||||||
* [bgp-monitors](/thousandeyes-sdk-bgp-monitors/README.md)
|
* [bgp-monitors](/thousandeyes-sdk-bgp-monitors/README.md)
|
||||||
* [credentials](/thousandeyes-sdk-credentials/README.md)
|
* [credentials](/thousandeyes-sdk-credentials/README.md)
|
||||||
* [dashboards](/thousandeyes-sdk-dashboards/README.md)
|
* [dashboards](/thousandeyes-sdk-dashboards/README.md)
|
||||||
|
* [emulation](/thousandeyes-sdk-emulation/README.md)
|
||||||
* [endpoint-agents](/thousandeyes-sdk-endpoint-agents/README.md)
|
* [endpoint-agents](/thousandeyes-sdk-endpoint-agents/README.md)
|
||||||
* [endpoint-instant-tests](/thousandeyes-sdk-endpoint-instant-tests/README.md)
|
* [endpoint-instant-tests](/thousandeyes-sdk-endpoint-instant-tests/README.md)
|
||||||
* [endpoint-labels](/thousandeyes-sdk-endpoint-labels/README.md)
|
* [endpoint-labels](/thousandeyes-sdk-endpoint-labels/README.md)
|
||||||
@ -22,7 +23,6 @@ Each of the APIs being published includes a README file with instructions on how
|
|||||||
* [endpoint-tests](/thousandeyes-sdk-endpoint-tests/README.md)
|
* [endpoint-tests](/thousandeyes-sdk-endpoint-tests/README.md)
|
||||||
* [instant-tests](/thousandeyes-sdk-instant-tests/README.md)
|
* [instant-tests](/thousandeyes-sdk-instant-tests/README.md)
|
||||||
* [internet-insights](/thousandeyes-sdk-internet-insights/README.md)
|
* [internet-insights](/thousandeyes-sdk-internet-insights/README.md)
|
||||||
* [labels](/thousandeyes-sdk-labels/README.md)
|
|
||||||
* [snapshots](/thousandeyes-sdk-snapshots/README.md)
|
* [snapshots](/thousandeyes-sdk-snapshots/README.md)
|
||||||
* [streaming](/thousandeyes-sdk-streaming/README.md)
|
* [streaming](/thousandeyes-sdk-streaming/README.md)
|
||||||
* [tags](/thousandeyes-sdk-tags/README.md)
|
* [tags](/thousandeyes-sdk-tags/README.md)
|
||||||
|
|||||||
@ -1,23 +0,0 @@
|
|||||||
# OpenAPI Generator Ignore
|
|
||||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
|
||||||
|
|
||||||
# Use this file to prevent files from being overwritten by the generator.
|
|
||||||
# The patterns follow closely to .gitignore or .dockerignore.
|
|
||||||
|
|
||||||
# As an example, the C# client generator defines ApiClient.cs.
|
|
||||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
|
||||||
#ApiClient.cs
|
|
||||||
|
|
||||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
|
||||||
#foo/*/qux
|
|
||||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
|
||||||
|
|
||||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
|
||||||
#foo/**/qux
|
|
||||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
|
||||||
|
|
||||||
# You can also negate patterns with an exclamation (!).
|
|
||||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
|
||||||
#docs/*.md
|
|
||||||
# Then explicitly reverse the ignore rule for a single file:
|
|
||||||
#!docs/README.md
|
|
||||||
@ -1,48 +0,0 @@
|
|||||||
.openapi-generator-ignore
|
|
||||||
MANIFEST.in
|
|
||||||
README.md
|
|
||||||
docs/AgentApi.md
|
|
||||||
docs/AllLabelsApi.md
|
|
||||||
docs/DashboardApi.md
|
|
||||||
docs/EndpointTestApi.md
|
|
||||||
docs/Error.md
|
|
||||||
docs/Label.md
|
|
||||||
docs/LabelDetail.md
|
|
||||||
docs/LabelRequest.md
|
|
||||||
docs/LabelType.md
|
|
||||||
docs/Labels.md
|
|
||||||
docs/Link.md
|
|
||||||
docs/SelfLinks.md
|
|
||||||
docs/TestApi.md
|
|
||||||
docs/UnauthorizedError.md
|
|
||||||
docs/ValidationError.md
|
|
||||||
docs/ValidationErrorItem.md
|
|
||||||
pyproject.toml
|
|
||||||
setup.cfg
|
|
||||||
src/thousandeyes_sdk/labels/__init__.py
|
|
||||||
src/thousandeyes_sdk/labels/api/__init__.py
|
|
||||||
src/thousandeyes_sdk/labels/api/agent_api.py
|
|
||||||
src/thousandeyes_sdk/labels/api/all_labels_api.py
|
|
||||||
src/thousandeyes_sdk/labels/api/dashboard_api.py
|
|
||||||
src/thousandeyes_sdk/labels/api/endpoint_test_api.py
|
|
||||||
src/thousandeyes_sdk/labels/api/test_api.py
|
|
||||||
src/thousandeyes_sdk/labels/models/__init__.py
|
|
||||||
src/thousandeyes_sdk/labels/models/error.py
|
|
||||||
src/thousandeyes_sdk/labels/models/label.py
|
|
||||||
src/thousandeyes_sdk/labels/models/label_detail.py
|
|
||||||
src/thousandeyes_sdk/labels/models/label_request.py
|
|
||||||
src/thousandeyes_sdk/labels/models/label_type.py
|
|
||||||
src/thousandeyes_sdk/labels/models/labels.py
|
|
||||||
src/thousandeyes_sdk/labels/models/link.py
|
|
||||||
src/thousandeyes_sdk/labels/models/self_links.py
|
|
||||||
src/thousandeyes_sdk/labels/models/unauthorized_error.py
|
|
||||||
src/thousandeyes_sdk/labels/models/validation_error.py
|
|
||||||
src/thousandeyes_sdk/labels/models/validation_error_item.py
|
|
||||||
src/thousandeyes_sdk/labels/py.typed
|
|
||||||
test/__init__.py
|
|
||||||
test/test_agent_api.py
|
|
||||||
test/test_all_labels_api.py
|
|
||||||
test/test_dashboard_api.py
|
|
||||||
test/test_endpoint_test_api.py
|
|
||||||
test/test_test_api.py
|
|
||||||
test/test_utils.py
|
|
||||||
@ -1 +0,0 @@
|
|||||||
7.6.0
|
|
||||||
@ -1 +0,0 @@
|
|||||||
include docs/*
|
|
||||||
@ -1,152 +0,0 @@
|
|||||||
# thousandeyes-sdk-labels
|
|
||||||
### Overview
|
|
||||||
This is API for the Labels API (formerly called groups).
|
|
||||||
|
|
||||||
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
||||||
|
|
||||||
- API version: 7.0.13
|
|
||||||
- Generator version: 7.6.0
|
|
||||||
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
|
|
||||||
|
|
||||||
## Requirements.
|
|
||||||
|
|
||||||
Python 3.8+
|
|
||||||
|
|
||||||
## Installation & Usage
|
|
||||||
### pip install
|
|
||||||
|
|
||||||
Install directly via PyPi:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
pip install thousandeyes-sdk-labels
|
|
||||||
```
|
|
||||||
(you may need to run `pip` with root permission: `sudo pip install thousandeyes-sdk-labels`)
|
|
||||||
|
|
||||||
Then import the package:
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
```
|
|
||||||
|
|
||||||
### Setuptools
|
|
||||||
|
|
||||||
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
|
|
||||||
|
|
||||||
```sh
|
|
||||||
python setup.py install --user
|
|
||||||
```
|
|
||||||
(or `sudo python setup.py install` to install the package for all users)
|
|
||||||
|
|
||||||
Then import the package:
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
```
|
|
||||||
|
|
||||||
### Tests
|
|
||||||
|
|
||||||
Execute `pytest` to run the tests.
|
|
||||||
|
|
||||||
## Getting Started
|
|
||||||
|
|
||||||
Please follow the installation procedure and then run the following:
|
|
||||||
|
|
||||||
```python
|
|
||||||
|
|
||||||
import thousandeyes_sdk.core
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.core.exceptions import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.AgentApi(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)
|
|
||||||
label_request = thousandeyes_sdk.labels.LabelRequest() # LabelRequest | Label resource (optional)
|
|
||||||
|
|
||||||
try:
|
|
||||||
# Create a Label of type `agent`
|
|
||||||
api_response = api_instance.create_agent_label(aid=aid, label_request=label_request)
|
|
||||||
print("The response of AgentApi->create_agent_label:\n")
|
|
||||||
pprint(api_response)
|
|
||||||
except ApiException as e:
|
|
||||||
print("Exception when calling AgentApi->create_agent_label: %s\n" % e)
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
## Documentation for API Endpoints
|
|
||||||
|
|
||||||
All URIs are relative to *https://api.thousandeyes.com*
|
|
||||||
|
|
||||||
Class | Method | HTTP request | Description
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
*AgentApi* | [**create_agent_label**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/AgentApi.md#create_agent_label) | **POST** /v7/labels/agent | Create a Label of type `agent`
|
|
||||||
*AgentApi* | [**delete_agent_label**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/AgentApi.md#delete_agent_label) | **DELETE** /v7/labels/agent/{labelId} | Delete a Label object of type `agent`
|
|
||||||
*AgentApi* | [**get_agent_label**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/AgentApi.md#get_agent_label) | **GET** /v7/labels/agent/{labelId} | Get a Label object of type `agent`
|
|
||||||
*AgentApi* | [**get_agent_labels**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/AgentApi.md#get_agent_labels) | **GET** /v7/labels/agent | Get list of Labels of type `agent`
|
|
||||||
*AgentApi* | [**update_agent_label**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/AgentApi.md#update_agent_label) | **PUT** /v7/labels/agent/{labelId} | Update a Label object of type `agent`
|
|
||||||
*AllLabelsApi* | [**get_labels**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/AllLabelsApi.md#get_labels) | **GET** /v7/labels | Get list of Labels
|
|
||||||
*DashboardApi* | [**create_dashboard_label**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/DashboardApi.md#create_dashboard_label) | **POST** /v7/labels/dashboard | Create a Label of type `dashboard`
|
|
||||||
*DashboardApi* | [**delete_dashboard_label**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/DashboardApi.md#delete_dashboard_label) | **DELETE** /v7/labels/dashboard/{labelId} | Delete a Label object of type `dashboard`
|
|
||||||
*DashboardApi* | [**get_dashboard_label**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/DashboardApi.md#get_dashboard_label) | **GET** /v7/labels/dashboard/{labelId} | Get a Label object of type `dashboard`
|
|
||||||
*DashboardApi* | [**get_dashboard_labels**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/DashboardApi.md#get_dashboard_labels) | **GET** /v7/labels/dashboard | Get list of Labels of type `dashboard`
|
|
||||||
*DashboardApi* | [**update_dashboard_label**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/DashboardApi.md#update_dashboard_label) | **PUT** /v7/labels/dashboard/{labelId} | Update a Label object of type `dashboard`
|
|
||||||
*EndpointTestApi* | [**create_endpoint_test_label**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/EndpointTestApi.md#create_endpoint_test_label) | **POST** /v7/labels/endpoint-test | Create a Label of type `endpoint-test`
|
|
||||||
*EndpointTestApi* | [**delete_endpoint_test_label**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/EndpointTestApi.md#delete_endpoint_test_label) | **DELETE** /v7/labels/endpoint-test/{labelId} | Delete a Label object of type `endpoint-test`
|
|
||||||
*EndpointTestApi* | [**get_endpoint_test_label**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/EndpointTestApi.md#get_endpoint_test_label) | **GET** /v7/labels/endpoint-test/{labelId} | Get a Label object of type `endpoint-test`
|
|
||||||
*EndpointTestApi* | [**get_endpoint_test_labels**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/EndpointTestApi.md#get_endpoint_test_labels) | **GET** /v7/labels/endpoint-test | Get list of Labels of type `endpoint-test`
|
|
||||||
*EndpointTestApi* | [**update_endpoint_test_label**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/EndpointTestApi.md#update_endpoint_test_label) | **PUT** /v7/labels/endpoint-test/{labelId} | Update a Label object of type `endpoint-test`
|
|
||||||
*TestApi* | [**create_test_label**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/TestApi.md#create_test_label) | **POST** /v7/labels/test | Create a Label of type `test`
|
|
||||||
*TestApi* | [**delete_test_label**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/TestApi.md#delete_test_label) | **DELETE** /v7/labels/test/{labelId} | Delete a Label object of type `test`
|
|
||||||
*TestApi* | [**get_test_label**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/TestApi.md#get_test_label) | **GET** /v7/labels/test/{labelId} | Get a Label object of type `test`
|
|
||||||
*TestApi* | [**get_test_labels**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/TestApi.md#get_test_labels) | **GET** /v7/labels/test | Get list of Labels of type `test`
|
|
||||||
*TestApi* | [**update_test_label**](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/TestApi.md#update_test_label) | **PUT** /v7/labels/test/{labelId} | Update a Label object of type `test`
|
|
||||||
|
|
||||||
|
|
||||||
## Documentation For Models
|
|
||||||
|
|
||||||
- [Error](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/Error.md)
|
|
||||||
- [Label](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/Label.md)
|
|
||||||
- [LabelDetail](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/LabelDetail.md)
|
|
||||||
- [LabelRequest](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/LabelRequest.md)
|
|
||||||
- [LabelType](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/LabelType.md)
|
|
||||||
- [Labels](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/Labels.md)
|
|
||||||
- [Link](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/Link.md)
|
|
||||||
- [SelfLinks](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/SelfLinks.md)
|
|
||||||
- [UnauthorizedError](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/UnauthorizedError.md)
|
|
||||||
- [ValidationError](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/ValidationError.md)
|
|
||||||
- [ValidationErrorItem](https://github.com/thousandeyes/thousandeyes-sdk-python//tree/main/thousandeyes-sdk-labels/docs/ValidationErrorItem.md)
|
|
||||||
|
|
||||||
|
|
||||||
<a id="documentation-for-authorization"></a>
|
|
||||||
## Documentation For Authorization
|
|
||||||
|
|
||||||
|
|
||||||
Authentication schemes defined for the API:
|
|
||||||
<a id="BearerAuth"></a>
|
|
||||||
### BearerAuth
|
|
||||||
|
|
||||||
- **Type**: Bearer authentication
|
|
||||||
|
|
||||||
|
|
||||||
## Author
|
|
||||||
|
|
||||||
<a href="mailto:api-team@thousandeyes.com">ThousandEyes API Team </a>
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,436 +0,0 @@
|
|||||||
# thousandeyes_sdk.labels.AgentApi
|
|
||||||
|
|
||||||
All URIs are relative to *https://api.thousandeyes.com*
|
|
||||||
|
|
||||||
Method | HTTP request | Description
|
|
||||||
------------- | ------------- | -------------
|
|
||||||
[**create_agent_label**](AgentApi.md#create_agent_label) | **POST** /v7/labels/agent | Create a Label of type `agent`
|
|
||||||
[**delete_agent_label**](AgentApi.md#delete_agent_label) | **DELETE** /v7/labels/agent/{labelId} | Delete a Label object of type `agent`
|
|
||||||
[**get_agent_label**](AgentApi.md#get_agent_label) | **GET** /v7/labels/agent/{labelId} | Get a Label object of type `agent`
|
|
||||||
[**get_agent_labels**](AgentApi.md#get_agent_labels) | **GET** /v7/labels/agent | Get list of Labels of type `agent`
|
|
||||||
[**update_agent_label**](AgentApi.md#update_agent_label) | **PUT** /v7/labels/agent/{labelId} | Update a Label object of type `agent`
|
|
||||||
|
|
||||||
|
|
||||||
# **create_agent_label**
|
|
||||||
> LabelDetail create_agent_label(aid=aid, label_request=label_request)
|
|
||||||
|
|
||||||
Create a Label of type `agent`
|
|
||||||
|
|
||||||
Creates a new label (formerly called group) in ThousandEyes, based on properties provided in the POST data. You must have sufficient permissions to create a new label. Regular users are blocked from using any of the POST-based methods. Note: When creating or updating a label and assigning `agent` or `test`, the user needs permission to modify the objects being added.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.models.label_detail import LabelDetail
|
|
||||||
from thousandeyes_sdk.labels.models.label_request import LabelRequest
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.AgentApi(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)
|
|
||||||
label_request = thousandeyes_sdk.labels.LabelRequest() # LabelRequest | Label resource (optional)
|
|
||||||
|
|
||||||
try:
|
|
||||||
# Create a Label of type `agent`
|
|
||||||
api_response = api_instance.create_agent_label(aid=aid, label_request=label_request)
|
|
||||||
print("The response of AgentApi->create_agent_label:\n")
|
|
||||||
pprint(api_response)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling AgentApi->create_agent_label: %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]
|
|
||||||
**label_request** | [**LabelRequest**](LabelRequest.md)| Label resource | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**LabelDetail**](LabelDetail.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[BearerAuth](../README.md#BearerAuth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**201** | Created | * Location - <br> |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **delete_agent_label**
|
|
||||||
> delete_agent_label(label_id, aid=aid)
|
|
||||||
|
|
||||||
Delete a Label object of type `agent`
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.AgentApi(api_client)
|
|
||||||
label_id = '961' # str | ID of the label to get
|
|
||||||
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
|
|
||||||
|
|
||||||
try:
|
|
||||||
# Delete a Label object of type `agent`
|
|
||||||
api_instance.delete_agent_label(label_id, aid=aid)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling AgentApi->delete_agent_label: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**label_id** | **str**| ID of the label to get |
|
|
||||||
**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
|
|
||||||
|
|
||||||
void (empty response body)
|
|
||||||
|
|
||||||
### 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 |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**204** | No content | - |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **get_agent_label**
|
|
||||||
> LabelDetail get_agent_label(label_id, aid=aid)
|
|
||||||
|
|
||||||
Get a Label object of type `agent`
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.models.label_detail import LabelDetail
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.AgentApi(api_client)
|
|
||||||
label_id = '961' # str | ID of the label to get
|
|
||||||
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:
|
|
||||||
# Get a Label object of type `agent`
|
|
||||||
api_response = api_instance.get_agent_label(label_id, aid=aid)
|
|
||||||
print("The response of AgentApi->get_agent_label:\n")
|
|
||||||
pprint(api_response)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling AgentApi->get_agent_label: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**label_id** | **str**| ID of the label to get |
|
|
||||||
**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
|
|
||||||
|
|
||||||
[**LabelDetail**](LabelDetail.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[BearerAuth](../README.md#BearerAuth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | OK | - |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **get_agent_labels**
|
|
||||||
> Labels get_agent_labels(aid=aid)
|
|
||||||
|
|
||||||
Get list of Labels of type `agent`
|
|
||||||
|
|
||||||
Returns a list of all Agent labels (formerly called groups) configured in ThousandEyes.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.models.labels import Labels
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.AgentApi(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:
|
|
||||||
# Get list of Labels of type `agent`
|
|
||||||
api_response = api_instance.get_agent_labels(aid=aid)
|
|
||||||
print("The response of AgentApi->get_agent_labels:\n")
|
|
||||||
pprint(api_response)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling AgentApi->get_agent_labels: %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
|
|
||||||
|
|
||||||
[**Labels**](Labels.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[BearerAuth](../README.md#BearerAuth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | OK | - |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **update_agent_label**
|
|
||||||
> LabelDetail update_agent_label(label_id, aid=aid, label_request=label_request)
|
|
||||||
|
|
||||||
Update a Label object of type `agent`
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.models.label_detail import LabelDetail
|
|
||||||
from thousandeyes_sdk.labels.models.label_request import LabelRequest
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.AgentApi(api_client)
|
|
||||||
label_id = '961' # str | ID of the label to get
|
|
||||||
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)
|
|
||||||
label_request = thousandeyes_sdk.labels.LabelRequest() # LabelRequest | (optional)
|
|
||||||
|
|
||||||
try:
|
|
||||||
# Update a Label object of type `agent`
|
|
||||||
api_response = api_instance.update_agent_label(label_id, aid=aid, label_request=label_request)
|
|
||||||
print("The response of AgentApi->update_agent_label:\n")
|
|
||||||
pprint(api_response)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling AgentApi->update_agent_label: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**label_id** | **str**| ID of the label to get |
|
|
||||||
**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]
|
|
||||||
**label_request** | [**LabelRequest**](LabelRequest.md)| | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**LabelDetail**](LabelDetail.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[BearerAuth](../README.md#BearerAuth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | OK | - |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
@ -1,93 +0,0 @@
|
|||||||
# thousandeyes_sdk.labels.AllLabelsApi
|
|
||||||
|
|
||||||
All URIs are relative to *https://api.thousandeyes.com*
|
|
||||||
|
|
||||||
Method | HTTP request | Description
|
|
||||||
------------- | ------------- | -------------
|
|
||||||
[**get_labels**](AllLabelsApi.md#get_labels) | **GET** /v7/labels | Get list of Labels
|
|
||||||
|
|
||||||
|
|
||||||
# **get_labels**
|
|
||||||
> Labels get_labels(aid=aid)
|
|
||||||
|
|
||||||
Get list of Labels
|
|
||||||
|
|
||||||
Returns a list of all labels (formerly called groups) configured in ThousandEyes.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.models.labels import Labels
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.AllLabelsApi(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:
|
|
||||||
# Get list of Labels
|
|
||||||
api_response = api_instance.get_labels(aid=aid)
|
|
||||||
print("The response of AllLabelsApi->get_labels:\n")
|
|
||||||
pprint(api_response)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling AllLabelsApi->get_labels: %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
|
|
||||||
|
|
||||||
[**Labels**](Labels.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[BearerAuth](../README.md#BearerAuth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | OK | - |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
@ -1,436 +0,0 @@
|
|||||||
# thousandeyes_sdk.labels.DashboardApi
|
|
||||||
|
|
||||||
All URIs are relative to *https://api.thousandeyes.com*
|
|
||||||
|
|
||||||
Method | HTTP request | Description
|
|
||||||
------------- | ------------- | -------------
|
|
||||||
[**create_dashboard_label**](DashboardApi.md#create_dashboard_label) | **POST** /v7/labels/dashboard | Create a Label of type `dashboard`
|
|
||||||
[**delete_dashboard_label**](DashboardApi.md#delete_dashboard_label) | **DELETE** /v7/labels/dashboard/{labelId} | Delete a Label object of type `dashboard`
|
|
||||||
[**get_dashboard_label**](DashboardApi.md#get_dashboard_label) | **GET** /v7/labels/dashboard/{labelId} | Get a Label object of type `dashboard`
|
|
||||||
[**get_dashboard_labels**](DashboardApi.md#get_dashboard_labels) | **GET** /v7/labels/dashboard | Get list of Labels of type `dashboard`
|
|
||||||
[**update_dashboard_label**](DashboardApi.md#update_dashboard_label) | **PUT** /v7/labels/dashboard/{labelId} | Update a Label object of type `dashboard`
|
|
||||||
|
|
||||||
|
|
||||||
# **create_dashboard_label**
|
|
||||||
> LabelDetail create_dashboard_label(aid=aid, label_request=label_request)
|
|
||||||
|
|
||||||
Create a Label of type `dashboard`
|
|
||||||
|
|
||||||
Creates a new label (formerly called group) in ThousandEyes, based on properties provided in the POST data. In order to create a new label, the user attempting the creation must have sufficient privileges to create labels. Regular users are blocked from using any of the POST-based methods. Note: When creating or updating a label and assigning agents or tests, the user needs permission to modify the objects being added.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.models.label_detail import LabelDetail
|
|
||||||
from thousandeyes_sdk.labels.models.label_request import LabelRequest
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.DashboardApi(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)
|
|
||||||
label_request = thousandeyes_sdk.labels.LabelRequest() # LabelRequest | Label resource (optional)
|
|
||||||
|
|
||||||
try:
|
|
||||||
# Create a Label of type `dashboard`
|
|
||||||
api_response = api_instance.create_dashboard_label(aid=aid, label_request=label_request)
|
|
||||||
print("The response of DashboardApi->create_dashboard_label:\n")
|
|
||||||
pprint(api_response)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling DashboardApi->create_dashboard_label: %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]
|
|
||||||
**label_request** | [**LabelRequest**](LabelRequest.md)| Label resource | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**LabelDetail**](LabelDetail.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[BearerAuth](../README.md#BearerAuth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**201** | Created | * Location - <br> |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **delete_dashboard_label**
|
|
||||||
> delete_dashboard_label(label_id, aid=aid)
|
|
||||||
|
|
||||||
Delete a Label object of type `dashboard`
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.DashboardApi(api_client)
|
|
||||||
label_id = '961' # str | ID of the label to get
|
|
||||||
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
|
|
||||||
|
|
||||||
try:
|
|
||||||
# Delete a Label object of type `dashboard`
|
|
||||||
api_instance.delete_dashboard_label(label_id, aid=aid)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling DashboardApi->delete_dashboard_label: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**label_id** | **str**| ID of the label to get |
|
|
||||||
**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
|
|
||||||
|
|
||||||
void (empty response body)
|
|
||||||
|
|
||||||
### 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 |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**204** | No content | - |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **get_dashboard_label**
|
|
||||||
> LabelDetail get_dashboard_label(label_id, aid=aid)
|
|
||||||
|
|
||||||
Get a Label object of type `dashboard`
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.models.label_detail import LabelDetail
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.DashboardApi(api_client)
|
|
||||||
label_id = '961' # str | ID of the label to get
|
|
||||||
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:
|
|
||||||
# Get a Label object of type `dashboard`
|
|
||||||
api_response = api_instance.get_dashboard_label(label_id, aid=aid)
|
|
||||||
print("The response of DashboardApi->get_dashboard_label:\n")
|
|
||||||
pprint(api_response)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling DashboardApi->get_dashboard_label: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**label_id** | **str**| ID of the label to get |
|
|
||||||
**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
|
|
||||||
|
|
||||||
[**LabelDetail**](LabelDetail.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[BearerAuth](../README.md#BearerAuth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | OK | - |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **get_dashboard_labels**
|
|
||||||
> Labels get_dashboard_labels(aid=aid)
|
|
||||||
|
|
||||||
Get list of Labels of type `dashboard`
|
|
||||||
|
|
||||||
Returns a list of all Dashboard labels (formerly called groups) configured in ThousandEyes.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.models.labels import Labels
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.DashboardApi(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:
|
|
||||||
# Get list of Labels of type `dashboard`
|
|
||||||
api_response = api_instance.get_dashboard_labels(aid=aid)
|
|
||||||
print("The response of DashboardApi->get_dashboard_labels:\n")
|
|
||||||
pprint(api_response)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling DashboardApi->get_dashboard_labels: %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
|
|
||||||
|
|
||||||
[**Labels**](Labels.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[BearerAuth](../README.md#BearerAuth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | OK | - |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **update_dashboard_label**
|
|
||||||
> LabelDetail update_dashboard_label(label_id, aid=aid, label_request=label_request)
|
|
||||||
|
|
||||||
Update a Label object of type `dashboard`
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.models.label_detail import LabelDetail
|
|
||||||
from thousandeyes_sdk.labels.models.label_request import LabelRequest
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.DashboardApi(api_client)
|
|
||||||
label_id = '961' # str | ID of the label to get
|
|
||||||
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)
|
|
||||||
label_request = thousandeyes_sdk.labels.LabelRequest() # LabelRequest | (optional)
|
|
||||||
|
|
||||||
try:
|
|
||||||
# Update a Label object of type `dashboard`
|
|
||||||
api_response = api_instance.update_dashboard_label(label_id, aid=aid, label_request=label_request)
|
|
||||||
print("The response of DashboardApi->update_dashboard_label:\n")
|
|
||||||
pprint(api_response)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling DashboardApi->update_dashboard_label: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**label_id** | **str**| ID of the label to get |
|
|
||||||
**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]
|
|
||||||
**label_request** | [**LabelRequest**](LabelRequest.md)| | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**LabelDetail**](LabelDetail.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[BearerAuth](../README.md#BearerAuth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | OK | - |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
@ -1,436 +0,0 @@
|
|||||||
# thousandeyes_sdk.labels.EndpointTestApi
|
|
||||||
|
|
||||||
All URIs are relative to *https://api.thousandeyes.com*
|
|
||||||
|
|
||||||
Method | HTTP request | Description
|
|
||||||
------------- | ------------- | -------------
|
|
||||||
[**create_endpoint_test_label**](EndpointTestApi.md#create_endpoint_test_label) | **POST** /v7/labels/endpoint-test | Create a Label of type `endpoint-test`
|
|
||||||
[**delete_endpoint_test_label**](EndpointTestApi.md#delete_endpoint_test_label) | **DELETE** /v7/labels/endpoint-test/{labelId} | Delete a Label object of type `endpoint-test`
|
|
||||||
[**get_endpoint_test_label**](EndpointTestApi.md#get_endpoint_test_label) | **GET** /v7/labels/endpoint-test/{labelId} | Get a Label object of type `endpoint-test`
|
|
||||||
[**get_endpoint_test_labels**](EndpointTestApi.md#get_endpoint_test_labels) | **GET** /v7/labels/endpoint-test | Get list of Labels of type `endpoint-test`
|
|
||||||
[**update_endpoint_test_label**](EndpointTestApi.md#update_endpoint_test_label) | **PUT** /v7/labels/endpoint-test/{labelId} | Update a Label object of type `endpoint-test`
|
|
||||||
|
|
||||||
|
|
||||||
# **create_endpoint_test_label**
|
|
||||||
> LabelDetail create_endpoint_test_label(aid=aid, label_request=label_request)
|
|
||||||
|
|
||||||
Create a Label of type `endpoint-test`
|
|
||||||
|
|
||||||
Creates a new label (formerly called group) in ThousandEyes, based on properties provided in the POST data. In order to create a new label, the user attempting the creation must have sufficient privileges to create labels. Regular users are blocked from using any of the POST-based methods. Note: When creating or updating a label and assigning agents or tests, the user needs permission to modify the objects being added.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.models.label_detail import LabelDetail
|
|
||||||
from thousandeyes_sdk.labels.models.label_request import LabelRequest
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.EndpointTestApi(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)
|
|
||||||
label_request = thousandeyes_sdk.labels.LabelRequest() # LabelRequest | Label resource (optional)
|
|
||||||
|
|
||||||
try:
|
|
||||||
# Create a Label of type `endpoint-test`
|
|
||||||
api_response = api_instance.create_endpoint_test_label(aid=aid, label_request=label_request)
|
|
||||||
print("The response of EndpointTestApi->create_endpoint_test_label:\n")
|
|
||||||
pprint(api_response)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling EndpointTestApi->create_endpoint_test_label: %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]
|
|
||||||
**label_request** | [**LabelRequest**](LabelRequest.md)| Label resource | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**LabelDetail**](LabelDetail.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[BearerAuth](../README.md#BearerAuth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**201** | Created | * Location - <br> |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **delete_endpoint_test_label**
|
|
||||||
> delete_endpoint_test_label(label_id, aid=aid)
|
|
||||||
|
|
||||||
Delete a Label object of type `endpoint-test`
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.EndpointTestApi(api_client)
|
|
||||||
label_id = '961' # str | ID of the label to get
|
|
||||||
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
|
|
||||||
|
|
||||||
try:
|
|
||||||
# Delete a Label object of type `endpoint-test`
|
|
||||||
api_instance.delete_endpoint_test_label(label_id, aid=aid)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling EndpointTestApi->delete_endpoint_test_label: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**label_id** | **str**| ID of the label to get |
|
|
||||||
**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
|
|
||||||
|
|
||||||
void (empty response body)
|
|
||||||
|
|
||||||
### 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 |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**204** | No content | - |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **get_endpoint_test_label**
|
|
||||||
> LabelDetail get_endpoint_test_label(label_id, aid=aid)
|
|
||||||
|
|
||||||
Get a Label object of type `endpoint-test`
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.models.label_detail import LabelDetail
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.EndpointTestApi(api_client)
|
|
||||||
label_id = '961' # str | ID of the label to get
|
|
||||||
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:
|
|
||||||
# Get a Label object of type `endpoint-test`
|
|
||||||
api_response = api_instance.get_endpoint_test_label(label_id, aid=aid)
|
|
||||||
print("The response of EndpointTestApi->get_endpoint_test_label:\n")
|
|
||||||
pprint(api_response)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling EndpointTestApi->get_endpoint_test_label: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**label_id** | **str**| ID of the label to get |
|
|
||||||
**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
|
|
||||||
|
|
||||||
[**LabelDetail**](LabelDetail.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[BearerAuth](../README.md#BearerAuth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | OK | - |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **get_endpoint_test_labels**
|
|
||||||
> Labels get_endpoint_test_labels(aid=aid)
|
|
||||||
|
|
||||||
Get list of Labels of type `endpoint-test`
|
|
||||||
|
|
||||||
Returns a list of all Endpoint Test labels (formerly called groups) configured in ThousandEyes.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.models.labels import Labels
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.EndpointTestApi(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:
|
|
||||||
# Get list of Labels of type `endpoint-test`
|
|
||||||
api_response = api_instance.get_endpoint_test_labels(aid=aid)
|
|
||||||
print("The response of EndpointTestApi->get_endpoint_test_labels:\n")
|
|
||||||
pprint(api_response)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling EndpointTestApi->get_endpoint_test_labels: %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
|
|
||||||
|
|
||||||
[**Labels**](Labels.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[BearerAuth](../README.md#BearerAuth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | OK | - |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **update_endpoint_test_label**
|
|
||||||
> LabelDetail update_endpoint_test_label(label_id, aid=aid, label_request=label_request)
|
|
||||||
|
|
||||||
Update a Label object of type `endpoint-test`
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.models.label_detail import LabelDetail
|
|
||||||
from thousandeyes_sdk.labels.models.label_request import LabelRequest
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.EndpointTestApi(api_client)
|
|
||||||
label_id = '961' # str | ID of the label to get
|
|
||||||
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)
|
|
||||||
label_request = thousandeyes_sdk.labels.LabelRequest() # LabelRequest | (optional)
|
|
||||||
|
|
||||||
try:
|
|
||||||
# Update a Label object of type `endpoint-test`
|
|
||||||
api_response = api_instance.update_endpoint_test_label(label_id, aid=aid, label_request=label_request)
|
|
||||||
print("The response of EndpointTestApi->update_endpoint_test_label:\n")
|
|
||||||
pprint(api_response)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling EndpointTestApi->update_endpoint_test_label: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**label_id** | **str**| ID of the label to get |
|
|
||||||
**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]
|
|
||||||
**label_request** | [**LabelRequest**](LabelRequest.md)| | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**LabelDetail**](LabelDetail.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[BearerAuth](../README.md#BearerAuth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | OK | - |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
# Error
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**type** | **str** | A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\". | [optional]
|
|
||||||
**title** | **str** | A short, human-readable summary of the problem type. | [optional]
|
|
||||||
**status** | **int** | The HTTP status code generated by the origin server for this occurrence of the problem. | [optional]
|
|
||||||
**detail** | **str** | A human-readable explanation specific to this occurrence of the problem. | [optional]
|
|
||||||
**instance** | **str** | A URI reference that identifies the specific occurrence of the problem. | [optional]
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
from thousandeyes_sdk.labels.models.error import Error
|
|
||||||
|
|
||||||
# TODO update the JSON string below
|
|
||||||
json = "{}"
|
|
||||||
# create an instance of Error from a JSON string
|
|
||||||
error_instance = Error.from_json(json)
|
|
||||||
# print the JSON string representation of the object
|
|
||||||
print(Error.to_json())
|
|
||||||
|
|
||||||
# convert the object into a dict
|
|
||||||
error_dict = error_instance.to_dict()
|
|
||||||
# create an instance of Error from a dict
|
|
||||||
error_from_dict = Error.from_dict(error_dict)
|
|
||||||
```
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
# Label
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**label_id** | **str** | Unique ID of the label; this number is negative for built-in labels. Query `/v7/labels/{type}/{id}` endpoint to see the list of agent/test/dashboard ids with this label. | [optional]
|
|
||||||
**is_built_in** | **bool** | `true` for built-in labels, and `false` for user-created labels. Note that built-in labels are read-only. | [optional]
|
|
||||||
**name** | **str** | The name of the new label - this must be unique. | [optional]
|
|
||||||
**type** | [**LabelType**](LabelType.md) | | [optional]
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
from thousandeyes_sdk.labels.models.label import Label
|
|
||||||
|
|
||||||
# TODO update the JSON string below
|
|
||||||
json = "{}"
|
|
||||||
# create an instance of Label from a JSON string
|
|
||||||
label_instance = Label.from_json(json)
|
|
||||||
# print the JSON string representation of the object
|
|
||||||
print(Label.to_json())
|
|
||||||
|
|
||||||
# convert the object into a dict
|
|
||||||
label_dict = label_instance.to_dict()
|
|
||||||
# create an instance of Label from a dict
|
|
||||||
label_from_dict = Label.from_dict(label_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)
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,34 +0,0 @@
|
|||||||
# LabelDetail
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**label_id** | **str** | Unique ID of the label; this number is negative for built-in labels. Query `/v7/labels/{type}/{id}` endpoint to see the list of agent/test/dashboard ids with this label. | [optional]
|
|
||||||
**is_built_in** | **bool** | `true` for built-in labels, and `false` for user-created labels. Note that built-in labels are read-only. | [optional]
|
|
||||||
**name** | **str** | The name of the new label - this must be unique. | [optional]
|
|
||||||
**type** | [**LabelType**](LabelType.md) | | [optional]
|
|
||||||
**ids** | **List[str]** | Array of agent/test/dashboard IDs the label is assigned to, depending on the type of label. | [optional]
|
|
||||||
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
from thousandeyes_sdk.labels.models.label_detail import LabelDetail
|
|
||||||
|
|
||||||
# TODO update the JSON string below
|
|
||||||
json = "{}"
|
|
||||||
# create an instance of LabelDetail from a JSON string
|
|
||||||
label_detail_instance = LabelDetail.from_json(json)
|
|
||||||
# print the JSON string representation of the object
|
|
||||||
print(LabelDetail.to_json())
|
|
||||||
|
|
||||||
# convert the object into a dict
|
|
||||||
label_detail_dict = label_detail_instance.to_dict()
|
|
||||||
# create an instance of LabelDetail from a dict
|
|
||||||
label_detail_from_dict = LabelDetail.from_dict(label_detail_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)
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
# LabelRequest
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**name** | **str** | The name of the new label - this must be unique. | [optional]
|
|
||||||
**ids** | **List[str]** | Array of agent/test/dashboard ids the label should be assigned to, depending on the type of label | [optional]
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
from thousandeyes_sdk.labels.models.label_request import LabelRequest
|
|
||||||
|
|
||||||
# TODO update the JSON string below
|
|
||||||
json = "{}"
|
|
||||||
# create an instance of LabelRequest from a JSON string
|
|
||||||
label_request_instance = LabelRequest.from_json(json)
|
|
||||||
# print the JSON string representation of the object
|
|
||||||
print(LabelRequest.to_json())
|
|
||||||
|
|
||||||
# convert the object into a dict
|
|
||||||
label_request_dict = label_request_instance.to_dict()
|
|
||||||
# create an instance of LabelRequest from a dict
|
|
||||||
label_request_from_dict = LabelRequest.from_dict(label_request_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)
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
# LabelType
|
|
||||||
|
|
||||||
Either `test`, `agent`, `endpoint-test`, `endpoint-agent` or `dashboard`, indicates the type of label.
|
|
||||||
|
|
||||||
## 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)
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
# Labels
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**labels** | [**List[Label]**](Label.md) | | [optional]
|
|
||||||
**links** | [**SelfLinks**](SelfLinks.md) | | [optional]
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
from thousandeyes_sdk.labels.models.labels import Labels
|
|
||||||
|
|
||||||
# TODO update the JSON string below
|
|
||||||
json = "{}"
|
|
||||||
# create an instance of Labels from a JSON string
|
|
||||||
labels_instance = Labels.from_json(json)
|
|
||||||
# print the JSON string representation of the object
|
|
||||||
print(Labels.to_json())
|
|
||||||
|
|
||||||
# convert the object into a dict
|
|
||||||
labels_dict = labels_instance.to_dict()
|
|
||||||
# create an instance of Labels from a dict
|
|
||||||
labels_from_dict = Labels.from_dict(labels_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)
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,37 +0,0 @@
|
|||||||
# Link
|
|
||||||
|
|
||||||
A hyperlink from the containing resource to a URI.
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**href** | **str** | Its value is either a URI [RFC3986] or a URI template [RFC6570]. |
|
|
||||||
**templated** | **bool** | Should be true when the link object's \"href\" property is a URI template. | [optional]
|
|
||||||
**type** | **str** | Used as a hint to indicate the media type expected when dereferencing the target resource. | [optional]
|
|
||||||
**deprecation** | **str** | Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation. | [optional]
|
|
||||||
**name** | **str** | Its value may be used as a secondary key for selecting link objects that share the same relation type. | [optional]
|
|
||||||
**profile** | **str** | A URI that hints about the profile of the target resource. | [optional]
|
|
||||||
**title** | **str** | Intended for labelling the link with a human-readable identifier | [optional]
|
|
||||||
**hreflang** | **str** | Indicates the language of the target resource | [optional]
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
from thousandeyes_sdk.labels.models.link import Link
|
|
||||||
|
|
||||||
# TODO update the JSON string below
|
|
||||||
json = "{}"
|
|
||||||
# create an instance of Link from a JSON string
|
|
||||||
link_instance = Link.from_json(json)
|
|
||||||
# print the JSON string representation of the object
|
|
||||||
print(Link.to_json())
|
|
||||||
|
|
||||||
# convert the object into a dict
|
|
||||||
link_dict = link_instance.to_dict()
|
|
||||||
# create an instance of Link from a dict
|
|
||||||
link_from_dict = Link.from_dict(link_dict)
|
|
||||||
```
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
# SelfLinks
|
|
||||||
|
|
||||||
A links object containing the self link.
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**var_self** | [**Link**](Link.md) | | [optional]
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
from thousandeyes_sdk.labels.models.self_links import SelfLinks
|
|
||||||
|
|
||||||
# TODO update the JSON string below
|
|
||||||
json = "{}"
|
|
||||||
# create an instance of SelfLinks from a JSON string
|
|
||||||
self_links_instance = SelfLinks.from_json(json)
|
|
||||||
# print the JSON string representation of the object
|
|
||||||
print(SelfLinks.to_json())
|
|
||||||
|
|
||||||
# convert the object into a dict
|
|
||||||
self_links_dict = self_links_instance.to_dict()
|
|
||||||
# create an instance of SelfLinks from a dict
|
|
||||||
self_links_from_dict = SelfLinks.from_dict(self_links_dict)
|
|
||||||
```
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,436 +0,0 @@
|
|||||||
# thousandeyes_sdk.labels.TestApi
|
|
||||||
|
|
||||||
All URIs are relative to *https://api.thousandeyes.com*
|
|
||||||
|
|
||||||
Method | HTTP request | Description
|
|
||||||
------------- | ------------- | -------------
|
|
||||||
[**create_test_label**](TestApi.md#create_test_label) | **POST** /v7/labels/test | Create a Label of type `test`
|
|
||||||
[**delete_test_label**](TestApi.md#delete_test_label) | **DELETE** /v7/labels/test/{labelId} | Delete a Label object of type `test`
|
|
||||||
[**get_test_label**](TestApi.md#get_test_label) | **GET** /v7/labels/test/{labelId} | Get a Label object of type `test`
|
|
||||||
[**get_test_labels**](TestApi.md#get_test_labels) | **GET** /v7/labels/test | Get list of Labels of type `test`
|
|
||||||
[**update_test_label**](TestApi.md#update_test_label) | **PUT** /v7/labels/test/{labelId} | Update a Label object of type `test`
|
|
||||||
|
|
||||||
|
|
||||||
# **create_test_label**
|
|
||||||
> LabelDetail create_test_label(aid=aid, label_request=label_request)
|
|
||||||
|
|
||||||
Create a Label of type `test`
|
|
||||||
|
|
||||||
Creates a new label (formerly called group) in ThousandEyes, based on properties provided in the POST data. In order to create a new label, the user attempting the creation must have sufficient privileges to create labels. Regular users are blocked from using any of the POST-based methods. Note: When creating or updating a label and assigning `agent` or `test`, the user needs permission to modify the objects being added.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.models.label_detail import LabelDetail
|
|
||||||
from thousandeyes_sdk.labels.models.label_request import LabelRequest
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.TestApi(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)
|
|
||||||
label_request = thousandeyes_sdk.labels.LabelRequest() # LabelRequest | Label resource (optional)
|
|
||||||
|
|
||||||
try:
|
|
||||||
# Create a Label of type `test`
|
|
||||||
api_response = api_instance.create_test_label(aid=aid, label_request=label_request)
|
|
||||||
print("The response of TestApi->create_test_label:\n")
|
|
||||||
pprint(api_response)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling TestApi->create_test_label: %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]
|
|
||||||
**label_request** | [**LabelRequest**](LabelRequest.md)| Label resource | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**LabelDetail**](LabelDetail.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[BearerAuth](../README.md#BearerAuth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**201** | Created | * Location - <br> |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **delete_test_label**
|
|
||||||
> delete_test_label(label_id, aid=aid)
|
|
||||||
|
|
||||||
Delete a Label object of type `test`
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.TestApi(api_client)
|
|
||||||
label_id = '961' # str | ID of the label to get
|
|
||||||
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
|
|
||||||
|
|
||||||
try:
|
|
||||||
# Delete a Label object of type `test`
|
|
||||||
api_instance.delete_test_label(label_id, aid=aid)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling TestApi->delete_test_label: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**label_id** | **str**| ID of the label to get |
|
|
||||||
**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
|
|
||||||
|
|
||||||
void (empty response body)
|
|
||||||
|
|
||||||
### 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 |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**204** | No content | - |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **get_test_label**
|
|
||||||
> LabelDetail get_test_label(label_id, aid=aid)
|
|
||||||
|
|
||||||
Get a Label object of type `test`
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.models.label_detail import LabelDetail
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.TestApi(api_client)
|
|
||||||
label_id = '961' # str | ID of the label to get
|
|
||||||
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:
|
|
||||||
# Get a Label object of type `test`
|
|
||||||
api_response = api_instance.get_test_label(label_id, aid=aid)
|
|
||||||
print("The response of TestApi->get_test_label:\n")
|
|
||||||
pprint(api_response)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling TestApi->get_test_label: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**label_id** | **str**| ID of the label to get |
|
|
||||||
**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
|
|
||||||
|
|
||||||
[**LabelDetail**](LabelDetail.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[BearerAuth](../README.md#BearerAuth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | OK | - |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **get_test_labels**
|
|
||||||
> Labels get_test_labels(aid=aid)
|
|
||||||
|
|
||||||
Get list of Labels of type `test`
|
|
||||||
|
|
||||||
Returns a list of all Test labels (formerly called groups) configured in ThousandEyes.
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.models.labels import Labels
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.TestApi(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:
|
|
||||||
# Get list of Labels of type `test`
|
|
||||||
api_response = api_instance.get_test_labels(aid=aid)
|
|
||||||
print("The response of TestApi->get_test_labels:\n")
|
|
||||||
pprint(api_response)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling TestApi->get_test_labels: %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
|
|
||||||
|
|
||||||
[**Labels**](Labels.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[BearerAuth](../README.md#BearerAuth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | OK | - |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **update_test_label**
|
|
||||||
> LabelDetail update_test_label(label_id, aid=aid, label_request=label_request)
|
|
||||||
|
|
||||||
Update a Label object of type `test`
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
* Bearer Authentication (BearerAuth):
|
|
||||||
|
|
||||||
```python
|
|
||||||
import thousandeyes_sdk.labels
|
|
||||||
from thousandeyes_sdk.labels.models.label_detail import LabelDetail
|
|
||||||
from thousandeyes_sdk.labels.models.label_request import LabelRequest
|
|
||||||
from thousandeyes_sdk.labels.rest import ApiException
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to https://api.thousandeyes.com
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = thousandeyes_sdk.core.Configuration(
|
|
||||||
host = "https://api.thousandeyes.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
# 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.labels.ApiClient(configuration) as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = thousandeyes_sdk.labels.TestApi(api_client)
|
|
||||||
label_id = '961' # str | ID of the label to get
|
|
||||||
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)
|
|
||||||
label_request = thousandeyes_sdk.labels.LabelRequest() # LabelRequest | (optional)
|
|
||||||
|
|
||||||
try:
|
|
||||||
# Update a Label object of type `test`
|
|
||||||
api_response = api_instance.update_test_label(label_id, aid=aid, label_request=label_request)
|
|
||||||
print("The response of TestApi->update_test_label:\n")
|
|
||||||
pprint(api_response)
|
|
||||||
except Exception as e:
|
|
||||||
print("Exception when calling TestApi->update_test_label: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**label_id** | **str**| ID of the label to get |
|
|
||||||
**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]
|
|
||||||
**label_request** | [**LabelRequest**](LabelRequest.md)| | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**LabelDetail**](LabelDetail.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
[BearerAuth](../README.md#BearerAuth)
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/hal+json, application/json, application/problem+json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | OK | - |
|
|
||||||
**400** | Bad Request | - |
|
|
||||||
**401** | Unauthorized | - |
|
|
||||||
**403** | Insufficient permissions to query endpoint | - |
|
|
||||||
**404** | Not found | - |
|
|
||||||
**429** | Exhausted rate limit for the organization | - |
|
|
||||||
**500** | Internal server error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
# UnauthorizedError
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**error** | **str** | | [optional]
|
|
||||||
**error_description** | **str** | | [optional]
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
from thousandeyes_sdk.labels.models.unauthorized_error import UnauthorizedError
|
|
||||||
|
|
||||||
# TODO update the JSON string below
|
|
||||||
json = "{}"
|
|
||||||
# create an instance of UnauthorizedError from a JSON string
|
|
||||||
unauthorized_error_instance = UnauthorizedError.from_json(json)
|
|
||||||
# print the JSON string representation of the object
|
|
||||||
print(UnauthorizedError.to_json())
|
|
||||||
|
|
||||||
# convert the object into a dict
|
|
||||||
unauthorized_error_dict = unauthorized_error_instance.to_dict()
|
|
||||||
# create an instance of UnauthorizedError from a dict
|
|
||||||
unauthorized_error_from_dict = UnauthorizedError.from_dict(unauthorized_error_dict)
|
|
||||||
```
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,34 +0,0 @@
|
|||||||
# ValidationError
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**type** | **str** | A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\". | [optional]
|
|
||||||
**title** | **str** | A short, human-readable summary of the problem type. | [optional]
|
|
||||||
**status** | **int** | The HTTP status code generated by the origin server for this occurrence of the problem. | [optional]
|
|
||||||
**detail** | **str** | A human-readable explanation specific to this occurrence of the problem. | [optional]
|
|
||||||
**instance** | **str** | A URI reference that identifies the specific occurrence of the problem. | [optional]
|
|
||||||
**errors** | [**List[ValidationErrorItem]**](ValidationErrorItem.md) | (Optional) When multiple errors occur, the details for each error are listed. | [optional]
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
from thousandeyes_sdk.labels.models.validation_error import ValidationError
|
|
||||||
|
|
||||||
# TODO update the JSON string below
|
|
||||||
json = "{}"
|
|
||||||
# create an instance of ValidationError from a JSON string
|
|
||||||
validation_error_instance = ValidationError.from_json(json)
|
|
||||||
# print the JSON string representation of the object
|
|
||||||
print(ValidationError.to_json())
|
|
||||||
|
|
||||||
# convert the object into a dict
|
|
||||||
validation_error_dict = validation_error_instance.to_dict()
|
|
||||||
# create an instance of ValidationError from a dict
|
|
||||||
validation_error_from_dict = ValidationError.from_dict(validation_error_dict)
|
|
||||||
```
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
# ValidationErrorItem
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**code** | **str** | (Optional) A unique error type/code that can be referenced in the documentation for further details. | [optional]
|
|
||||||
**var_field** | **str** | Identifies the field that triggered this particular error. | [optional]
|
|
||||||
**message** | **str** | A short, human-readable summary of the error. | [optional]
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
from thousandeyes_sdk.labels.models.validation_error_item import ValidationErrorItem
|
|
||||||
|
|
||||||
# TODO update the JSON string below
|
|
||||||
json = "{}"
|
|
||||||
# create an instance of ValidationErrorItem from a JSON string
|
|
||||||
validation_error_item_instance = ValidationErrorItem.from_json(json)
|
|
||||||
# print the JSON string representation of the object
|
|
||||||
print(ValidationErrorItem.to_json())
|
|
||||||
|
|
||||||
# convert the object into a dict
|
|
||||||
validation_error_item_dict = validation_error_item_instance.to_dict()
|
|
||||||
# create an instance of ValidationErrorItem from a dict
|
|
||||||
validation_error_item_from_dict = ValidationErrorItem.from_dict(validation_error_item_dict)
|
|
||||||
```
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,82 +0,0 @@
|
|||||||
[project]
|
|
||||||
name = "thousandeyes-sdk-labels"
|
|
||||||
dynamic = ["version"]
|
|
||||||
readme = "README.md"
|
|
||||||
authors = [
|
|
||||||
{ name = "ThousandEyes API Team", email = "api-team@thousandeyes.com" }
|
|
||||||
]
|
|
||||||
description = "ThousandEyes SDK Labels API"
|
|
||||||
license = { file = "LICENSE" }
|
|
||||||
requires-python = ">= 3.8"
|
|
||||||
dependencies = [
|
|
||||||
"urllib3 >= 1.25.3",
|
|
||||||
"python-dateutil >=2.8.2",
|
|
||||||
"pydantic >=2",
|
|
||||||
"typing-extensions >=4.7.1",
|
|
||||||
"thousandeyes-sdk-core",
|
|
||||||
]
|
|
||||||
|
|
||||||
[tool.setuptools.dynamic]
|
|
||||||
version = {file = ".version"}
|
|
||||||
|
|
||||||
[project.optional-dependencies]
|
|
||||||
test = [
|
|
||||||
"pytest~=7.1.3",
|
|
||||||
"pytest-cov>=2.8.1",
|
|
||||||
"pytest-randomly>=3.12.0",
|
|
||||||
"mypy>=1.4.1",
|
|
||||||
"types-python-dateutil>=2.8.19",
|
|
||||||
]
|
|
||||||
dev = [
|
|
||||||
"flake8>=4.0.0",
|
|
||||||
"mypy>=1.4.1",
|
|
||||||
"types-python-dateutil>=2.8.19",
|
|
||||||
]
|
|
||||||
|
|
||||||
[build-system]
|
|
||||||
requires = ["setuptools"]
|
|
||||||
build-backend = "setuptools.build_meta"
|
|
||||||
|
|
||||||
[tool.setuptools]
|
|
||||||
include-package-data = true
|
|
||||||
|
|
||||||
[tool.pylint.'MESSAGES CONTROL']
|
|
||||||
extension-pkg-whitelist = "pydantic"
|
|
||||||
|
|
||||||
[tool.mypy]
|
|
||||||
files = [
|
|
||||||
"src",
|
|
||||||
#"test", # auto-generated tests
|
|
||||||
"tests", # hand-written tests
|
|
||||||
]
|
|
||||||
# TODO: enable "strict" once all these individual checks are passing
|
|
||||||
# strict = true
|
|
||||||
|
|
||||||
# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options
|
|
||||||
warn_unused_configs = true
|
|
||||||
warn_redundant_casts = true
|
|
||||||
warn_unused_ignores = true
|
|
||||||
|
|
||||||
## Getting these passing should be easy
|
|
||||||
strict_equality = true
|
|
||||||
strict_concatenate = true
|
|
||||||
|
|
||||||
## Strongly recommend enabling this one as soon as you can
|
|
||||||
check_untyped_defs = true
|
|
||||||
|
|
||||||
## These shouldn't be too much additional work, but may be tricky to
|
|
||||||
## get passing if you use a lot of untyped libraries
|
|
||||||
disallow_subclassing_any = true
|
|
||||||
disallow_untyped_decorators = true
|
|
||||||
disallow_any_generics = true
|
|
||||||
|
|
||||||
### These next few are various gradations of forcing use of type annotations
|
|
||||||
#disallow_untyped_calls = true
|
|
||||||
#disallow_incomplete_defs = true
|
|
||||||
#disallow_untyped_defs = true
|
|
||||||
#
|
|
||||||
### This one isn't too hard to get passing, but return on investment is lower
|
|
||||||
#no_implicit_reexport = true
|
|
||||||
#
|
|
||||||
### This one can be tricky to get passing if you use a lot of untyped libraries
|
|
||||||
#warn_return_any = true
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
[flake8]
|
|
||||||
max-line-length=99
|
|
||||||
@ -1,36 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
# flake8: noqa
|
|
||||||
|
|
||||||
"""
|
|
||||||
Labels API
|
|
||||||
|
|
||||||
### Overview This is API for the Labels API (formerly called groups).
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 7.0.13
|
|
||||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
# import apis into sdk package
|
|
||||||
from thousandeyes_sdk.labels.api.agent_api import AgentApi
|
|
||||||
from thousandeyes_sdk.labels.api.all_labels_api import AllLabelsApi
|
|
||||||
from thousandeyes_sdk.labels.api.dashboard_api import DashboardApi
|
|
||||||
from thousandeyes_sdk.labels.api.endpoint_test_api import EndpointTestApi
|
|
||||||
from thousandeyes_sdk.labels.api.test_api import TestApi
|
|
||||||
|
|
||||||
|
|
||||||
# import models into sdk package
|
|
||||||
from thousandeyes_sdk.labels.models.error import Error
|
|
||||||
from thousandeyes_sdk.labels.models.label import Label
|
|
||||||
from thousandeyes_sdk.labels.models.label_detail import LabelDetail
|
|
||||||
from thousandeyes_sdk.labels.models.label_request import LabelRequest
|
|
||||||
from thousandeyes_sdk.labels.models.label_type import LabelType
|
|
||||||
from thousandeyes_sdk.labels.models.labels import Labels
|
|
||||||
from thousandeyes_sdk.labels.models.link import Link
|
|
||||||
from thousandeyes_sdk.labels.models.self_links import SelfLinks
|
|
||||||
from thousandeyes_sdk.labels.models.unauthorized_error import UnauthorizedError
|
|
||||||
from thousandeyes_sdk.labels.models.validation_error import ValidationError
|
|
||||||
from thousandeyes_sdk.labels.models.validation_error_item import ValidationErrorItem
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
# flake8: noqa
|
|
||||||
|
|
||||||
# import apis into api package
|
|
||||||
from thousandeyes_sdk.labels.api.agent_api import AgentApi
|
|
||||||
from thousandeyes_sdk.labels.api.all_labels_api import AllLabelsApi
|
|
||||||
from thousandeyes_sdk.labels.api.dashboard_api import DashboardApi
|
|
||||||
from thousandeyes_sdk.labels.api.endpoint_test_api import EndpointTestApi
|
|
||||||
from thousandeyes_sdk.labels.api.test_api import TestApi
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,325 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Labels API
|
|
||||||
|
|
||||||
### Overview This is API for the Labels API (formerly called groups).
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 7.0.13
|
|
||||||
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.labels.models
|
|
||||||
|
|
||||||
from pydantic import Field, StrictStr
|
|
||||||
from typing import Optional
|
|
||||||
from typing_extensions import Annotated
|
|
||||||
from thousandeyes_sdk.labels.models.labels import Labels
|
|
||||||
|
|
||||||
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 AllLabelsApi:
|
|
||||||
"""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-labels"))
|
|
||||||
self.api_client = api_client
|
|
||||||
|
|
||||||
|
|
||||||
@validate_call
|
|
||||||
def get_labels(
|
|
||||||
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,
|
|
||||||
) -> Labels:
|
|
||||||
"""Get list of Labels
|
|
||||||
|
|
||||||
Returns a list of all labels (formerly called groups) configured in ThousandEyes.
|
|
||||||
|
|
||||||
: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_labels_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': "Labels",
|
|
||||||
'400': "ValidationError",
|
|
||||||
'401': "UnauthorizedError",
|
|
||||||
'403': "Error",
|
|
||||||
'404': "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.labels.models,
|
|
||||||
).data
|
|
||||||
|
|
||||||
|
|
||||||
@validate_call
|
|
||||||
def get_labels_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[Labels]:
|
|
||||||
"""Get list of Labels
|
|
||||||
|
|
||||||
Returns a list of all labels (formerly called groups) configured in ThousandEyes.
|
|
||||||
|
|
||||||
: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_labels_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': "Labels",
|
|
||||||
'400': "ValidationError",
|
|
||||||
'401': "UnauthorizedError",
|
|
||||||
'403': "Error",
|
|
||||||
'404': "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.labels.models,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@validate_call
|
|
||||||
def get_labels_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:
|
|
||||||
"""Get list of Labels
|
|
||||||
|
|
||||||
Returns a list of all labels (formerly called groups) configured in ThousandEyes.
|
|
||||||
|
|
||||||
: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_labels_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': "Labels",
|
|
||||||
'400': "ValidationError",
|
|
||||||
'401': "UnauthorizedError",
|
|
||||||
'403': "Error",
|
|
||||||
'404': "Error",
|
|
||||||
'429': "Error",
|
|
||||||
'500': "Error",
|
|
||||||
}
|
|
||||||
response_data = self.api_client.call_api(
|
|
||||||
*_param,
|
|
||||||
_request_timeout=_request_timeout
|
|
||||||
)
|
|
||||||
return response_data.response
|
|
||||||
|
|
||||||
|
|
||||||
def _get_labels_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/hal+json',
|
|
||||||
'application/json',
|
|
||||||
'application/problem+json'
|
|
||||||
]
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# authentication setting
|
|
||||||
_auth_settings: List[str] = [
|
|
||||||
'BearerAuth'
|
|
||||||
]
|
|
||||||
|
|
||||||
return self.api_client.param_serialize(
|
|
||||||
method='GET',
|
|
||||||
resource_path='/v7/labels',
|
|
||||||
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
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,27 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
# flake8: noqa
|
|
||||||
"""
|
|
||||||
Labels API
|
|
||||||
|
|
||||||
### Overview This is API for the Labels API (formerly called groups).
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 7.0.13
|
|
||||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
# import models into model package
|
|
||||||
from thousandeyes_sdk.labels.models.error import Error
|
|
||||||
from thousandeyes_sdk.labels.models.label import Label
|
|
||||||
from thousandeyes_sdk.labels.models.label_detail import LabelDetail
|
|
||||||
from thousandeyes_sdk.labels.models.label_request import LabelRequest
|
|
||||||
from thousandeyes_sdk.labels.models.label_type import LabelType
|
|
||||||
from thousandeyes_sdk.labels.models.labels import Labels
|
|
||||||
from thousandeyes_sdk.labels.models.link import Link
|
|
||||||
from thousandeyes_sdk.labels.models.self_links import SelfLinks
|
|
||||||
from thousandeyes_sdk.labels.models.unauthorized_error import UnauthorizedError
|
|
||||||
from thousandeyes_sdk.labels.models.validation_error import ValidationError
|
|
||||||
from thousandeyes_sdk.labels.models.validation_error_item import ValidationErrorItem
|
|
||||||
@ -1,96 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Labels API
|
|
||||||
|
|
||||||
### Overview This is API for the Labels API (formerly called groups).
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 7.0.13
|
|
||||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
import pprint
|
|
||||||
import re # noqa: F401
|
|
||||||
import json
|
|
||||||
|
|
||||||
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
|
||||||
from typing import Optional, Set
|
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
class Error(BaseModel):
|
|
||||||
"""
|
|
||||||
Error
|
|
||||||
""" # noqa: E501
|
|
||||||
type: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".")
|
|
||||||
title: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the problem type.")
|
|
||||||
status: Optional[StrictInt] = Field(default=None, description="The HTTP status code generated by the origin server for this occurrence of the problem.")
|
|
||||||
detail: Optional[StrictStr] = Field(default=None, description="A human-readable explanation specific to this occurrence of the problem.")
|
|
||||||
instance: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the specific occurrence of the problem.")
|
|
||||||
__properties: ClassVar[List[str]] = ["type", "title", "status", "detail", "instance"]
|
|
||||||
|
|
||||||
model_config = ConfigDict(
|
|
||||||
populate_by_name=True,
|
|
||||||
validate_assignment=True,
|
|
||||||
protected_namespaces=(),
|
|
||||||
extra="allow",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
|
||||||
"""Returns the string representation of the model using alias"""
|
|
||||||
return pprint.pformat(self.model_dump(by_alias=True))
|
|
||||||
|
|
||||||
def to_json(self) -> str:
|
|
||||||
"""Returns the JSON representation of the model using alias"""
|
|
||||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
||||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
||||||
"""Create an instance of Error from a JSON string"""
|
|
||||||
return cls.from_dict(json.loads(json_str))
|
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
|
||||||
"""Return the dictionary representation of the model using alias.
|
|
||||||
|
|
||||||
This has the following differences from calling pydantic's
|
|
||||||
`self.model_dump(by_alias=True)`:
|
|
||||||
|
|
||||||
* `None` is only added to the output dict for nullable fields that
|
|
||||||
were set at model initialization. Other fields with value `None`
|
|
||||||
are ignored.
|
|
||||||
"""
|
|
||||||
excluded_fields: Set[str] = set([
|
|
||||||
])
|
|
||||||
|
|
||||||
_dict = self.model_dump(
|
|
||||||
by_alias=True,
|
|
||||||
exclude=excluded_fields,
|
|
||||||
exclude_none=True,
|
|
||||||
)
|
|
||||||
return _dict
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
||||||
"""Create an instance of Error from a dict"""
|
|
||||||
if obj is None:
|
|
||||||
return None
|
|
||||||
|
|
||||||
if not isinstance(obj, dict):
|
|
||||||
return cls.model_validate(obj)
|
|
||||||
|
|
||||||
_obj = cls.model_validate({
|
|
||||||
"type": obj.get("type"),
|
|
||||||
"title": obj.get("title"),
|
|
||||||
"status": obj.get("status"),
|
|
||||||
"detail": obj.get("detail"),
|
|
||||||
"instance": obj.get("instance")
|
|
||||||
})
|
|
||||||
return _obj
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,95 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Labels API
|
|
||||||
|
|
||||||
### Overview This is API for the Labels API (formerly called groups).
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 7.0.13
|
|
||||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
import pprint
|
|
||||||
import re # noqa: F401
|
|
||||||
import json
|
|
||||||
|
|
||||||
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
|
||||||
from thousandeyes_sdk.labels.models.label_type import LabelType
|
|
||||||
from typing import Optional, Set
|
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
class Label(BaseModel):
|
|
||||||
"""
|
|
||||||
Label
|
|
||||||
""" # noqa: E501
|
|
||||||
label_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the label; this number is negative for built-in labels. Query `/v7/labels/{type}/{id}` endpoint to see the list of agent/test/dashboard ids with this label. ", alias="labelId")
|
|
||||||
is_built_in: Optional[StrictBool] = Field(default=None, description="`true` for built-in labels, and `false` for user-created labels. Note that built-in labels are read-only. ", alias="isBuiltIn")
|
|
||||||
name: Optional[StrictStr] = Field(default=None, description="The name of the new label - this must be unique.")
|
|
||||||
type: Optional[LabelType] = None
|
|
||||||
__properties: ClassVar[List[str]] = ["labelId", "isBuiltIn", "name", "type"]
|
|
||||||
|
|
||||||
model_config = ConfigDict(
|
|
||||||
populate_by_name=True,
|
|
||||||
validate_assignment=True,
|
|
||||||
protected_namespaces=(),
|
|
||||||
extra="allow",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
|
||||||
"""Returns the string representation of the model using alias"""
|
|
||||||
return pprint.pformat(self.model_dump(by_alias=True))
|
|
||||||
|
|
||||||
def to_json(self) -> str:
|
|
||||||
"""Returns the JSON representation of the model using alias"""
|
|
||||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
||||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
||||||
"""Create an instance of Label 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 Label from a dict"""
|
|
||||||
if obj is None:
|
|
||||||
return None
|
|
||||||
|
|
||||||
if not isinstance(obj, dict):
|
|
||||||
return cls.model_validate(obj)
|
|
||||||
|
|
||||||
_obj = cls.model_validate({
|
|
||||||
"labelId": obj.get("labelId"),
|
|
||||||
"isBuiltIn": obj.get("isBuiltIn"),
|
|
||||||
"name": obj.get("name"),
|
|
||||||
"type": obj.get("type")
|
|
||||||
})
|
|
||||||
return _obj
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,103 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Labels API
|
|
||||||
|
|
||||||
### Overview This is API for the Labels API (formerly called groups).
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 7.0.13
|
|
||||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
import pprint
|
|
||||||
import re # noqa: F401
|
|
||||||
import json
|
|
||||||
|
|
||||||
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
|
||||||
from thousandeyes_sdk.labels.models.label_type import LabelType
|
|
||||||
from thousandeyes_sdk.labels.models.self_links import SelfLinks
|
|
||||||
from typing import Optional, Set
|
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
class LabelDetail(BaseModel):
|
|
||||||
"""
|
|
||||||
LabelDetail
|
|
||||||
""" # noqa: E501
|
|
||||||
label_id: Optional[StrictStr] = Field(default=None, description="Unique ID of the label; this number is negative for built-in labels. Query `/v7/labels/{type}/{id}` endpoint to see the list of agent/test/dashboard ids with this label. ", alias="labelId")
|
|
||||||
is_built_in: Optional[StrictBool] = Field(default=None, description="`true` for built-in labels, and `false` for user-created labels. Note that built-in labels are read-only. ", alias="isBuiltIn")
|
|
||||||
name: Optional[StrictStr] = Field(default=None, description="The name of the new label - this must be unique.")
|
|
||||||
type: Optional[LabelType] = None
|
|
||||||
ids: Optional[List[StrictStr]] = Field(default=None, description="Array of agent/test/dashboard IDs the label is assigned to, depending on the type of label.")
|
|
||||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
|
||||||
__properties: ClassVar[List[str]] = ["labelId", "isBuiltIn", "name", "type", "ids", "_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 LabelDetail from a JSON string"""
|
|
||||||
return cls.from_dict(json.loads(json_str))
|
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
|
||||||
"""Return the dictionary representation of the model using alias.
|
|
||||||
|
|
||||||
This has the following differences from calling pydantic's
|
|
||||||
`self.model_dump(by_alias=True)`:
|
|
||||||
|
|
||||||
* `None` is only added to the output dict for nullable fields that
|
|
||||||
were set at model initialization. Other fields with value `None`
|
|
||||||
are ignored.
|
|
||||||
"""
|
|
||||||
excluded_fields: Set[str] = set([
|
|
||||||
])
|
|
||||||
|
|
||||||
_dict = self.model_dump(
|
|
||||||
by_alias=True,
|
|
||||||
exclude=excluded_fields,
|
|
||||||
exclude_none=True,
|
|
||||||
)
|
|
||||||
# override the default output from pydantic by calling `to_dict()` of links
|
|
||||||
if self.links:
|
|
||||||
_dict['_links'] = self.links.to_dict()
|
|
||||||
return _dict
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
||||||
"""Create an instance of LabelDetail from a dict"""
|
|
||||||
if obj is None:
|
|
||||||
return None
|
|
||||||
|
|
||||||
if not isinstance(obj, dict):
|
|
||||||
return cls.model_validate(obj)
|
|
||||||
|
|
||||||
_obj = cls.model_validate({
|
|
||||||
"labelId": obj.get("labelId"),
|
|
||||||
"isBuiltIn": obj.get("isBuiltIn"),
|
|
||||||
"name": obj.get("name"),
|
|
||||||
"type": obj.get("type"),
|
|
||||||
"ids": obj.get("ids"),
|
|
||||||
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
|
|
||||||
})
|
|
||||||
return _obj
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,90 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Labels API
|
|
||||||
|
|
||||||
### Overview This is API for the Labels API (formerly called groups).
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 7.0.13
|
|
||||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
import pprint
|
|
||||||
import re # noqa: F401
|
|
||||||
import json
|
|
||||||
|
|
||||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
|
||||||
from typing import Optional, Set
|
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
class LabelRequest(BaseModel):
|
|
||||||
"""
|
|
||||||
LabelRequest
|
|
||||||
""" # noqa: E501
|
|
||||||
name: Optional[StrictStr] = Field(default=None, description="The name of the new label - this must be unique.")
|
|
||||||
ids: Optional[List[StrictStr]] = Field(default=None, description="Array of agent/test/dashboard ids the label should be assigned to, depending on the type of label")
|
|
||||||
__properties: ClassVar[List[str]] = ["name", "ids"]
|
|
||||||
|
|
||||||
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 LabelRequest 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 LabelRequest from a dict"""
|
|
||||||
if obj is None:
|
|
||||||
return None
|
|
||||||
|
|
||||||
if not isinstance(obj, dict):
|
|
||||||
return cls.model_validate(obj)
|
|
||||||
|
|
||||||
_obj = cls.model_validate({
|
|
||||||
"name": obj.get("name"),
|
|
||||||
"ids": obj.get("ids")
|
|
||||||
})
|
|
||||||
return _obj
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Labels API
|
|
||||||
|
|
||||||
### Overview This is API for the Labels API (formerly called groups).
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 7.0.13
|
|
||||||
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 LabelType(str, Enum):
|
|
||||||
"""
|
|
||||||
Either `test`, `agent`, `endpoint-test`, `endpoint-agent` or `dashboard`, indicates the type of label.
|
|
||||||
"""
|
|
||||||
|
|
||||||
"""
|
|
||||||
allowed enum values
|
|
||||||
"""
|
|
||||||
AGENT = 'agent'
|
|
||||||
TEST = 'test'
|
|
||||||
ENDPOINT_MINUS_AGENT = 'endpoint-agent'
|
|
||||||
ENDPOINT_MINUS_TEST = 'endpoint-test'
|
|
||||||
DASHBOARD = 'dashboard'
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_json(cls, json_str: str) -> Self:
|
|
||||||
"""Create an instance of LabelType from a JSON string"""
|
|
||||||
return cls(json.loads(json_str))
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,102 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Labels API
|
|
||||||
|
|
||||||
### Overview This is API for the Labels API (formerly called groups).
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 7.0.13
|
|
||||||
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.labels.models.label import Label
|
|
||||||
from thousandeyes_sdk.labels.models.self_links import SelfLinks
|
|
||||||
from typing import Optional, Set
|
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
class Labels(BaseModel):
|
|
||||||
"""
|
|
||||||
Labels
|
|
||||||
""" # noqa: E501
|
|
||||||
labels: Optional[List[Label]] = None
|
|
||||||
links: Optional[SelfLinks] = Field(default=None, alias="_links")
|
|
||||||
__properties: ClassVar[List[str]] = ["labels", "_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 Labels 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 labels (list)
|
|
||||||
_items = []
|
|
||||||
if self.labels:
|
|
||||||
for _item in self.labels:
|
|
||||||
if _item:
|
|
||||||
_items.append(_item.to_dict())
|
|
||||||
_dict['labels'] = _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 Labels from a dict"""
|
|
||||||
if obj is None:
|
|
||||||
return None
|
|
||||||
|
|
||||||
if not isinstance(obj, dict):
|
|
||||||
return cls.model_validate(obj)
|
|
||||||
|
|
||||||
_obj = cls.model_validate({
|
|
||||||
"labels": [Label.from_dict(_item) for _item in obj["labels"]] if obj.get("labels") is not None else None,
|
|
||||||
"_links": SelfLinks.from_dict(obj["_links"]) if obj.get("_links") is not None else None
|
|
||||||
})
|
|
||||||
return _obj
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,102 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Labels API
|
|
||||||
|
|
||||||
### Overview This is API for the Labels API (formerly called groups).
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 7.0.13
|
|
||||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
import pprint
|
|
||||||
import re # noqa: F401
|
|
||||||
import json
|
|
||||||
|
|
||||||
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
|
||||||
from typing import Optional, Set
|
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
class Link(BaseModel):
|
|
||||||
"""
|
|
||||||
A hyperlink from the containing resource to a URI.
|
|
||||||
""" # noqa: E501
|
|
||||||
href: StrictStr = Field(description="Its value is either a URI [RFC3986] or a URI template [RFC6570].")
|
|
||||||
templated: Optional[StrictBool] = Field(default=None, description="Should be true when the link object's \"href\" property is a URI template.")
|
|
||||||
type: Optional[StrictStr] = Field(default=None, description="Used as a hint to indicate the media type expected when dereferencing the target resource.")
|
|
||||||
deprecation: Optional[StrictStr] = Field(default=None, description="Its presence indicates that the link is to be deprecated at a future date. Its value is a URL that should provide further information about the deprecation.")
|
|
||||||
name: Optional[StrictStr] = Field(default=None, description="Its value may be used as a secondary key for selecting link objects that share the same relation type.")
|
|
||||||
profile: Optional[StrictStr] = Field(default=None, description="A URI that hints about the profile of the target resource.")
|
|
||||||
title: Optional[StrictStr] = Field(default=None, description="Intended for labelling the link with a human-readable identifier")
|
|
||||||
hreflang: Optional[StrictStr] = Field(default=None, description="Indicates the language of the target resource")
|
|
||||||
__properties: ClassVar[List[str]] = ["href", "templated", "type", "deprecation", "name", "profile", "title", "hreflang"]
|
|
||||||
|
|
||||||
model_config = ConfigDict(
|
|
||||||
populate_by_name=True,
|
|
||||||
validate_assignment=True,
|
|
||||||
protected_namespaces=(),
|
|
||||||
extra="allow",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
|
||||||
"""Returns the string representation of the model using alias"""
|
|
||||||
return pprint.pformat(self.model_dump(by_alias=True))
|
|
||||||
|
|
||||||
def to_json(self) -> str:
|
|
||||||
"""Returns the JSON representation of the model using alias"""
|
|
||||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
||||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
||||||
"""Create an instance of Link from a JSON string"""
|
|
||||||
return cls.from_dict(json.loads(json_str))
|
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
|
||||||
"""Return the dictionary representation of the model using alias.
|
|
||||||
|
|
||||||
This has the following differences from calling pydantic's
|
|
||||||
`self.model_dump(by_alias=True)`:
|
|
||||||
|
|
||||||
* `None` is only added to the output dict for nullable fields that
|
|
||||||
were set at model initialization. Other fields with value `None`
|
|
||||||
are ignored.
|
|
||||||
"""
|
|
||||||
excluded_fields: Set[str] = set([
|
|
||||||
])
|
|
||||||
|
|
||||||
_dict = self.model_dump(
|
|
||||||
by_alias=True,
|
|
||||||
exclude=excluded_fields,
|
|
||||||
exclude_none=True,
|
|
||||||
)
|
|
||||||
return _dict
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
||||||
"""Create an instance of Link from a dict"""
|
|
||||||
if obj is None:
|
|
||||||
return None
|
|
||||||
|
|
||||||
if not isinstance(obj, dict):
|
|
||||||
return cls.model_validate(obj)
|
|
||||||
|
|
||||||
_obj = cls.model_validate({
|
|
||||||
"href": obj.get("href"),
|
|
||||||
"templated": obj.get("templated"),
|
|
||||||
"type": obj.get("type"),
|
|
||||||
"deprecation": obj.get("deprecation"),
|
|
||||||
"name": obj.get("name"),
|
|
||||||
"profile": obj.get("profile"),
|
|
||||||
"title": obj.get("title"),
|
|
||||||
"hreflang": obj.get("hreflang")
|
|
||||||
})
|
|
||||||
return _obj
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,92 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Labels API
|
|
||||||
|
|
||||||
### Overview This is API for the Labels API (formerly called groups).
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 7.0.13
|
|
||||||
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.labels.models.link import Link
|
|
||||||
from typing import Optional, Set
|
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
class SelfLinks(BaseModel):
|
|
||||||
"""
|
|
||||||
A links object containing the self link.
|
|
||||||
""" # noqa: E501
|
|
||||||
var_self: Optional[Link] = Field(default=None, alias="self")
|
|
||||||
__properties: ClassVar[List[str]] = ["self"]
|
|
||||||
|
|
||||||
model_config = ConfigDict(
|
|
||||||
populate_by_name=True,
|
|
||||||
validate_assignment=True,
|
|
||||||
protected_namespaces=(),
|
|
||||||
extra="allow",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
|
||||||
"""Returns the string representation of the model using alias"""
|
|
||||||
return pprint.pformat(self.model_dump(by_alias=True))
|
|
||||||
|
|
||||||
def to_json(self) -> str:
|
|
||||||
"""Returns the JSON representation of the model using alias"""
|
|
||||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
||||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
||||||
"""Create an instance of SelfLinks from a JSON string"""
|
|
||||||
return cls.from_dict(json.loads(json_str))
|
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
|
||||||
"""Return the dictionary representation of the model using alias.
|
|
||||||
|
|
||||||
This has the following differences from calling pydantic's
|
|
||||||
`self.model_dump(by_alias=True)`:
|
|
||||||
|
|
||||||
* `None` is only added to the output dict for nullable fields that
|
|
||||||
were set at model initialization. Other fields with value `None`
|
|
||||||
are ignored.
|
|
||||||
"""
|
|
||||||
excluded_fields: Set[str] = set([
|
|
||||||
])
|
|
||||||
|
|
||||||
_dict = self.model_dump(
|
|
||||||
by_alias=True,
|
|
||||||
exclude=excluded_fields,
|
|
||||||
exclude_none=True,
|
|
||||||
)
|
|
||||||
# override the default output from pydantic by calling `to_dict()` of var_self
|
|
||||||
if self.var_self:
|
|
||||||
_dict['self'] = self.var_self.to_dict()
|
|
||||||
return _dict
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
||||||
"""Create an instance of SelfLinks from a dict"""
|
|
||||||
if obj is None:
|
|
||||||
return None
|
|
||||||
|
|
||||||
if not isinstance(obj, dict):
|
|
||||||
return cls.model_validate(obj)
|
|
||||||
|
|
||||||
_obj = cls.model_validate({
|
|
||||||
"self": Link.from_dict(obj["self"]) if obj.get("self") is not None else None
|
|
||||||
})
|
|
||||||
return _obj
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,90 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Labels API
|
|
||||||
|
|
||||||
### Overview This is API for the Labels API (formerly called groups).
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 7.0.13
|
|
||||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
import pprint
|
|
||||||
import re # noqa: F401
|
|
||||||
import json
|
|
||||||
|
|
||||||
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
|
||||||
from typing import Optional, Set
|
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
class UnauthorizedError(BaseModel):
|
|
||||||
"""
|
|
||||||
UnauthorizedError
|
|
||||||
""" # noqa: E501
|
|
||||||
error: Optional[StrictStr] = None
|
|
||||||
error_description: Optional[StrictStr] = None
|
|
||||||
__properties: ClassVar[List[str]] = ["error", "error_description"]
|
|
||||||
|
|
||||||
model_config = ConfigDict(
|
|
||||||
populate_by_name=True,
|
|
||||||
validate_assignment=True,
|
|
||||||
protected_namespaces=(),
|
|
||||||
extra="allow",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
|
||||||
"""Returns the string representation of the model using alias"""
|
|
||||||
return pprint.pformat(self.model_dump(by_alias=True))
|
|
||||||
|
|
||||||
def to_json(self) -> str:
|
|
||||||
"""Returns the JSON representation of the model using alias"""
|
|
||||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
||||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
||||||
"""Create an instance of UnauthorizedError from a JSON string"""
|
|
||||||
return cls.from_dict(json.loads(json_str))
|
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
|
||||||
"""Return the dictionary representation of the model using alias.
|
|
||||||
|
|
||||||
This has the following differences from calling pydantic's
|
|
||||||
`self.model_dump(by_alias=True)`:
|
|
||||||
|
|
||||||
* `None` is only added to the output dict for nullable fields that
|
|
||||||
were set at model initialization. Other fields with value `None`
|
|
||||||
are ignored.
|
|
||||||
"""
|
|
||||||
excluded_fields: Set[str] = set([
|
|
||||||
])
|
|
||||||
|
|
||||||
_dict = self.model_dump(
|
|
||||||
by_alias=True,
|
|
||||||
exclude=excluded_fields,
|
|
||||||
exclude_none=True,
|
|
||||||
)
|
|
||||||
return _dict
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
||||||
"""Create an instance of UnauthorizedError from a dict"""
|
|
||||||
if obj is None:
|
|
||||||
return None
|
|
||||||
|
|
||||||
if not isinstance(obj, dict):
|
|
||||||
return cls.model_validate(obj)
|
|
||||||
|
|
||||||
_obj = cls.model_validate({
|
|
||||||
"error": obj.get("error"),
|
|
||||||
"error_description": obj.get("error_description")
|
|
||||||
})
|
|
||||||
return _obj
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,111 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Labels API
|
|
||||||
|
|
||||||
### Overview This is API for the Labels API (formerly called groups).
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 7.0.13
|
|
||||||
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.labels.models.validation_error_item import ValidationErrorItem
|
|
||||||
from typing import Optional, Set
|
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
class ValidationError(BaseModel):
|
|
||||||
"""
|
|
||||||
ValidationError
|
|
||||||
""" # noqa: E501
|
|
||||||
type: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\".")
|
|
||||||
title: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the problem type.")
|
|
||||||
status: Optional[StrictInt] = Field(default=None, description="The HTTP status code generated by the origin server for this occurrence of the problem.")
|
|
||||||
detail: Optional[StrictStr] = Field(default=None, description="A human-readable explanation specific to this occurrence of the problem.")
|
|
||||||
instance: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the specific occurrence of the problem.")
|
|
||||||
errors: Optional[List[ValidationErrorItem]] = Field(default=None, description="(Optional) When multiple errors occur, the details for each error are listed.")
|
|
||||||
__properties: ClassVar[List[str]] = ["type", "title", "status", "detail", "instance", "errors"]
|
|
||||||
|
|
||||||
model_config = ConfigDict(
|
|
||||||
populate_by_name=True,
|
|
||||||
validate_assignment=True,
|
|
||||||
protected_namespaces=(),
|
|
||||||
extra="allow",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
|
||||||
"""Returns the string representation of the model using alias"""
|
|
||||||
return pprint.pformat(self.model_dump(by_alias=True))
|
|
||||||
|
|
||||||
def to_json(self) -> str:
|
|
||||||
"""Returns the JSON representation of the model using alias"""
|
|
||||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
||||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
||||||
"""Create an instance of ValidationError from a JSON string"""
|
|
||||||
return cls.from_dict(json.loads(json_str))
|
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
|
||||||
"""Return the dictionary representation of the model using alias.
|
|
||||||
|
|
||||||
This has the following differences from calling pydantic's
|
|
||||||
`self.model_dump(by_alias=True)`:
|
|
||||||
|
|
||||||
* `None` is only added to the output dict for nullable fields that
|
|
||||||
were set at model initialization. Other fields with value `None`
|
|
||||||
are ignored.
|
|
||||||
"""
|
|
||||||
excluded_fields: Set[str] = set([
|
|
||||||
])
|
|
||||||
|
|
||||||
_dict = self.model_dump(
|
|
||||||
by_alias=True,
|
|
||||||
exclude=excluded_fields,
|
|
||||||
exclude_none=True,
|
|
||||||
)
|
|
||||||
# override the default output from pydantic by calling `to_dict()` of each item in errors (list)
|
|
||||||
_items = []
|
|
||||||
if self.errors:
|
|
||||||
for _item in self.errors:
|
|
||||||
if _item:
|
|
||||||
_items.append(_item.to_dict())
|
|
||||||
_dict['errors'] = _items
|
|
||||||
# set to None if errors (nullable) is None
|
|
||||||
# and model_fields_set contains the field
|
|
||||||
if self.errors is None and "errors" in self.model_fields_set:
|
|
||||||
_dict['errors'] = None
|
|
||||||
|
|
||||||
return _dict
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
||||||
"""Create an instance of ValidationError from a dict"""
|
|
||||||
if obj is None:
|
|
||||||
return None
|
|
||||||
|
|
||||||
if not isinstance(obj, dict):
|
|
||||||
return cls.model_validate(obj)
|
|
||||||
|
|
||||||
_obj = cls.model_validate({
|
|
||||||
"type": obj.get("type"),
|
|
||||||
"title": obj.get("title"),
|
|
||||||
"status": obj.get("status"),
|
|
||||||
"detail": obj.get("detail"),
|
|
||||||
"instance": obj.get("instance"),
|
|
||||||
"errors": [ValidationErrorItem.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
|
|
||||||
})
|
|
||||||
return _obj
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,92 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Labels API
|
|
||||||
|
|
||||||
### Overview This is API for the Labels API (formerly called groups).
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 7.0.13
|
|
||||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
import pprint
|
|
||||||
import re # noqa: F401
|
|
||||||
import json
|
|
||||||
|
|
||||||
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
||||||
from typing import Any, ClassVar, Dict, List, Optional
|
|
||||||
from typing import Optional, Set
|
|
||||||
from typing_extensions import Self
|
|
||||||
|
|
||||||
class ValidationErrorItem(BaseModel):
|
|
||||||
"""
|
|
||||||
ValidationErrorItem
|
|
||||||
""" # noqa: E501
|
|
||||||
code: Optional[StrictStr] = Field(default=None, description="(Optional) A unique error type/code that can be referenced in the documentation for further details.")
|
|
||||||
var_field: Optional[StrictStr] = Field(default=None, description="Identifies the field that triggered this particular error.", alias="field")
|
|
||||||
message: Optional[StrictStr] = Field(default=None, description="A short, human-readable summary of the error.")
|
|
||||||
__properties: ClassVar[List[str]] = ["code", "field", "message"]
|
|
||||||
|
|
||||||
model_config = ConfigDict(
|
|
||||||
populate_by_name=True,
|
|
||||||
validate_assignment=True,
|
|
||||||
protected_namespaces=(),
|
|
||||||
extra="allow",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def to_str(self) -> str:
|
|
||||||
"""Returns the string representation of the model using alias"""
|
|
||||||
return pprint.pformat(self.model_dump(by_alias=True))
|
|
||||||
|
|
||||||
def to_json(self) -> str:
|
|
||||||
"""Returns the JSON representation of the model using alias"""
|
|
||||||
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
||||||
return self.model_dump_json(by_alias=True, exclude_unset=True, exclude_none=True)
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
||||||
"""Create an instance of ValidationErrorItem from a JSON string"""
|
|
||||||
return cls.from_dict(json.loads(json_str))
|
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
|
||||||
"""Return the dictionary representation of the model using alias.
|
|
||||||
|
|
||||||
This has the following differences from calling pydantic's
|
|
||||||
`self.model_dump(by_alias=True)`:
|
|
||||||
|
|
||||||
* `None` is only added to the output dict for nullable fields that
|
|
||||||
were set at model initialization. Other fields with value `None`
|
|
||||||
are ignored.
|
|
||||||
"""
|
|
||||||
excluded_fields: Set[str] = set([
|
|
||||||
])
|
|
||||||
|
|
||||||
_dict = self.model_dump(
|
|
||||||
by_alias=True,
|
|
||||||
exclude=excluded_fields,
|
|
||||||
exclude_none=True,
|
|
||||||
)
|
|
||||||
return _dict
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
||||||
"""Create an instance of ValidationErrorItem from a dict"""
|
|
||||||
if obj is None:
|
|
||||||
return None
|
|
||||||
|
|
||||||
if not isinstance(obj, dict):
|
|
||||||
return cls.model_validate(obj)
|
|
||||||
|
|
||||||
_obj = cls.model_validate({
|
|
||||||
"code": obj.get("code"),
|
|
||||||
"field": obj.get("field"),
|
|
||||||
"message": obj.get("message")
|
|
||||||
})
|
|
||||||
return _obj
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,174 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Labels API
|
|
||||||
|
|
||||||
### Overview This is API for the Labels API (formerly called groups).
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 7.0.13
|
|
||||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
import json
|
|
||||||
import unittest
|
|
||||||
import thousandeyes_sdk.labels.models
|
|
||||||
|
|
||||||
from .test_utils import assert_constructed_model_matches_example_json
|
|
||||||
from thousandeyes_sdk.labels.api.agent_api import AgentApi
|
|
||||||
|
|
||||||
|
|
||||||
class TestAgentApi(unittest.TestCase):
|
|
||||||
"""AgentApi unit test stubs"""
|
|
||||||
|
|
||||||
def setUp(self) -> None:
|
|
||||||
self.api = AgentApi()
|
|
||||||
|
|
||||||
def tearDown(self) -> None:
|
|
||||||
pass
|
|
||||||
|
|
||||||
def test_create_agent_label_models_validation(self) -> None:
|
|
||||||
"""Test case for create_agent_label request and response models"""
|
|
||||||
request_body_json = """
|
|
||||||
{
|
|
||||||
"name" : "My new label",
|
|
||||||
"ids" : [ "5048", "1234" ]
|
|
||||||
}"""
|
|
||||||
|
|
||||||
request_loaded_json = json.loads(request_body_json)
|
|
||||||
request_from_json = thousandeyes_sdk.labels.models.LabelRequest.from_json(request_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
|
|
||||||
|
|
||||||
response_body_json = """
|
|
||||||
{
|
|
||||||
"labelId" : "961123",
|
|
||||||
"_links" : {
|
|
||||||
"self" : {
|
|
||||||
"hreflang" : "hreflang",
|
|
||||||
"templated" : true,
|
|
||||||
"profile" : "profile",
|
|
||||||
"name" : "name",
|
|
||||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
||||||
"type" : "type",
|
|
||||||
"deprecation" : "deprecation",
|
|
||||||
"title" : "title"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ],
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
}"""
|
|
||||||
|
|
||||||
response_loaded_json = json.loads(response_body_json)
|
|
||||||
response_from_json = thousandeyes_sdk.labels.models.LabelDetail.from_json(response_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
|
||||||
|
|
||||||
def test_delete_agent_label_models_validation(self) -> None:
|
|
||||||
"""Test case for delete_agent_label request and response models"""
|
|
||||||
|
|
||||||
|
|
||||||
def test_get_agent_label_models_validation(self) -> None:
|
|
||||||
"""Test case for get_agent_label request and response models"""
|
|
||||||
|
|
||||||
response_body_json = """
|
|
||||||
{
|
|
||||||
"labelId" : "961123",
|
|
||||||
"_links" : {
|
|
||||||
"self" : {
|
|
||||||
"hreflang" : "hreflang",
|
|
||||||
"templated" : true,
|
|
||||||
"profile" : "profile",
|
|
||||||
"name" : "name",
|
|
||||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
||||||
"type" : "type",
|
|
||||||
"deprecation" : "deprecation",
|
|
||||||
"title" : "title"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ],
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
}"""
|
|
||||||
|
|
||||||
response_loaded_json = json.loads(response_body_json)
|
|
||||||
response_from_json = thousandeyes_sdk.labels.models.LabelDetail.from_json(response_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
|
||||||
|
|
||||||
def test_get_agent_labels_models_validation(self) -> None:
|
|
||||||
"""Test case for get_agent_labels request and response models"""
|
|
||||||
|
|
||||||
response_body_json = """
|
|
||||||
{
|
|
||||||
"_links" : {
|
|
||||||
"self" : {
|
|
||||||
"hreflang" : "hreflang",
|
|
||||||
"templated" : true,
|
|
||||||
"profile" : "profile",
|
|
||||||
"name" : "name",
|
|
||||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
||||||
"type" : "type",
|
|
||||||
"deprecation" : "deprecation",
|
|
||||||
"title" : "title"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"labels" : [ {
|
|
||||||
"labelId" : "961123",
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
}, {
|
|
||||||
"labelId" : "961123",
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
} ]
|
|
||||||
}"""
|
|
||||||
|
|
||||||
response_loaded_json = json.loads(response_body_json)
|
|
||||||
response_from_json = thousandeyes_sdk.labels.models.Labels.from_json(response_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
|
||||||
|
|
||||||
def test_update_agent_label_models_validation(self) -> None:
|
|
||||||
"""Test case for update_agent_label request and response models"""
|
|
||||||
request_body_json = """
|
|
||||||
{
|
|
||||||
"name" : "My new label",
|
|
||||||
"ids" : [ "5048", "1234" ]
|
|
||||||
}"""
|
|
||||||
|
|
||||||
request_loaded_json = json.loads(request_body_json)
|
|
||||||
request_from_json = thousandeyes_sdk.labels.models.LabelRequest.from_json(request_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
|
|
||||||
|
|
||||||
response_body_json = """
|
|
||||||
{
|
|
||||||
"labelId" : "961123",
|
|
||||||
"_links" : {
|
|
||||||
"self" : {
|
|
||||||
"hreflang" : "hreflang",
|
|
||||||
"templated" : true,
|
|
||||||
"profile" : "profile",
|
|
||||||
"name" : "name",
|
|
||||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
||||||
"type" : "type",
|
|
||||||
"deprecation" : "deprecation",
|
|
||||||
"title" : "title"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ],
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
}"""
|
|
||||||
|
|
||||||
response_loaded_json = json.loads(response_body_json)
|
|
||||||
response_from_json = thousandeyes_sdk.labels.models.LabelDetail.from_json(response_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
unittest.main()
|
|
||||||
@ -1,68 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Labels API
|
|
||||||
|
|
||||||
### Overview This is API for the Labels API (formerly called groups).
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 7.0.13
|
|
||||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
import json
|
|
||||||
import unittest
|
|
||||||
import thousandeyes_sdk.labels.models
|
|
||||||
|
|
||||||
from .test_utils import assert_constructed_model_matches_example_json
|
|
||||||
from thousandeyes_sdk.labels.api.all_labels_api import AllLabelsApi
|
|
||||||
|
|
||||||
|
|
||||||
class TestAllLabelsApi(unittest.TestCase):
|
|
||||||
"""AllLabelsApi unit test stubs"""
|
|
||||||
|
|
||||||
def setUp(self) -> None:
|
|
||||||
self.api = AllLabelsApi()
|
|
||||||
|
|
||||||
def tearDown(self) -> None:
|
|
||||||
pass
|
|
||||||
|
|
||||||
def test_get_labels_models_validation(self) -> None:
|
|
||||||
"""Test case for get_labels request and response models"""
|
|
||||||
|
|
||||||
response_body_json = """
|
|
||||||
{
|
|
||||||
"_links" : {
|
|
||||||
"self" : {
|
|
||||||
"hreflang" : "hreflang",
|
|
||||||
"templated" : true,
|
|
||||||
"profile" : "profile",
|
|
||||||
"name" : "name",
|
|
||||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
||||||
"type" : "type",
|
|
||||||
"deprecation" : "deprecation",
|
|
||||||
"title" : "title"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"labels" : [ {
|
|
||||||
"labelId" : "961123",
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
}, {
|
|
||||||
"labelId" : "961123",
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
} ]
|
|
||||||
}"""
|
|
||||||
|
|
||||||
response_loaded_json = json.loads(response_body_json)
|
|
||||||
response_from_json = thousandeyes_sdk.labels.models.Labels.from_json(response_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
unittest.main()
|
|
||||||
@ -1,174 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Labels API
|
|
||||||
|
|
||||||
### Overview This is API for the Labels API (formerly called groups).
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 7.0.13
|
|
||||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
import json
|
|
||||||
import unittest
|
|
||||||
import thousandeyes_sdk.labels.models
|
|
||||||
|
|
||||||
from .test_utils import assert_constructed_model_matches_example_json
|
|
||||||
from thousandeyes_sdk.labels.api.dashboard_api import DashboardApi
|
|
||||||
|
|
||||||
|
|
||||||
class TestDashboardApi(unittest.TestCase):
|
|
||||||
"""DashboardApi unit test stubs"""
|
|
||||||
|
|
||||||
def setUp(self) -> None:
|
|
||||||
self.api = DashboardApi()
|
|
||||||
|
|
||||||
def tearDown(self) -> None:
|
|
||||||
pass
|
|
||||||
|
|
||||||
def test_create_dashboard_label_models_validation(self) -> None:
|
|
||||||
"""Test case for create_dashboard_label request and response models"""
|
|
||||||
request_body_json = """
|
|
||||||
{
|
|
||||||
"name" : "My new label",
|
|
||||||
"ids" : [ "5048", "1234" ]
|
|
||||||
}"""
|
|
||||||
|
|
||||||
request_loaded_json = json.loads(request_body_json)
|
|
||||||
request_from_json = thousandeyes_sdk.labels.models.LabelRequest.from_json(request_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
|
|
||||||
|
|
||||||
response_body_json = """
|
|
||||||
{
|
|
||||||
"labelId" : "961123",
|
|
||||||
"_links" : {
|
|
||||||
"self" : {
|
|
||||||
"hreflang" : "hreflang",
|
|
||||||
"templated" : true,
|
|
||||||
"profile" : "profile",
|
|
||||||
"name" : "name",
|
|
||||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
||||||
"type" : "type",
|
|
||||||
"deprecation" : "deprecation",
|
|
||||||
"title" : "title"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ],
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
}"""
|
|
||||||
|
|
||||||
response_loaded_json = json.loads(response_body_json)
|
|
||||||
response_from_json = thousandeyes_sdk.labels.models.LabelDetail.from_json(response_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
|
||||||
|
|
||||||
def test_delete_dashboard_label_models_validation(self) -> None:
|
|
||||||
"""Test case for delete_dashboard_label request and response models"""
|
|
||||||
|
|
||||||
|
|
||||||
def test_get_dashboard_label_models_validation(self) -> None:
|
|
||||||
"""Test case for get_dashboard_label request and response models"""
|
|
||||||
|
|
||||||
response_body_json = """
|
|
||||||
{
|
|
||||||
"labelId" : "961123",
|
|
||||||
"_links" : {
|
|
||||||
"self" : {
|
|
||||||
"hreflang" : "hreflang",
|
|
||||||
"templated" : true,
|
|
||||||
"profile" : "profile",
|
|
||||||
"name" : "name",
|
|
||||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
||||||
"type" : "type",
|
|
||||||
"deprecation" : "deprecation",
|
|
||||||
"title" : "title"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ],
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
}"""
|
|
||||||
|
|
||||||
response_loaded_json = json.loads(response_body_json)
|
|
||||||
response_from_json = thousandeyes_sdk.labels.models.LabelDetail.from_json(response_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
|
||||||
|
|
||||||
def test_get_dashboard_labels_models_validation(self) -> None:
|
|
||||||
"""Test case for get_dashboard_labels request and response models"""
|
|
||||||
|
|
||||||
response_body_json = """
|
|
||||||
{
|
|
||||||
"_links" : {
|
|
||||||
"self" : {
|
|
||||||
"hreflang" : "hreflang",
|
|
||||||
"templated" : true,
|
|
||||||
"profile" : "profile",
|
|
||||||
"name" : "name",
|
|
||||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
||||||
"type" : "type",
|
|
||||||
"deprecation" : "deprecation",
|
|
||||||
"title" : "title"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"labels" : [ {
|
|
||||||
"labelId" : "961123",
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
}, {
|
|
||||||
"labelId" : "961123",
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
} ]
|
|
||||||
}"""
|
|
||||||
|
|
||||||
response_loaded_json = json.loads(response_body_json)
|
|
||||||
response_from_json = thousandeyes_sdk.labels.models.Labels.from_json(response_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
|
||||||
|
|
||||||
def test_update_dashboard_label_models_validation(self) -> None:
|
|
||||||
"""Test case for update_dashboard_label request and response models"""
|
|
||||||
request_body_json = """
|
|
||||||
{
|
|
||||||
"name" : "My new label",
|
|
||||||
"ids" : [ "5048", "1234" ]
|
|
||||||
}"""
|
|
||||||
|
|
||||||
request_loaded_json = json.loads(request_body_json)
|
|
||||||
request_from_json = thousandeyes_sdk.labels.models.LabelRequest.from_json(request_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
|
|
||||||
|
|
||||||
response_body_json = """
|
|
||||||
{
|
|
||||||
"labelId" : "961123",
|
|
||||||
"_links" : {
|
|
||||||
"self" : {
|
|
||||||
"hreflang" : "hreflang",
|
|
||||||
"templated" : true,
|
|
||||||
"profile" : "profile",
|
|
||||||
"name" : "name",
|
|
||||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
||||||
"type" : "type",
|
|
||||||
"deprecation" : "deprecation",
|
|
||||||
"title" : "title"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ],
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
}"""
|
|
||||||
|
|
||||||
response_loaded_json = json.loads(response_body_json)
|
|
||||||
response_from_json = thousandeyes_sdk.labels.models.LabelDetail.from_json(response_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
unittest.main()
|
|
||||||
@ -1,174 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Labels API
|
|
||||||
|
|
||||||
### Overview This is API for the Labels API (formerly called groups).
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 7.0.13
|
|
||||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
import json
|
|
||||||
import unittest
|
|
||||||
import thousandeyes_sdk.labels.models
|
|
||||||
|
|
||||||
from .test_utils import assert_constructed_model_matches_example_json
|
|
||||||
from thousandeyes_sdk.labels.api.endpoint_test_api import EndpointTestApi
|
|
||||||
|
|
||||||
|
|
||||||
class TestEndpointTestApi(unittest.TestCase):
|
|
||||||
"""EndpointTestApi unit test stubs"""
|
|
||||||
|
|
||||||
def setUp(self) -> None:
|
|
||||||
self.api = EndpointTestApi()
|
|
||||||
|
|
||||||
def tearDown(self) -> None:
|
|
||||||
pass
|
|
||||||
|
|
||||||
def test_create_endpoint_test_label_models_validation(self) -> None:
|
|
||||||
"""Test case for create_endpoint_test_label request and response models"""
|
|
||||||
request_body_json = """
|
|
||||||
{
|
|
||||||
"name" : "My new label",
|
|
||||||
"ids" : [ "5048", "1234" ]
|
|
||||||
}"""
|
|
||||||
|
|
||||||
request_loaded_json = json.loads(request_body_json)
|
|
||||||
request_from_json = thousandeyes_sdk.labels.models.LabelRequest.from_json(request_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
|
|
||||||
|
|
||||||
response_body_json = """
|
|
||||||
{
|
|
||||||
"labelId" : "961123",
|
|
||||||
"_links" : {
|
|
||||||
"self" : {
|
|
||||||
"hreflang" : "hreflang",
|
|
||||||
"templated" : true,
|
|
||||||
"profile" : "profile",
|
|
||||||
"name" : "name",
|
|
||||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
||||||
"type" : "type",
|
|
||||||
"deprecation" : "deprecation",
|
|
||||||
"title" : "title"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ],
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
}"""
|
|
||||||
|
|
||||||
response_loaded_json = json.loads(response_body_json)
|
|
||||||
response_from_json = thousandeyes_sdk.labels.models.LabelDetail.from_json(response_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
|
||||||
|
|
||||||
def test_delete_endpoint_test_label_models_validation(self) -> None:
|
|
||||||
"""Test case for delete_endpoint_test_label request and response models"""
|
|
||||||
|
|
||||||
|
|
||||||
def test_get_endpoint_test_label_models_validation(self) -> None:
|
|
||||||
"""Test case for get_endpoint_test_label request and response models"""
|
|
||||||
|
|
||||||
response_body_json = """
|
|
||||||
{
|
|
||||||
"labelId" : "961123",
|
|
||||||
"_links" : {
|
|
||||||
"self" : {
|
|
||||||
"hreflang" : "hreflang",
|
|
||||||
"templated" : true,
|
|
||||||
"profile" : "profile",
|
|
||||||
"name" : "name",
|
|
||||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
||||||
"type" : "type",
|
|
||||||
"deprecation" : "deprecation",
|
|
||||||
"title" : "title"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ],
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
}"""
|
|
||||||
|
|
||||||
response_loaded_json = json.loads(response_body_json)
|
|
||||||
response_from_json = thousandeyes_sdk.labels.models.LabelDetail.from_json(response_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
|
||||||
|
|
||||||
def test_get_endpoint_test_labels_models_validation(self) -> None:
|
|
||||||
"""Test case for get_endpoint_test_labels request and response models"""
|
|
||||||
|
|
||||||
response_body_json = """
|
|
||||||
{
|
|
||||||
"_links" : {
|
|
||||||
"self" : {
|
|
||||||
"hreflang" : "hreflang",
|
|
||||||
"templated" : true,
|
|
||||||
"profile" : "profile",
|
|
||||||
"name" : "name",
|
|
||||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
||||||
"type" : "type",
|
|
||||||
"deprecation" : "deprecation",
|
|
||||||
"title" : "title"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"labels" : [ {
|
|
||||||
"labelId" : "961123",
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
}, {
|
|
||||||
"labelId" : "961123",
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
} ]
|
|
||||||
}"""
|
|
||||||
|
|
||||||
response_loaded_json = json.loads(response_body_json)
|
|
||||||
response_from_json = thousandeyes_sdk.labels.models.Labels.from_json(response_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
|
||||||
|
|
||||||
def test_update_endpoint_test_label_models_validation(self) -> None:
|
|
||||||
"""Test case for update_endpoint_test_label request and response models"""
|
|
||||||
request_body_json = """
|
|
||||||
{
|
|
||||||
"name" : "My new label",
|
|
||||||
"ids" : [ "5048", "1234" ]
|
|
||||||
}"""
|
|
||||||
|
|
||||||
request_loaded_json = json.loads(request_body_json)
|
|
||||||
request_from_json = thousandeyes_sdk.labels.models.LabelRequest.from_json(request_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
|
|
||||||
|
|
||||||
response_body_json = """
|
|
||||||
{
|
|
||||||
"labelId" : "961123",
|
|
||||||
"_links" : {
|
|
||||||
"self" : {
|
|
||||||
"hreflang" : "hreflang",
|
|
||||||
"templated" : true,
|
|
||||||
"profile" : "profile",
|
|
||||||
"name" : "name",
|
|
||||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
||||||
"type" : "type",
|
|
||||||
"deprecation" : "deprecation",
|
|
||||||
"title" : "title"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ],
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
}"""
|
|
||||||
|
|
||||||
response_loaded_json = json.loads(response_body_json)
|
|
||||||
response_from_json = thousandeyes_sdk.labels.models.LabelDetail.from_json(response_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
unittest.main()
|
|
||||||
@ -1,174 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Labels API
|
|
||||||
|
|
||||||
### Overview This is API for the Labels API (formerly called groups).
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 7.0.13
|
|
||||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
""" # noqa: E501
|
|
||||||
|
|
||||||
|
|
||||||
import json
|
|
||||||
import unittest
|
|
||||||
import thousandeyes_sdk.labels.models
|
|
||||||
|
|
||||||
from .test_utils import assert_constructed_model_matches_example_json
|
|
||||||
from thousandeyes_sdk.labels.api.test_api import TestApi
|
|
||||||
|
|
||||||
|
|
||||||
class TestTestApi(unittest.TestCase):
|
|
||||||
"""TestApi unit test stubs"""
|
|
||||||
|
|
||||||
def setUp(self) -> None:
|
|
||||||
self.api = TestApi()
|
|
||||||
|
|
||||||
def tearDown(self) -> None:
|
|
||||||
pass
|
|
||||||
|
|
||||||
def test_create_test_label_models_validation(self) -> None:
|
|
||||||
"""Test case for create_test_label request and response models"""
|
|
||||||
request_body_json = """
|
|
||||||
{
|
|
||||||
"name" : "My new label",
|
|
||||||
"ids" : [ "5048", "1234" ]
|
|
||||||
}"""
|
|
||||||
|
|
||||||
request_loaded_json = json.loads(request_body_json)
|
|
||||||
request_from_json = thousandeyes_sdk.labels.models.LabelRequest.from_json(request_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
|
|
||||||
|
|
||||||
response_body_json = """
|
|
||||||
{
|
|
||||||
"labelId" : "961123",
|
|
||||||
"_links" : {
|
|
||||||
"self" : {
|
|
||||||
"hreflang" : "hreflang",
|
|
||||||
"templated" : true,
|
|
||||||
"profile" : "profile",
|
|
||||||
"name" : "name",
|
|
||||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
||||||
"type" : "type",
|
|
||||||
"deprecation" : "deprecation",
|
|
||||||
"title" : "title"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ],
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
}"""
|
|
||||||
|
|
||||||
response_loaded_json = json.loads(response_body_json)
|
|
||||||
response_from_json = thousandeyes_sdk.labels.models.LabelDetail.from_json(response_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
|
||||||
|
|
||||||
def test_delete_test_label_models_validation(self) -> None:
|
|
||||||
"""Test case for delete_test_label request and response models"""
|
|
||||||
|
|
||||||
|
|
||||||
def test_get_test_label_models_validation(self) -> None:
|
|
||||||
"""Test case for get_test_label request and response models"""
|
|
||||||
|
|
||||||
response_body_json = """
|
|
||||||
{
|
|
||||||
"labelId" : "961123",
|
|
||||||
"_links" : {
|
|
||||||
"self" : {
|
|
||||||
"hreflang" : "hreflang",
|
|
||||||
"templated" : true,
|
|
||||||
"profile" : "profile",
|
|
||||||
"name" : "name",
|
|
||||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
||||||
"type" : "type",
|
|
||||||
"deprecation" : "deprecation",
|
|
||||||
"title" : "title"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ],
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
}"""
|
|
||||||
|
|
||||||
response_loaded_json = json.loads(response_body_json)
|
|
||||||
response_from_json = thousandeyes_sdk.labels.models.LabelDetail.from_json(response_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
|
||||||
|
|
||||||
def test_get_test_labels_models_validation(self) -> None:
|
|
||||||
"""Test case for get_test_labels request and response models"""
|
|
||||||
|
|
||||||
response_body_json = """
|
|
||||||
{
|
|
||||||
"_links" : {
|
|
||||||
"self" : {
|
|
||||||
"hreflang" : "hreflang",
|
|
||||||
"templated" : true,
|
|
||||||
"profile" : "profile",
|
|
||||||
"name" : "name",
|
|
||||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
||||||
"type" : "type",
|
|
||||||
"deprecation" : "deprecation",
|
|
||||||
"title" : "title"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"labels" : [ {
|
|
||||||
"labelId" : "961123",
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
}, {
|
|
||||||
"labelId" : "961123",
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
} ]
|
|
||||||
}"""
|
|
||||||
|
|
||||||
response_loaded_json = json.loads(response_body_json)
|
|
||||||
response_from_json = thousandeyes_sdk.labels.models.Labels.from_json(response_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
|
||||||
|
|
||||||
def test_update_test_label_models_validation(self) -> None:
|
|
||||||
"""Test case for update_test_label request and response models"""
|
|
||||||
request_body_json = """
|
|
||||||
{
|
|
||||||
"name" : "My new label",
|
|
||||||
"ids" : [ "5048", "1234" ]
|
|
||||||
}"""
|
|
||||||
|
|
||||||
request_loaded_json = json.loads(request_body_json)
|
|
||||||
request_from_json = thousandeyes_sdk.labels.models.LabelRequest.from_json(request_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
|
|
||||||
|
|
||||||
response_body_json = """
|
|
||||||
{
|
|
||||||
"labelId" : "961123",
|
|
||||||
"_links" : {
|
|
||||||
"self" : {
|
|
||||||
"hreflang" : "hreflang",
|
|
||||||
"templated" : true,
|
|
||||||
"profile" : "profile",
|
|
||||||
"name" : "name",
|
|
||||||
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
|
|
||||||
"type" : "type",
|
|
||||||
"deprecation" : "deprecation",
|
|
||||||
"title" : "title"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"name" : "Label XYZ",
|
|
||||||
"ids" : [ "231286", "6317a3ca0d2bfc6ab882d6ce", "6317a3ca0d2bfc6ab882d6ca" ],
|
|
||||||
"isBuiltIn" : true,
|
|
||||||
"type" : "endpoint-test"
|
|
||||||
}"""
|
|
||||||
|
|
||||||
response_loaded_json = json.loads(response_body_json)
|
|
||||||
response_from_json = thousandeyes_sdk.labels.models.LabelDetail.from_json(response_body_json)
|
|
||||||
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
unittest.main()
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
# coding: utf-8
|
|
||||||
|
|
||||||
import json
|
|
||||||
import unittest
|
|
||||||
|
|
||||||
from pydantic import BaseModel
|
|
||||||
|
|
||||||
|
|
||||||
def assert_constructed_model_matches_example_json(model: BaseModel, loaded_json: dict):
|
|
||||||
test_case = unittest.TestCase()
|
|
||||||
test_case.maxDiff = None
|
|
||||||
test_case.assertIsNotNone(model)
|
|
||||||
constructed_json = json.loads(model.to_json())
|
|
||||||
sorted_loaded_json = json.dumps(loaded_json, sort_keys=True)
|
|
||||||
sorted_constructed_json = json.dumps(constructed_json, sort_keys=True)
|
|
||||||
test_case.assertEqual(sorted_loaded_json, sorted_constructed_json)
|
|
||||||
Loading…
Reference in New Issue
Block a user