All URIs are relative to https://api.thousandeyes.com/v7
Method | HTTP request | Description |
---|---|---|
getEnterpriseAgentsUnitsUsage | GET /usage/units/enterprise-agents | Get enterprise agent usage |
getEnterpriseAgentsUnitsUsageWithHttpInfo | GET /usage/units/enterprise-agents | Get enterprise agent usage |
getTestsUnitsUsage | GET /usage/units/tests | Get cloud and enterprise agents units usage |
getTestsUnitsUsageWithHttpInfo | GET /usage/units/tests | Get cloud and enterprise agents units usage |
getUsage | GET /usage | Get usage information for the last month |
getUsageWithHttpInfo | GET /usage | Get usage information for the last month |
EnterpriseAgentsUsage getEnterpriseAgentsUnitsUsage(startDate, endDate, cursor)
Get enterprise agent usage
This operation returns the organization's enterprise agents usage for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, a shared enterprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the shared agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model.
// Import classes:
import com.thousandeyes.sdk.client.ApiClient;
import com.thousandeyes.sdk.common.ApiException;
import com.thousandeyes.sdk.Configuration;
import com.thousandeyes.sdk.authentication.*;
import com.thousandeyes.sdk.models.*;
import com.thousandeyes.sdk.usage.UsageApi;
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");
UsageApi apiInstance = new UsageApi(defaultClient);
OffsetDateTime startDate = OffsetDateTime.parse("2022-07-17T22:00:54Z"); // OffsetDateTime | Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
OffsetDateTime endDate = OffsetDateTime.parse("2022-07-18T22:00:54Z"); // OffsetDateTime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
String cursor = "cursor_example"; // String | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.
try {
EnterpriseAgentsUsage result = apiInstance.getEnterpriseAgentsUnitsUsage(startDate, endDate, cursor);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsageApi#getEnterpriseAgentsUnitsUsage");
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 |
---|---|---|---|
startDate | OffsetDateTime | Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional] |
endDate | OffsetDateTime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional] |
cursor | String | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] |
- Content-Type: Not defined
- 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 | - |
500 | Internal server error | - |
ApiResponse getEnterpriseAgentsUnitsUsage getEnterpriseAgentsUnitsUsageWithHttpInfo(startDate, endDate, cursor)
Get enterprise agent usage
This operation returns the organization's enterprise agents usage for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, a shared enterprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the shared agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model.
// Import classes:
import com.thousandeyes.sdk.client.ApiClient;
import com.thousandeyes.sdk.common.ApiException;
import com.thousandeyes.sdk.common.ApiResponse;
import com.thousandeyes.sdk.Configuration;
import com.thousandeyes.sdk.authentication.*;
import com.thousandeyes.sdk.models.*;
import com.thousandeyes.sdk.usage.UsageApi;
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");
UsageApi apiInstance = new UsageApi(defaultClient);
OffsetDateTime startDate = OffsetDateTime.parse("2022-07-17T22:00:54Z"); // OffsetDateTime | Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
OffsetDateTime endDate = OffsetDateTime.parse("2022-07-18T22:00:54Z"); // OffsetDateTime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
String cursor = "cursor_example"; // String | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.
try {
ApiResponse<EnterpriseAgentsUsage> response = apiInstance.getEnterpriseAgentsUnitsUsageWithHttpInfo(startDate, endDate, cursor);
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 UsageApi#getEnterpriseAgentsUnitsUsage");
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 |
---|---|---|---|
startDate | OffsetDateTime | Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional] |
endDate | OffsetDateTime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional] |
cursor | String | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] |
ApiResponse<EnterpriseAgentsUsage>
- Content-Type: Not defined
- 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 | - |
500 | Internal server error | - |
TestsUsage getTestsUnitsUsage(aid, startDate, endDate, cursor)
Get cloud and enterprise agents units usage
This operation returns the cloud and enterprise agents usage for all the tests for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, an enterprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model.
// Import classes:
import com.thousandeyes.sdk.client.ApiClient;
import com.thousandeyes.sdk.common.ApiException;
import com.thousandeyes.sdk.Configuration;
import com.thousandeyes.sdk.authentication.*;
import com.thousandeyes.sdk.models.*;
import com.thousandeyes.sdk.usage.UsageApi;
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");
UsageApi apiInstance = new UsageApi(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.
OffsetDateTime startDate = OffsetDateTime.parse("2022-07-17T22:00:54Z"); // OffsetDateTime | Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
OffsetDateTime endDate = OffsetDateTime.parse("2022-07-18T22:00:54Z"); // OffsetDateTime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
String cursor = "cursor_example"; // String | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.
try {
TestsUsage result = apiInstance.getTestsUnitsUsage(aid, startDate, endDate, cursor);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsageApi#getTestsUnitsUsage");
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] |
startDate | OffsetDateTime | Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional] |
endDate | OffsetDateTime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional] |
cursor | String | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] |
- Content-Type: Not defined
- 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 | - |
500 | Internal server error | - |
ApiResponse getTestsUnitsUsage getTestsUnitsUsageWithHttpInfo(aid, startDate, endDate, cursor)
Get cloud and enterprise agents units usage
This operation returns the cloud and enterprise agents usage for all the tests for a specific time period, or the curent billing cycle if no time period is specified. In the `/v7/usage` API, an enterprise agent's usage is reported in the account group where the agent was created (i.e Primary Account Group). However in this API, the agent's usage is distributed among all the account groups where the tests are running on the particular agent. This API is also only available to customers on usage based pricing model.
// Import classes:
import com.thousandeyes.sdk.client.ApiClient;
import com.thousandeyes.sdk.common.ApiException;
import com.thousandeyes.sdk.common.ApiResponse;
import com.thousandeyes.sdk.Configuration;
import com.thousandeyes.sdk.authentication.*;
import com.thousandeyes.sdk.models.*;
import com.thousandeyes.sdk.usage.UsageApi;
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");
UsageApi apiInstance = new UsageApi(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.
OffsetDateTime startDate = OffsetDateTime.parse("2022-07-17T22:00:54Z"); // OffsetDateTime | Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
OffsetDateTime endDate = OffsetDateTime.parse("2022-07-18T22:00:54Z"); // OffsetDateTime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`.
String cursor = "cursor_example"; // String | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter.
try {
ApiResponse<TestsUsage> response = apiInstance.getTestsUnitsUsageWithHttpInfo(aid, startDate, endDate, cursor);
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 UsageApi#getTestsUnitsUsage");
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] |
startDate | OffsetDateTime | Use with the `endDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional] |
endDate | OffsetDateTime | Defaults to current time the request is made. Use with the `startDate` parameter. Include the complete time (hours, minutes, and seconds) in UTC time zone, following the ISO 8601 date-time format. See the example for reference. Please note that this parameter can't be used with `window`. | [optional] |
cursor | String | (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. | [optional] |
ApiResponse<TestsUsage>
- Content-Type: Not defined
- 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 | - |
500 | Internal server error | - |
Usage getUsage(aid, expand)
Get usage information for the last month
This operation returns usage for the current period. It provides visibility across all account groups within an organization. To access this endpoint, you need the `View Billing` permission (a management permission). If you have access to view billing in multiple organizations, query the endpoint using an `aid` querystring parameter (see optional parameters, below) from each organization. Note: Access to billing information older than one month is not supported by this endpoint.
// Import classes:
import com.thousandeyes.sdk.client.ApiClient;
import com.thousandeyes.sdk.common.ApiException;
import com.thousandeyes.sdk.Configuration;
import com.thousandeyes.sdk.authentication.*;
import com.thousandeyes.sdk.models.*;
import com.thousandeyes.sdk.usage.UsageApi;
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");
UsageApi apiInstance = new UsageApi(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.
List<ExpandUsageOptions> expand = Arrays.asList(); // List<ExpandUsageOptions> | Expands the available resources. By default, no expansion takes place if the `expand` query parameter is not passed. For example, to expand the \"tests\" resource, pass the query '?expand=test'.
try {
Usage result = apiInstance.getUsage(aid, expand);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsageApi#getUsage");
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] |
expand | List<ExpandUsageOptions> | Expands the available resources. By default, no expansion takes place if the `expand` query parameter is not passed. For example, to expand the "tests" resource, pass the query '?expand=test'. | [optional] |
- Content-Type: Not defined
- 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 | - |
500 | Internal server error | - |
ApiResponse getUsage getUsageWithHttpInfo(aid, expand)
Get usage information for the last month
This operation returns usage for the current period. It provides visibility across all account groups within an organization. To access this endpoint, you need the `View Billing` permission (a management permission). If you have access to view billing in multiple organizations, query the endpoint using an `aid` querystring parameter (see optional parameters, below) from each organization. Note: Access to billing information older than one month is not supported by this endpoint.
// Import classes:
import com.thousandeyes.sdk.client.ApiClient;
import com.thousandeyes.sdk.common.ApiException;
import com.thousandeyes.sdk.common.ApiResponse;
import com.thousandeyes.sdk.Configuration;
import com.thousandeyes.sdk.authentication.*;
import com.thousandeyes.sdk.models.*;
import com.thousandeyes.sdk.usage.UsageApi;
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");
UsageApi apiInstance = new UsageApi(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.
List<ExpandUsageOptions> expand = Arrays.asList(); // List<ExpandUsageOptions> | Expands the available resources. By default, no expansion takes place if the `expand` query parameter is not passed. For example, to expand the \"tests\" resource, pass the query '?expand=test'.
try {
ApiResponse<Usage> response = apiInstance.getUsageWithHttpInfo(aid, expand);
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 UsageApi#getUsage");
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] |
expand | List<ExpandUsageOptions> | Expands the available resources. By default, no expansion takes place if the `expand` query parameter is not passed. For example, to expand the "tests" resource, pass the query '?expand=test'. | [optional] |
ApiResponse<Usage>
- Content-Type: Not defined
- 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 | - |
500 | Internal server error | - |