Skip to content

Latest commit

 

History

History
812 lines (603 loc) · 36.8 KB

EndpointAgentLabelsApi.md

File metadata and controls

812 lines (603 loc) · 36.8 KB

EndpointAgentLabelsApi

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

Method HTTP request Description
createEndpointLabel POST /endpoint/labels Create label
createEndpointLabelWithHttpInfo POST /endpoint/labels Create label
deleteEndpointLabel DELETE /endpoint/labels/{id} Delete label
deleteEndpointLabelWithHttpInfo DELETE /endpoint/labels/{id} Delete label
getEndpointLabel GET /endpoint/labels/{id} Retrieve label
getEndpointLabelWithHttpInfo GET /endpoint/labels/{id} Retrieve label
getEndpointLabels GET /endpoint/labels List labels
getEndpointLabelsWithHttpInfo GET /endpoint/labels List labels
updateEndpointLabel PATCH /endpoint/labels/{id} Update label
updateEndpointLabelWithHttpInfo PATCH /endpoint/labels/{id} Update label

createEndpointLabel

LabelResponse createEndpointLabel(aid, labelRequest)

Create label

Creates a new label.

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.labels.EndpointAgentLabelsApi;

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");

        EndpointAgentLabelsApi apiInstance = new EndpointAgentLabelsApi(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.
        LabelRequest labelRequest = new LabelRequest(); // LabelRequest | Label settings
        try {
            LabelResponse result = apiInstance.createEndpointLabel(aid, labelRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EndpointAgentLabelsApi#createEndpointLabel");
            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]
labelRequest LabelRequest Label settings [optional]

Return type

LabelResponse

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 created * Location -
400 Bad Request -
401 Unauthorized -
403 Insufficient permissions to query endpoint -
429 Exhausted rate limit for the organization -

createEndpointLabelWithHttpInfo

ApiResponse createEndpointLabel createEndpointLabelWithHttpInfo(aid, labelRequest)

Create label

Creates a new label.

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.labels.EndpointAgentLabelsApi;

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");

        EndpointAgentLabelsApi apiInstance = new EndpointAgentLabelsApi(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.
        LabelRequest labelRequest = new LabelRequest(); // LabelRequest | Label settings
        try {
            ApiResponse<LabelResponse> response = apiInstance.createEndpointLabelWithHttpInfo(aid, labelRequest);
            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 EndpointAgentLabelsApi#createEndpointLabel");
            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]
labelRequest LabelRequest Label settings [optional]

Return type

ApiResponse<LabelResponse>

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 created * Location -
400 Bad Request -
401 Unauthorized -
403 Insufficient permissions to query endpoint -
429 Exhausted rate limit for the organization -

deleteEndpointLabel

void deleteEndpointLabel(id, aid)

Delete label

Deletes the label from your account.

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.labels.EndpointAgentLabelsApi;

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");

        EndpointAgentLabelsApi apiInstance = new EndpointAgentLabelsApi(defaultClient);
        String id = "id_example"; // String | The unique identifier of the label to operate on.
        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.deleteEndpointLabel(id, aid);
        } catch (ApiException e) {
            System.err.println("Exception when calling EndpointAgentLabelsApi#deleteEndpointLabel");
            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
id String The unique identifier of the label to operate on.
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: Not defined
  • Accept: application/json, application/problem+json

HTTP response details

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

deleteEndpointLabelWithHttpInfo

ApiResponse deleteEndpointLabel deleteEndpointLabelWithHttpInfo(id, aid)

Delete label

Deletes the label from your account.

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.labels.EndpointAgentLabelsApi;

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");

        EndpointAgentLabelsApi apiInstance = new EndpointAgentLabelsApi(defaultClient);
        String id = "id_example"; // String | The unique identifier of the label to operate on.
        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.deleteEndpointLabelWithHttpInfo(id, aid);
            System.out.println("Status code: " + response.getStatusCode());
            System.out.println("Response headers: " + response.getHeaders());
        } catch (ApiException e) {
            System.err.println("Exception when calling EndpointAgentLabelsApi#deleteEndpointLabel");
            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
id String The unique identifier of the label to operate on.
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: Not defined
  • Accept: application/json, application/problem+json

HTTP response details

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

getEndpointLabel

LabelResponse getEndpointLabel(id, expand, aid)

Retrieve label

Returns a single label using its ID.

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.labels.EndpointAgentLabelsApi;

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");

        EndpointAgentLabelsApi apiInstance = new EndpointAgentLabelsApi(defaultClient);
        String id = "id_example"; // String | The unique identifier of the label to operate on.
        List<ExpandLabelOptions> expand = Arrays.asList(); // List<ExpandLabelOptions> | This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times.
        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 {
            LabelResponse result = apiInstance.getEndpointLabel(id, expand, aid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EndpointAgentLabelsApi#getEndpointLabel");
            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
id String The unique identifier of the label to operate on.
expand List<ExpandLabelOptions> This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times. [optional]
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

LabelResponse

Authorization

BearerAuth

HTTP request headers

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

getEndpointLabelWithHttpInfo

ApiResponse getEndpointLabel getEndpointLabelWithHttpInfo(id, expand, aid)

Retrieve label

Returns a single label using its ID.

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.labels.EndpointAgentLabelsApi;

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");

        EndpointAgentLabelsApi apiInstance = new EndpointAgentLabelsApi(defaultClient);
        String id = "id_example"; // String | The unique identifier of the label to operate on.
        List<ExpandLabelOptions> expand = Arrays.asList(); // List<ExpandLabelOptions> | This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times.
        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<LabelResponse> response = apiInstance.getEndpointLabelWithHttpInfo(id, expand, aid);
            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 EndpointAgentLabelsApi#getEndpointLabel");
            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
id String The unique identifier of the label to operate on.
expand List<ExpandLabelOptions> This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times. [optional]
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<LabelResponse>

Authorization

BearerAuth

HTTP request headers

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

getEndpointLabels

Labels getEndpointLabels(max, cursor, expand, aid)

List labels

Returns a list of labels.

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.labels.EndpointAgentLabelsApi;

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");

        EndpointAgentLabelsApi apiInstance = new EndpointAgentLabelsApi(defaultClient);
        Integer max = 5; // Integer | (Optional) Maximum number of objects to return.
        String cursor = "cursor_example"; // String | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.
        List<ExpandLabelOptions> expand = Arrays.asList(); // List<ExpandLabelOptions> | This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times.
        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 {
            Labels result = apiInstance.getEndpointLabels(max, cursor, expand, aid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EndpointAgentLabelsApi#getEndpointLabels");
            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
max Integer (Optional) Maximum number of objects to return. [optional]
cursor String (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. [optional]
expand List<ExpandLabelOptions> This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times. [optional]
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

Labels

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -
403 Insufficient permissions to query endpoint -
429 Exhausted rate limit for the organization -

getEndpointLabelsWithHttpInfo

ApiResponse getEndpointLabels getEndpointLabelsWithHttpInfo(max, cursor, expand, aid)

List labels

Returns a list of labels.

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.labels.EndpointAgentLabelsApi;

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");

        EndpointAgentLabelsApi apiInstance = new EndpointAgentLabelsApi(defaultClient);
        Integer max = 5; // Integer | (Optional) Maximum number of objects to return.
        String cursor = "cursor_example"; // String | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.
        List<ExpandLabelOptions> expand = Arrays.asList(); // List<ExpandLabelOptions> | This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times.
        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<Labels> response = apiInstance.getEndpointLabelsWithHttpInfo(max, cursor, expand, aid);
            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 EndpointAgentLabelsApi#getEndpointLabels");
            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
max Integer (Optional) Maximum number of objects to return. [optional]
cursor String (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. [optional]
expand List<ExpandLabelOptions> This parameter is optional and determines whether to include additional details in the response. To specify multiple expansions, you can either separate the values with commas or specify the parameter multiple times. [optional]
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<Labels>

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
401 Unauthorized -
403 Insufficient permissions to query endpoint -
429 Exhausted rate limit for the organization -

updateEndpointLabel

LabelResponse updateEndpointLabel(id, aid, label)

Update label

Updates a label using its ID.

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.labels.EndpointAgentLabelsApi;

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");

        EndpointAgentLabelsApi apiInstance = new EndpointAgentLabelsApi(defaultClient);
        String id = "id_example"; // String | The unique identifier of the label to operate on.
        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.
        Label label = new Label(); // Label | Fields to change on the agent
        try {
            LabelResponse result = apiInstance.updateEndpointLabel(id, aid, label);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EndpointAgentLabelsApi#updateEndpointLabel");
            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
id String The unique identifier of the label to operate on.
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]
label Label Fields to change on the agent [optional]

Return type

LabelResponse

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

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

updateEndpointLabelWithHttpInfo

ApiResponse updateEndpointLabel updateEndpointLabelWithHttpInfo(id, aid, label)

Update label

Updates a label using its ID.

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.labels.EndpointAgentLabelsApi;

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");

        EndpointAgentLabelsApi apiInstance = new EndpointAgentLabelsApi(defaultClient);
        String id = "id_example"; // String | The unique identifier of the label to operate on.
        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.
        Label label = new Label(); // Label | Fields to change on the agent
        try {
            ApiResponse<LabelResponse> response = apiInstance.updateEndpointLabelWithHttpInfo(id, aid, label);
            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 EndpointAgentLabelsApi#updateEndpointLabel");
            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
id String The unique identifier of the label to operate on.
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]
label Label Fields to change on the agent [optional]

Return type

ApiResponse<LabelResponse>

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

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