mirror of
https://github.com/thousandeyes/thousandeyes-sdk-python.git
synced 2025-12-06 16:05:30 +00:00
459 lines
20 KiB
Markdown
459 lines
20 KiB
Markdown
# thousandeyes_sdk.tests.DNSTraceTestsApi
|
|
|
|
All URIs are relative to *https://api.thousandeyes.com/v7*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**create_dns_trace_test**](DNSTraceTestsApi.md#create_dns_trace_test) | **POST** /tests/dns-trace | Create DNS Trace test
|
|
[**delete_dns_trace_test**](DNSTraceTestsApi.md#delete_dns_trace_test) | **DELETE** /tests/dns-trace/{testId} | Delete DNS Trace test
|
|
[**get_dns_trace_test**](DNSTraceTestsApi.md#get_dns_trace_test) | **GET** /tests/dns-trace/{testId} | Get DNS Trace test
|
|
[**get_dns_trace_tests**](DNSTraceTestsApi.md#get_dns_trace_tests) | **GET** /tests/dns-trace | List DNS Trace tests
|
|
[**update_dns_trace_test**](DNSTraceTestsApi.md#update_dns_trace_test) | **PUT** /tests/dns-trace/{testId} | Update DNS Trace test
|
|
|
|
|
|
# **create_dns_trace_test**
|
|
> DnsTraceTestResponse create_dns_trace_test(dns_trace_test_request, aid=aid, expand=expand)
|
|
|
|
Create DNS Trace test
|
|
|
|
Creates a new DNS Trace test. This method requires Account Admin permissions.
|
|
|
|
### Example
|
|
|
|
* Bearer Authentication (BearerAuth):
|
|
|
|
```python
|
|
import thousandeyes_sdk.tests
|
|
from thousandeyes_sdk.tests.models.dns_trace_test_request import DnsTraceTestRequest
|
|
from thousandeyes_sdk.tests.models.dns_trace_test_response import DnsTraceTestResponse
|
|
from thousandeyes_sdk.tests.models.expand_test_options import ExpandTestOptions
|
|
from thousandeyes_sdk.tests.rest import ApiException
|
|
from pprint import pprint
|
|
|
|
# Defining the host is optional and defaults to https://api.thousandeyes.com/v7
|
|
# See configuration.py for a list of all supported configuration parameters.
|
|
configuration = thousandeyes_sdk.core.Configuration(
|
|
host = "https://api.thousandeyes.com/v7"
|
|
)
|
|
|
|
# The client must configure the authentication and authorization parameters
|
|
# in accordance with the API server security policy.
|
|
# Examples for each auth method are provided below, use the example that
|
|
# satisfies your auth use case.
|
|
|
|
# Configure Bearer authorization: BearerAuth
|
|
configuration = thousandeyes_sdk.core.Configuration(
|
|
access_token = os.environ["BEARER_TOKEN"]
|
|
)
|
|
|
|
# Enter a context with an instance of the API client
|
|
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
|
# Create an instance of the API class
|
|
api_instance = thousandeyes_sdk.tests.DNSTraceTestsApi(api_client)
|
|
dns_trace_test_request = thousandeyes_sdk.tests.DnsTraceTestRequest() # DnsTraceTestRequest |
|
|
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
|
|
expand = [thousandeyes_sdk.tests.ExpandTestOptions()] # List[ExpandTestOptions] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional)
|
|
|
|
try:
|
|
# Create DNS Trace test
|
|
api_response = api_instance.create_dns_trace_test(dns_trace_test_request, aid=aid, expand=expand)
|
|
print("The response of DNSTraceTestsApi->create_dns_trace_test:\n")
|
|
pprint(api_response)
|
|
except Exception as e:
|
|
print("Exception when calling DNSTraceTestsApi->create_dns_trace_test: %s\n" % e)
|
|
```
|
|
|
|
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**dns_trace_test_request** | [**DnsTraceTestRequest**](DnsTraceTestRequest.md)| |
|
|
**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]
|
|
**expand** | [**List[ExpandTestOptions]**](ExpandTestOptions.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional]
|
|
|
|
### Return type
|
|
|
|
[**DnsTraceTestResponse**](DnsTraceTestResponse.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 | - |
|
|
**502** | Bad Gateway | - |
|
|
**0** | An error occurred | - |
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
# **delete_dns_trace_test**
|
|
> delete_dns_trace_test(test_id, aid=aid)
|
|
|
|
Delete DNS Trace test
|
|
|
|
Deletes the specified DNS Trace test. This method requires Account Admin permissions.
|
|
|
|
### Example
|
|
|
|
* Bearer Authentication (BearerAuth):
|
|
|
|
```python
|
|
import thousandeyes_sdk.tests
|
|
from thousandeyes_sdk.tests.rest import ApiException
|
|
from pprint import pprint
|
|
|
|
# Defining the host is optional and defaults to https://api.thousandeyes.com/v7
|
|
# See configuration.py for a list of all supported configuration parameters.
|
|
configuration = thousandeyes_sdk.core.Configuration(
|
|
host = "https://api.thousandeyes.com/v7"
|
|
)
|
|
|
|
# The client must configure the authentication and authorization parameters
|
|
# in accordance with the API server security policy.
|
|
# Examples for each auth method are provided below, use the example that
|
|
# satisfies your auth use case.
|
|
|
|
# Configure Bearer authorization: BearerAuth
|
|
configuration = thousandeyes_sdk.core.Configuration(
|
|
access_token = os.environ["BEARER_TOKEN"]
|
|
)
|
|
|
|
# Enter a context with an instance of the API client
|
|
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
|
# Create an instance of the API class
|
|
api_instance = thousandeyes_sdk.tests.DNSTraceTestsApi(api_client)
|
|
test_id = '202701' # str | Test ID
|
|
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
|
|
|
|
try:
|
|
# Delete DNS Trace test
|
|
api_instance.delete_dns_trace_test(test_id, aid=aid)
|
|
except Exception as e:
|
|
print("Exception when calling DNSTraceTestsApi->delete_dns_trace_test: %s\n" % e)
|
|
```
|
|
|
|
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**test_id** | **str**| Test ID |
|
|
**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 | - |
|
|
**401** | Unauthorized | - |
|
|
**403** | Insufficient permissions to query endpoint | - |
|
|
**404** | Not found | - |
|
|
**429** | Exhausted rate limit for the organization | - |
|
|
**500** | Internal server error | - |
|
|
**502** | Bad Gateway | - |
|
|
**0** | An error occurred | - |
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
# **get_dns_trace_test**
|
|
> DnsTraceTestResponse get_dns_trace_test(test_id, aid=aid, expand=expand)
|
|
|
|
Get DNS Trace test
|
|
|
|
Returns details for a DNS Trace test, including name, intervals, targets, alert rules and agents.
|
|
|
|
### Example
|
|
|
|
* Bearer Authentication (BearerAuth):
|
|
|
|
```python
|
|
import thousandeyes_sdk.tests
|
|
from thousandeyes_sdk.tests.models.dns_trace_test_response import DnsTraceTestResponse
|
|
from thousandeyes_sdk.tests.models.expand_test_options import ExpandTestOptions
|
|
from thousandeyes_sdk.tests.rest import ApiException
|
|
from pprint import pprint
|
|
|
|
# Defining the host is optional and defaults to https://api.thousandeyes.com/v7
|
|
# See configuration.py for a list of all supported configuration parameters.
|
|
configuration = thousandeyes_sdk.core.Configuration(
|
|
host = "https://api.thousandeyes.com/v7"
|
|
)
|
|
|
|
# The client must configure the authentication and authorization parameters
|
|
# in accordance with the API server security policy.
|
|
# Examples for each auth method are provided below, use the example that
|
|
# satisfies your auth use case.
|
|
|
|
# Configure Bearer authorization: BearerAuth
|
|
configuration = thousandeyes_sdk.core.Configuration(
|
|
access_token = os.environ["BEARER_TOKEN"]
|
|
)
|
|
|
|
# Enter a context with an instance of the API client
|
|
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
|
# Create an instance of the API class
|
|
api_instance = thousandeyes_sdk.tests.DNSTraceTestsApi(api_client)
|
|
test_id = '202701' # str | Test ID
|
|
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
|
|
expand = [thousandeyes_sdk.tests.ExpandTestOptions()] # List[ExpandTestOptions] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional)
|
|
|
|
try:
|
|
# Get DNS Trace test
|
|
api_response = api_instance.get_dns_trace_test(test_id, aid=aid, expand=expand)
|
|
print("The response of DNSTraceTestsApi->get_dns_trace_test:\n")
|
|
pprint(api_response)
|
|
except Exception as e:
|
|
print("Exception when calling DNSTraceTestsApi->get_dns_trace_test: %s\n" % e)
|
|
```
|
|
|
|
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**test_id** | **str**| Test ID |
|
|
**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]
|
|
**expand** | [**List[ExpandTestOptions]**](ExpandTestOptions.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional]
|
|
|
|
### Return type
|
|
|
|
[**DnsTraceTestResponse**](DnsTraceTestResponse.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 | - |
|
|
**401** | Unauthorized | - |
|
|
**403** | Insufficient permissions to query endpoint | - |
|
|
**404** | Not found | - |
|
|
**429** | Exhausted rate limit for the organization | - |
|
|
**500** | Internal server error | - |
|
|
**502** | Bad Gateway | - |
|
|
**0** | An error occurred | - |
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
# **get_dns_trace_tests**
|
|
> DnsTraceTests get_dns_trace_tests(aid=aid)
|
|
|
|
List DNS Trace tests
|
|
|
|
Returns a list of all DNS Trace tests and saved events.
|
|
|
|
### Example
|
|
|
|
* Bearer Authentication (BearerAuth):
|
|
|
|
```python
|
|
import thousandeyes_sdk.tests
|
|
from thousandeyes_sdk.tests.models.dns_trace_tests import DnsTraceTests
|
|
from thousandeyes_sdk.tests.rest import ApiException
|
|
from pprint import pprint
|
|
|
|
# Defining the host is optional and defaults to https://api.thousandeyes.com/v7
|
|
# See configuration.py for a list of all supported configuration parameters.
|
|
configuration = thousandeyes_sdk.core.Configuration(
|
|
host = "https://api.thousandeyes.com/v7"
|
|
)
|
|
|
|
# The client must configure the authentication and authorization parameters
|
|
# in accordance with the API server security policy.
|
|
# Examples for each auth method are provided below, use the example that
|
|
# satisfies your auth use case.
|
|
|
|
# Configure Bearer authorization: BearerAuth
|
|
configuration = thousandeyes_sdk.core.Configuration(
|
|
access_token = os.environ["BEARER_TOKEN"]
|
|
)
|
|
|
|
# Enter a context with an instance of the API client
|
|
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
|
# Create an instance of the API class
|
|
api_instance = thousandeyes_sdk.tests.DNSTraceTestsApi(api_client)
|
|
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
|
|
|
|
try:
|
|
# List DNS Trace tests
|
|
api_response = api_instance.get_dns_trace_tests(aid=aid)
|
|
print("The response of DNSTraceTestsApi->get_dns_trace_tests:\n")
|
|
pprint(api_response)
|
|
except Exception as e:
|
|
print("Exception when calling DNSTraceTestsApi->get_dns_trace_tests: %s\n" % e)
|
|
```
|
|
|
|
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
|
|
|
|
### Return type
|
|
|
|
[**DnsTraceTests**](DnsTraceTests.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 | - |
|
|
**401** | Unauthorized | - |
|
|
**403** | Insufficient permissions to query endpoint | - |
|
|
**404** | Not found | - |
|
|
**429** | Exhausted rate limit for the organization | - |
|
|
**500** | Internal server error | - |
|
|
**502** | Bad Gateway | - |
|
|
**0** | An error occurred | - |
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
# **update_dns_trace_test**
|
|
> DnsTraceTestResponse update_dns_trace_test(test_id, dns_trace_test_request, aid=aid, expand=expand)
|
|
|
|
Update DNS Trace test
|
|
|
|
Updates a DNS Trace test. The target test cannot be a live share or saved event. This method requires Account Admin permissions.
|
|
|
|
### Example
|
|
|
|
* Bearer Authentication (BearerAuth):
|
|
|
|
```python
|
|
import thousandeyes_sdk.tests
|
|
from thousandeyes_sdk.tests.models.dns_trace_test_request import DnsTraceTestRequest
|
|
from thousandeyes_sdk.tests.models.dns_trace_test_response import DnsTraceTestResponse
|
|
from thousandeyes_sdk.tests.models.expand_test_options import ExpandTestOptions
|
|
from thousandeyes_sdk.tests.rest import ApiException
|
|
from pprint import pprint
|
|
|
|
# Defining the host is optional and defaults to https://api.thousandeyes.com/v7
|
|
# See configuration.py for a list of all supported configuration parameters.
|
|
configuration = thousandeyes_sdk.core.Configuration(
|
|
host = "https://api.thousandeyes.com/v7"
|
|
)
|
|
|
|
# The client must configure the authentication and authorization parameters
|
|
# in accordance with the API server security policy.
|
|
# Examples for each auth method are provided below, use the example that
|
|
# satisfies your auth use case.
|
|
|
|
# Configure Bearer authorization: BearerAuth
|
|
configuration = thousandeyes_sdk.core.Configuration(
|
|
access_token = os.environ["BEARER_TOKEN"]
|
|
)
|
|
|
|
# Enter a context with an instance of the API client
|
|
with thousandeyes_sdk.core.ApiClient(configuration) as api_client:
|
|
# Create an instance of the API class
|
|
api_instance = thousandeyes_sdk.tests.DNSTraceTestsApi(api_client)
|
|
test_id = '202701' # str | Test ID
|
|
dns_trace_test_request = thousandeyes_sdk.tests.DnsTraceTestRequest() # DnsTraceTestRequest |
|
|
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
|
|
expand = [thousandeyes_sdk.tests.ExpandTestOptions()] # List[ExpandTestOptions] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional)
|
|
|
|
try:
|
|
# Update DNS Trace test
|
|
api_response = api_instance.update_dns_trace_test(test_id, dns_trace_test_request, aid=aid, expand=expand)
|
|
print("The response of DNSTraceTestsApi->update_dns_trace_test:\n")
|
|
pprint(api_response)
|
|
except Exception as e:
|
|
print("Exception when calling DNSTraceTestsApi->update_dns_trace_test: %s\n" % e)
|
|
```
|
|
|
|
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**test_id** | **str**| Test ID |
|
|
**dns_trace_test_request** | [**DnsTraceTestRequest**](DnsTraceTestRequest.md)| |
|
|
**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]
|
|
**expand** | [**List[ExpandTestOptions]**](ExpandTestOptions.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional]
|
|
|
|
### Return type
|
|
|
|
[**DnsTraceTestResponse**](DnsTraceTestResponse.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 | - |
|
|
**502** | Bad Gateway | - |
|
|
**0** | An error occurred | - |
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|