diff --git a/administrative/README.md b/administrative/README.md index 6694aeccc..b39ca567a 100644 --- a/administrative/README.md +++ b/administrative/README.md @@ -2,7 +2,7 @@ Administrative API -- API version: 7.0.22 +- API version: 7.0.25 Manage users, accounts, and account groups in the ThousandEyes platform using the Administrative API. This API provides the following operations to manage your organization: diff --git a/administrative/src/main/java/com/thousandeyes/sdk/account/management/administrative/UserEventsApi.java b/administrative/src/main/java/com/thousandeyes/sdk/account/management/administrative/UserEventsApi.java index b661c0666..1606dff11 100644 --- a/administrative/src/main/java/com/thousandeyes/sdk/account/management/administrative/UserEventsApi.java +++ b/administrative/src/main/java/com/thousandeyes/sdk/account/management/administrative/UserEventsApi.java @@ -26,6 +26,8 @@ import java.time.OffsetDateTime; import com.thousandeyes.sdk.account.management.administrative.model.UnauthorizedError; import com.thousandeyes.sdk.account.management.administrative.model.ValidationError; +import com.thousandeyes.sdk.account.management.administrative.model.UserEvent; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -60,6 +62,21 @@ public UserEventsApi(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * List activity log events with pagination + * Returns a list of activity log events in the current account group. If `useAllPermittedAids=true` query parameter is passed and the user has permission `View activity log for all users in account group` the logs returned include events across all the account groups they belong to. For more information about changing the account group context, see [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext). + * @param aid 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) + * @param useAllPermittedAids Set to `true` to load data from all accounts the user has access to. (optional, default to false) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @return Paginator + */ + public Paginator getUserEventsPaginated(String aid, Boolean useAllPermittedAids, String window, OffsetDateTime startDate, OffsetDateTime endDate) { + return new Paginator<>(cursor -> getUserEvents(aid, useAllPermittedAids, window, startDate, endDate, cursor), + AuditUserEvents::getAuditEvents); + + } /** * List activity log events * Returns a list of activity log events in the current account group. If `useAllPermittedAids=true` query parameter is passed and the user has permission `View activity log for all users in account group` the logs returned include events across all the account groups they belong to. For more information about changing the account group context, see [Account Context](https://developer.thousandeyes.com/v7/#/accountcontext). diff --git a/administrative/src/test/java/com/thousandeyes/sdk/account/management/administrative/UserEventsApiTest.java b/administrative/src/test/java/com/thousandeyes/sdk/account/management/administrative/UserEventsApiTest.java index 24f023a4a..c633db0fc 100644 --- a/administrative/src/test/java/com/thousandeyes/sdk/account/management/administrative/UserEventsApiTest.java +++ b/administrative/src/test/java/com/thousandeyes/sdk/account/management/administrative/UserEventsApiTest.java @@ -17,6 +17,8 @@ import java.time.OffsetDateTime; import com.thousandeyes.sdk.account.management.administrative.model.UnauthorizedError; import com.thousandeyes.sdk.account.management.administrative.model.ValidationError; +import com.thousandeyes.sdk.account.management.administrative.model.UserEvent; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; diff --git a/agents/README.md b/agents/README.md index a61bae4bb..f057b79d6 100644 --- a/agents/README.md +++ b/agents/README.md @@ -2,7 +2,7 @@ Agents API -- API version: 7.0.22 +- API version: 7.0.25 ## Overview diff --git a/alerts/README.md b/alerts/README.md index 66915b73f..e230aa042 100644 --- a/alerts/README.md +++ b/alerts/README.md @@ -2,7 +2,7 @@ Alerts API -- API version: 7.0.22 +- API version: 7.0.25 You can manage the following alert functionalities on the ThousandEyes platform using the Alerts API: diff --git a/alerts/docs/AlertsApi.md b/alerts/docs/AlertsApi.md index 9e89ba65e..190e0d6c0 100644 --- a/alerts/docs/AlertsApi.md +++ b/alerts/docs/AlertsApi.md @@ -171,7 +171,7 @@ ApiResponse<[**AlertDetail**](AlertDetail.md)> ## getAlerts -> Alerts getAlerts(aid, window, startDate, endDate, max, state) +> Alerts getAlerts(aid, window, startDate, endDate, max, cursor, state) List active alerts @@ -203,9 +203,10 @@ public class Example { 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`. 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. State state = new State(); // State | Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`. try { - Alerts result = apiInstance.getAlerts(aid, window, startDate, endDate, max, state); + Alerts result = apiInstance.getAlerts(aid, window, startDate, endDate, max, cursor, state); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AlertsApi#getAlerts"); @@ -228,6 +229,7 @@ public class Example { | **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] | | **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] | | **state** | [**State**](.md)| Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`. | [optional] | ### Return type @@ -256,7 +258,7 @@ public class Example { ## getAlertsWithHttpInfo -> ApiResponse getAlerts getAlertsWithHttpInfo(aid, window, startDate, endDate, max, state) +> ApiResponse getAlerts getAlertsWithHttpInfo(aid, window, startDate, endDate, max, cursor, state) List active alerts @@ -289,9 +291,10 @@ public class Example { 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`. 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. State state = new State(); // State | Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`. try { - ApiResponse response = apiInstance.getAlertsWithHttpInfo(aid, window, startDate, endDate, max, state); + ApiResponse response = apiInstance.getAlertsWithHttpInfo(aid, window, startDate, endDate, max, cursor, state); System.out.println("Status code: " + response.getStatusCode()); System.out.println("Response headers: " + response.getHeaders()); System.out.println("Response body: " + response.getData()); @@ -316,6 +319,7 @@ public class Example { | **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] | | **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] | | **state** | [**State**](.md)| Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`. | [optional] | ### Return type diff --git a/alerts/src/main/java/com/thousandeyes/sdk/alerts/AlertsApi.java b/alerts/src/main/java/com/thousandeyes/sdk/alerts/AlertsApi.java index 0e9193016..ca32f40ed 100644 --- a/alerts/src/main/java/com/thousandeyes/sdk/alerts/AlertsApi.java +++ b/alerts/src/main/java/com/thousandeyes/sdk/alerts/AlertsApi.java @@ -28,6 +28,8 @@ import com.thousandeyes.sdk.alerts.model.State; import java.util.UUID; import com.thousandeyes.sdk.alerts.model.UnauthorizedError; +import com.thousandeyes.sdk.alerts.model.Alert; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -117,6 +119,22 @@ private ApiRequest.ApiRequestBuilder getAlertRequestBuilder(UUID alertId, String requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); return requestBuilder; } + /** + * List active alerts with pagination + * Returns a list of active alerts. If no alerts are active within the specified time range, an empty response is returned. Note that time filters (`window`, `startDate`, or `endDate`) are only applied to cleared alerts. + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @param max (Optional) Maximum number of objects to return. (optional) + * @param state Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`. (optional) + * @return Paginator + */ + public Paginator getAlertsPaginated(String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate, Integer max, State state) { + return new Paginator<>(cursor -> getAlerts(aid, window, startDate, endDate, max, cursor, state), + Alerts::getAlerts); + + } /** * List active alerts * Returns a list of active alerts. If no alerts are active within the specified time range, an empty response is returned. Note that time filters (`window`, `startDate`, or `endDate`) are only applied to cleared alerts. @@ -125,12 +143,13 @@ private ApiRequest.ApiRequestBuilder getAlertRequestBuilder(UUID alertId, String * @param startDate 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) * @param endDate 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) * @param max (Optional) Maximum number of objects to return. (optional) + * @param cursor (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) * @param state Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`. (optional) * @return Alerts * @throws ApiException if fails to make API call */ - public Alerts getAlerts(String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate, Integer max, State state) throws ApiException { - ApiResponse response = getAlertsWithHttpInfo(aid, window, startDate, endDate, max, state); + public Alerts getAlerts(String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate, Integer max, String cursor, State state) throws ApiException { + ApiResponse response = getAlertsWithHttpInfo(aid, window, startDate, endDate, max, cursor, state); return response.getData(); } @@ -142,14 +161,15 @@ public Alerts getAlerts(String aid, String window, OffsetDateTime startDate, Off * @param startDate 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) * @param endDate 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) * @param max (Optional) Maximum number of objects to return. (optional) + * @param cursor (Optional) Opaque cursor used for pagination. Clients should use `next` value from `_links` instead of this parameter. (optional) * @param state Optional parameter to match a specific alert state. If not specified, it defaults to `trigger`. (optional) * @return ApiResponse<Alerts> * @throws ApiException if fails to make API call */ - public ApiResponse getAlertsWithHttpInfo(String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate, Integer max, State state) throws ApiException { + public ApiResponse getAlertsWithHttpInfo(String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate, Integer max, String cursor, State state) throws ApiException { getAlertsValidateRequest(); - var requestBuilder = getAlertsRequestBuilder(aid, window, startDate, endDate, max, state); + var requestBuilder = getAlertsRequestBuilder(aid, window, startDate, endDate, max, cursor, state); return apiClient.send(requestBuilder.build(), Alerts.class); } @@ -157,7 +177,7 @@ public ApiResponse getAlertsWithHttpInfo(String aid, String window, Offs private void getAlertsValidateRequest() throws ApiException { } - private ApiRequest.ApiRequestBuilder getAlertsRequestBuilder(String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate, Integer max, State state) throws ApiException { + private ApiRequest.ApiRequestBuilder getAlertsRequestBuilder(String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate, Integer max, String cursor, State state) throws ApiException { ApiRequest.ApiRequestBuilder requestBuilder = ApiRequest.builder() .method("GET"); @@ -170,6 +190,7 @@ private ApiRequest.ApiRequestBuilder getAlertsRequestBuilder(String aid, String localVarQueryParams.addAll(parameterToPairs("startDate", startDate)); localVarQueryParams.addAll(parameterToPairs("endDate", endDate)); localVarQueryParams.addAll(parameterToPairs("max", max)); + localVarQueryParams.addAll(parameterToPairs("cursor", cursor)); localVarQueryParams.addAll(parameterToPairs("state", state)); if (!localVarQueryParams.isEmpty()) { diff --git a/alerts/src/main/java/com/thousandeyes/sdk/alerts/model/NotificationCustomWebhook.java b/alerts/src/main/java/com/thousandeyes/sdk/alerts/model/NotificationCustomWebhook.java index 53c7d3495..b64568127 100644 --- a/alerts/src/main/java/com/thousandeyes/sdk/alerts/model/NotificationCustomWebhook.java +++ b/alerts/src/main/java/com/thousandeyes/sdk/alerts/model/NotificationCustomWebhook.java @@ -21,6 +21,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import com.thousandeyes.sdk.alerts.model.CustomWebhookIntegrationType; +import java.util.UUID; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -36,7 +37,7 @@ @jakarta.annotation.Generated(value = "com.thousandeyes.api.codegen.ThousandeyesJavaGenerator") public class NotificationCustomWebhook { public static final String JSON_PROPERTY_INTEGRATION_ID = "integrationId"; - private String integrationId; + private UUID integrationId; public static final String JSON_PROPERTY_INTEGRATION_TYPE = "integrationType"; private CustomWebhookIntegrationType integrationType; @@ -50,7 +51,7 @@ public class NotificationCustomWebhook { public NotificationCustomWebhook() { } - public NotificationCustomWebhook integrationId(String integrationId) { + public NotificationCustomWebhook integrationId(UUID integrationId) { this.integrationId = integrationId; return this; } @@ -63,14 +64,14 @@ public NotificationCustomWebhook integrationId(String integrationId) { @JsonProperty(JSON_PROPERTY_INTEGRATION_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getIntegrationId() { + public UUID getIntegrationId() { return integrationId; } @JsonProperty(JSON_PROPERTY_INTEGRATION_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIntegrationId(String integrationId) { + public void setIntegrationId(UUID integrationId) { this.integrationId = integrationId; } diff --git a/alerts/src/main/java/com/thousandeyes/sdk/alerts/model/ThirdPartyIntegrationType.java b/alerts/src/main/java/com/thousandeyes/sdk/alerts/model/ThirdPartyIntegrationType.java index 8b049fb4b..38694ab10 100644 --- a/alerts/src/main/java/com/thousandeyes/sdk/alerts/model/ThirdPartyIntegrationType.java +++ b/alerts/src/main/java/com/thousandeyes/sdk/alerts/model/ThirdPartyIntegrationType.java @@ -32,6 +32,8 @@ public enum ThirdPartyIntegrationType { APP_DYNAMICS("app-dynamics"), + SERVICE_NOW("service-now"), + UNKNOWN("unknown"); private String value; diff --git a/alerts/src/test/java/com/thousandeyes/sdk/alerts/AlertRulesApiTest.java b/alerts/src/test/java/com/thousandeyes/sdk/alerts/AlertRulesApiTest.java index 2f3dab7a9..8ed94179c 100644 --- a/alerts/src/test/java/com/thousandeyes/sdk/alerts/AlertRulesApiTest.java +++ b/alerts/src/test/java/com/thousandeyes/sdk/alerts/AlertRulesApiTest.java @@ -123,12 +123,12 @@ public void createAlertRuleRequestAndResponseDeserializationTest() "customWebhook" : [ { "integrationType" : "custom-webhook", "integrationName" : "My webhook", - "integrationId" : "cwb-201", + "integrationId" : "6e069ae9-8537-4120-b988-61bf8e0d8b87", "target" : "https://example.com/test/webhooks/notifications" }, { "integrationType" : "custom-webhook", "integrationName" : "My webhook", - "integrationId" : "cwb-201", + "integrationId" : "6e069ae9-8537-4120-b988-61bf8e0d8b87", "target" : "https://example.com/test/webhooks/notifications" } ] }, @@ -191,12 +191,12 @@ public void createAlertRuleRequestAndResponseDeserializationTest() "customWebhook" : [ { "integrationType" : "custom-webhook", "integrationName" : "My webhook", - "integrationId" : "cwb-201", + "integrationId" : "6e069ae9-8537-4120-b988-61bf8e0d8b87", "target" : "https://example.com/test/webhooks/notifications" }, { "integrationType" : "custom-webhook", "integrationName" : "My webhook", - "integrationId" : "cwb-201", + "integrationId" : "6e069ae9-8537-4120-b988-61bf8e0d8b87", "target" : "https://example.com/test/webhooks/notifications" } ] }, @@ -377,12 +377,12 @@ public void getAlertRuleRequestAndResponseDeserializationTest() "customWebhook" : [ { "integrationType" : "custom-webhook", "integrationName" : "My webhook", - "integrationId" : "cwb-201", + "integrationId" : "6e069ae9-8537-4120-b988-61bf8e0d8b87", "target" : "https://example.com/test/webhooks/notifications" }, { "integrationType" : "custom-webhook", "integrationName" : "My webhook", - "integrationId" : "cwb-201", + "integrationId" : "6e069ae9-8537-4120-b988-61bf8e0d8b87", "target" : "https://example.com/test/webhooks/notifications" } ] }, @@ -540,12 +540,12 @@ public void updateAlertRuleRequestAndResponseDeserializationTest() "customWebhook" : [ { "integrationType" : "custom-webhook", "integrationName" : "My webhook", - "integrationId" : "cwb-201", + "integrationId" : "6e069ae9-8537-4120-b988-61bf8e0d8b87", "target" : "https://example.com/test/webhooks/notifications" }, { "integrationType" : "custom-webhook", "integrationName" : "My webhook", - "integrationId" : "cwb-201", + "integrationId" : "6e069ae9-8537-4120-b988-61bf8e0d8b87", "target" : "https://example.com/test/webhooks/notifications" } ] }, @@ -608,12 +608,12 @@ public void updateAlertRuleRequestAndResponseDeserializationTest() "customWebhook" : [ { "integrationType" : "custom-webhook", "integrationName" : "My webhook", - "integrationId" : "cwb-201", + "integrationId" : "6e069ae9-8537-4120-b988-61bf8e0d8b87", "target" : "https://example.com/test/webhooks/notifications" }, { "integrationType" : "custom-webhook", "integrationName" : "My webhook", - "integrationId" : "cwb-201", + "integrationId" : "6e069ae9-8537-4120-b988-61bf8e0d8b87", "target" : "https://example.com/test/webhooks/notifications" } ] }, diff --git a/alerts/src/test/java/com/thousandeyes/sdk/alerts/AlertsApiTest.java b/alerts/src/test/java/com/thousandeyes/sdk/alerts/AlertsApiTest.java index d8df5c452..351ff82d3 100644 --- a/alerts/src/test/java/com/thousandeyes/sdk/alerts/AlertsApiTest.java +++ b/alerts/src/test/java/com/thousandeyes/sdk/alerts/AlertsApiTest.java @@ -19,6 +19,8 @@ import com.thousandeyes.sdk.alerts.model.State; import java.util.UUID; import com.thousandeyes.sdk.alerts.model.UnauthorizedError; +import com.thousandeyes.sdk.alerts.model.Alert; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; @@ -385,7 +387,7 @@ public void getAlertsRequestAndResponseDeserializationTest() .withBody(responseBodyJson) .withStatus(statusCode))); - var apiResponse = api.getAlerts(null, null, null, null, null, null); + var apiResponse = api.getAlerts(null, null, null, null, null, null, null); assertEquals(mappedResponse, apiResponse); } diff --git a/bgp-monitors/README.md b/bgp-monitors/README.md index a4b2dc10f..fd88f7014 100644 --- a/bgp-monitors/README.md +++ b/bgp-monitors/README.md @@ -2,7 +2,7 @@ BGP Monitors API -- API version: 7.0.22 +- API version: 7.0.25 Retrieve information about BGP monitors available to your ThousandEyes account. ThousandEyes ingests BGP routing data from dozens of global BGP collectors and automatically integrates that visibility as a configurable layer under service, network, and path visualization layers. diff --git a/credentials/README.md b/credentials/README.md index c6df1b527..898b8978f 100644 --- a/credentials/README.md +++ b/credentials/README.md @@ -2,7 +2,7 @@ Credentials API -- API version: 7.0.22 +- API version: 7.0.25 Manage credentials for transaction tests using the Credentials API. diff --git a/dashboards/README.md b/dashboards/README.md index 8152b224b..79b3e6275 100644 --- a/dashboards/README.md +++ b/dashboards/README.md @@ -2,7 +2,7 @@ Dashboards API -- API version: 7.0.22 +- API version: 7.0.25 Manage ThousandEyes Dashboards. diff --git a/emulation/README.md b/emulation/README.md index 825775646..5cf26c584 100644 --- a/emulation/README.md +++ b/emulation/README.md @@ -2,7 +2,7 @@ Emulation API -- API version: 7.0.22 +- API version: 7.0.25 The Emulation API facilitates the retrieval of user-agent strings for HTTP, pageload, and transaction tests. It also enables the retrieval and addition of emulated devices for pageload and transaction tests. diff --git a/endpoint-agents/README.md b/endpoint-agents/README.md index 40a221c76..48e119009 100644 --- a/endpoint-agents/README.md +++ b/endpoint-agents/README.md @@ -2,7 +2,7 @@ Endpoint Agents API -- API version: 7.0.22 +- API version: 7.0.25 Manage ThousandEyes Endpoint Agents using this API. diff --git a/endpoint-agents/src/main/java/com/thousandeyes/sdk/endpoint/agents/EndpointAgentsApi.java b/endpoint-agents/src/main/java/com/thousandeyes/sdk/endpoint/agents/EndpointAgentsApi.java index 21c7244a0..7640af27d 100644 --- a/endpoint-agents/src/main/java/com/thousandeyes/sdk/endpoint/agents/EndpointAgentsApi.java +++ b/endpoint-agents/src/main/java/com/thousandeyes/sdk/endpoint/agents/EndpointAgentsApi.java @@ -32,6 +32,10 @@ import java.util.UUID; import com.thousandeyes.sdk.endpoint.agents.model.UnauthorizedError; import com.thousandeyes.sdk.endpoint.agents.model.ValidationError; +import com.thousandeyes.sdk.endpoint.agents.model.EndpointAgent; +import com.thousandeyes.sdk.pagination.Paginator; +import com.thousandeyes.sdk.endpoint.agents.model.EndpointAgent; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -232,6 +236,21 @@ private ApiRequest.ApiRequestBuilder enableEndpointAgentRequestBuilder(UUID agen requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); return requestBuilder; } + /** + * Filter endpoint agents with pagination + * Retrieves a list of endpoint agents within the specified account group that match the specified filters. If no agents meet the filter criteria, the API returns an empty array. + * @param agentSearchRequest The filter options for advanced search filtering for agents. (required) + * @param max (Optional) Maximum number of objects to return. (optional) + * @param aid 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) + * @param expand This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. (optional + * @param includeDeleted When requesting entities, set to `true` if you want to see deleted entities. (optional) + * @return Paginator + */ + public Paginator filterEndpointAgentsPaginated(AgentSearchRequest agentSearchRequest, Integer max, String aid, List expand, Boolean includeDeleted) { + return new Paginator<>(cursor -> filterEndpointAgents(agentSearchRequest, max, cursor, aid, expand, includeDeleted), + FilterEndpointAgentsResponse::getAgents); + + } /** * Filter endpoint agents * Retrieves a list of endpoint agents within the specified account group that match the specified filters. If no agents meet the filter criteria, the API returns an empty array. @@ -361,6 +380,23 @@ private ApiRequest.ApiRequestBuilder getEndpointAgentRequestBuilder(UUID agentId requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); return requestBuilder; } + /** + * List endpoint agents with pagination + * Retrieves a list of endpoint agents in a given account group. If there are no agents in the specified account group, it returns an empty array. + * @param max (Optional) Maximum number of objects to return. (optional) + * @param aid 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) + * @param expand This optional parameter allows you to control the expansion of test resources associated with the agent. By default, no expansion occurs when this query parameter is omitted. To expand the \"clients\" resource, include the query parameter `?expand=clients`. For multiple expansions, you have two options: * Separate the values with commas. For example, `?expandAgent=clients,tasks`. * Specify the parameter multiple times. For example, `?expandAgent=clients&expandAgent=tasks`. This parameter offers flexibility for users to customize the expansion of specific resources related to the agent. (optional + * @param includeDeleted When requesting entities, set to `true` if you want to see deleted entities. (optional) + * @param useAllPermittedAids Set to `true` to load data from all accounts the user has access to. (optional, default to false) + * @param agentName Returns only agents with the specified name. This is an exact match only. (optional) + * @param computerName Returns only agents with the specified computer name. This is an exact match only. (optional) + * @return Paginator + */ + public Paginator getEndpointAgentsPaginated(Integer max, String aid, List expand, Boolean includeDeleted, Boolean useAllPermittedAids, String agentName, String computerName) { + return new Paginator<>(cursor -> getEndpointAgents(max, cursor, aid, expand, includeDeleted, useAllPermittedAids, agentName, computerName), + ListEndpointAgentsResponse::getAgents); + + } /** * List endpoint agents * Retrieves a list of endpoint agents in a given account group. If there are no agents in the specified account group, it returns an empty array. diff --git a/endpoint-agents/src/test/java/com/thousandeyes/sdk/endpoint/agents/EndpointAgentsApiTest.java b/endpoint-agents/src/test/java/com/thousandeyes/sdk/endpoint/agents/EndpointAgentsApiTest.java index f743e792e..b42e9d15c 100644 --- a/endpoint-agents/src/test/java/com/thousandeyes/sdk/endpoint/agents/EndpointAgentsApiTest.java +++ b/endpoint-agents/src/test/java/com/thousandeyes/sdk/endpoint/agents/EndpointAgentsApiTest.java @@ -23,6 +23,10 @@ import java.util.UUID; import com.thousandeyes.sdk.endpoint.agents.model.UnauthorizedError; import com.thousandeyes.sdk.endpoint.agents.model.ValidationError; +import com.thousandeyes.sdk.endpoint.agents.model.EndpointAgent; +import com.thousandeyes.sdk.pagination.Paginator; +import com.thousandeyes.sdk.endpoint.agents.model.EndpointAgent; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; diff --git a/endpoint-instant-tests/README.md b/endpoint-instant-tests/README.md index 32efd5518..bd47ff3ec 100644 --- a/endpoint-instant-tests/README.md +++ b/endpoint-instant-tests/README.md @@ -2,7 +2,7 @@ Endpoint Instant Scheduled Tests API -- API version: 7.0.22 +- API version: 7.0.25 You can create and execute a new endpoint instant scheduled test within ThousandEyes using this API. The test parameters are specified in the `POST` data. diff --git a/endpoint-labels/README.md b/endpoint-labels/README.md index 560e8651e..5b673457b 100644 --- a/endpoint-labels/README.md +++ b/endpoint-labels/README.md @@ -2,7 +2,7 @@ Endpoint Agent Labels API -- API version: 7.0.22 +- API version: 7.0.25 Manage labels applied to endpoint agents using this API. diff --git a/endpoint-labels/src/main/java/com/thousandeyes/sdk/endpoint/labels/EndpointAgentLabelsApi.java b/endpoint-labels/src/main/java/com/thousandeyes/sdk/endpoint/labels/EndpointAgentLabelsApi.java index 5b35de434..64f34fcdb 100644 --- a/endpoint-labels/src/main/java/com/thousandeyes/sdk/endpoint/labels/EndpointAgentLabelsApi.java +++ b/endpoint-labels/src/main/java/com/thousandeyes/sdk/endpoint/labels/EndpointAgentLabelsApi.java @@ -30,6 +30,8 @@ import java.net.URI; import com.thousandeyes.sdk.endpoint.labels.model.UnauthorizedError; import com.thousandeyes.sdk.endpoint.labels.model.ValidationError; +import com.thousandeyes.sdk.endpoint.labels.model.LabelResponse; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -227,6 +229,19 @@ private ApiRequest.ApiRequestBuilder getEndpointLabelRequestBuilder(String id, L requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); return requestBuilder; } + /** + * List labels with pagination + * Returns a list of labels. + * @param max (Optional) Maximum number of objects to return. (optional) + * @param expand 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 + * @param aid 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 Paginator + */ + public Paginator getEndpointLabelsPaginated(Integer max, List expand, String aid) { + return new Paginator<>(cursor -> getEndpointLabels(max, cursor, expand, aid), + Labels::getLabels); + + } /** * List labels * Returns a list of labels. diff --git a/endpoint-labels/src/test/java/com/thousandeyes/sdk/endpoint/labels/EndpointAgentLabelsApiTest.java b/endpoint-labels/src/test/java/com/thousandeyes/sdk/endpoint/labels/EndpointAgentLabelsApiTest.java index 204af37f4..0b0af52df 100644 --- a/endpoint-labels/src/test/java/com/thousandeyes/sdk/endpoint/labels/EndpointAgentLabelsApiTest.java +++ b/endpoint-labels/src/test/java/com/thousandeyes/sdk/endpoint/labels/EndpointAgentLabelsApiTest.java @@ -21,6 +21,8 @@ import java.net.URI; import com.thousandeyes.sdk.endpoint.labels.model.UnauthorizedError; import com.thousandeyes.sdk.endpoint.labels.model.ValidationError; +import com.thousandeyes.sdk.endpoint.labels.model.LabelResponse; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; diff --git a/endpoint-test-results/README.md b/endpoint-test-results/README.md index a528129dd..65dec85a0 100644 --- a/endpoint-test-results/README.md +++ b/endpoint-test-results/README.md @@ -2,7 +2,7 @@ Endpoint Test Results API -- API version: 7.0.22 +- API version: 7.0.25 Retrieve results for scheduled and dynamic tests on endpoint agents. diff --git a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/HttpServerEndpointScheduledTestResultsApi.java b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/HttpServerEndpointScheduledTestResultsApi.java index b804b91ea..8f5ce9afe 100644 --- a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/HttpServerEndpointScheduledTestResultsApi.java +++ b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/HttpServerEndpointScheduledTestResultsApi.java @@ -29,6 +29,10 @@ import java.time.OffsetDateTime; import com.thousandeyes.sdk.endpoint.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.endpoint.tests.results.model.ValidationError; +import com.thousandeyes.sdk.endpoint.tests.results.model.HttpEndpointTestResult; +import com.thousandeyes.sdk.pagination.Paginator; +import com.thousandeyes.sdk.endpoint.tests.results.model.HttpEndpointTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -63,6 +67,22 @@ public HttpServerEndpointScheduledTestResultsApi(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Retrieve HTTP server scheduled test results with pagination + * Returns component-level (DNS, Connect, Wait and Receive) timing for the load of an object over HTTP. + * @param testId Test ID (required) + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @param expand This parameter is optional and determines whether to expand resources related to test results. By default, no expansion occurs when this query parameter is omitted. To expand a specific resource, such as \"header,\" append `?expand=header` to the query. (optional + * @return Paginator + */ + public Paginator getHttpServerScheduledTestResultsPaginated(String testId, String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate, List expand) { + return new Paginator<>(cursor -> getHttpServerScheduledTestResults(testId, aid, window, startDate, endDate, cursor, expand), + HttpEndpointTestResults::getResults); + + } /** * Retrieve HTTP server scheduled test results * Returns component-level (DNS, Connect, Wait and Receive) timing for the load of an object over HTTP. @@ -133,6 +153,22 @@ private ApiRequest.ApiRequestBuilder getHttpServerScheduledTestResultsRequestBui requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); return requestBuilder; } + /** + * Filter HTTP server scheduled test results with pagination + * Returns component-level (DNS, Connect, Wait and Receive) timing for the load of an object over HTTP. + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @param expand This parameter is optional and determines whether to expand resources related to test results. By default, no expansion occurs when this query parameter is omitted. To expand a specific resource, such as \"header,\" append `?expand=header` to the query. (optional + * @param httpEndpointTestsDataRoundsSearch Test data search filters. (optional) + * @return Paginator + */ + public Paginator getMultiTestFilteredHttpServerScheduledTestResultsPaginated(String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate, List expand, HttpEndpointTestsDataRoundsSearch httpEndpointTestsDataRoundsSearch) { + return new Paginator<>(cursor -> getMultiTestFilteredHttpServerScheduledTestResults(aid, window, startDate, endDate, cursor, expand, httpEndpointTestsDataRoundsSearch), + HttpMultiEndpointTestResults::getResults); + + } /** * Filter HTTP server scheduled test results * Returns component-level (DNS, Connect, Wait and Receive) timing for the load of an object over HTTP. diff --git a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/LocalNetworkEndpointTestResultsApi.java b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/LocalNetworkEndpointTestResultsApi.java index 4114f9b72..109267ac8 100644 --- a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/LocalNetworkEndpointTestResultsApi.java +++ b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/LocalNetworkEndpointTestResultsApi.java @@ -29,6 +29,8 @@ import java.time.OffsetDateTime; import com.thousandeyes.sdk.endpoint.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.endpoint.tests.results.model.ValidationError; +import com.thousandeyes.sdk.endpoint.tests.results.model.LocalNetworkTopologyResultBase; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -63,6 +65,21 @@ public LocalNetworkEndpointTestResultsApi(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * List endpoint network topologies probes with pagination + * Returns a list of all endpoint local network topologies probes. Results from the last round are provided unless an explicit start and end is provided with `startDate`, `endDate` or `window` optional parameters. ## Request body filters This endpoint supports complex filtering using the request body. It is important these filters remain unaltered when making use of pagination, otherwise the results will not be coherent with the original request. ### Multiple filter fields When multiple filter fields are provided, a logical `AND` is applied between the filters. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/local-networks/topologies/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ] }}' ``` ### Filter field with multiple values When a filter field contains multiple values, a logical `OR` is applied between the filter values. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/local-networks/topologies/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] }}' ``` ### Combination of request parameters and body filters ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/local-networks/topologies/filter?window=12h' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ], \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] }}' ``` ### Warning Note that a maximum of 12h worth of data can be retrieved at once. If you need more, you need to make multiple requests. Returns a `results` array of network topology probes. Network topology probes shown are from the latest round, or based on the time range specified. + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @param endpointNetworkTopologyResultRequest (optional) + * @return Paginator + */ + public Paginator filterLocalNetworksTestResultsTopologiesPaginated(String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate, EndpointNetworkTopologyResultRequest endpointNetworkTopologyResultRequest) { + return new Paginator<>(cursor -> filterLocalNetworksTestResultsTopologies(aid, window, startDate, endDate, cursor, endpointNetworkTopologyResultRequest), + LocalNetworkTopologyResults::getResults); + + } /** * List endpoint network topologies probes * Returns a list of all endpoint local network topologies probes. Results from the last round are provided unless an explicit start and end is provided with `startDate`, `endDate` or `window` optional parameters. ## Request body filters This endpoint supports complex filtering using the request body. It is important these filters remain unaltered when making use of pagination, otherwise the results will not be coherent with the original request. ### Multiple filter fields When multiple filter fields are provided, a logical `AND` is applied between the filters. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/local-networks/topologies/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ] }}' ``` ### Filter field with multiple values When a filter field contains multiple values, a logical `OR` is applied between the filter values. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/local-networks/topologies/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] }}' ``` ### Combination of request parameters and body filters ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/local-networks/topologies/filter?window=12h' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ], \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] }}' ``` ### Warning Note that a maximum of 12h worth of data can be retrieved at once. If you need more, you need to make multiple requests. Returns a `results` array of network topology probes. Network topology probes shown are from the latest round, or based on the time range specified. diff --git a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkDynamicEndpointTestResultsApi.java b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkDynamicEndpointTestResultsApi.java index 59a079b58..ca816a569 100644 --- a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkDynamicEndpointTestResultsApi.java +++ b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkDynamicEndpointTestResultsApi.java @@ -29,6 +29,10 @@ import com.thousandeyes.sdk.endpoint.tests.results.model.PathVisDynamicEndpointTestResults; import com.thousandeyes.sdk.endpoint.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.endpoint.tests.results.model.ValidationError; +import com.thousandeyes.sdk.endpoint.tests.results.model.NetworkDynamicEndpointTestResult; +import com.thousandeyes.sdk.pagination.Paginator; +import com.thousandeyes.sdk.endpoint.tests.results.model.PathVisDynamicEndpointTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -63,6 +67,22 @@ public NetworkDynamicEndpointTestResultsApi(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Retrieve network dynamic test results with pagination + * Returns network metrics (`loss`, `latency`, `jitter` and `bandwidth`) from each endpoint agent, for each `roundId` in the requested window. When Time Frame is provided the rounds specific to the time frame is returned and the order is not pre-defined unless a user specifies the sort order in filter. When no time frame is provided the latest rounds are returned. + * @param testId Test ID (required) + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @param dynamicEndpointTestsDataRoundSearch Tests data search filters. (optional) + * @return Paginator + */ + public Paginator filterDynamicTestNetworkResultsPaginated(String testId, String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate, DynamicEndpointTestsDataRoundSearch dynamicEndpointTestsDataRoundSearch) { + return new Paginator<>(cursor -> filterDynamicTestNetworkResults(testId, aid, window, startDate, endDate, cursor, dynamicEndpointTestsDataRoundSearch), + NetworkDynamicEndpointTestResults::getResults); + + } /** * Retrieve network dynamic test results * Returns network metrics (`loss`, `latency`, `jitter` and `bandwidth`) from each endpoint agent, for each `roundId` in the requested window. When Time Frame is provided the rounds specific to the time frame is returned and the order is not pre-defined unless a user specifies the sort order in filter. When no time frame is provided the latest rounds are returned. @@ -203,6 +223,21 @@ private ApiRequest.ApiRequestBuilder getDynamicTestPathVisAgentRoundResultsReque requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); return requestBuilder; } + /** + * Retrieve path visualization network dynamic test results with pagination + * Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours will be returned. + * @param testId Test ID (required) + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @return Paginator + */ + public Paginator getDynamicTestPathVisResultsPaginated(String testId, String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate) { + return new Paginator<>(cursor -> getDynamicTestPathVisResults(testId, aid, window, startDate, endDate, cursor), + PathVisDynamicEndpointTestResults::getResults); + + } /** * Retrieve path visualization network dynamic test results * Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours will be returned. diff --git a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkEndpointScheduledTestResultsApi.java b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkEndpointScheduledTestResultsApi.java index 89d3cbb43..ea1091c91 100644 --- a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkEndpointScheduledTestResultsApi.java +++ b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkEndpointScheduledTestResultsApi.java @@ -30,6 +30,12 @@ import com.thousandeyes.sdk.endpoint.tests.results.model.PathVisDetailEndpointTestResults; import com.thousandeyes.sdk.endpoint.tests.results.model.PathVisEndpointTestResults; import com.thousandeyes.sdk.endpoint.tests.results.model.UnauthorizedError; +import com.thousandeyes.sdk.endpoint.tests.results.model.NetworkEndpointTestResult; +import com.thousandeyes.sdk.pagination.Paginator; +import com.thousandeyes.sdk.endpoint.tests.results.model.NetworkEndpointTestResult; +import com.thousandeyes.sdk.pagination.Paginator; +import com.thousandeyes.sdk.endpoint.tests.results.model.PathVisEndpointTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -64,6 +70,22 @@ public NetworkEndpointScheduledTestResultsApi(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Retrieve network scheduled test results with pagination + * Returns network metrics (loss, latency, and jitter) from each endpoint agent, for each roundId within the specified time window, as determined by search filters. If a time frame is provided, the rounds relevant to that time frame are returned, and the order is not predefined unless the user specifies a sort order in the filter. When no time frame is provided, the latest rounds are returned. + * @param testId Test ID (required) + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @param endpointTestsDataRoundsSearch Tests data search filters. (optional) + * @return Paginator + */ + public Paginator filterScheduledTestNetworkResultsPaginated(String testId, String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate, EndpointTestsDataRoundsSearch endpointTestsDataRoundsSearch) { + return new Paginator<>(cursor -> filterScheduledTestNetworkResults(testId, aid, window, startDate, endDate, cursor, endpointTestsDataRoundsSearch), + NetworkEndpointTestResults::getResults); + + } /** * Retrieve network scheduled test results * Returns network metrics (loss, latency, and jitter) from each endpoint agent, for each roundId within the specified time window, as determined by search filters. If a time frame is provided, the rounds relevant to that time frame are returned, and the order is not predefined unless the user specifies a sort order in the filter. When no time frame is provided, the latest rounds are returned. @@ -135,6 +157,22 @@ private ApiRequest.ApiRequestBuilder filterScheduledTestNetworkResultsRequestBui requestBuilder.requestBody(endpointTestsDataRoundsSearch); return requestBuilder; } + /** + * Retrieve network scheduled test results from multiple tests with pagination + * Returns network metrics, including loss, latency, and jitter, for multiple test IDs obtained from each endpoint agent. It allows you to specify a time window using search filters to retrieve metrics for specific round IDs within that time frame. The default order of results is unspecified unless you include a sorting preference in the filter. When no time frame is provided, the API returns metrics for the most recent rounds. Access to all accounts associated with the specified test IDs is required to use this endpoint. + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @param max (Optional) Maximum number of objects to return. (optional) + * @param multiTestIdEndpointTestsDataRoundsSearch Test data search filters. (optional) + * @return Paginator + */ + public Paginator filterScheduledTestsNetworkResultsPaginated(String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate, Integer max, MultiTestIdEndpointTestsDataRoundsSearch multiTestIdEndpointTestsDataRoundsSearch) { + return new Paginator<>(cursor -> filterScheduledTestsNetworkResults(aid, window, startDate, endDate, max, cursor, multiTestIdEndpointTestsDataRoundsSearch), + MultiTestIdNetworkEndpointTestResults::getResults); + + } /** * Retrieve network scheduled test results from multiple tests * Returns network metrics, including loss, latency, and jitter, for multiple test IDs obtained from each endpoint agent. It allows you to specify a time window using search filters to retrieve metrics for specific round IDs within that time frame. The default order of results is unspecified unless you include a sorting preference in the filter. When no time frame is provided, the API returns metrics for the most recent rounds. Access to all accounts associated with the specified test IDs is required to use this endpoint. @@ -271,6 +309,21 @@ private ApiRequest.ApiRequestBuilder getScheduledTestPathVisAgentRoundResultsReq requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); return requestBuilder; } + /** + * Retrieve path visualization network scheduled test results with pagination + * Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours is returned. + * @param testId Test ID (required) + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @return Paginator + */ + public Paginator getScheduledTestPathVisResultsPaginated(String testId, String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate) { + return new Paginator<>(cursor -> getScheduledTestPathVisResults(testId, aid, window, startDate, endDate, cursor), + PathVisEndpointTestResults::getResults); + + } /** * Retrieve path visualization network scheduled test results * Returns a summary of the path visualization data collected from each endpoint agent to the destination. In each path visualization attempt, one attempt is made to reach the destination. Each set of data is summarized, based on response time, number of hops, and response time to the target. A time frame must be specified, or the most recent round within last 2 hours is returned. diff --git a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/RealUserEndpointTestResultsApi.java b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/RealUserEndpointTestResultsApi.java index 05e51d063..992a3869e 100644 --- a/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/RealUserEndpointTestResultsApi.java +++ b/endpoint-test-results/src/main/java/com/thousandeyes/sdk/endpoint/tests/results/RealUserEndpointTestResultsApi.java @@ -32,6 +32,12 @@ import com.thousandeyes.sdk.endpoint.tests.results.model.RealUserEndpointTestResultsRequest; import com.thousandeyes.sdk.endpoint.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.endpoint.tests.results.model.ValidationError; +import com.thousandeyes.sdk.endpoint.tests.results.model.RealUserEndpointTestNetworkResult; +import com.thousandeyes.sdk.pagination.Paginator; +import com.thousandeyes.sdk.endpoint.tests.results.model.RealUserEndpointTest; +import com.thousandeyes.sdk.pagination.Paginator; +import com.thousandeyes.sdk.endpoint.tests.results.model.RealUserEndpointTestPageResult; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -66,6 +72,21 @@ public RealUserEndpointTestResultsApi(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * List endpoint real user tests with pagination + * Returns a list of all endpoint real user tests. Sessions from the last round are provided unless an explicit start and end is provided with `startDate`, `endDate` or `window` optional parameters. ## Request body filters This endpoint supports complex filtering using the request body. It is important these filters remain unaltered when making use of pagination, otherwise the results will not be coherent with the original request. ### Multiple filter fields When multiple filter fields are provided, a logical `AND` is applied between the filters. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/networks/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ] }}' ``` ### Filter field with multiple values When a filter field contains multiple values, a logical `OR` is applied between the filter values. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/networks/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] }}' ``` ### Combination of request parameters and body filters ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/networks/filter?window=1w' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ], \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] }}' ``` Returns a `results` array of endpoint real user tests. Network sessions shown are from the latest round, or based on the time range specified. + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @param realUserEndpointTestResultsRequest (optional) + * @return Paginator + */ + public Paginator filterRealUserTestsNetworkResultsPaginated(String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate, RealUserEndpointTestResultsRequest realUserEndpointTestResultsRequest) { + return new Paginator<>(cursor -> filterRealUserTestsNetworkResults(aid, window, startDate, endDate, cursor, realUserEndpointTestResultsRequest), + RealUserEndpointTestNetworkResults::getResults); + + } /** * List endpoint real user tests * Returns a list of all endpoint real user tests. Sessions from the last round are provided unless an explicit start and end is provided with `startDate`, `endDate` or `window` optional parameters. ## Request body filters This endpoint supports complex filtering using the request body. It is important these filters remain unaltered when making use of pagination, otherwise the results will not be coherent with the original request. ### Multiple filter fields When multiple filter fields are provided, a logical `AND` is applied between the filters. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/networks/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ] }}' ``` ### Filter field with multiple values When a filter field contains multiple values, a logical `OR` is applied between the filter values. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/networks/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] }}' ``` ### Combination of request parameters and body filters ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/networks/filter?window=1w' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ], \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] }}' ``` Returns a `results` array of endpoint real user tests. Network sessions shown are from the latest round, or based on the time range specified. @@ -130,6 +151,21 @@ private ApiRequest.ApiRequestBuilder filterRealUserTestsNetworkResultsRequestBui requestBuilder.requestBody(realUserEndpointTestResultsRequest); return requestBuilder; } + /** + * List endpoint real user tests with pagination + * Returns a list of all endpoint real user tests. Results from the last round are provided unless an explicit start and end is provided with `startDate`, `endDate` or `window` optional parameters. ## Request body filters This endpoint supports complex filtering using the request body. It is important these filters remain unaltered when making use of pagination, otherwise the results will not be coherent with the original request. ### Multiple filter fields When multiple filter fields are provided, a logical `AND` is applied between the filters. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ] }}' ``` ### Filter field with multiple values When a filter field contains multiple values, a logical `OR` is applied between the filter values. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` ### Combination of request parameters and body filters ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter?window=1w' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ], \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` Returns a `results` array of endpoint real user tests. Either the latest results, or based on the time range and body filters specified. + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @param realUserEndpointTestResultsRequest (optional) + * @return Paginator + */ + public Paginator filterRealUserTestsResultsPaginated(String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate, RealUserEndpointTestResultsRequest realUserEndpointTestResultsRequest) { + return new Paginator<>(cursor -> filterRealUserTestsResults(aid, window, startDate, endDate, cursor, realUserEndpointTestResultsRequest), + RealUserEndpointTestResults::getResults); + + } /** * List endpoint real user tests * Returns a list of all endpoint real user tests. Results from the last round are provided unless an explicit start and end is provided with `startDate`, `endDate` or `window` optional parameters. ## Request body filters This endpoint supports complex filtering using the request body. It is important these filters remain unaltered when making use of pagination, otherwise the results will not be coherent with the original request. ### Multiple filter fields When multiple filter fields are provided, a logical `AND` is applied between the filters. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ] }}' ``` ### Filter field with multiple values When a filter field contains multiple values, a logical `OR` is applied between the filter values. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` ### Combination of request parameters and body filters ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/filter?window=1w' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ], \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] } }' ``` Returns a `results` array of endpoint real user tests. Either the latest results, or based on the time range and body filters specified. @@ -194,6 +230,21 @@ private ApiRequest.ApiRequestBuilder filterRealUserTestsResultsRequestBuilder(St requestBuilder.requestBody(realUserEndpointTestResultsRequest); return requestBuilder; } + /** + * List endpoint real user tests visited pages with pagination + * Returns a list of all endpoint real user tests visited pages. Sessions from the last round are provided unless an explicit start and end is provided with `startDate`, `endDate` or `window` optional parameters. ## Request body filters This endpoint supports complex filtering using the request body. It is important these filters remain unaltered when making use of pagination, otherwise the results will not be coherent with the original request. ### Multiple filter fields When multiple filter fields are provided, a logical `AND` is applied between the filters. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/pages/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ] }}' ``` ### Filter field with multiple values When a filter field contains multiple values, a logical `OR` is applied between the filter values. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/pages/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] }}' ``` ### Combination of request parameters and body filters ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/pages/filter?window=1w' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ], \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] }}' ``` Returns a `results` array of user loaded pages in an endpoint real user test. Pages shown are from the latest round, or based on the time range specified. + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @param realUserEndpointTestResultRequestFilter (optional) + * @return Paginator + */ + public Paginator filterRealUserTestsVisitedPagesResultsPaginated(String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate, RealUserEndpointTestResultRequestFilter realUserEndpointTestResultRequestFilter) { + return new Paginator<>(cursor -> filterRealUserTestsVisitedPagesResults(aid, window, startDate, endDate, cursor, realUserEndpointTestResultRequestFilter), + RealUserEndpointTestPageResults::getResults); + + } /** * List endpoint real user tests visited pages * Returns a list of all endpoint real user tests visited pages. Sessions from the last round are provided unless an explicit start and end is provided with `startDate`, `endDate` or `window` optional parameters. ## Request body filters This endpoint supports complex filtering using the request body. It is important these filters remain unaltered when making use of pagination, otherwise the results will not be coherent with the original request. ### Multiple filter fields When multiple filter fields are provided, a logical `AND` is applied between the filters. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/pages/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ] }}' ``` ### Filter field with multiple values When a filter field contains multiple values, a logical `OR` is applied between the filter values. ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/pages/filter' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] }}' ``` ### Combination of request parameters and body filters ``` curl --location --request POST 'https://api.thousandeyes.com/v7/endpoint/test-results/real-user-tests/pages/filter?window=1w' --header 'Authorization: Bearer $token' --header 'Content-Type: application/json' --data-raw '{ \"searchFilters\": { \"platform\": [ \"mac\" ], \"domain\": [ \"thousandeyes.com\" ], \"networkId\": [ \"660b34109d12\", \"660b34109d15\" ] }}' ``` Returns a `results` array of user loaded pages in an endpoint real user test. Pages shown are from the latest round, or based on the time range specified. diff --git a/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/HttpServerEndpointScheduledTestResultsApiTest.java b/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/HttpServerEndpointScheduledTestResultsApiTest.java index 1e3295c1d..a367bdb83 100644 --- a/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/HttpServerEndpointScheduledTestResultsApiTest.java +++ b/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/HttpServerEndpointScheduledTestResultsApiTest.java @@ -20,6 +20,10 @@ import java.time.OffsetDateTime; import com.thousandeyes.sdk.endpoint.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.endpoint.tests.results.model.ValidationError; +import com.thousandeyes.sdk.endpoint.tests.results.model.HttpEndpointTestResult; +import com.thousandeyes.sdk.pagination.Paginator; +import com.thousandeyes.sdk.endpoint.tests.results.model.HttpEndpointTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; diff --git a/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/LocalNetworkEndpointTestResultsApiTest.java b/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/LocalNetworkEndpointTestResultsApiTest.java index 9d52ccba7..b34456025 100644 --- a/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/LocalNetworkEndpointTestResultsApiTest.java +++ b/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/LocalNetworkEndpointTestResultsApiTest.java @@ -20,6 +20,8 @@ import java.time.OffsetDateTime; import com.thousandeyes.sdk.endpoint.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.endpoint.tests.results.model.ValidationError; +import com.thousandeyes.sdk.endpoint.tests.results.model.LocalNetworkTopologyResultBase; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; diff --git a/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkDynamicEndpointTestResultsApiTest.java b/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkDynamicEndpointTestResultsApiTest.java index 3550ee247..f1b4554b6 100644 --- a/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkDynamicEndpointTestResultsApiTest.java +++ b/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkDynamicEndpointTestResultsApiTest.java @@ -20,6 +20,10 @@ import com.thousandeyes.sdk.endpoint.tests.results.model.PathVisDynamicEndpointTestResults; import com.thousandeyes.sdk.endpoint.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.endpoint.tests.results.model.ValidationError; +import com.thousandeyes.sdk.endpoint.tests.results.model.NetworkDynamicEndpointTestResult; +import com.thousandeyes.sdk.pagination.Paginator; +import com.thousandeyes.sdk.endpoint.tests.results.model.PathVisDynamicEndpointTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; diff --git a/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkEndpointScheduledTestResultsApiTest.java b/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkEndpointScheduledTestResultsApiTest.java index 43cfd74e4..6d1434444 100644 --- a/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkEndpointScheduledTestResultsApiTest.java +++ b/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/NetworkEndpointScheduledTestResultsApiTest.java @@ -21,6 +21,12 @@ import com.thousandeyes.sdk.endpoint.tests.results.model.PathVisDetailEndpointTestResults; import com.thousandeyes.sdk.endpoint.tests.results.model.PathVisEndpointTestResults; import com.thousandeyes.sdk.endpoint.tests.results.model.UnauthorizedError; +import com.thousandeyes.sdk.endpoint.tests.results.model.NetworkEndpointTestResult; +import com.thousandeyes.sdk.pagination.Paginator; +import com.thousandeyes.sdk.endpoint.tests.results.model.NetworkEndpointTestResult; +import com.thousandeyes.sdk.pagination.Paginator; +import com.thousandeyes.sdk.endpoint.tests.results.model.PathVisEndpointTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; diff --git a/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/RealUserEndpointTestResultsApiTest.java b/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/RealUserEndpointTestResultsApiTest.java index 4307906c1..13a20fc96 100644 --- a/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/RealUserEndpointTestResultsApiTest.java +++ b/endpoint-test-results/src/test/java/com/thousandeyes/sdk/endpoint/tests/results/RealUserEndpointTestResultsApiTest.java @@ -23,6 +23,12 @@ import com.thousandeyes.sdk.endpoint.tests.results.model.RealUserEndpointTestResultsRequest; import com.thousandeyes.sdk.endpoint.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.endpoint.tests.results.model.ValidationError; +import com.thousandeyes.sdk.endpoint.tests.results.model.RealUserEndpointTestNetworkResult; +import com.thousandeyes.sdk.pagination.Paginator; +import com.thousandeyes.sdk.endpoint.tests.results.model.RealUserEndpointTest; +import com.thousandeyes.sdk.pagination.Paginator; +import com.thousandeyes.sdk.endpoint.tests.results.model.RealUserEndpointTestPageResult; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; @@ -520,11 +526,11 @@ public void getRealUserTestPageResultsRequestAndResponseDeserializationTest() "log" : { "browser" : { "name" : "Google Chrome", - "version" : "7.0.22.98" + "version" : "7.0.25.98" }, "creator" : { "name" : "ThousandEyes Endpoint Agent", - "version" : "7.0.22" + "version" : "7.0.25" }, "entries" : [ { "pageref" : "page_1", diff --git a/endpoint-tests/README.md b/endpoint-tests/README.md index 911b52b9e..1af35b62e 100644 --- a/endpoint-tests/README.md +++ b/endpoint-tests/README.md @@ -2,7 +2,7 @@ Endpoint Tests API -- API version: 7.0.22 +- API version: 7.0.25 Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API. diff --git a/event-detection/README.md b/event-detection/README.md index 49e5b968e..8947a8773 100644 --- a/event-detection/README.md +++ b/event-detection/README.md @@ -2,7 +2,7 @@ Event Detection API -- API version: 7.0.22 +- API version: 7.0.25 Event detection occurs when ThousandEyes identifies that error signals related to a component (proxy, network node, AS, server etc) have deviated from the baselines established by events. diff --git a/event-detection/src/main/java/com/thousandeyes/sdk/event/detection/EventsApi.java b/event-detection/src/main/java/com/thousandeyes/sdk/event/detection/EventsApi.java index a36ebe02f..1e9e759d1 100644 --- a/event-detection/src/main/java/com/thousandeyes/sdk/event/detection/EventsApi.java +++ b/event-detection/src/main/java/com/thousandeyes/sdk/event/detection/EventsApi.java @@ -28,6 +28,8 @@ import java.util.UUID; import com.thousandeyes.sdk.event.detection.model.UnauthorizedError; import com.thousandeyes.sdk.event.detection.model.ValidationError; +import com.thousandeyes.sdk.event.detection.model.Event; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -117,6 +119,21 @@ private ApiRequest.ApiRequestBuilder getEventRequestBuilder(UUID id, String aid) requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); return requestBuilder; } + /** + * List events with pagination + * Retrieves a list of events within the specified time window. If no events are active during the specified time range, an empty response is returned. **Note**: You must provide either a time window using the `window` parameter or specify `startDate` and `endDate`. + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @param max (Optional) Maximum number of objects to return. (optional) + * @return Paginator + */ + public Paginator getEventsPaginated(String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate, Integer max) { + return new Paginator<>(cursor -> getEvents(aid, window, startDate, endDate, max, cursor), + Events::getEvents); + + } /** * List events * Retrieves a list of events within the specified time window. If no events are active during the specified time range, an empty response is returned. **Note**: You must provide either a time window using the `window` parameter or specify `startDate` and `endDate`. diff --git a/event-detection/src/test/java/com/thousandeyes/sdk/event/detection/EventsApiTest.java b/event-detection/src/test/java/com/thousandeyes/sdk/event/detection/EventsApiTest.java index 3a079f33c..5a725ee14 100644 --- a/event-detection/src/test/java/com/thousandeyes/sdk/event/detection/EventsApiTest.java +++ b/event-detection/src/test/java/com/thousandeyes/sdk/event/detection/EventsApiTest.java @@ -19,6 +19,8 @@ import java.util.UUID; import com.thousandeyes.sdk.event.detection.model.UnauthorizedError; import com.thousandeyes.sdk.event.detection.model.ValidationError; +import com.thousandeyes.sdk.event.detection.model.Event; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; diff --git a/instant-tests/README.md b/instant-tests/README.md index 9bec5a013..8672231e3 100644 --- a/instant-tests/README.md +++ b/instant-tests/README.md @@ -2,7 +2,7 @@ Instant Tests API -- API version: 7.0.22 +- API version: 7.0.25 The Instant Tests API operations lets you create and run new instant tests. You will need to be a regular user or have the following permissions: * `API Access` diff --git a/internet-insights/README.md b/internet-insights/README.md index 6460951c9..c580b8eb9 100644 --- a/internet-insights/README.md +++ b/internet-insights/README.md @@ -2,7 +2,7 @@ Internet Insights API -- API version: 7.0.22 +- API version: 7.0.25 We are happy to announce the release of the Internet Insights API set. This limited release includes endpoints that: diff --git a/snapshots/README.md b/snapshots/README.md index 1b88deac6..449f07db9 100644 --- a/snapshots/README.md +++ b/snapshots/README.md @@ -2,7 +2,7 @@ Test Snapshots API -- API version: 7.0.22 +- API version: 7.0.25 Creates a new test snapshot in ThousandEyes. diff --git a/streaming/README.md b/streaming/README.md index 3e0b06e5d..105d8bd2e 100644 --- a/streaming/README.md +++ b/streaming/README.md @@ -2,7 +2,7 @@ ThousandEyes for OpenTelemetry API -- API version: 7.0.22 +- API version: 7.0.25 ThousandEyes for OpenTelemetry provides machine-to-machine integration between ThousandEyes and its customers. It allows you to export ThousandEyes telemetry data in OTel format, which is widely used in the industry. With ThousandEyes for OTel, you can leverage frameworks widely used in the observability domain - such as Splunk, Grafana, and Honeycomb - to capture and analyze ThousandEyes data. Any client that supports OTel can use ThousandEyes for OpenTelemetry. diff --git a/tags/README.md b/tags/README.md index 9fb2c63ce..d029ca67c 100644 --- a/tags/README.md +++ b/tags/README.md @@ -2,7 +2,7 @@ Tags API -- API version: 7.0.22 +- API version: 7.0.25 The ThousandEyes Tags API provides a tagging system with key/value pairs. It allows you to tag assets within the ThousandEyes platform (such as agents, tests, or alert rules) with meaningful metadata. For example: `branch:sfo`, `branch:nyc`, and `team:netops`. diff --git a/test-results/README.md b/test-results/README.md index 8c844fb43..c3d40da21 100644 --- a/test-results/README.md +++ b/test-results/README.md @@ -2,7 +2,7 @@ Test Results API -- API version: 7.0.22 +- API version: 7.0.25 Get test result metrics for Cloud and Enterprise Agent tests. diff --git a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/ApiTestResultsApi.java b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/ApiTestResultsApi.java index 5ae91c51a..d72e3c30b 100644 --- a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/ApiTestResultsApi.java +++ b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/ApiTestResultsApi.java @@ -27,6 +27,8 @@ import java.time.OffsetDateTime; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.ApiTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -130,6 +132,21 @@ private ApiRequest.ApiRequestBuilder getTestApiAgentRoundResultsRequestBuilder(S requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); return requestBuilder; } + /** + * Get API test results with pagination + * Returns test results for API. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. + * @param testId Test ID (required) + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @return Paginator + */ + public Paginator getTestApiResultsPaginated(String testId, String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate) { + return new Paginator<>(cursor -> getTestApiResults(testId, aid, window, startDate, endDate, cursor), + ApiTestResults::getResults); + + } /** * Get API test results * Returns test results for API. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. diff --git a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/DnsServerTestResultsApi.java b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/DnsServerTestResultsApi.java index 62bc2deed..b698971b8 100644 --- a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/DnsServerTestResultsApi.java +++ b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/DnsServerTestResultsApi.java @@ -26,6 +26,10 @@ import java.time.OffsetDateTime; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.DnsServerTestResult; +import com.thousandeyes.sdk.pagination.Paginator; +import com.thousandeyes.sdk.tests.results.model.DnsServerTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -60,6 +64,22 @@ public DnsServerTestResultsApi(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Get DNS server test results by server with pagination + * Returns mappings for a DNS record and resolution time to the specified server, measured from the requesting agent's point of view. This is similar to dig @server. + * @param testId Test ID (required) + * @param serverId DNS server ID (required) + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @return Paginator + */ + public Paginator getTestDnsServerResultPaginated(String testId, String serverId, String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate) { + return new Paginator<>(cursor -> getTestDnsServerResult(testId, serverId, aid, window, startDate, endDate, cursor), + DnsServerTestResults::getResults); + + } /** * Get DNS server test results by server * Returns mappings for a DNS record and resolution time to the specified server, measured from the requesting agent's point of view. This is similar to dig @server. @@ -134,6 +154,21 @@ private ApiRequest.ApiRequestBuilder getTestDnsServerResultRequestBuilder(String requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); return requestBuilder; } + /** + * Get DNS server test results with pagination + * Returns the mappings for a DNS record, along with the resolution time to each authoritative server, measured from the agent's point of view. Similar to dig @server. + * @param testId Test ID (required) + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @return Paginator + */ + public Paginator getTestDnsServersResultsPaginated(String testId, String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate) { + return new Paginator<>(cursor -> getTestDnsServersResults(testId, aid, window, startDate, endDate, cursor), + DnsServerTestResults::getResults); + + } /** * Get DNS server test results * Returns the mappings for a DNS record, along with the resolution time to each authoritative server, measured from the agent's point of view. Similar to dig @server. diff --git a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/DnsTraceTestResultsApi.java b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/DnsTraceTestResultsApi.java index e348f56e0..60851813b 100644 --- a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/DnsTraceTestResultsApi.java +++ b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/DnsTraceTestResultsApi.java @@ -26,6 +26,8 @@ import java.time.OffsetDateTime; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.DnsTraceTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -60,6 +62,21 @@ public DnsTraceTestResultsApi(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Get DNS trace test results with pagination + * Returns a DNS record from the requesting agent's point of view. This is similar to dig +trace. + * @param testId Test ID (required) + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @return Paginator + */ + public Paginator getTestDnsTraceResultsPaginated(String testId, String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate) { + return new Paginator<>(cursor -> getTestDnsTraceResults(testId, aid, window, startDate, endDate, cursor), + DnsTraceTestResults::getResults); + + } /** * Get DNS trace test results * Returns a DNS record from the requesting agent's point of view. This is similar to dig +trace. diff --git a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/DnssecTestResultsApi.java b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/DnssecTestResultsApi.java index 322647acf..e14afdbaf 100644 --- a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/DnssecTestResultsApi.java +++ b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/DnssecTestResultsApi.java @@ -26,6 +26,8 @@ import java.time.OffsetDateTime; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.DnssecTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -60,6 +62,21 @@ public DnssecTestResultsApi(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Get DNSSEC test results with pagination + * Returns the keychain validity for a record on a domain secured using DNSSEC extensions. + * @param testId Test ID (required) + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @return Paginator + */ + public Paginator getTestDnsSecResultsPaginated(String testId, String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate) { + return new Paginator<>(cursor -> getTestDnsSecResults(testId, aid, window, startDate, endDate, cursor), + DnssecTestResults::getResults); + + } /** * Get DNSSEC test results * Returns the keychain validity for a record on a domain secured using DNSSEC extensions. diff --git a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/NetworkBgpTestResultsApi.java b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/NetworkBgpTestResultsApi.java index e4d032db3..155da3545 100644 --- a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/NetworkBgpTestResultsApi.java +++ b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/NetworkBgpTestResultsApi.java @@ -27,6 +27,8 @@ import java.time.OffsetDateTime; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.BgpTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -61,6 +63,21 @@ public NetworkBgpTestResultsApi(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Get BGP test results with pagination + * Returns a list of BGP monitors actively monitoring the destination's target prefix. This list includes information about the prefix, its associated AS Number, and provides details regarding reachability, path updates, and any changes in the path for the target network. + * @param testId Test ID (required) + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @return Paginator + */ + public Paginator getTestBgpResultsPaginated(String testId, String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate) { + return new Paginator<>(cursor -> getTestBgpResults(testId, aid, window, startDate, endDate, cursor), + BgpTestResults::getResults); + + } /** * Get BGP test results * Returns a list of BGP monitors actively monitoring the destination's target prefix. This list includes information about the prefix, its associated AS Number, and provides details regarding reachability, path updates, and any changes in the path for the target network. diff --git a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/NetworkTestResultsApi.java b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/NetworkTestResultsApi.java index 6b63fb081..d75c03898 100644 --- a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/NetworkTestResultsApi.java +++ b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/NetworkTestResultsApi.java @@ -30,6 +30,10 @@ import com.thousandeyes.sdk.tests.results.model.TestDirection; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.NetworkTestResult; +import com.thousandeyes.sdk.pagination.Paginator; +import com.thousandeyes.sdk.tests.results.model.PathVisTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -64,6 +68,22 @@ public NetworkTestResultsApi(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Get network test results with pagination + * Returns network test results for every agent and round. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. + * @param testId Test ID (required) + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @param direction Choose the direction for the metrics you want: [`from-target`, `to-target`, `bidirectional`]. This applies when you're doing bidirectional Agent-to-Agent tests. For bidirectional data, you'll get combined results; otherwise, you'll get data for one direction. If you try to get unidirectional test data with an incorrect direction parameter, it will trigger an error response. (optional, default to to-target) + * @return Paginator + */ + public Paginator getTestNetworkResultsPaginated(String testId, String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate, TestDirection direction) { + return new Paginator<>(cursor -> getTestNetworkResults(testId, aid, window, startDate, endDate, cursor, direction), + NetworkTestResults::getResults); + + } /** * Get network test results * Returns network test results for every agent and round. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. @@ -206,6 +226,22 @@ private ApiRequest.ApiRequestBuilder getTestPathVisAgentRoundResultsRequestBuild requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); return requestBuilder; } + /** + * Get path visualization network test results with pagination + * Returns a summary of the path trace data collected during path visualization for a given time range. With each attempt, three tries are made to reach the destination. The entire path is displayed in order. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. Bidirectional agent-to-agent tests also support the `direction` parameter. For example, if agents A, B, and C are testing agent D bidirectionally, and you want results from the route from agent A to agent D, you can use the query `direction=to-target`. For results from agent D to agent A, you can use `direction=from-target`. To get both results for both routes, query without the direction parameter. The source will always be agent A and the destination will be agent D, but the direction field will indicate which trace direction you want test results from. + * @param testId Test ID (required) + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @param direction Choose the direction for the metrics you want: [`from-target`, `to-target`]. This applies when you're doing bidirectional Agent-to-Agent tests. Omitting the parameter will default the results to both `from-target` and `to-target` values (bidirectional); otherwise, you'll get data for one direction. If you try to get unidirectional test data with an incorrect direction parameter, it will trigger an error response. (optional) + * @return Paginator + */ + public Paginator getTestPathVisResultsPaginated(String testId, String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate, PathVisDirection direction) { + return new Paginator<>(cursor -> getTestPathVisResults(testId, aid, window, startDate, endDate, cursor, direction), + PathVisTestResults::getResults); + + } /** * Get path visualization network test results * Returns a summary of the path trace data collected during path visualization for a given time range. With each attempt, three tries are made to reach the destination. The entire path is displayed in order. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. Bidirectional agent-to-agent tests also support the `direction` parameter. For example, if agents A, B, and C are testing agent D bidirectionally, and you want results from the route from agent A to agent D, you can use the query `direction=to-target`. For results from agent D to agent A, you can use `direction=from-target`. To get both results for both routes, query without the direction parameter. The source will always be agent A and the destination will be agent D, but the direction field will indicate which trace direction you want test results from. diff --git a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/VoiceRtpServerTestResultsApi.java b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/VoiceRtpServerTestResultsApi.java index 7a5111338..3d30b4e27 100644 --- a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/VoiceRtpServerTestResultsApi.java +++ b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/VoiceRtpServerTestResultsApi.java @@ -26,6 +26,8 @@ import com.thousandeyes.sdk.tests.results.model.RtpStreamTestResults; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.RtpStreamTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -60,6 +62,21 @@ public VoiceRtpServerTestResultsApi(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Retrieve RTP server test metrics with pagination + * Returns Voice RTP server test results. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. + * @param testId Test ID (required) + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @return Paginator + */ + public Paginator getTestRtpServerResultsPaginated(String testId, String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate) { + return new Paginator<>(cursor -> getTestRtpServerResults(testId, aid, window, startDate, endDate, cursor), + RtpStreamTestResults::getResults); + + } /** * Retrieve RTP server test metrics * Returns Voice RTP server test results. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. diff --git a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/VoiceSipServerTestResultsApi.java b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/VoiceSipServerTestResultsApi.java index 080275a76..0b5c24ebd 100644 --- a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/VoiceSipServerTestResultsApi.java +++ b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/VoiceSipServerTestResultsApi.java @@ -26,6 +26,8 @@ import com.thousandeyes.sdk.tests.results.model.SipServerTestResults; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.SipServerTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -60,6 +62,21 @@ public VoiceSipServerTestResultsApi(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Get SIP server test results with pagination + * Returns Voice SIP server test results. It returns data for each agent and each `roundId` within the selected time frame. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. + * @param testId Test ID (required) + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @return Paginator + */ + public Paginator getTestSipServerResultsPaginated(String testId, String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate) { + return new Paginator<>(cursor -> getTestSipServerResults(testId, aid, window, startDate, endDate, cursor), + SipServerTestResults::getResults); + + } /** * Get SIP server test results * Returns Voice SIP server test results. It returns data for each agent and each `roundId` within the selected time frame. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. diff --git a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/WebFtpServerTestResultsApi.java b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/WebFtpServerTestResultsApi.java index fd7658429..583e13c00 100644 --- a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/WebFtpServerTestResultsApi.java +++ b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/WebFtpServerTestResultsApi.java @@ -26,6 +26,8 @@ import java.time.OffsetDateTime; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.FtpServerTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -60,6 +62,21 @@ public WebFtpServerTestResultsApi(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Get FTP server test results with pagination + * Returns test results for FTP server requests. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. + * @param testId Test ID (required) + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @return Paginator + */ + public Paginator getTestFtpServerResultsPaginated(String testId, String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate) { + return new Paginator<>(cursor -> getTestFtpServerResults(testId, aid, window, startDate, endDate, cursor), + FtpServerTestResults::getResults); + + } /** * Get FTP server test results * Returns test results for FTP server requests. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. diff --git a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/WebHttpServerTestResultsApi.java b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/WebHttpServerTestResultsApi.java index 2947b7b59..d1d2ca01f 100644 --- a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/WebHttpServerTestResultsApi.java +++ b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/WebHttpServerTestResultsApi.java @@ -27,6 +27,8 @@ import java.time.OffsetDateTime; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.HttpTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -61,6 +63,22 @@ public WebHttpServerTestResultsApi(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Get HTTP server test results with pagination + * Returns results for requests made over HTTP. Components include DNS, Connect, Wait, Receive, and Fetch. + * @param testId Test ID (required) + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @param expand This parameter lets you decide if you want to see more details about test results. By default, no extra information is shown unless you use the query parameter. For instance, if you want more info about the \"header,\" add ?expand=header to the query. (optional + * @return Paginator + */ + public Paginator getTestHttpServerResultsPaginated(String testId, String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate, List expand) { + return new Paginator<>(cursor -> getTestHttpServerResults(testId, aid, window, startDate, endDate, cursor, expand), + HttpTestResults::getResults); + + } /** * Get HTTP server test results * Returns results for requests made over HTTP. Components include DNS, Connect, Wait, Receive, and Fetch. diff --git a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/WebPageLoadTestResultsApi.java b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/WebPageLoadTestResultsApi.java index 1ad763457..c0931afe8 100644 --- a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/WebPageLoadTestResultsApi.java +++ b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/WebPageLoadTestResultsApi.java @@ -27,6 +27,8 @@ import com.thousandeyes.sdk.tests.results.model.PageLoadTestResults; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.PageLoadTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -130,6 +132,21 @@ private ApiRequest.ApiRequestBuilder getTestPageLoadAgentRoundResultsRequestBuil requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); return requestBuilder; } + /** + * Get page load server test results with pagination + * Returns results for page load server tests with a focus on page load times and DOM for a web page. + * @param testId Test ID (required) + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @return Paginator + */ + public Paginator getTestPageLoadResultsPaginated(String testId, String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate) { + return new Paginator<>(cursor -> getTestPageLoadResults(testId, aid, window, startDate, endDate, cursor), + PageLoadTestResults::getResults); + + } /** * Get page load server test results * Returns results for page load server tests with a focus on page load times and DOM for a web page. diff --git a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/WebTransactionsTestResultsApi.java b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/WebTransactionsTestResultsApi.java index 791b22c81..1c937e6d4 100644 --- a/test-results/src/main/java/com/thousandeyes/sdk/tests/results/WebTransactionsTestResultsApi.java +++ b/test-results/src/main/java/com/thousandeyes/sdk/tests/results/WebTransactionsTestResultsApi.java @@ -28,6 +28,8 @@ import com.thousandeyes.sdk.tests.results.model.WebTransactionDetailTestResults; import com.thousandeyes.sdk.tests.results.model.WebTransactionPageDetailTestResults; import com.thousandeyes.sdk.tests.results.model.WebTransactionTestResults; +import com.thousandeyes.sdk.tests.results.model.WebTransactionTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -207,6 +209,21 @@ private ApiRequest.ApiRequestBuilder getTestWebTransactionAgentRoundResultsReque requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); return requestBuilder; } + /** + * Get web transactions test results with pagination + * Returns test results for web transactions. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. + * @param testId Test ID (required) + * @param aid 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) + * @param window A dynamic time interval up to the current time of the request. Specify the interval as a number followed by an optional type: `s` for seconds (default if no type is specified), `m` for minutes, `h` for hours, `d` for days, and `w` for weeks. For a precise date range, use `startDate` and `endDate`. (optional) + * @param startDate 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) + * @param endDate 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) + * @return Paginator + */ + public Paginator getTestWebTransactionResultsPaginated(String testId, String aid, String window, OffsetDateTime startDate, OffsetDateTime endDate) { + return new Paginator<>(cursor -> getTestWebTransactionResults(testId, aid, window, startDate, endDate, cursor), + WebTransactionTestResults::getResults); + + } /** * Get web transactions test results * Returns test results for web transactions. If you do not specify a window or a start and end date, data is displayed for the most recent testing round. diff --git a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/ApiTestResultsApiTest.java b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/ApiTestResultsApiTest.java index 779c48f2c..1098c9371 100644 --- a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/ApiTestResultsApiTest.java +++ b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/ApiTestResultsApiTest.java @@ -18,6 +18,8 @@ import java.time.OffsetDateTime; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.ApiTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; diff --git a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/DnsServerTestResultsApiTest.java b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/DnsServerTestResultsApiTest.java index 18cee1e11..af86ee112 100644 --- a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/DnsServerTestResultsApiTest.java +++ b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/DnsServerTestResultsApiTest.java @@ -17,6 +17,10 @@ import java.time.OffsetDateTime; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.DnsServerTestResult; +import com.thousandeyes.sdk.pagination.Paginator; +import com.thousandeyes.sdk.tests.results.model.DnsServerTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; diff --git a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/DnsTraceTestResultsApiTest.java b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/DnsTraceTestResultsApiTest.java index 13a4aa6f1..7e55827d9 100644 --- a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/DnsTraceTestResultsApiTest.java +++ b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/DnsTraceTestResultsApiTest.java @@ -17,6 +17,8 @@ import java.time.OffsetDateTime; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.DnsTraceTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; diff --git a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/DnssecTestResultsApiTest.java b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/DnssecTestResultsApiTest.java index 884e50949..beac54a7f 100644 --- a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/DnssecTestResultsApiTest.java +++ b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/DnssecTestResultsApiTest.java @@ -17,6 +17,8 @@ import java.time.OffsetDateTime; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.DnssecTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; diff --git a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/NetworkBgpTestResultsApiTest.java b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/NetworkBgpTestResultsApiTest.java index 9d8695d9a..40d4a933a 100644 --- a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/NetworkBgpTestResultsApiTest.java +++ b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/NetworkBgpTestResultsApiTest.java @@ -18,6 +18,8 @@ import java.time.OffsetDateTime; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.BgpTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; diff --git a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/NetworkTestResultsApiTest.java b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/NetworkTestResultsApiTest.java index 2784d51ce..630397ab7 100644 --- a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/NetworkTestResultsApiTest.java +++ b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/NetworkTestResultsApiTest.java @@ -21,6 +21,10 @@ import com.thousandeyes.sdk.tests.results.model.TestDirection; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.NetworkTestResult; +import com.thousandeyes.sdk.pagination.Paginator; +import com.thousandeyes.sdk.tests.results.model.PathVisTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; diff --git a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/VoiceRtpServerTestResultsApiTest.java b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/VoiceRtpServerTestResultsApiTest.java index c2c692be0..19a52118f 100644 --- a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/VoiceRtpServerTestResultsApiTest.java +++ b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/VoiceRtpServerTestResultsApiTest.java @@ -17,6 +17,8 @@ import com.thousandeyes.sdk.tests.results.model.RtpStreamTestResults; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.RtpStreamTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; diff --git a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/VoiceSipServerTestResultsApiTest.java b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/VoiceSipServerTestResultsApiTest.java index ab82378a4..51c7cca63 100644 --- a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/VoiceSipServerTestResultsApiTest.java +++ b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/VoiceSipServerTestResultsApiTest.java @@ -17,6 +17,8 @@ import com.thousandeyes.sdk.tests.results.model.SipServerTestResults; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.SipServerTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; diff --git a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/WebFtpServerTestResultsApiTest.java b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/WebFtpServerTestResultsApiTest.java index c0188c7e6..d4316ca2b 100644 --- a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/WebFtpServerTestResultsApiTest.java +++ b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/WebFtpServerTestResultsApiTest.java @@ -17,6 +17,8 @@ import java.time.OffsetDateTime; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.FtpServerTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; diff --git a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/WebHttpServerTestResultsApiTest.java b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/WebHttpServerTestResultsApiTest.java index 76ec21884..2afa75a08 100644 --- a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/WebHttpServerTestResultsApiTest.java +++ b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/WebHttpServerTestResultsApiTest.java @@ -18,6 +18,8 @@ import java.time.OffsetDateTime; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.HttpTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; diff --git a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/WebPageLoadTestResultsApiTest.java b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/WebPageLoadTestResultsApiTest.java index 9143ce62a..b22559472 100644 --- a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/WebPageLoadTestResultsApiTest.java +++ b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/WebPageLoadTestResultsApiTest.java @@ -18,6 +18,8 @@ import com.thousandeyes.sdk.tests.results.model.PageLoadTestResults; import com.thousandeyes.sdk.tests.results.model.UnauthorizedError; import com.thousandeyes.sdk.tests.results.model.ValidationError; +import com.thousandeyes.sdk.tests.results.model.PageLoadTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; diff --git a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/WebTransactionsTestResultsApiTest.java b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/WebTransactionsTestResultsApiTest.java index c49f25dfa..b6e35674d 100644 --- a/test-results/src/test/java/com/thousandeyes/sdk/tests/results/WebTransactionsTestResultsApiTest.java +++ b/test-results/src/test/java/com/thousandeyes/sdk/tests/results/WebTransactionsTestResultsApiTest.java @@ -19,6 +19,8 @@ import com.thousandeyes.sdk.tests.results.model.WebTransactionDetailTestResults; import com.thousandeyes.sdk.tests.results.model.WebTransactionPageDetailTestResults; import com.thousandeyes.sdk.tests.results.model.WebTransactionTestResults; +import com.thousandeyes.sdk.tests.results.model.WebTransactionTestResult; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE; diff --git a/tests/README.md b/tests/README.md index fe790b4d0..e12c3f235 100644 --- a/tests/README.md +++ b/tests/README.md @@ -2,7 +2,7 @@ Tests API -- API version: 7.0.22 +- API version: 7.0.25 This API supports listing, creating, editing, and deleting Cloud and Enterprise Agent (CEA) based tests. diff --git a/usage/README.md b/usage/README.md index f7fa267a8..1e782d406 100644 --- a/usage/README.md +++ b/usage/README.md @@ -2,7 +2,7 @@ Usage API -- API version: 7.0.22 +- API version: 7.0.25 These usage endpoints define the following operations: diff --git a/usage/src/main/java/com/thousandeyes/sdk/usage/UsageApi.java b/usage/src/main/java/com/thousandeyes/sdk/usage/UsageApi.java index 322b62575..55eec4328 100644 --- a/usage/src/main/java/com/thousandeyes/sdk/usage/UsageApi.java +++ b/usage/src/main/java/com/thousandeyes/sdk/usage/UsageApi.java @@ -29,6 +29,10 @@ import com.thousandeyes.sdk.usage.model.UnauthorizedError; import com.thousandeyes.sdk.usage.model.Usage; import com.thousandeyes.sdk.usage.model.ValidationError; +import com.thousandeyes.sdk.usage.model.EnterpriseAgentUnitsByTestOwnerAccountGroup; +import com.thousandeyes.sdk.pagination.Paginator; +import com.thousandeyes.sdk.usage.model.UnitsByTests; +import com.thousandeyes.sdk.pagination.Paginator; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -63,6 +67,18 @@ public UsageApi(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Get enterprise agent usage with pagination + * 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. + * @param startDate 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) + * @param endDate 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) + * @return Paginator + */ + public Paginator getEnterpriseAgentsUnitsUsagePaginated(OffsetDateTime startDate, OffsetDateTime endDate) { + return new Paginator<>(cursor -> getEnterpriseAgentsUnitsUsage(startDate, endDate, cursor), + EnterpriseAgentsUsage::getBreakdowns); + + } /** * 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. @@ -117,6 +133,19 @@ private ApiRequest.ApiRequestBuilder getEnterpriseAgentsUnitsUsageRequestBuilder requestBuilder.header("User-Agent", List.of(Config.USER_AGENT)); return requestBuilder; } + /** + * Get cloud and enterprise agents units usage with pagination + * 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. + * @param aid 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) + * @param startDate 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) + * @param endDate 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) + * @return Paginator + */ + public Paginator getTestsUnitsUsagePaginated(String aid, OffsetDateTime startDate, OffsetDateTime endDate) { + return new Paginator<>(cursor -> getTestsUnitsUsage(aid, startDate, endDate, cursor), + TestsUsage::getBreakdowns); + + } /** * 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. diff --git a/usage/src/test/java/com/thousandeyes/sdk/usage/UsageApiTest.java b/usage/src/test/java/com/thousandeyes/sdk/usage/UsageApiTest.java index 324a4d758..364f3d1a7 100644 --- a/usage/src/test/java/com/thousandeyes/sdk/usage/UsageApiTest.java +++ b/usage/src/test/java/com/thousandeyes/sdk/usage/UsageApiTest.java @@ -20,6 +20,10 @@ import com.thousandeyes.sdk.usage.model.UnauthorizedError; import com.thousandeyes.sdk.usage.model.Usage; import com.thousandeyes.sdk.usage.model.ValidationError; +import com.thousandeyes.sdk.usage.model.EnterpriseAgentUnitsByTestOwnerAccountGroup; +import com.thousandeyes.sdk.pagination.Paginator; +import com.thousandeyes.sdk.usage.model.UnitsByTests; +import com.thousandeyes.sdk.pagination.Paginator; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.ContentTypes.AUTHORIZATION; import static com.github.tomakehurst.wiremock.common.ContentTypes.CONTENT_TYPE;