Skip to content

Latest commit

 

History

History
328 lines (242 loc) · 17 KB

File metadata and controls

328 lines (242 loc) · 17 KB

EndpointAgentsTransferApi

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

Method HTTP request Description
transferEndpointAgent POST /endpoint/agents/{agentId}/transfer Transfer endpoint agent
transferEndpointAgentWithHttpInfo POST /endpoint/agents/{agentId}/transfer Transfer endpoint agent
transferEndpointAgents POST /endpoint/agents/transfer/bulk Bulk transfer agents
transferEndpointAgentsWithHttpInfo POST /endpoint/agents/transfer/bulk Bulk transfer agents

transferEndpointAgent

void transferEndpointAgent(agentId, agentTransferRequest, aid)

Transfer endpoint agent

Initiates the transfer of an agent from its current account, which must correspond to the provided aid, to the target account. Note: It is essential to ensure that the `aid` parameter matches the current account of the agent for this operation to succeed.

Example

// Import classes:
import com.thousandeyes.sdk.client.ApiClient;
import com.thousandeyes.sdk.common.ApiException;
import com.thousandeyes.sdk.endpoint.Configuration;
import com.thousandeyes.sdk.endpoint.authentication.*;
import com.thousandeyes.sdk.endpoint.models.*;
import com.thousandeyes.sdk.endpoint.agents.EndpointAgentsTransferApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.thousandeyes.com/v7");
        
        // Configure HTTP bearer authorization: BearerAuth
        HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth");
        BearerAuth.setBearerToken("BEARER TOKEN");

        EndpointAgentsTransferApi apiInstance = new EndpointAgentsTransferApi(defaultClient);
        UUID agentId = UUID.randomUUID(); // UUID | The identifier of the agent to operate on.
        AgentTransferRequest agentTransferRequest = new AgentTransferRequest(); // AgentTransferRequest | The request to move an agent between accounts.
        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 {
            apiInstance.transferEndpointAgent(agentId, agentTransferRequest, aid);
        } catch (ApiException e) {
            System.err.println("Exception when calling EndpointAgentsTransferApi#transferEndpointAgent");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
agentId UUID The identifier of the agent to operate on.
agentTransferRequest AgentTransferRequest The request to move an agent between accounts.
aid 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. [optional]

Return type

null (empty response body)

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/problem+json

HTTP response details

Status code Description Response headers
202 Transfer initiated -
401 Unauthorized -
403 Insufficient permissions to query endpoint -
404 Not found -
429 Exhausted rate limit for the organization -

transferEndpointAgentWithHttpInfo

ApiResponse transferEndpointAgent transferEndpointAgentWithHttpInfo(agentId, agentTransferRequest, aid)

Transfer endpoint agent

Initiates the transfer of an agent from its current account, which must correspond to the provided aid, to the target account. Note: It is essential to ensure that the `aid` parameter matches the current account of the agent for this operation to succeed.

Example

// Import classes:
import com.thousandeyes.sdk.client.ApiClient;
import com.thousandeyes.sdk.common.ApiException;
import com.thousandeyes.sdk.common.ApiResponse;
import com.thousandeyes.sdk.endpoint.Configuration;
import com.thousandeyes.sdk.endpoint.authentication.*;
import com.thousandeyes.sdk.endpoint.models.*;
import com.thousandeyes.sdk.endpoint.agents.EndpointAgentsTransferApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.thousandeyes.com/v7");
        
        // Configure HTTP bearer authorization: BearerAuth
        HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth");
        BearerAuth.setBearerToken("BEARER TOKEN");

        EndpointAgentsTransferApi apiInstance = new EndpointAgentsTransferApi(defaultClient);
        UUID agentId = UUID.randomUUID(); // UUID | The identifier of the agent to operate on.
        AgentTransferRequest agentTransferRequest = new AgentTransferRequest(); // AgentTransferRequest | The request to move an agent between accounts.
        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 {
            ApiResponse<Void> response = apiInstance.transferEndpointAgentWithHttpInfo(agentId, agentTransferRequest, aid);
            System.out.println("Status code: " + response.getStatusCode());
            System.out.println("Response headers: " + response.getHeaders());
        } catch (ApiException e) {
            System.err.println("Exception when calling EndpointAgentsTransferApi#transferEndpointAgent");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Response headers: " + e.getResponseHeaders());
            System.err.println("Reason: " + e.getResponseBody());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
agentId UUID The identifier of the agent to operate on.
agentTransferRequest AgentTransferRequest The request to move an agent between accounts.
aid 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. [optional]

Return type

ApiResponse

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/problem+json

HTTP response details

Status code Description Response headers
202 Transfer initiated -
401 Unauthorized -
403 Insufficient permissions to query endpoint -
404 Not found -
429 Exhausted rate limit for the organization -

transferEndpointAgents

BulkAgentTransferResponse transferEndpointAgents(aid, bulkAgentTransferRequest)

Bulk transfer agents

Initiates the transfer of multiple agents between accounts. The following conditions apply: * The requester must possess 'write' permissions for both the 'from' and 'to' accounts involved in each transfer. * Multiple transfers may involve a mix of different source and destination accounts. * For each transfer request, the 'from' account must match the current account of the respective agent. * Transfers are executed asynchronously. * Progress tracking is not intended, but users can monitor the progress by periodically polling the 'get agent' endpoint. * Each transfer request is individually validated and completed; this operation is not atomic, meaning transfers can succeed or fail individually. * The API response provides the status of each transfer request. * There are no performance concerns for this API; any number of agents can be transferred in bulk.

Example

// Import classes:
import com.thousandeyes.sdk.client.ApiClient;
import com.thousandeyes.sdk.common.ApiException;
import com.thousandeyes.sdk.endpoint.Configuration;
import com.thousandeyes.sdk.endpoint.authentication.*;
import com.thousandeyes.sdk.endpoint.models.*;
import com.thousandeyes.sdk.endpoint.agents.EndpointAgentsTransferApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.thousandeyes.com/v7");
        
        // Configure HTTP bearer authorization: BearerAuth
        HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth");
        BearerAuth.setBearerToken("BEARER TOKEN");

        EndpointAgentsTransferApi apiInstance = new EndpointAgentsTransferApi(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.
        BulkAgentTransferRequest bulkAgentTransferRequest = new BulkAgentTransferRequest(); // BulkAgentTransferRequest | A collection of `AgentTransfers`.
        try {
            BulkAgentTransferResponse result = apiInstance.transferEndpointAgents(aid, bulkAgentTransferRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EndpointAgentsTransferApi#transferEndpointAgents");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
aid 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. [optional]
bulkAgentTransferRequest BulkAgentTransferRequest A collection of `AgentTransfers`. [optional]

Return type

BulkAgentTransferResponse

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json, text/csv, text/plain
  • Accept: application/hal+json, application/json, application/problem+json

HTTP response details

Status code Description Response headers
207 Transfer initiated -
400 Bad Request -
401 Unauthorized -
403 Insufficient permissions to query endpoint -
404 Not found -
429 Exhausted rate limit for the organization -

transferEndpointAgentsWithHttpInfo

ApiResponse transferEndpointAgents transferEndpointAgentsWithHttpInfo(aid, bulkAgentTransferRequest)

Bulk transfer agents

Initiates the transfer of multiple agents between accounts. The following conditions apply: * The requester must possess 'write' permissions for both the 'from' and 'to' accounts involved in each transfer. * Multiple transfers may involve a mix of different source and destination accounts. * For each transfer request, the 'from' account must match the current account of the respective agent. * Transfers are executed asynchronously. * Progress tracking is not intended, but users can monitor the progress by periodically polling the 'get agent' endpoint. * Each transfer request is individually validated and completed; this operation is not atomic, meaning transfers can succeed or fail individually. * The API response provides the status of each transfer request. * There are no performance concerns for this API; any number of agents can be transferred in bulk.

Example

// Import classes:
import com.thousandeyes.sdk.client.ApiClient;
import com.thousandeyes.sdk.common.ApiException;
import com.thousandeyes.sdk.common.ApiResponse;
import com.thousandeyes.sdk.endpoint.Configuration;
import com.thousandeyes.sdk.endpoint.authentication.*;
import com.thousandeyes.sdk.endpoint.models.*;
import com.thousandeyes.sdk.endpoint.agents.EndpointAgentsTransferApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.thousandeyes.com/v7");
        
        // Configure HTTP bearer authorization: BearerAuth
        HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth");
        BearerAuth.setBearerToken("BEARER TOKEN");

        EndpointAgentsTransferApi apiInstance = new EndpointAgentsTransferApi(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.
        BulkAgentTransferRequest bulkAgentTransferRequest = new BulkAgentTransferRequest(); // BulkAgentTransferRequest | A collection of `AgentTransfers`.
        try {
            ApiResponse<BulkAgentTransferResponse> response = apiInstance.transferEndpointAgentsWithHttpInfo(aid, bulkAgentTransferRequest);
            System.out.println("Status code: " + response.getStatusCode());
            System.out.println("Response headers: " + response.getHeaders());
            System.out.println("Response body: " + response.getData());
        } catch (ApiException e) {
            System.err.println("Exception when calling EndpointAgentsTransferApi#transferEndpointAgents");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Response headers: " + e.getResponseHeaders());
            System.err.println("Reason: " + e.getResponseBody());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
aid 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. [optional]
bulkAgentTransferRequest BulkAgentTransferRequest A collection of `AgentTransfers`. [optional]

Return type

ApiResponse<BulkAgentTransferResponse>

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json, text/csv, text/plain
  • Accept: application/hal+json, application/json, application/problem+json

HTTP response details

Status code Description Response headers
207 Transfer initiated -
400 Bad Request -
401 Unauthorized -
403 Insufficient permissions to query endpoint -
404 Not found -
429 Exhausted rate limit for the organization -