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 |
LabelResponse createEndpointLabel(aid, labelRequest)
Create label
Creates a new label.
// 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();
}
}
}
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] |
- Content-Type: application/json
- Accept: application/hal+json, application/json, application/problem+json
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 | - |
ApiResponse createEndpointLabel createEndpointLabelWithHttpInfo(aid, labelRequest)
Create label
Creates a new label.
// 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();
}
}
}
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] |
ApiResponse<LabelResponse>
- Content-Type: application/json
- Accept: application/hal+json, application/json, application/problem+json
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 | - |
void deleteEndpointLabel(id, aid)
Delete label
Deletes the label from your account.
// 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();
}
}
}
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] |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json, application/problem+json
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 | - |
ApiResponse deleteEndpointLabel deleteEndpointLabelWithHttpInfo(id, aid)
Delete label
Deletes the label from your account.
// 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();
}
}
}
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] |
ApiResponse
- Content-Type: Not defined
- Accept: application/json, application/problem+json
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 | - |
LabelResponse getEndpointLabel(id, expand, aid)
Retrieve label
Returns a single label using its ID.
// 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();
}
}
}
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] |
- Content-Type: Not defined
- Accept: application/hal+json, application/json, application/problem+json
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 | - |
ApiResponse getEndpointLabel getEndpointLabelWithHttpInfo(id, expand, aid)
Retrieve label
Returns a single label using its ID.
// 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();
}
}
}
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] |
ApiResponse<LabelResponse>
- Content-Type: Not defined
- Accept: application/hal+json, application/json, application/problem+json
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 | - |
Labels getEndpointLabels(max, cursor, expand, aid)
List labels
Returns a list of labels.
// 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();
}
}
}
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] |
- Content-Type: Not defined
- Accept: application/hal+json, application/json, application/problem+json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
401 | Unauthorized | - |
403 | Insufficient permissions to query endpoint | - |
429 | Exhausted rate limit for the organization | - |
ApiResponse getEndpointLabels getEndpointLabelsWithHttpInfo(max, cursor, expand, aid)
List labels
Returns a list of labels.
// 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();
}
}
}
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] |
ApiResponse<Labels>
- Content-Type: Not defined
- Accept: application/hal+json, application/json, application/problem+json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
401 | Unauthorized | - |
403 | Insufficient permissions to query endpoint | - |
429 | Exhausted rate limit for the organization | - |
LabelResponse updateEndpointLabel(id, aid, label)
Update label
Updates a label using its ID.
// 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();
}
}
}
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] |
- Content-Type: application/json
- Accept: application/hal+json, application/json, application/problem+json
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 | - |
ApiResponse updateEndpointLabel updateEndpointLabelWithHttpInfo(id, aid, label)
Update label
Updates a label using its ID.
// 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();
}
}
}
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] |
ApiResponse<LabelResponse>
- Content-Type: application/json
- Accept: application/hal+json, application/json, application/problem+json
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 | - |