thousandeyes-sdk-python/agents_api/docs/ProxiesApi.md
2023-12-11 09:29:15 +00:00

3.4 KiB

agents_api.ProxiesApi

All URIs are relative to https://api.thousandeyes.com

Method HTTP request Description
get_agent_proxies GET /v7/agents/proxies List agent proxies

get_agent_proxies

GetAgentProxies200Response get_agent_proxies(aid=aid)

List agent proxies

List all agent proxies available under the account group.

Example

  • Bearer Authentication (BearerAuth):
import time
import os
import agents_api
from agents_api.models.get_agent_proxies200_response import GetAgentProxies200Response
from agents_api.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 = agents_api.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 = agents_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with agents_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = agents_api.ProxiesApi(api_client)
    aid = '2067' # 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 proxies
        api_response = api_instance.get_agent_proxies(aid=aid)
        print("The response of ProxiesApi->get_agent_proxies:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProxiesApi->get_agent_proxies: %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

GetAgentProxies200Response

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/hal+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]