thousandeyes-sdk-python/instant_tests/docs/RunApi.md

94 lines
3.3 KiB
Markdown

# instant_tests.RunApi
All URIs are relative to *https://api.thousandeyes.com*
Method | HTTP request | Description
------------- | ------------- | -------------
[**post_instant_run**](RunApi.md#post_instant_run) | **POST** /v7/tests/{testId}/run | Run instant test
# **post_instant_run**
> post_instant_run(test_id, aid=aid)
Run instant test
Run an existing instant test.
### Example
* Bearer Authentication (BearerAuth):
```python
import instant_tests
from instant_tests.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 = instant_tests.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 = instant_tests.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with instant_tests.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = instant_tests.RunApi(api_client)
test_id = '105' # str | Identifier for the instant test you wish to rerun.
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:
# Run instant test
api_instance.post_instant_run(test_id, aid=aid)
except Exception as e:
print("Exception when calling RunApi->post_instant_run: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**test_id** | **str**| Identifier for the instant test you wish to rerun. |
**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/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)