Co-authored-by: API Team <api-team@thousandeyes.com>
(cherry picked from commit cafc4e63c7)
21 KiB
thousandeyes_sdk.tests.AgentToAgentTestsApi
All URIs are relative to https://api.thousandeyes.com/v7
| Method | HTTP request | Description |
|---|---|---|
| create_agent_to_agent_test | POST /tests/agent-to-agent | Create Agent to Agent test |
| delete_agent_to_agent_test | DELETE /tests/agent-to-agent/{testId} | Delete Agent to Agent test |
| get_agent_to_agent_test | GET /tests/agent-to-agent/{testId} | Get Agent to Agent test |
| get_agent_to_agent_tests | GET /tests/agent-to-agent | List Agent to Agent tests |
| update_agent_to_agent_test | PUT /tests/agent-to-agent/{testId} | Update Agent to Agent test |
create_agent_to_agent_test
AgentToAgentTestResponse create_agent_to_agent_test(agent_to_agent_test_request, aid=aid, expand=expand)
Create Agent to Agent test
Creates a new Agent to Agent test. This method requires Account Admin permissions.
Example
- Bearer Authentication (BearerAuth):
import thousandeyes_sdk.tests
from thousandeyes_sdk.tests.models.agent_to_agent_test_request import AgentToAgentTestRequest
from thousandeyes_sdk.tests.models.agent_to_agent_test_response import AgentToAgentTestResponse
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.AgentToAgentTestsApi(api_client)
agent_to_agent_test_request = thousandeyes_sdk.tests.AgentToAgentTestRequest() # AgentToAgentTestRequest |
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 Agent to Agent test
api_response = api_instance.create_agent_to_agent_test(agent_to_agent_test_request, aid=aid, expand=expand)
print("The response of AgentToAgentTestsApi->create_agent_to_agent_test:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentToAgentTestsApi->create_agent_to_agent_test: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| agent_to_agent_test_request | AgentToAgentTestRequest | ||
| 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]** | 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
Authorization
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 - |
| 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] [Back to Model list] [Back to README]
delete_agent_to_agent_test
delete_agent_to_agent_test(test_id, aid=aid)
Delete Agent to Agent test
Deletes the specified Agent to Agent test. This method requires Account Admin permissions.
Example
- Bearer Authentication (BearerAuth):
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.AgentToAgentTestsApi(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 Agent to Agent test
api_instance.delete_agent_to_agent_test(test_id, aid=aid)
except Exception as e:
print("Exception when calling AgentToAgentTestsApi->delete_agent_to_agent_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
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] [Back to Model list] [Back to README]
get_agent_to_agent_test
AgentToAgentTestResponse get_agent_to_agent_test(test_id, aid=aid, expand=expand)
Get Agent to Agent test
Returns details for a Agent to Agent test, including name, intervals, targets, alert rules and agents.
Example
- Bearer Authentication (BearerAuth):
import thousandeyes_sdk.tests
from thousandeyes_sdk.tests.models.agent_to_agent_test_response import AgentToAgentTestResponse
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.AgentToAgentTestsApi(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 Agent to Agent test
api_response = api_instance.get_agent_to_agent_test(test_id, aid=aid, expand=expand)
print("The response of AgentToAgentTestsApi->get_agent_to_agent_test:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentToAgentTestsApi->get_agent_to_agent_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]** | 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
Authorization
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] [Back to Model list] [Back to README]
get_agent_to_agent_tests
AgentToAgentTests get_agent_to_agent_tests(aid=aid)
List Agent to Agent tests
Returns a list of Agent to Agent tests and saved events.
Example
- Bearer Authentication (BearerAuth):
import thousandeyes_sdk.tests
from thousandeyes_sdk.tests.models.agent_to_agent_tests import AgentToAgentTests
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.AgentToAgentTestsApi(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 Agent to Agent tests
api_response = api_instance.get_agent_to_agent_tests(aid=aid)
print("The response of AgentToAgentTestsApi->get_agent_to_agent_tests:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentToAgentTestsApi->get_agent_to_agent_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
Authorization
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] [Back to Model list] [Back to README]
update_agent_to_agent_test
AgentToAgentTestResponse update_agent_to_agent_test(test_id, agent_to_agent_test_request, aid=aid, expand=expand)
Update Agent to Agent test
Updates a Agent to Agent test. This method requires Account Admin permissions.
Example
- Bearer Authentication (BearerAuth):
import thousandeyes_sdk.tests
from thousandeyes_sdk.tests.models.agent_to_agent_test_request import AgentToAgentTestRequest
from thousandeyes_sdk.tests.models.agent_to_agent_test_response import AgentToAgentTestResponse
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.AgentToAgentTestsApi(api_client)
test_id = '202701' # str | Test ID
agent_to_agent_test_request = thousandeyes_sdk.tests.AgentToAgentTestRequest() # AgentToAgentTestRequest |
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 Agent to Agent test
api_response = api_instance.update_agent_to_agent_test(test_id, agent_to_agent_test_request, aid=aid, expand=expand)
print("The response of AgentToAgentTestsApi->update_agent_to_agent_test:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AgentToAgentTestsApi->update_agent_to_agent_test: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| test_id | str | Test ID | |
| agent_to_agent_test_request | AgentToAgentTestRequest | ||
| 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]** | 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
Authorization
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] [Back to Model list] [Back to README]