Co-authored-by: API Team <api-team@thousandeyes.com>
22 KiB
thousandeyes_sdk.tests.WebTransactionTestsApi
All URIs are relative to https://api.thousandeyes.com/v7
| Method | HTTP request | Description |
|---|---|---|
| create_web_transactions_test | POST /tests/web-transactions | Create Web Transactions test |
| delete_web_transactions_test | DELETE /tests/web-transactions/{testId} | Delete Web Transactions test |
| get_web_transactions_test | GET /tests/web-transactions/{testId} | Get Web Transactions test |
| get_web_transactions_tests | GET /tests/web-transactions | List Web Transactions tests |
| update_web_transactions_test | PUT /tests/web-transactions/{testId} | Update Web Transactions test |
create_web_transactions_test
WebTransactionTestResponse create_web_transactions_test(web_transaction_test_request, aid=aid, expand=expand)
Create Web Transactions test
Creates a new Web Transactions test. This method requires Account Admin permissions.
Example
- Bearer Authentication (BearerAuth):
import thousandeyes_sdk.tests
from thousandeyes_sdk.tests.models.expand_test_options import ExpandTestOptions
from thousandeyes_sdk.tests.models.web_transaction_test_request import WebTransactionTestRequest
from thousandeyes_sdk.tests.models.web_transaction_test_response import WebTransactionTestResponse
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.WebTransactionTestsApi(api_client)
web_transaction_test_request = thousandeyes_sdk.tests.WebTransactionTestRequest() # WebTransactionTestRequest |
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 Web Transactions test
api_response = api_instance.create_web_transactions_test(web_transaction_test_request, aid=aid, expand=expand)
print("The response of WebTransactionTestsApi->create_web_transactions_test:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebTransactionTestsApi->create_web_transactions_test: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| web_transaction_test_request | WebTransactionTestRequest | ||
| 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_web_transactions_test
delete_web_transactions_test(test_id, aid=aid)
Delete Web Transactions test
Deletes the specified Web Transactions 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.WebTransactionTestsApi(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 Web Transactions test
api_instance.delete_web_transactions_test(test_id, aid=aid)
except Exception as e:
print("Exception when calling WebTransactionTestsApi->delete_web_transactions_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_web_transactions_test
WebTransactionTestResponse get_web_transactions_test(test_id, aid=aid, version_id=version_id, expand=expand)
Get Web Transactions test
Returns details for a Web Transactions test, including name, intervals, targets, alert rules and agents.
Example
- Bearer Authentication (BearerAuth):
import thousandeyes_sdk.tests
from thousandeyes_sdk.tests.models.expand_test_options import ExpandTestOptions
from thousandeyes_sdk.tests.models.web_transaction_test_response import WebTransactionTestResponse
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.WebTransactionTestsApi(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)
version_id = '1234' # str | The unique identifier for a specific version of the test settings. If provided, returns the test configuration as it existed at that version. To retrieve available version IDs, use the `/tests/{testId}/history` endpoint. If not specified, the current version of the test settings is returned. (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 Web Transactions test
api_response = api_instance.get_web_transactions_test(test_id, aid=aid, version_id=version_id, expand=expand)
print("The response of WebTransactionTestsApi->get_web_transactions_test:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebTransactionTestsApi->get_web_transactions_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] |
| version_id | str | The unique identifier for a specific version of the test settings. If provided, returns the test configuration as it existed at that version. To retrieve available version IDs, use the `/tests/{testId}/history` endpoint. If not specified, the current version of the test settings is returned. | [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_web_transactions_tests
WebTransactionTests get_web_transactions_tests(aid=aid)
List Web Transactions tests
Returns a list of all Web Transactions tests and saved events. Note: Saved Events are now called Private Snapshots in the user interface. This change does not affect API.
Example
- Bearer Authentication (BearerAuth):
import thousandeyes_sdk.tests
from thousandeyes_sdk.tests.models.web_transaction_tests import WebTransactionTests
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.WebTransactionTestsApi(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 Web Transactions tests
api_response = api_instance.get_web_transactions_tests(aid=aid)
print("The response of WebTransactionTestsApi->get_web_transactions_tests:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebTransactionTestsApi->get_web_transactions_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_web_transactions_test
WebTransactionTestResponse update_web_transactions_test(test_id, web_transaction_test_request, aid=aid, expand=expand)
Update Web Transactions test
Updates a Web Transactions test. The target test cannot be a live share or saved event. This method requires Account Admin permissions. Note: Saved Events are now called Private Snapshots in the user interface. This change does not affect API.
Example
- Bearer Authentication (BearerAuth):
import thousandeyes_sdk.tests
from thousandeyes_sdk.tests.models.expand_test_options import ExpandTestOptions
from thousandeyes_sdk.tests.models.web_transaction_test_request import WebTransactionTestRequest
from thousandeyes_sdk.tests.models.web_transaction_test_response import WebTransactionTestResponse
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.WebTransactionTestsApi(api_client)
test_id = '202701' # str | Test ID
web_transaction_test_request = thousandeyes_sdk.tests.WebTransactionTestRequest() # WebTransactionTestRequest |
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 Web Transactions test
api_response = api_instance.update_web_transactions_test(test_id, web_transaction_test_request, aid=aid, expand=expand)
print("The response of WebTransactionTestsApi->update_web_transactions_test:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling WebTransactionTestsApi->update_web_transactions_test: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| test_id | str | Test ID | |
| web_transaction_test_request | WebTransactionTestRequest | ||
| 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]