mirror of
https://github.com/thousandeyes/thousandeyes-sdk-python.git
synced 2025-12-06 07:55:31 +00:00
|
|
||
|---|---|---|
| .. | ||
| .openapi-generator | ||
| docs | ||
| src/thousandeyes_sdk/test_results | ||
| test | ||
| .openapi-generator-ignore | ||
| pyproject.toml | ||
| README.md | ||
| setup.cfg | ||
thousandeyes-sdk-test-results
Get test result metrics for Cloud and Enterprise Agent tests.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 7.0.4
- Package version: 1.0.0
- Generator version: 7.6.0
- Build package: com.thousandeyes.api.codegen.ThousandeyesPythonGenerator
Requirements.
Python 3.7+
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)
Then import the package:
import thousandeyes_sdk.test_results
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install to install the package for all users)
Then import the package:
import thousandeyes_sdk.test_results
Tests
Execute pytest to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
import thousandeyes_sdk.client
import thousandeyes_sdk.test_results
from thousandeyes_sdk.client.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.client.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.client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.test_results.APITestMetricsApi(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)
window = '12h' # str | A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional)
start_date = '2022-07-17T22:00:54Z' # datetime | Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional)
end_date = '2022-07-18T22:00:54Z' # datetime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. (optional)
cursor = 'cursor_example' # str | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional)
try:
# Get API test results
api_response = api_instance.get_test_result_api(test_id, aid=aid, window=window, start_date=start_date, end_date=end_date, cursor=cursor)
print("The response of APITestMetricsApi->get_test_result_api:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling APITestMetricsApi->get_test_result_api: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://api.thousandeyes.com
| Class | Method | HTTP request | Description |
|---|---|---|---|
| APITestMetricsApi | get_test_result_api | GET /v7/test-results/{testId}/api | Get API test results |
| APITestMetricsApi | get_test_result_api_component_detail | GET /v7/test-results/{testId}/api/agent/{agentId}/round/{roundId} | Get API test results by agent and round |
| DNSSECTestMetricsApi | get_test_result_dnssec | GET /v7/test-results/{testId}/dnssec | Get DNSSEC test results |
| DNSServerTestMetricsApi | get_test_result_dns_server | GET /v7/test-results/{testId}/dns-server/{serverId} | Get DNS server test results by server |
| DNSServerTestMetricsApi | get_test_result_dns_servers | GET /v7/test-results/{testId}/dns-server | Get DNS server test results |
| DNSTraceTestMetricsApi | get_test_result_dns_trace | GET /v7/test-results/{testId}/dns-trace | Get DNS trace test results |
| NetworkBGPTestMetricsApi | get_test_results_bgp | GET /v7/test-results/{testId}/bgp | Get BGP test results |
| NetworkBGPTestMetricsApi | get_test_results_bgp_prefix | GET /v7/test-results/{testId}/bgp/routes/prefix/{prefixId}/round/{roundId} | Get BGP route test results by prefix |
| NetworkTestMetricsApi | get_test_pathvis_agent_round | GET /v7/test-results/{testId}/path-vis/agent/{agentId}/round/{roundId} | Get path visualization test results by agent and round |
| NetworkTestMetricsApi | get_test_result_metrics | GET /v7/test-results/{testId}/network | Get network test results |
| NetworkTestMetricsApi | get_test_result_network_path_vis | GET /v7/test-results/{testId}/path-vis | Get path visualization network test results |
| VoiceRTPServerTestMetricsApi | get_test_result_rtp_stream | GET /v7/test-results/{testId}/rtp-server | Retrieve RTP server test metrics |
| VoiceSIPServerTestMetricsApi | get_test_result_sip_server | GET /v7/test-results/{testId}/sip-server | Get SIP server test results |
| WebFTPServerTestMetricsApi | get_test_result_ftp_server | GET /v7/test-results/{testId}/ftp-server | Get FTP server test results |
| WebHTTPServerTestMetricsApi | get_test_result_http_server | GET /v7/test-results/{testId}/http-server | Get HTTP server test results |
| WebPageLoadTestMetricsApi | get_test_result_page_load | GET /v7/test-results/{testId}/page-load | Get page load server test results |
| WebPageLoadTestMetricsApi | get_test_result_page_load_component_detail | GET /v7/test-results/{testId}/page-load/agent/{agentId}/round/{roundId} | Get page load server test results by agent and round |
| WebTransactionsTestMetricsApi | get_test_result_web_transactions | GET /v7/test-results/{testId}/web-transactions | Get web transactions test results |
| WebTransactionsTestMetricsApi | get_test_result_web_transactions_component_detail | GET /v7/test-results/{testId}/web-transactions/agent/{agentId}/round/{roundId} | Get web transactions test results by agent and round |
| WebTransactionsTestMetricsApi | get_test_result_web_transactions_component_page_detail | GET /v7/test-results/{testId}/web-transactions/agent/{agentId}/round/{roundId}/page/{pageId} | Get detailed web transactions test result by agent, round, and page |
Documentation For Models
- Agent
- ApiDetailTestResult
- ApiDetailTestResults
- ApiRequestDetail
- ApiRequestDetailAssertion
- ApiTestResult
- ApiTestResults
- AppLinks
- BgpBasicTestResult
- BgpHop
- BgpTestResult
- BgpTestResults
- BgpTestRouteInformationResult
- BgpTestRouteInformationResults
- DnsServerTestResult
- DnsServerTestResults
- DnsTraceTestResult
- DnsTraceTestResults
- DnssecTestResult
- DnssecTestResults
- EpochTimeWindow
- Error
- Expand
- FtpServerTestResult
- FtpServerTestResults
- HttpTestResult
- HttpTestResultHeaders
- HttpTestResults
- Link
- Marker
- Monitor
- NetworkTestResult
- NetworkTestResults
- Page
- PageLoadDetailTestResult
- PageLoadDetailTestResults
- PageLoadTestResult
- PageLoadTestResults
- PaginationLinks
- PathVisBaseTestResult
- PathVisDetailTestResult
- PathVisDetailTestResults
- PathVisDirection
- PathVisEndpoint
- PathVisHop
- PathVisRoute
- PathVisTestResult
- PathVisTestResults
- RtpStreamTestResult
- RtpStreamTestResults
- SelfLinks
- SimpleTest
- SipServerErrorType
- SipServerTestResult
- SipServerTestResults
- SslCert
- TestDirection
- TestInterval
- TestLinks
- TestResult
- TestResultAppLinks
- TestSelfLink
- TestType
- UnauthorizedError
- ValidationError
- ValidationErrorItem
- WebTransactionDetailTestResult
- WebTransactionDetailTestResults
- WebTransactionPageDetailTestResult
- WebTransactionPageDetailTestResults
- WebTransactionTestResult
- WebTransactionTestResults
Documentation For Authorization
Authentication schemes defined for the API:
BearerAuth
- Type: Bearer authentication