Agents API
- API version: 7.0.32
Manage all agents available to your account in ThousandEyes, including both Cloud and Enterprise Agents.
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- Java 11+
- Maven/Gradle
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependencies>
<dependency>
<groupId>com.thousandeyes.sdk</groupId>
<artifactId>agents</artifactId>
<version>version</version>
</dependency>
<dependency>
<groupId>com.thousandeyes.sdk</groupId>
<artifactId>client</artifactId>
<version>version</version>
</dependency>
<!-- Example only, you can use your own client implementation -->
<dependency>
<groupId>com.thousandeyes.sdk</groupId>
<artifactId>client-native</artifactId>
<version>version</version>
</dependency>
</dependencies>
Add this dependency to your project's build file:
implementation "com.thousandeyes.sdk:client:<version>"
implementation "com.thousandeyes.sdk:client-native:<version>" #Example only, you can use your own client implementation
implementation "com.thousandeyes.sdk:agents:<version>"
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/agents-version.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
import com.thousandeyes.sdk.*;
import com.thousandeyes.sdk.client.*;
import com.thousandeyes.sdk.agents.model.*;
import com.thousandeyes.sdk.agents.AgentProxiesApi;
public class AgentProxiesApiExample {
public static void main(String[] args) {
// Configure clients using the `defaultClient` object, such as
// overriding the host and port, timeout, etc. In this example we are using the NativeApiClient
// but you can use your own client implementation
ApiClient defaultClient = NativeApiClient
.builder()
.baseUri("https://api.thousandeyes.com/v7")
.bearerToken("<bearer-token>")
.build();
AgentProxiesApi apiInstance = new AgentProxiesApi(defaultClient);
String aid = "1234"; // String | 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.
try {
AgentProxies result = apiInstance.getAgentsProxies(aid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AgentProxiesApi#getAgentsProxies");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
All URIs are relative to https://api.thousandeyes.com/v7
Class | Method | HTTP request | Description |
---|---|---|---|
AgentProxiesApi | getAgentsProxies | GET /agents/proxies | List agent proxies |
AgentProxiesApi | getAgentsProxiesWithHttpInfo | GET /agents/proxies | List agent proxies |
CloudAndEnterpriseAgentNotificationRulesApi | getAgentsNotificationRule | GET /agents/notification-rules/{notificationRuleId} | Retrieve agent notification rule |
CloudAndEnterpriseAgentNotificationRulesApi | getAgentsNotificationRuleWithHttpInfo | GET /agents/notification-rules/{notificationRuleId} | Retrieve agent notification rule |
CloudAndEnterpriseAgentNotificationRulesApi | getAgentsNotificationRules | GET /agents/notification-rules | List agent notification rules |
CloudAndEnterpriseAgentNotificationRulesApi | getAgentsNotificationRulesWithHttpInfo | GET /agents/notification-rules | List agent notification rules |
CloudAndEnterpriseAgentsApi | deleteAgent | DELETE /agents/{agentId} | Delete Enterprise Agent |
CloudAndEnterpriseAgentsApi | deleteAgentWithHttpInfo | DELETE /agents/{agentId} | Delete Enterprise Agent |
CloudAndEnterpriseAgentsApi | getAgent | GET /agents/{agentId} | Retrieve Cloud and Enterprise Agent |
CloudAndEnterpriseAgentsApi | getAgentWithHttpInfo | GET /agents/{agentId} | Retrieve Cloud and Enterprise Agent |
CloudAndEnterpriseAgentsApi | getAgents | GET /agents | List Cloud and Enterprise Agents |
CloudAndEnterpriseAgentsApi | getAgentsWithHttpInfo | GET /agents | List Cloud and Enterprise Agents |
CloudAndEnterpriseAgentsApi | updateAgent | PUT /agents/{agentId} | Update Enterprise Agent |
CloudAndEnterpriseAgentsApi | updateAgentWithHttpInfo | PUT /agents/{agentId} | Update Enterprise Agent |
EnterpriseAgentClusterApi | assignAgentToCluster | POST /agents/{agentId}/cluster/assign | Add member to Enterprise Agent cluster |
EnterpriseAgentClusterApi | assignAgentToClusterWithHttpInfo | POST /agents/{agentId}/cluster/assign | Add member to Enterprise Agent cluster |
EnterpriseAgentClusterApi | unassignAgentFromCluster | POST /agents/{agentId}/cluster/unassign | Remove member from Enterprise Agent cluster |
EnterpriseAgentClusterApi | unassignAgentFromClusterWithHttpInfo | POST /agents/{agentId}/cluster/unassign | Remove member from Enterprise Agent cluster |
Authentication schemes defined for the API:
- Type: HTTP Bearer Token authentication
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.
However, the instances of the api clients created from the ApiClient
are thread-safe and can be re-used.