diff --git a/.generated-info b/.generated-info index e93d3fbdb80..2f609c52737 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "fde8b90", - "generated": "2025-08-18 20:34:00.694" + "spec_repo_commit": "4413e63", + "generated": "2025-08-19 20:29:58.463" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index cb4c1c4bb0f..5dc52e4a2ee 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -32160,6 +32160,8 @@ components: format: int32 maximum: 2147483647 type: integer + product_scales: + $ref: '#/components/schemas/RUMProductScales' type: description: Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, @@ -32204,6 +32206,10 @@ components: description: Name of the RUM application. example: my_new_rum_application type: string + product_analytics_retention_state: + $ref: '#/components/schemas/RUMProductAnalyticsRetentionState' + rum_event_processing_state: + $ref: '#/components/schemas/RUMEventProcessingState' type: description: Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, @@ -32278,6 +32284,8 @@ components: format: int32 maximum: 2147483647 type: integer + product_scales: + $ref: '#/components/schemas/RUMProductScales' type: description: Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, @@ -32349,6 +32357,10 @@ components: description: Name of the RUM application. example: updated_name_for_my_existing_rum_application type: string + product_analytics_retention_state: + $ref: '#/components/schemas/RUMProductAnalyticsRetentionState' + rum_event_processing_state: + $ref: '#/components/schemas/RUMEventProcessingState' type: description: Type of the RUM application. Supported values are `browser`, `ios`, `android`, `react-native`, `flutter`, `roku`, `electron`, `unity`, @@ -32477,6 +32489,33 @@ components: format: date-time type: string type: object + RUMEventProcessingScale: + description: RUM event processing scale configuration. + properties: + last_modified_at: + description: Timestamp in milliseconds when this scale was last modified. + example: 1721897494108 + format: int64 + type: integer + state: + $ref: '#/components/schemas/RUMEventProcessingState' + type: object + RUMEventProcessingState: + description: Configures which RUM events are processed and stored for the application. + enum: + - ALL + - ERROR_FOCUSED_MODE + - NONE + example: ALL + type: string + x-enum-descriptions: + - Process and store all RUM events (sessions, views, actions, resources, errors) + - Process and store only error events and related critical events + - "Disable RUM event processing\u2014no events are stored" + x-enum-varnames: + - ALL + - ERROR_FOCUSED_MODE + - NONE RUMEventType: default: rum description: Type of the event. @@ -32583,6 +32622,39 @@ components: RUMGroupByTotalString: description: A string to use as the key value for the total bucket. type: string + RUMProductAnalyticsRetentionScale: + description: Product Analytics retention scale configuration. + properties: + last_modified_at: + description: Timestamp in milliseconds when this scale was last modified. + example: 1747922145974 + format: int64 + type: integer + state: + $ref: '#/components/schemas/RUMProductAnalyticsRetentionState' + type: object + RUMProductAnalyticsRetentionState: + description: Controls the retention policy for Product Analytics data derived + from RUM events. + enum: + - MAX + - NONE + example: MAX + type: string + x-enum-descriptions: + - Store Product Analytics data for the maximum available retention period + - Do not store Product Analytics data + x-enum-varnames: + - MAX + - NONE + RUMProductScales: + description: Product Scales configuration for the RUM application. + properties: + product_analytics_retention_scale: + $ref: '#/components/schemas/RUMProductAnalyticsRetentionScale' + rum_event_processing_scale: + $ref: '#/components/schemas/RUMEventProcessingScale' + type: object RUMQueryFilter: description: The search and filter query settings. properties: diff --git a/examples/v2/rum/CreateRUMApplication_1946294560.java b/examples/v2/rum/CreateRUMApplication_1946294560.java new file mode 100644 index 00000000000..97a3d4ea6ca --- /dev/null +++ b/examples/v2/rum/CreateRUMApplication_1946294560.java @@ -0,0 +1,42 @@ +// Create a new RUM application with Product Scales returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumApi; +import com.datadog.api.client.v2.model.RUMApplicationCreate; +import com.datadog.api.client.v2.model.RUMApplicationCreateAttributes; +import com.datadog.api.client.v2.model.RUMApplicationCreateRequest; +import com.datadog.api.client.v2.model.RUMApplicationCreateType; +import com.datadog.api.client.v2.model.RUMApplicationResponse; +import com.datadog.api.client.v2.model.RUMEventProcessingState; +import com.datadog.api.client.v2.model.RUMProductAnalyticsRetentionState; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumApi apiInstance = new RumApi(defaultClient); + + RUMApplicationCreateRequest body = + new RUMApplicationCreateRequest() + .data( + new RUMApplicationCreate() + .attributes( + new RUMApplicationCreateAttributes() + .name("test-rum-with-product-scales-5c67ebb32077e1d9") + .type("browser") + .rumEventProcessingState(RUMEventProcessingState.ERROR_FOCUSED_MODE) + .productAnalyticsRetentionState(RUMProductAnalyticsRetentionState.NONE)) + .type(RUMApplicationCreateType.RUM_APPLICATION_CREATE)); + + try { + RUMApplicationResponse result = apiInstance.createRUMApplication(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumApi#createRUMApplication"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum/UpdateRUMApplication_394074053.java b/examples/v2/rum/UpdateRUMApplication_394074053.java new file mode 100644 index 00000000000..f509b3c4166 --- /dev/null +++ b/examples/v2/rum/UpdateRUMApplication_394074053.java @@ -0,0 +1,46 @@ +// Update a RUM application with Product Scales returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumApi; +import com.datadog.api.client.v2.model.RUMApplicationResponse; +import com.datadog.api.client.v2.model.RUMApplicationUpdate; +import com.datadog.api.client.v2.model.RUMApplicationUpdateAttributes; +import com.datadog.api.client.v2.model.RUMApplicationUpdateRequest; +import com.datadog.api.client.v2.model.RUMApplicationUpdateType; +import com.datadog.api.client.v2.model.RUMEventProcessingState; +import com.datadog.api.client.v2.model.RUMProductAnalyticsRetentionState; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumApi apiInstance = new RumApi(defaultClient); + + // there is a valid "rum_application" in the system + String RUM_APPLICATION_DATA_ID = System.getenv("RUM_APPLICATION_DATA_ID"); + + RUMApplicationUpdateRequest body = + new RUMApplicationUpdateRequest() + .data( + new RUMApplicationUpdate() + .attributes( + new RUMApplicationUpdateAttributes() + .name("updated_rum_with_product_scales") + .rumEventProcessingState(RUMEventProcessingState.ALL) + .productAnalyticsRetentionState(RUMProductAnalyticsRetentionState.MAX)) + .id(RUM_APPLICATION_DATA_ID) + .type(RUMApplicationUpdateType.RUM_APPLICATION_UPDATE)); + + try { + RUMApplicationResponse result = + apiInstance.updateRUMApplication(RUM_APPLICATION_DATA_ID, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumApi#updateRUMApplication"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationAttributes.java index 83841691659..79fc70c118d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationAttributes.java @@ -27,6 +27,7 @@ RUMApplicationAttributes.JSON_PROPERTY_IS_ACTIVE, RUMApplicationAttributes.JSON_PROPERTY_NAME, RUMApplicationAttributes.JSON_PROPERTY_ORG_ID, + RUMApplicationAttributes.JSON_PROPERTY_PRODUCT_SCALES, RUMApplicationAttributes.JSON_PROPERTY_TYPE, RUMApplicationAttributes.JSON_PROPERTY_UPDATED_AT, RUMApplicationAttributes.JSON_PROPERTY_UPDATED_BY_HANDLE @@ -59,6 +60,9 @@ public class RUMApplicationAttributes { public static final String JSON_PROPERTY_ORG_ID = "org_id"; private Integer orgId; + public static final String JSON_PROPERTY_PRODUCT_SCALES = "product_scales"; + private RUMProductScales productScales; + public static final String JSON_PROPERTY_TYPE = "type"; private String type; @@ -256,6 +260,28 @@ public void setOrgId(Integer orgId) { this.orgId = orgId; } + public RUMApplicationAttributes productScales(RUMProductScales productScales) { + this.productScales = productScales; + this.unparsed |= productScales.unparsed; + return this; + } + + /** + * Product Scales configuration for the RUM application. + * + * @return productScales + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRODUCT_SCALES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RUMProductScales getProductScales() { + return productScales; + } + + public void setProductScales(RUMProductScales productScales) { + this.productScales = productScales; + } + public RUMApplicationAttributes type(String type) { this.type = type; return this; @@ -382,6 +408,7 @@ public boolean equals(Object o) { && Objects.equals(this.isActive, rumApplicationAttributes.isActive) && Objects.equals(this.name, rumApplicationAttributes.name) && Objects.equals(this.orgId, rumApplicationAttributes.orgId) + && Objects.equals(this.productScales, rumApplicationAttributes.productScales) && Objects.equals(this.type, rumApplicationAttributes.type) && Objects.equals(this.updatedAt, rumApplicationAttributes.updatedAt) && Objects.equals(this.updatedByHandle, rumApplicationAttributes.updatedByHandle) @@ -399,6 +426,7 @@ public int hashCode() { isActive, name, orgId, + productScales, type, updatedAt, updatedByHandle, @@ -417,6 +445,7 @@ public String toString() { sb.append(" isActive: ").append(toIndentedString(isActive)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" productScales: ").append(toIndentedString(productScales)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" updatedByHandle: ").append(toIndentedString(updatedByHandle)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreateAttributes.java index b32b47ec99e..ae6149b29a8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationCreateAttributes.java @@ -20,6 +20,8 @@ /** RUM application creation attributes. */ @JsonPropertyOrder({ RUMApplicationCreateAttributes.JSON_PROPERTY_NAME, + RUMApplicationCreateAttributes.JSON_PROPERTY_PRODUCT_ANALYTICS_RETENTION_STATE, + RUMApplicationCreateAttributes.JSON_PROPERTY_RUM_EVENT_PROCESSING_STATE, RUMApplicationCreateAttributes.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( @@ -29,6 +31,14 @@ public class RUMApplicationCreateAttributes { public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_PRODUCT_ANALYTICS_RETENTION_STATE = + "product_analytics_retention_state"; + private RUMProductAnalyticsRetentionState productAnalyticsRetentionState; + + public static final String JSON_PROPERTY_RUM_EVENT_PROCESSING_STATE = + "rum_event_processing_state"; + private RUMEventProcessingState rumEventProcessingState; + public static final String JSON_PROPERTY_TYPE = "type"; private String type; @@ -60,6 +70,59 @@ public void setName(String name) { this.name = name; } + public RUMApplicationCreateAttributes productAnalyticsRetentionState( + RUMProductAnalyticsRetentionState productAnalyticsRetentionState) { + this.productAnalyticsRetentionState = productAnalyticsRetentionState; + this.unparsed |= !productAnalyticsRetentionState.isValid(); + return this; + } + + /** + * Controls the retention policy for Product Analytics data derived from RUM events. + * + * @return productAnalyticsRetentionState + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRODUCT_ANALYTICS_RETENTION_STATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RUMProductAnalyticsRetentionState getProductAnalyticsRetentionState() { + return productAnalyticsRetentionState; + } + + public void setProductAnalyticsRetentionState( + RUMProductAnalyticsRetentionState productAnalyticsRetentionState) { + if (!productAnalyticsRetentionState.isValid()) { + this.unparsed = true; + } + this.productAnalyticsRetentionState = productAnalyticsRetentionState; + } + + public RUMApplicationCreateAttributes rumEventProcessingState( + RUMEventProcessingState rumEventProcessingState) { + this.rumEventProcessingState = rumEventProcessingState; + this.unparsed |= !rumEventProcessingState.isValid(); + return this; + } + + /** + * Configures which RUM events are processed and stored for the application. + * + * @return rumEventProcessingState + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_EVENT_PROCESSING_STATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RUMEventProcessingState getRumEventProcessingState() { + return rumEventProcessingState; + } + + public void setRumEventProcessingState(RUMEventProcessingState rumEventProcessingState) { + if (!rumEventProcessingState.isValid()) { + this.unparsed = true; + } + this.rumEventProcessingState = rumEventProcessingState; + } + public RUMApplicationCreateAttributes type(String type) { this.type = type; return this; @@ -141,6 +204,11 @@ public boolean equals(Object o) { RUMApplicationCreateAttributes rumApplicationCreateAttributes = (RUMApplicationCreateAttributes) o; return Objects.equals(this.name, rumApplicationCreateAttributes.name) + && Objects.equals( + this.productAnalyticsRetentionState, + rumApplicationCreateAttributes.productAnalyticsRetentionState) + && Objects.equals( + this.rumEventProcessingState, rumApplicationCreateAttributes.rumEventProcessingState) && Objects.equals(this.type, rumApplicationCreateAttributes.type) && Objects.equals( this.additionalProperties, rumApplicationCreateAttributes.additionalProperties); @@ -148,7 +216,8 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(name, type, additionalProperties); + return Objects.hash( + name, productAnalyticsRetentionState, rumEventProcessingState, type, additionalProperties); } @Override @@ -156,6 +225,12 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RUMApplicationCreateAttributes {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" productAnalyticsRetentionState: ") + .append(toIndentedString(productAnalyticsRetentionState)) + .append("\n"); + sb.append(" rumEventProcessingState: ") + .append(toIndentedString(rumEventProcessingState)) + .append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationListAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationListAttributes.java index 20872f9f129..a02e9521ce1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationListAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationListAttributes.java @@ -26,6 +26,7 @@ RUMApplicationListAttributes.JSON_PROPERTY_IS_ACTIVE, RUMApplicationListAttributes.JSON_PROPERTY_NAME, RUMApplicationListAttributes.JSON_PROPERTY_ORG_ID, + RUMApplicationListAttributes.JSON_PROPERTY_PRODUCT_SCALES, RUMApplicationListAttributes.JSON_PROPERTY_TYPE, RUMApplicationListAttributes.JSON_PROPERTY_UPDATED_AT, RUMApplicationListAttributes.JSON_PROPERTY_UPDATED_BY_HANDLE @@ -55,6 +56,9 @@ public class RUMApplicationListAttributes { public static final String JSON_PROPERTY_ORG_ID = "org_id"; private Integer orgId; + public static final String JSON_PROPERTY_PRODUCT_SCALES = "product_scales"; + private RUMProductScales productScales; + public static final String JSON_PROPERTY_TYPE = "type"; private String type; @@ -230,6 +234,28 @@ public void setOrgId(Integer orgId) { this.orgId = orgId; } + public RUMApplicationListAttributes productScales(RUMProductScales productScales) { + this.productScales = productScales; + this.unparsed |= productScales.unparsed; + return this; + } + + /** + * Product Scales configuration for the RUM application. + * + * @return productScales + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRODUCT_SCALES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RUMProductScales getProductScales() { + return productScales; + } + + public void setProductScales(RUMProductScales productScales) { + this.productScales = productScales; + } + public RUMApplicationListAttributes type(String type) { this.type = type; return this; @@ -355,6 +381,7 @@ public boolean equals(Object o) { && Objects.equals(this.isActive, rumApplicationListAttributes.isActive) && Objects.equals(this.name, rumApplicationListAttributes.name) && Objects.equals(this.orgId, rumApplicationListAttributes.orgId) + && Objects.equals(this.productScales, rumApplicationListAttributes.productScales) && Objects.equals(this.type, rumApplicationListAttributes.type) && Objects.equals(this.updatedAt, rumApplicationListAttributes.updatedAt) && Objects.equals(this.updatedByHandle, rumApplicationListAttributes.updatedByHandle) @@ -372,6 +399,7 @@ public int hashCode() { isActive, name, orgId, + productScales, type, updatedAt, updatedByHandle, @@ -389,6 +417,7 @@ public String toString() { sb.append(" isActive: ").append(toIndentedString(isActive)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" productScales: ").append(toIndentedString(productScales)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" updatedByHandle: ").append(toIndentedString(updatedByHandle)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdateAttributes.java index 5ef968a2fb6..97705c6c2fb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RUMApplicationUpdateAttributes.java @@ -19,6 +19,8 @@ /** RUM application update attributes. */ @JsonPropertyOrder({ RUMApplicationUpdateAttributes.JSON_PROPERTY_NAME, + RUMApplicationUpdateAttributes.JSON_PROPERTY_PRODUCT_ANALYTICS_RETENTION_STATE, + RUMApplicationUpdateAttributes.JSON_PROPERTY_RUM_EVENT_PROCESSING_STATE, RUMApplicationUpdateAttributes.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( @@ -28,6 +30,14 @@ public class RUMApplicationUpdateAttributes { public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_PRODUCT_ANALYTICS_RETENTION_STATE = + "product_analytics_retention_state"; + private RUMProductAnalyticsRetentionState productAnalyticsRetentionState; + + public static final String JSON_PROPERTY_RUM_EVENT_PROCESSING_STATE = + "rum_event_processing_state"; + private RUMEventProcessingState rumEventProcessingState; + public static final String JSON_PROPERTY_TYPE = "type"; private String type; @@ -52,6 +62,59 @@ public void setName(String name) { this.name = name; } + public RUMApplicationUpdateAttributes productAnalyticsRetentionState( + RUMProductAnalyticsRetentionState productAnalyticsRetentionState) { + this.productAnalyticsRetentionState = productAnalyticsRetentionState; + this.unparsed |= !productAnalyticsRetentionState.isValid(); + return this; + } + + /** + * Controls the retention policy for Product Analytics data derived from RUM events. + * + * @return productAnalyticsRetentionState + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRODUCT_ANALYTICS_RETENTION_STATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RUMProductAnalyticsRetentionState getProductAnalyticsRetentionState() { + return productAnalyticsRetentionState; + } + + public void setProductAnalyticsRetentionState( + RUMProductAnalyticsRetentionState productAnalyticsRetentionState) { + if (!productAnalyticsRetentionState.isValid()) { + this.unparsed = true; + } + this.productAnalyticsRetentionState = productAnalyticsRetentionState; + } + + public RUMApplicationUpdateAttributes rumEventProcessingState( + RUMEventProcessingState rumEventProcessingState) { + this.rumEventProcessingState = rumEventProcessingState; + this.unparsed |= !rumEventProcessingState.isValid(); + return this; + } + + /** + * Configures which RUM events are processed and stored for the application. + * + * @return rumEventProcessingState + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_EVENT_PROCESSING_STATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RUMEventProcessingState getRumEventProcessingState() { + return rumEventProcessingState; + } + + public void setRumEventProcessingState(RUMEventProcessingState rumEventProcessingState) { + if (!rumEventProcessingState.isValid()) { + this.unparsed = true; + } + this.rumEventProcessingState = rumEventProcessingState; + } + public RUMApplicationUpdateAttributes type(String type) { this.type = type; return this; @@ -133,6 +196,11 @@ public boolean equals(Object o) { RUMApplicationUpdateAttributes rumApplicationUpdateAttributes = (RUMApplicationUpdateAttributes) o; return Objects.equals(this.name, rumApplicationUpdateAttributes.name) + && Objects.equals( + this.productAnalyticsRetentionState, + rumApplicationUpdateAttributes.productAnalyticsRetentionState) + && Objects.equals( + this.rumEventProcessingState, rumApplicationUpdateAttributes.rumEventProcessingState) && Objects.equals(this.type, rumApplicationUpdateAttributes.type) && Objects.equals( this.additionalProperties, rumApplicationUpdateAttributes.additionalProperties); @@ -140,7 +208,8 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(name, type, additionalProperties); + return Objects.hash( + name, productAnalyticsRetentionState, rumEventProcessingState, type, additionalProperties); } @Override @@ -148,6 +217,12 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RUMApplicationUpdateAttributes {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" productAnalyticsRetentionState: ") + .append(toIndentedString(productAnalyticsRetentionState)) + .append("\n"); + sb.append(" rumEventProcessingState: ") + .append(toIndentedString(rumEventProcessingState)) + .append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMEventProcessingScale.java b/src/main/java/com/datadog/api/client/v2/model/RUMEventProcessingScale.java new file mode 100644 index 00000000000..9330d519aee --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMEventProcessingScale.java @@ -0,0 +1,168 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** RUM event processing scale configuration. */ +@JsonPropertyOrder({ + RUMEventProcessingScale.JSON_PROPERTY_LAST_MODIFIED_AT, + RUMEventProcessingScale.JSON_PROPERTY_STATE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMEventProcessingScale { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_LAST_MODIFIED_AT = "last_modified_at"; + private Long lastModifiedAt; + + public static final String JSON_PROPERTY_STATE = "state"; + private RUMEventProcessingState state; + + public RUMEventProcessingScale lastModifiedAt(Long lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + * Timestamp in milliseconds when this scale was last modified. + * + * @return lastModifiedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLastModifiedAt() { + return lastModifiedAt; + } + + public void setLastModifiedAt(Long lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public RUMEventProcessingScale state(RUMEventProcessingState state) { + this.state = state; + this.unparsed |= !state.isValid(); + return this; + } + + /** + * Configures which RUM events are processed and stored for the application. + * + * @return state + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RUMEventProcessingState getState() { + return state; + } + + public void setState(RUMEventProcessingState state) { + if (!state.isValid()) { + this.unparsed = true; + } + this.state = state; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMEventProcessingScale + */ + @JsonAnySetter + public RUMEventProcessingScale putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMEventProcessingScale object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMEventProcessingScale rumEventProcessingScale = (RUMEventProcessingScale) o; + return Objects.equals(this.lastModifiedAt, rumEventProcessingScale.lastModifiedAt) + && Objects.equals(this.state, rumEventProcessingScale.state) + && Objects.equals(this.additionalProperties, rumEventProcessingScale.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(lastModifiedAt, state, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMEventProcessingScale {\n"); + sb.append(" lastModifiedAt: ").append(toIndentedString(lastModifiedAt)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMEventProcessingState.java b/src/main/java/com/datadog/api/client/v2/model/RUMEventProcessingState.java new file mode 100644 index 00000000000..d67d057c643 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMEventProcessingState.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Configures which RUM events are processed and stored for the application. */ +@JsonSerialize(using = RUMEventProcessingState.RUMEventProcessingStateSerializer.class) +public class RUMEventProcessingState extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("ALL", "ERROR_FOCUSED_MODE", "NONE")); + + public static final RUMEventProcessingState ALL = new RUMEventProcessingState("ALL"); + public static final RUMEventProcessingState ERROR_FOCUSED_MODE = + new RUMEventProcessingState("ERROR_FOCUSED_MODE"); + public static final RUMEventProcessingState NONE = new RUMEventProcessingState("NONE"); + + RUMEventProcessingState(String value) { + super(value, allowedValues); + } + + public static class RUMEventProcessingStateSerializer + extends StdSerializer { + public RUMEventProcessingStateSerializer(Class t) { + super(t); + } + + public RUMEventProcessingStateSerializer() { + this(null); + } + + @Override + public void serialize( + RUMEventProcessingState value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RUMEventProcessingState fromValue(String value) { + return new RUMEventProcessingState(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMProductAnalyticsRetentionScale.java b/src/main/java/com/datadog/api/client/v2/model/RUMProductAnalyticsRetentionScale.java new file mode 100644 index 00000000000..1668516b9df --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMProductAnalyticsRetentionScale.java @@ -0,0 +1,170 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Product Analytics retention scale configuration. */ +@JsonPropertyOrder({ + RUMProductAnalyticsRetentionScale.JSON_PROPERTY_LAST_MODIFIED_AT, + RUMProductAnalyticsRetentionScale.JSON_PROPERTY_STATE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMProductAnalyticsRetentionScale { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_LAST_MODIFIED_AT = "last_modified_at"; + private Long lastModifiedAt; + + public static final String JSON_PROPERTY_STATE = "state"; + private RUMProductAnalyticsRetentionState state; + + public RUMProductAnalyticsRetentionScale lastModifiedAt(Long lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + * Timestamp in milliseconds when this scale was last modified. + * + * @return lastModifiedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLastModifiedAt() { + return lastModifiedAt; + } + + public void setLastModifiedAt(Long lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public RUMProductAnalyticsRetentionScale state(RUMProductAnalyticsRetentionState state) { + this.state = state; + this.unparsed |= !state.isValid(); + return this; + } + + /** + * Controls the retention policy for Product Analytics data derived from RUM events. + * + * @return state + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RUMProductAnalyticsRetentionState getState() { + return state; + } + + public void setState(RUMProductAnalyticsRetentionState state) { + if (!state.isValid()) { + this.unparsed = true; + } + this.state = state; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMProductAnalyticsRetentionScale + */ + @JsonAnySetter + public RUMProductAnalyticsRetentionScale putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMProductAnalyticsRetentionScale object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMProductAnalyticsRetentionScale rumProductAnalyticsRetentionScale = + (RUMProductAnalyticsRetentionScale) o; + return Objects.equals(this.lastModifiedAt, rumProductAnalyticsRetentionScale.lastModifiedAt) + && Objects.equals(this.state, rumProductAnalyticsRetentionScale.state) + && Objects.equals( + this.additionalProperties, rumProductAnalyticsRetentionScale.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(lastModifiedAt, state, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMProductAnalyticsRetentionScale {\n"); + sb.append(" lastModifiedAt: ").append(toIndentedString(lastModifiedAt)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMProductAnalyticsRetentionState.java b/src/main/java/com/datadog/api/client/v2/model/RUMProductAnalyticsRetentionState.java new file mode 100644 index 00000000000..20f5361c7ca --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMProductAnalyticsRetentionState.java @@ -0,0 +1,60 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Controls the retention policy for Product Analytics data derived from RUM events. */ +@JsonSerialize( + using = RUMProductAnalyticsRetentionState.RUMProductAnalyticsRetentionStateSerializer.class) +public class RUMProductAnalyticsRetentionState extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("MAX", "NONE")); + + public static final RUMProductAnalyticsRetentionState MAX = + new RUMProductAnalyticsRetentionState("MAX"); + public static final RUMProductAnalyticsRetentionState NONE = + new RUMProductAnalyticsRetentionState("NONE"); + + RUMProductAnalyticsRetentionState(String value) { + super(value, allowedValues); + } + + public static class RUMProductAnalyticsRetentionStateSerializer + extends StdSerializer { + public RUMProductAnalyticsRetentionStateSerializer(Class t) { + super(t); + } + + public RUMProductAnalyticsRetentionStateSerializer() { + this(null); + } + + @Override + public void serialize( + RUMProductAnalyticsRetentionState value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RUMProductAnalyticsRetentionState fromValue(String value) { + return new RUMProductAnalyticsRetentionState(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RUMProductScales.java b/src/main/java/com/datadog/api/client/v2/model/RUMProductScales.java new file mode 100644 index 00000000000..43cbfc0587b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RUMProductScales.java @@ -0,0 +1,176 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Product Scales configuration for the RUM application. */ +@JsonPropertyOrder({ + RUMProductScales.JSON_PROPERTY_PRODUCT_ANALYTICS_RETENTION_SCALE, + RUMProductScales.JSON_PROPERTY_RUM_EVENT_PROCESSING_SCALE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RUMProductScales { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PRODUCT_ANALYTICS_RETENTION_SCALE = + "product_analytics_retention_scale"; + private RUMProductAnalyticsRetentionScale productAnalyticsRetentionScale; + + public static final String JSON_PROPERTY_RUM_EVENT_PROCESSING_SCALE = + "rum_event_processing_scale"; + private RUMEventProcessingScale rumEventProcessingScale; + + public RUMProductScales productAnalyticsRetentionScale( + RUMProductAnalyticsRetentionScale productAnalyticsRetentionScale) { + this.productAnalyticsRetentionScale = productAnalyticsRetentionScale; + this.unparsed |= productAnalyticsRetentionScale.unparsed; + return this; + } + + /** + * Product Analytics retention scale configuration. + * + * @return productAnalyticsRetentionScale + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRODUCT_ANALYTICS_RETENTION_SCALE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RUMProductAnalyticsRetentionScale getProductAnalyticsRetentionScale() { + return productAnalyticsRetentionScale; + } + + public void setProductAnalyticsRetentionScale( + RUMProductAnalyticsRetentionScale productAnalyticsRetentionScale) { + this.productAnalyticsRetentionScale = productAnalyticsRetentionScale; + } + + public RUMProductScales rumEventProcessingScale(RUMEventProcessingScale rumEventProcessingScale) { + this.rumEventProcessingScale = rumEventProcessingScale; + this.unparsed |= rumEventProcessingScale.unparsed; + return this; + } + + /** + * RUM event processing scale configuration. + * + * @return rumEventProcessingScale + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUM_EVENT_PROCESSING_SCALE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RUMEventProcessingScale getRumEventProcessingScale() { + return rumEventProcessingScale; + } + + public void setRumEventProcessingScale(RUMEventProcessingScale rumEventProcessingScale) { + this.rumEventProcessingScale = rumEventProcessingScale; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RUMProductScales + */ + @JsonAnySetter + public RUMProductScales putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RUMProductScales object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RUMProductScales rumProductScales = (RUMProductScales) o; + return Objects.equals( + this.productAnalyticsRetentionScale, rumProductScales.productAnalyticsRetentionScale) + && Objects.equals(this.rumEventProcessingScale, rumProductScales.rumEventProcessingScale) + && Objects.equals(this.additionalProperties, rumProductScales.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + productAnalyticsRetentionScale, rumEventProcessingScale, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RUMProductScales {\n"); + sb.append(" productAnalyticsRetentionScale: ") + .append(toIndentedString(productAnalyticsRetentionScale)) + .append("\n"); + sb.append(" rumEventProcessingScale: ") + .append(toIndentedString(rumEventProcessingScale)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_RUM_application_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_new_RUM_application_returns_OK_response.freeze index e2022296247..751be959039 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_new_RUM_application_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Create_a_new_RUM_application_returns_OK_response.freeze @@ -1 +1 @@ -2024-12-10T15:40:39.991Z \ No newline at end of file +2025-08-19T14:20:13.721Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_RUM_application_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_a_new_RUM_application_returns_OK_response.json index 2a4055213ce..9133e1fd0b7 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_new_RUM_application_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_new_RUM_application_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"name\":\"test-rum-5be7aad200899ffd\",\"type\":\"ios\"},\"type\":\"rum_application_create\"}}" + "json": "{\"data\":{\"attributes\":{\"name\":\"test-rum-33452889744bdeee\",\"type\":\"ios\"},\"type\":\"rum_application_create\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"type\":\"rum_application\",\"attributes\":{\"hash\":\"pub53e9a8788cac8b240efc0bfd17073059\",\"type\":\"ios\",\"name\":\"test-rum-5be7aad200899ffd\",\"tags\":[],\"created_at\":1733845240406,\"updated_at\":1733845240406,\"created_by_handle\":\"frog@datadoghq.com\",\"rum_enabled_at\":1733845240406,\"org_id\":321813,\"updated_by_handle\":\"frog@datadoghq.com\",\"product_analytics_disabled_at\":1733845240406,\"rum_enabled\":true,\"application_id\":\"2ce2bdc3-efa2-4182-9bc1-b75b2ff09be4\",\"product_analytics_enabled_at\":1733845240406,\"rum_disabled_at\":0,\"product_analytics_enabled\":false,\"is_active\":false,\"client_token\":\"pub53e9a8788cac8b240efc0bfd17073059\"},\"id\":\"2ce2bdc3-efa2-4182-9bc1-b75b2ff09be4\"}}\n", + "body": "{\"data\":{\"type\":\"rum_application\",\"attributes\":{\"type\":\"ios\",\"updated_at\":1755613213992,\"created_by_handle\":\"frog@datadoghq.com\",\"name\":\"test-rum-33452889744bdeee\",\"org_id\":321813,\"tags\":[],\"created_at\":1755613213992,\"product_analytics_replay_sample_rate\":100,\"product_scales\":{\"product_analytics_retention_scale\":{\"state\":\"NONE\",\"last_modified_at\":1755613213992},\"rum_event_processing_scale\":{\"state\":\"ALL\",\"last_modified_at\":1755613213992}},\"updated_by_handle\":\"frog@datadoghq.com\",\"application_id\":\"ee0b4d74-7159-4498-bec7-2b4f2b5ba642\",\"client_token\":\"pub994be67f562b7afec4436673d77927fe\",\"hash\":\"pub994be67f562b7afec4436673d77927fe\",\"is_active\":false},\"id\":\"ee0b4d74-7159-4498-bec7-2b4f2b5ba642\"}}\n", "headers": { "Content-Type": [ "application/json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "f45a54cf-4611-7774-50ad-c217a52ccbee" + "id": "e41f3195-9d1d-f340-3a2f-a6f426da52c8" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/rum/applications/2ce2bdc3-efa2-4182-9bc1-b75b2ff09be4", + "path": "/api/v2/rum/applications/ee0b4d74-7159-4498-bec7-2b4f2b5ba642", "keepAlive": false, "secure": true }, @@ -48,6 +48,6 @@ "timeToLive": { "unlimited": true }, - "id": "efe35e68-a51e-c2fa-836c-ac138538c159" + "id": "f697a7b3-cb0a-2b2c-2349-66045cf59069" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_RUM_application_with_Product_Scales_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_new_RUM_application_with_Product_Scales_returns_OK_response.freeze new file mode 100644 index 00000000000..40a71dd36fc --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_new_RUM_application_with_Product_Scales_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-08-19T14:01:52.966Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_RUM_application_with_Product_Scales_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_a_new_RUM_application_with_Product_Scales_returns_OK_response.json new file mode 100644 index 00000000000..961cd4a699e --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_new_RUM_application_with_Product_Scales_returns_OK_response.json @@ -0,0 +1,53 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"name\":\"test-rum-with-product-scales-b91c7f54876a951d\",\"product_analytics_retention_state\":\"NONE\",\"rum_event_processing_state\":\"ERROR_FOCUSED_MODE\",\"type\":\"browser\"},\"type\":\"rum_application_create\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/rum/applications", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"rum_application\",\"id\":\"51419fd9-a73f-4508-9f74-ad07d6669a47\",\"attributes\":{\"hash\":\"pub6c464316cf5deccd2f56a23dbacd996e\",\"type\":\"browser\",\"org_id\":321813,\"updated_at\":1755612113258,\"name\":\"test-rum-with-product-scales-b91c7f54876a951d\",\"product_scales\":{\"product_analytics_retention_scale\":{\"state\":\"NONE\",\"last_modified_at\":1755612113258},\"rum_event_processing_scale\":{\"state\":\"ERROR_FOCUSED_MODE\",\"last_modified_at\":1755612113258}},\"created_at\":1755612113258,\"tags\":[],\"is_active\":false,\"updated_by_handle\":\"frog@datadoghq.com\",\"client_token\":\"pub6c464316cf5deccd2f56a23dbacd996e\",\"created_by_handle\":\"frog@datadoghq.com\",\"application_id\":\"51419fd9-a73f-4508-9f74-ad07d6669a47\",\"product_analytics_replay_sample_rate\":100}}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "8985cfde-a521-82e0-075e-b82e0a29194f" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/rum/applications/51419fd9-a73f-4508-9f74-ad07d6669a47", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "abd64512-4f29-7a4c-7af9-c283c4e567c7" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_RUM_application_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_RUM_application_returns_OK_response.freeze index 86ca008c81c..b77bb23923d 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_RUM_application_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_a_RUM_application_returns_OK_response.freeze @@ -1 +1 @@ -2024-12-10T15:40:43.594Z \ No newline at end of file +2025-08-19T14:03:19.778Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_RUM_application_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_RUM_application_returns_OK_response.json index 126fbf409af..3a366895c02 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_RUM_application_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_a_RUM_application_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"name\":\"test-rum-27e6a81538211560\",\"type\":\"ios\"},\"type\":\"rum_application_create\"}}" + "json": "{\"data\":{\"attributes\":{\"name\":\"test-rum-4a6d822e36907848\",\"type\":\"ios\"},\"type\":\"rum_application_create\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"type\":\"rum_application\",\"attributes\":{\"rum_disabled_at\":0,\"client_token\":\"pubabba2bf694ec513df0b434dd05fc8f4b\",\"created_at\":1733845244003,\"rum_enabled_at\":1733845244003,\"tags\":[],\"created_by_handle\":\"frog@datadoghq.com\",\"is_active\":false,\"type\":\"ios\",\"updated_by_handle\":\"frog@datadoghq.com\",\"product_analytics_enabled_at\":1733845244003,\"application_id\":\"77826c21-2a07-4b5a-a54d-8912e1802854\",\"name\":\"test-rum-27e6a81538211560\",\"updated_at\":1733845244003,\"product_analytics_disabled_at\":1733845244003,\"org_id\":321813,\"product_analytics_enabled\":false,\"hash\":\"pubabba2bf694ec513df0b434dd05fc8f4b\",\"rum_enabled\":true},\"id\":\"77826c21-2a07-4b5a-a54d-8912e1802854\"}}\n", + "body": "{\"data\":{\"type\":\"rum_application\",\"id\":\"60ddadf3-d37f-4d33-bdf1-f56b674ae8ed\",\"attributes\":{\"product_analytics_replay_sample_rate\":100,\"tags\":[],\"is_active\":false,\"org_id\":321813,\"updated_by_handle\":\"frog@datadoghq.com\",\"application_id\":\"60ddadf3-d37f-4d33-bdf1-f56b674ae8ed\",\"product_scales\":{\"rum_event_processing_scale\":{\"last_modified_at\":1755612200050,\"state\":\"ALL\"},\"product_analytics_retention_scale\":{\"last_modified_at\":1755612200050,\"state\":\"NONE\"}},\"name\":\"test-rum-4a6d822e36907848\",\"created_at\":1755612200050,\"type\":\"ios\",\"created_by_handle\":\"frog@datadoghq.com\",\"client_token\":\"pubc55567bba30695d2cd7bf49190b6ccf5\",\"updated_at\":1755612200050,\"hash\":\"pubc55567bba30695d2cd7bf49190b6ccf5\"}}}\n", "headers": { "Content-Type": [ "application/json" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "03b7cb9d-e2ad-1f36-f9fb-692e5b986d4e" + "id": "725c7ccc-35da-acda-b998-3e15d26365aa" }, { "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/rum/applications/77826c21-2a07-4b5a-a54d-8912e1802854", + "path": "/api/v2/rum/applications/60ddadf3-d37f-4d33-bdf1-f56b674ae8ed", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"type\":\"rum_application\",\"attributes\":{\"product_analytics_disabled_at\":1733845244003,\"rum_disabled_at\":0,\"is_active\":false,\"application_id\":\"77826c21-2a07-4b5a-a54d-8912e1802854\",\"name\":\"test-rum-27e6a81538211560\",\"updated_at\":1733845244003,\"updated_by_handle\":\"frog@datadoghq.com\",\"org_id\":321813,\"rum_enabled_at\":1733845244003,\"hash\":\"pubabba2bf694ec513df0b434dd05fc8f4b\",\"tags\":[],\"created_by_handle\":\"frog@datadoghq.com\",\"type\":\"ios\",\"rum_enabled\":true,\"product_analytics_enabled\":false,\"product_analytics_enabled_at\":1733845244003,\"created_at\":1733845244003,\"client_token\":\"pubabba2bf694ec513df0b434dd05fc8f4b\"},\"id\":\"77826c21-2a07-4b5a-a54d-8912e1802854\"}}\n", + "body": "{\"data\":{\"type\":\"rum_application\",\"attributes\":{\"updated_at\":1755612200050,\"org_id\":321813,\"product_analytics_replay_sample_rate\":100,\"updated_by_handle\":\"frog@datadoghq.com\",\"type\":\"ios\",\"application_id\":\"60ddadf3-d37f-4d33-bdf1-f56b674ae8ed\",\"hash\":\"pubc55567bba30695d2cd7bf49190b6ccf5\",\"created_by_handle\":\"frog@datadoghq.com\",\"product_scales\":{\"rum_event_processing_scale\":{\"state\":\"ALL\",\"last_modified_at\":1755612200050},\"product_analytics_retention_scale\":{\"state\":\"NONE\",\"last_modified_at\":1755612200050}},\"is_active\":false,\"tags\":[],\"name\":\"test-rum-4a6d822e36907848\",\"client_token\":\"pubc55567bba30695d2cd7bf49190b6ccf5\",\"created_at\":1755612200050},\"id\":\"60ddadf3-d37f-4d33-bdf1-f56b674ae8ed\"}}\n", "headers": { "Content-Type": [ "application/json" @@ -53,13 +53,13 @@ "timeToLive": { "unlimited": true }, - "id": "d41cba32-8ac9-4ed8-807a-67cedbe1db7b" + "id": "23abdbeb-d110-9d7c-79cd-5afd1b996bbe" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/rum/applications/77826c21-2a07-4b5a-a54d-8912e1802854", + "path": "/api/v2/rum/applications/60ddadf3-d37f-4d33-bdf1-f56b674ae8ed", "keepAlive": false, "secure": true }, @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "3178d1d6-c3e1-46f0-dc07-940cd20d3b5c" + "id": "01dd3db5-a9c2-c85d-a49a-f10c2a3bd6c5" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_all_the_RUM_applications_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/List_all_the_RUM_applications_returns_OK_response.freeze index f86a32bc291..f4b8f8d2caf 100644 --- a/src/test/resources/cassettes/features/v2/List_all_the_RUM_applications_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/List_all_the_RUM_applications_returns_OK_response.freeze @@ -1 +1 @@ -2024-12-10T15:40:45.445Z \ No newline at end of file +2025-08-19T14:03:34.020Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_all_the_RUM_applications_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_all_the_RUM_applications_returns_OK_response.json index 18b368db112..d7e8bd63b89 100644 --- a/src/test/resources/cassettes/features/v2/List_all_the_RUM_applications_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_all_the_RUM_applications_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"name\":\"test-rum-688346277e8afe02\",\"type\":\"ios\"},\"type\":\"rum_application_create\"}}" + "json": "{\"data\":{\"attributes\":{\"name\":\"test-rum-a630eb80b3e09124\",\"type\":\"ios\"},\"type\":\"rum_application_create\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"type\":\"rum_application\",\"attributes\":{\"is_active\":false,\"rum_disabled_at\":0,\"created_at\":1733845245930,\"type\":\"ios\",\"name\":\"test-rum-688346277e8afe02\",\"updated_at\":1733845245930,\"org_id\":321813,\"hash\":\"pub49b6e409919401d6f57c613443277c5f\",\"product_analytics_enabled_at\":1733845245930,\"application_id\":\"9b00e648-de1e-4d5f-af81-3d465b925b0d\",\"client_token\":\"pub49b6e409919401d6f57c613443277c5f\",\"product_analytics_enabled\":false,\"tags\":[],\"created_by_handle\":\"frog@datadoghq.com\",\"updated_by_handle\":\"frog@datadoghq.com\",\"rum_enabled\":true,\"rum_enabled_at\":1733845245930,\"product_analytics_disabled_at\":1733845245930},\"id\":\"9b00e648-de1e-4d5f-af81-3d465b925b0d\"}}\n", + "body": "{\"data\":{\"type\":\"rum_application\",\"id\":\"cfc4270c-7df3-4a8b-a24a-20f2a25e15b2\",\"attributes\":{\"created_by_handle\":\"frog@datadoghq.com\",\"name\":\"test-rum-a630eb80b3e09124\",\"product_analytics_replay_sample_rate\":100,\"tags\":[],\"type\":\"ios\",\"updated_at\":1755612214266,\"updated_by_handle\":\"frog@datadoghq.com\",\"hash\":\"pub8da0c745dc9ed0616e72239bf54c23ff\",\"product_scales\":{\"rum_event_processing_scale\":{\"state\":\"ALL\",\"last_modified_at\":1755612214266},\"product_analytics_retention_scale\":{\"state\":\"NONE\",\"last_modified_at\":1755612214266}},\"created_at\":1755612214266,\"client_token\":\"pub8da0c745dc9ed0616e72239bf54c23ff\",\"org_id\":321813,\"application_id\":\"cfc4270c-7df3-4a8b-a24a-20f2a25e15b2\",\"is_active\":false}}}\n", "headers": { "Content-Type": [ "application/json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "dac3d202-30f0-266c-33a8-13906a0d7038" + "id": "76bddd51-b63f-5134-9692-eaf331f5a48c" }, { "httpRequest": { @@ -38,7 +38,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":[{\"type\":\"rum_application\",\"attributes\":{\"updated_at\":1646148434414,\"product_analytics_disabled_at\":1646148352095,\"rum_enabled_at\":1646148352095,\"rum_disabled_at\":0,\"application_id\":\"6ae18142-192f-4582-9633-95121c2a01d7\",\"created_by_handle\":\"frog@datadoghq.com\",\"product_analytics_enabled\":false,\"org_id\":321813,\"type\":\"browser\",\"is_active\":true,\"updated_by_handle\":\"frog@datadoghq.com\",\"rum_enabled\":true,\"tags\":[],\"product_analytics_enabled_at\":1646148352095,\"name\":\"S8-integration-tests\",\"created_at\":1646148352095},\"id\":\"6ae18142-192f-4582-9633-95121c2a01d7\"},{\"type\":\"rum_application\",\"attributes\":{\"updated_at\":1648568515456,\"product_analytics_disabled_at\":1648568515456,\"rum_enabled_at\":1648568515456,\"rum_disabled_at\":0,\"application_id\":\"ce9843b0-7a45-453c-a831-55dd15f85141\",\"created_by_handle\":\"frog@datadoghq.com\",\"product_analytics_enabled\":false,\"org_id\":321813,\"type\":\"browser\",\"is_active\":true,\"updated_by_handle\":\"frog@datadoghq.com\",\"rum_enabled\":true,\"tags\":[],\"product_analytics_enabled_at\":1648568515456,\"name\":\"Synthetic Tests Default Application\",\"created_at\":1648568515456},\"id\":\"ce9843b0-7a45-453c-a831-55dd15f85141\"},{\"type\":\"rum_application\",\"attributes\":{\"updated_at\":1670608490405,\"product_analytics_disabled_at\":1670608490405,\"rum_enabled_at\":1670608490405,\"rum_disabled_at\":0,\"application_id\":\"88e86bcc-6d0a-4a3c-942f-55314a6f03bd\",\"created_by_handle\":\"frog@datadoghq.com\",\"product_analytics_enabled\":false,\"org_id\":321813,\"type\":\"browser\",\"is_active\":false,\"updated_by_handle\":\"frog@datadoghq.com\",\"rum_enabled\":true,\"tags\":[],\"product_analytics_enabled_at\":1670608490405,\"name\":\"awoooooooo\",\"created_at\":1670608490405},\"id\":\"88e86bcc-6d0a-4a3c-942f-55314a6f03bd\"},{\"type\":\"rum_application\",\"attributes\":{\"updated_at\":1721327950211,\"product_analytics_disabled_at\":1721327950211,\"rum_enabled_at\":1721327950211,\"rum_disabled_at\":0,\"application_id\":\"aaf8455b-23c6-4ec8-9bd8-9bc45fe90aa5\",\"created_by_handle\":\"anika.maskara@datadoghq.com\",\"product_analytics_enabled\":false,\"org_id\":321813,\"type\":\"browser\",\"is_active\":false,\"updated_by_handle\":\"anika.maskara@datadoghq.com\",\"rum_enabled\":true,\"tags\":[],\"product_analytics_enabled_at\":1721327950211,\"name\":\"%s2\",\"created_at\":1721327950211},\"id\":\"aaf8455b-23c6-4ec8-9bd8-9bc45fe90aa5\"},{\"type\":\"rum_application\",\"attributes\":{\"updated_at\":1733845067600,\"product_analytics_disabled_at\":1733845067600,\"rum_enabled_at\":1733845067600,\"rum_disabled_at\":0,\"application_id\":\"56ea0200-2ff2-4aba-8b68-c2519f958d92\",\"created_by_handle\":\"frog@datadoghq.com\",\"product_analytics_enabled\":false,\"org_id\":321813,\"type\":\"browser\",\"is_active\":false,\"updated_by_handle\":\"frog@datadoghq.com\",\"rum_enabled\":true,\"tags\":[],\"product_analytics_enabled_at\":1733845067600,\"name\":\"test-name-create\",\"created_at\":1733845067600},\"id\":\"56ea0200-2ff2-4aba-8b68-c2519f958d92\"},{\"type\":\"rum_application\",\"attributes\":{\"updated_at\":1733845070746,\"product_analytics_disabled_at\":1733845070746,\"rum_enabled_at\":1733845070746,\"rum_disabled_at\":0,\"application_id\":\"ee5565ee-8853-4aa5-b996-95ed92723275\",\"created_by_handle\":\"frog@datadoghq.com\",\"product_analytics_enabled\":false,\"org_id\":321813,\"type\":\"browser\",\"is_active\":false,\"updated_by_handle\":\"frog@datadoghq.com\",\"rum_enabled\":true,\"tags\":[],\"product_analytics_enabled_at\":1733845070746,\"name\":\"test-name-create\",\"created_at\":1733845070746},\"id\":\"ee5565ee-8853-4aa5-b996-95ed92723275\"},{\"type\":\"rum_application\",\"attributes\":{\"updated_at\":1733845073568,\"product_analytics_disabled_at\":1733845073568,\"rum_enabled_at\":1733845073568,\"rum_disabled_at\":0,\"application_id\":\"9b86706d-31fb-401f-aa12-4483512eebfc\",\"created_by_handle\":\"frog@datadoghq.com\",\"product_analytics_enabled\":false,\"org_id\":321813,\"type\":\"browser\",\"is_active\":false,\"updated_by_handle\":\"frog@datadoghq.com\",\"rum_enabled\":true,\"tags\":[],\"product_analytics_enabled_at\":1733845073568,\"name\":\"test-name-create\",\"created_at\":1733845073568},\"id\":\"9b86706d-31fb-401f-aa12-4483512eebfc\"},{\"type\":\"rum_application\",\"attributes\":{\"updated_at\":1733845076778,\"product_analytics_disabled_at\":1733845076778,\"rum_enabled_at\":1733845076778,\"rum_disabled_at\":0,\"application_id\":\"c0ebd9ba-093e-4f43-bb7a-a11b59dcbc5f\",\"created_by_handle\":\"frog@datadoghq.com\",\"product_analytics_enabled\":false,\"org_id\":321813,\"type\":\"browser\",\"is_active\":false,\"updated_by_handle\":\"frog@datadoghq.com\",\"rum_enabled\":true,\"tags\":[],\"product_analytics_enabled_at\":1733845076778,\"name\":\"test-name-create\",\"created_at\":1733845076778},\"id\":\"c0ebd9ba-093e-4f43-bb7a-a11b59dcbc5f\"},{\"type\":\"rum_application\",\"attributes\":{\"updated_at\":1733845079233,\"product_analytics_disabled_at\":1733845079233,\"rum_enabled_at\":1733845079233,\"rum_disabled_at\":0,\"application_id\":\"86e85ed3-b529-4e1c-9499-8c7a58cd781a\",\"created_by_handle\":\"frog@datadoghq.com\",\"product_analytics_enabled\":false,\"org_id\":321813,\"type\":\"browser\",\"is_active\":false,\"updated_by_handle\":\"frog@datadoghq.com\",\"rum_enabled\":true,\"tags\":[],\"product_analytics_enabled_at\":1733845079233,\"name\":\"test-name-create\",\"created_at\":1733845079233},\"id\":\"86e85ed3-b529-4e1c-9499-8c7a58cd781a\"},{\"type\":\"rum_application\",\"attributes\":{\"updated_at\":1733845245930,\"product_analytics_disabled_at\":1733845245930,\"rum_enabled_at\":1733845245930,\"rum_disabled_at\":0,\"application_id\":\"9b00e648-de1e-4d5f-af81-3d465b925b0d\",\"created_by_handle\":\"frog@datadoghq.com\",\"product_analytics_enabled\":false,\"org_id\":321813,\"type\":\"ios\",\"is_active\":false,\"updated_by_handle\":\"frog@datadoghq.com\",\"rum_enabled\":true,\"tags\":[],\"product_analytics_enabled_at\":1733845245930,\"name\":\"test-rum-688346277e8afe02\",\"created_at\":1733845245930},\"id\":\"9b00e648-de1e-4d5f-af81-3d465b925b0d\"}]}\n", + "body": "{\"data\":[{\"type\":\"rum_application\",\"attributes\":{\"updated_by_handle\":\"Datadog\",\"is_active\":true,\"created_at\":1646148352095,\"product_analytics_replay_sample_rate\":100,\"product_scales\":{\"rum_event_processing_scale\":{\"state\":\"ALL\",\"last_modified_at\":1646148352095},\"product_analytics_retention_scale\":{\"state\":\"NONE\",\"last_modified_at\":1646148352095}},\"tags\":[],\"updated_at\":1753109253427,\"type\":\"browser\",\"created_by_handle\":\"frog@datadoghq.com\",\"name\":\"S8-integration-tests\",\"org_id\":321813,\"application_id\":\"6ae18142-192f-4582-9633-95121c2a01d7\"},\"id\":\"6ae18142-192f-4582-9633-95121c2a01d7\"},{\"type\":\"rum_application\",\"attributes\":{\"updated_by_handle\":\"Datadog\",\"is_active\":true,\"created_at\":1648568515456,\"product_analytics_replay_sample_rate\":100,\"product_scales\":{\"rum_event_processing_scale\":{\"state\":\"ALL\",\"last_modified_at\":1648568515456},\"product_analytics_retention_scale\":{\"state\":\"NONE\",\"last_modified_at\":1648568515456}},\"tags\":[],\"updated_at\":1753109253438,\"type\":\"browser\",\"created_by_handle\":\"frog@datadoghq.com\",\"name\":\"Synthetic Tests Default Application\",\"org_id\":321813,\"application_id\":\"ce9843b0-7a45-453c-a831-55dd15f85141\"},\"id\":\"ce9843b0-7a45-453c-a831-55dd15f85141\"},{\"type\":\"rum_application\",\"attributes\":{\"updated_by_handle\":\"Datadog\",\"is_active\":false,\"created_at\":1670608490405,\"product_analytics_replay_sample_rate\":100,\"product_scales\":{\"rum_event_processing_scale\":{\"state\":\"ALL\",\"last_modified_at\":1670608490405},\"product_analytics_retention_scale\":{\"state\":\"NONE\",\"last_modified_at\":1670608490405}},\"tags\":[],\"updated_at\":1753109253448,\"type\":\"browser\",\"created_by_handle\":\"frog@datadoghq.com\",\"name\":\"awoooooooo\",\"org_id\":321813,\"application_id\":\"88e86bcc-6d0a-4a3c-942f-55314a6f03bd\"},\"id\":\"88e86bcc-6d0a-4a3c-942f-55314a6f03bd\"},{\"type\":\"rum_application\",\"attributes\":{\"updated_by_handle\":\"Datadog\",\"is_active\":false,\"created_at\":1721327950211,\"product_analytics_replay_sample_rate\":100,\"product_scales\":{\"rum_event_processing_scale\":{\"state\":\"ALL\",\"last_modified_at\":1721327950211},\"product_analytics_retention_scale\":{\"state\":\"NONE\",\"last_modified_at\":1721327950211}},\"tags\":[],\"updated_at\":1753109253459,\"type\":\"browser\",\"created_by_handle\":\"anika.maskara@datadoghq.com\",\"name\":\"%s2\",\"org_id\":321813,\"application_id\":\"aaf8455b-23c6-4ec8-9bd8-9bc45fe90aa5\"},\"id\":\"aaf8455b-23c6-4ec8-9bd8-9bc45fe90aa5\"},{\"type\":\"rum_application\",\"attributes\":{\"updated_by_handle\":\"Datadog\",\"is_active\":false,\"created_at\":1743185866075,\"product_analytics_replay_sample_rate\":100,\"product_scales\":{\"rum_event_processing_scale\":{\"state\":\"ALL\",\"last_modified_at\":1743185866075},\"product_analytics_retention_scale\":{\"state\":\"NONE\",\"last_modified_at\":1743185866075}},\"tags\":[],\"updated_at\":1753109253472,\"type\":\"browser\",\"created_by_handle\":\"frog@datadoghq.com\",\"name\":\"my-rum-application-test\",\"org_id\":321813,\"application_id\":\"414e5c84-a376-43ec-b3d7-35049deea225\"},\"id\":\"414e5c84-a376-43ec-b3d7-35049deea225\"},{\"type\":\"rum_application\",\"attributes\":{\"updated_by_handle\":\"Datadog\",\"is_active\":false,\"created_at\":1750736321451,\"product_analytics_replay_sample_rate\":100,\"product_scales\":{\"rum_event_processing_scale\":{\"state\":\"ALL\",\"last_modified_at\":1750736321451},\"product_analytics_retention_scale\":{\"state\":\"NONE\",\"last_modified_at\":1750736321451}},\"tags\":[],\"updated_at\":1753109253483,\"type\":\"browser\",\"created_by_handle\":\"frog@datadoghq.com\",\"name\":\"updated_name_for_my_existing_rum_application\",\"org_id\":321813,\"application_id\":\"47e19fb5-6c6a-4bd1-aee8-25f6709833e0\"},\"id\":\"47e19fb5-6c6a-4bd1-aee8-25f6709833e0\"},{\"type\":\"rum_application\",\"attributes\":{\"updated_by_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"is_active\":false,\"created_at\":1755519831419,\"product_analytics_replay_sample_rate\":100,\"product_scales\":{\"rum_event_processing_scale\":{\"state\":\"ALL\",\"last_modified_at\":1755519831419},\"product_analytics_retention_scale\":{\"state\":\"NONE\",\"last_modified_at\":1755519831419}},\"tags\":[],\"updated_at\":1755519831419,\"type\":\"android\",\"created_by_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"tf-TestAccDatadogRUMApplicationDatasourceErrorMultiple-local-1755519829\",\"org_id\":321813,\"application_id\":\"e75f227f-a40f-49df-bd2c-e1997b1da53a\"},\"id\":\"e75f227f-a40f-49df-bd2c-e1997b1da53a\"},{\"type\":\"rum_application\",\"attributes\":{\"updated_by_handle\":\"frog@datadoghq.com\",\"is_active\":false,\"created_at\":1755612214266,\"product_analytics_replay_sample_rate\":100,\"product_scales\":{\"rum_event_processing_scale\":{\"state\":\"ALL\",\"last_modified_at\":1755612214266},\"product_analytics_retention_scale\":{\"state\":\"NONE\",\"last_modified_at\":1755612214266}},\"tags\":[],\"updated_at\":1755612214266,\"type\":\"ios\",\"created_by_handle\":\"frog@datadoghq.com\",\"name\":\"test-rum-a630eb80b3e09124\",\"org_id\":321813,\"application_id\":\"cfc4270c-7df3-4a8b-a24a-20f2a25e15b2\"},\"id\":\"cfc4270c-7df3-4a8b-a24a-20f2a25e15b2\"}]}\n", "headers": { "Content-Type": [ "application/json" @@ -59,7 +59,7 @@ "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/rum/applications/9b00e648-de1e-4d5f-af81-3d465b925b0d", + "path": "/api/v2/rum/applications/cfc4270c-7df3-4a8b-a24a-20f2a25e15b2", "keepAlive": false, "secure": true }, @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "09a1cf5e-f1e8-da64-3057-fbe756b6eba3" + "id": "947ccee2-8ca0-6ad3-fa32-7fedebc33225" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_RUM_application_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_RUM_application_returns_OK_response.freeze index 929c624ea20..7134dffc5e1 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_RUM_application_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Update_a_RUM_application_returns_OK_response.freeze @@ -1 +1 @@ -2024-12-10T15:40:47.532Z \ No newline at end of file +2025-08-19T14:26:24.242Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_RUM_application_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_RUM_application_returns_OK_response.json index 0e8d001cdd9..ecc63103ead 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_RUM_application_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_RUM_application_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"name\":\"test-rum-08f8f866ac73a2f6\",\"type\":\"ios\"},\"type\":\"rum_application_create\"}}" + "json": "{\"data\":{\"attributes\":{\"name\":\"test-rum-2befac64eeb0a1b0\",\"type\":\"ios\"},\"type\":\"rum_application_create\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"type\":\"rum_application\",\"attributes\":{\"tags\":[],\"type\":\"ios\",\"client_token\":\"pub89c189272956845c68f39e57d34d23f6\",\"hash\":\"pub89c189272956845c68f39e57d34d23f6\",\"updated_at\":1733845247961,\"org_id\":321813,\"product_analytics_disabled_at\":1733845247961,\"product_analytics_enabled_at\":1733845247961,\"rum_enabled_at\":1733845247961,\"application_id\":\"04898090-77be-4047-a2cb-654f5e050929\",\"is_active\":false,\"rum_disabled_at\":0,\"product_analytics_enabled\":false,\"created_at\":1733845247961,\"created_by_handle\":\"frog@datadoghq.com\",\"name\":\"test-rum-08f8f866ac73a2f6\",\"rum_enabled\":true,\"updated_by_handle\":\"frog@datadoghq.com\"},\"id\":\"04898090-77be-4047-a2cb-654f5e050929\"}}\n", + "body": "{\"data\":{\"type\":\"rum_application\",\"attributes\":{\"type\":\"ios\",\"is_active\":false,\"name\":\"test-rum-2befac64eeb0a1b0\",\"org_id\":321813,\"client_token\":\"pub5771f25e4c8f41666ac4a61cf7fc9d0d\",\"created_by_handle\":\"frog@datadoghq.com\",\"updated_at\":1755613584581,\"application_id\":\"94f76d3a-a8b2-4d1a-9938-771568a36f50\",\"created_at\":1755613584581,\"updated_by_handle\":\"frog@datadoghq.com\",\"product_scales\":{\"rum_event_processing_scale\":{\"state\":\"ALL\",\"last_modified_at\":1755613584581},\"product_analytics_retention_scale\":{\"state\":\"NONE\",\"last_modified_at\":1755613584581}},\"hash\":\"pub5771f25e4c8f41666ac4a61cf7fc9d0d\",\"tags\":[],\"product_analytics_replay_sample_rate\":100},\"id\":\"94f76d3a-a8b2-4d1a-9938-771568a36f50\"}}\n", "headers": { "Content-Type": [ "application/json" @@ -27,22 +27,22 @@ "timeToLive": { "unlimited": true }, - "id": "640e8d15-71eb-544e-d896-bae1e2fe9ce5" + "id": "0f6ab4d3-1771-1a1f-90d7-575223543ead" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"name\":\"updated_name_for_my_existing_rum_application\",\"type\":\"browser\"},\"id\":\"04898090-77be-4047-a2cb-654f5e050929\",\"type\":\"rum_application_update\"}}" + "json": "{\"data\":{\"attributes\":{\"name\":\"updated_name_for_my_existing_rum_application\",\"type\":\"browser\"},\"id\":\"94f76d3a-a8b2-4d1a-9938-771568a36f50\",\"type\":\"rum_application_update\"}}" }, "headers": {}, "method": "PATCH", - "path": "/api/v2/rum/applications/04898090-77be-4047-a2cb-654f5e050929", + "path": "/api/v2/rum/applications/94f76d3a-a8b2-4d1a-9938-771568a36f50", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"type\":\"rum_application\",\"attributes\":{\"product_analytics_enabled\":false,\"tags\":[],\"updated_at\":1733845248476,\"rum_enabled\":true,\"type\":\"browser\",\"product_analytics_enabled_at\":1733845247961,\"rum_enabled_at\":1733845247961,\"rum_disabled_at\":0,\"name\":\"updated_name_for_my_existing_rum_application\",\"is_active\":false,\"client_token\":\"pub89c189272956845c68f39e57d34d23f6\",\"created_at\":1733845247961,\"product_analytics_disabled_at\":1733845247961,\"hash\":\"pub89c189272956845c68f39e57d34d23f6\",\"org_id\":321813,\"created_by_handle\":\"frog@datadoghq.com\",\"updated_by_handle\":\"frog@datadoghq.com\",\"application_id\":\"04898090-77be-4047-a2cb-654f5e050929\"},\"id\":\"04898090-77be-4047-a2cb-654f5e050929\"}}\n", + "body": "{\"data\":{\"type\":\"rum_application\",\"attributes\":{\"product_scales\":{\"rum_event_processing_scale\":{\"state\":\"ALL\",\"last_modified_at\":1755613584581},\"product_analytics_retention_scale\":{\"state\":\"NONE\",\"last_modified_at\":1755613584581}},\"hash\":\"pub5771f25e4c8f41666ac4a61cf7fc9d0d\",\"name\":\"updated_name_for_my_existing_rum_application\",\"type\":\"browser\",\"created_at\":1755613584581,\"org_id\":321813,\"updated_at\":1755613584847,\"tags\":[],\"is_active\":false,\"client_token\":\"pub5771f25e4c8f41666ac4a61cf7fc9d0d\",\"created_by_handle\":\"frog@datadoghq.com\",\"application_id\":\"94f76d3a-a8b2-4d1a-9938-771568a36f50\",\"updated_by_handle\":\"frog@datadoghq.com\",\"product_analytics_replay_sample_rate\":100},\"id\":\"94f76d3a-a8b2-4d1a-9938-771568a36f50\"}}\n", "headers": { "Content-Type": [ "application/json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "6f4ccf67-eb52-6502-0fa4-6590503b7d4f" + "id": "a2ddb16e-262a-b4bf-af2c-22da1a9804f5" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/rum/applications/04898090-77be-4047-a2cb-654f5e050929", + "path": "/api/v2/rum/applications/94f76d3a-a8b2-4d1a-9938-771568a36f50", "keepAlive": false, "secure": true }, @@ -78,6 +78,6 @@ "timeToLive": { "unlimited": true }, - "id": "59a558c0-8dd1-37e3-41ae-62fe80acd400" + "id": "6355e0aa-a097-5d80-9537-61fef6cb7e82" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_RUM_application_with_Product_Scales_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_RUM_application_with_Product_Scales_returns_OK_response.freeze new file mode 100644 index 00000000000..49869dc4be5 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_RUM_application_with_Product_Scales_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-08-19T14:03:03.148Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_RUM_application_with_Product_Scales_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_RUM_application_with_Product_Scales_returns_OK_response.json new file mode 100644 index 00000000000..35840e3837f --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_RUM_application_with_Product_Scales_returns_OK_response.json @@ -0,0 +1,83 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"name\":\"test-rum-437f87a61b37ca7e\",\"type\":\"ios\"},\"type\":\"rum_application_create\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/rum/applications", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"rum_application\",\"attributes\":{\"updated_by_handle\":\"frog@datadoghq.com\",\"product_scales\":{\"rum_event_processing_scale\":{\"state\":\"ALL\",\"last_modified_at\":1755612183425},\"product_analytics_retention_scale\":{\"state\":\"NONE\",\"last_modified_at\":1755612183425}},\"client_token\":\"pub601ee82f2a03f18ee4750e75918179a9\",\"is_active\":false,\"created_by_handle\":\"frog@datadoghq.com\",\"tags\":[],\"org_id\":321813,\"type\":\"ios\",\"product_analytics_replay_sample_rate\":100,\"name\":\"test-rum-437f87a61b37ca7e\",\"application_id\":\"c82755b7-9938-4241-ae5a-24dd5760402b\",\"hash\":\"pub601ee82f2a03f18ee4750e75918179a9\",\"updated_at\":1755612183425,\"created_at\":1755612183425},\"id\":\"c82755b7-9938-4241-ae5a-24dd5760402b\"}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "633d0509-50f8-9a73-a177-47d4c18f92b9" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"name\":\"updated_rum_with_product_scales\",\"product_analytics_retention_state\":\"MAX\",\"rum_event_processing_state\":\"ALL\"},\"id\":\"c82755b7-9938-4241-ae5a-24dd5760402b\",\"type\":\"rum_application_update\"}}" + }, + "headers": {}, + "method": "PATCH", + "path": "/api/v2/rum/applications/c82755b7-9938-4241-ae5a-24dd5760402b", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"rum_application\",\"attributes\":{\"tags\":[],\"application_id\":\"c82755b7-9938-4241-ae5a-24dd5760402b\",\"is_active\":false,\"hash\":\"pub601ee82f2a03f18ee4750e75918179a9\",\"product_analytics_replay_sample_rate\":100,\"product_scales\":{\"product_analytics_retention_scale\":{\"state\":\"MAX\",\"last_modified_at\":1755612183687},\"rum_event_processing_scale\":{\"state\":\"ALL\",\"last_modified_at\":1755612183425}},\"updated_by_handle\":\"frog@datadoghq.com\",\"org_id\":321813,\"created_by_handle\":\"frog@datadoghq.com\",\"type\":\"ios\",\"name\":\"updated_rum_with_product_scales\",\"client_token\":\"pub601ee82f2a03f18ee4750e75918179a9\",\"created_at\":1755612183425,\"updated_at\":1755612183687},\"id\":\"c82755b7-9938-4241-ae5a-24dd5760402b\"}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "443556ca-4b72-c300-9e76-c8568d828604" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/rum/applications/c82755b7-9938-4241-ae5a-24dd5760402b", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "7d72e7e9-93c7-6719-6f3b-c72319beaab2" + } +] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum.feature b/src/test/resources/com/datadog/api/client/v2/api/rum.feature index f86e1ee618f..e25922fb48c 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/rum.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/rum.feature @@ -42,6 +42,23 @@ Feature: RUM And the response "data.type" is equal to "rum_application" And the response "data.attributes.type" is equal to "ios" And the response "data.attributes.name" is equal to "test-rum-{{ unique_hash }}" + And the response "data.attributes.product_scales.rum_event_processing_scale.state" is equal to "ALL" + And the response "data.attributes.product_scales.product_analytics_retention_scale.state" is equal to "NONE" + And the response "data.attributes.product_scales.rum_event_processing_scale" has field "last_modified_at" + And the response "data.attributes.product_scales.product_analytics_retention_scale" has field "last_modified_at" + + @skip-validation @team:DataDog/rum-backend + Scenario: Create a new RUM application with Product Scales returns "OK" response + Given new "CreateRUMApplication" request + And body with value {"data": {"attributes": {"name": "test-rum-with-product-scales-{{ unique_hash }}", "type": "browser", "rum_event_processing_state": "ERROR_FOCUSED_MODE", "product_analytics_retention_state": "NONE"}, "type": "rum_application_create"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "rum_application" + And the response "data.attributes.name" is equal to "test-rum-with-product-scales-{{ unique_hash }}" + And the response "data.attributes.product_scales.rum_event_processing_scale.state" is equal to "ERROR_FOCUSED_MODE" + And the response "data.attributes.product_scales.product_analytics_retention_scale.state" is equal to "NONE" + And the response "data.attributes.product_scales.rum_event_processing_scale" has field "last_modified_at" + And the response "data.attributes.product_scales.product_analytics_retention_scale" has field "last_modified_at" @skip-validation @team:DataDog/rum-backend Scenario: Delete a RUM application returns "No Content" response @@ -75,6 +92,7 @@ Feature: RUM And the response "data.type" is equal to "rum_application" And the response "data.attributes.type" is equal to "ios" And the response "data.attributes.name" is equal to "test-rum-{{ unique_hash }}" + And the response "data.attributes" has field "product_scales" @generated @skip @team:DataDog/rum-backend Scenario: Get a list of RUM events returns "Bad Request" response @@ -109,6 +127,8 @@ Feature: RUM When the request is sent Then the response status is 200 OK And the response "data" has item with field "attributes.application_id" with value "{{ rum_application.data.id }}" + And the response "data" has item with field "attributes.product_scales.rum_event_processing_scale.state" with value "ALL" + And the response "data" has item with field "attributes.product_scales.product_analytics_retention_scale.state" with value "NONE" @generated @skip @team:DataDog/rum-backend Scenario: Search RUM events returns "Bad Request" response @@ -136,7 +156,7 @@ Feature: RUM Scenario: Update a RUM application returns "Bad Request" response Given new "UpdateRUMApplication" request And request contains "id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"name": "updated_name_for_my_existing_rum_application", "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}} + And body with value {"data": {"attributes": {"name": "updated_name_for_my_existing_rum_application", "product_analytics_retention_state": "MAX", "rum_event_processing_state": "ALL", "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}} When the request is sent Then the response status is 400 Bad Request @@ -144,7 +164,7 @@ Feature: RUM Scenario: Update a RUM application returns "Not Found" response Given new "UpdateRUMApplication" request And request contains "id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"name": "updated_name_for_my_existing_rum_application", "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}} + And body with value {"data": {"attributes": {"name": "updated_name_for_my_existing_rum_application", "product_analytics_retention_state": "MAX", "rum_event_processing_state": "ALL", "type": "browser"}, "id": "abcd1234-0000-0000-abcd-1234abcd5678", "type": "rum_application_update"}} When the request is sent Then the response status is 404 Not Found @@ -160,6 +180,10 @@ Feature: RUM And the response "data.attributes.application_id" is equal to "{{ rum_application.data.id }}" And the response "data.attributes.type" is equal to "browser" And the response "data.attributes.name" is equal to "updated_name_for_my_existing_rum_application" + And the response "data.attributes.product_scales.rum_event_processing_scale.state" is equal to "ALL" + And the response "data.attributes.product_scales.product_analytics_retention_scale.state" is equal to "NONE" + And the response "data.attributes.product_scales.rum_event_processing_scale" has field "last_modified_at" + And the response "data.attributes.product_scales.product_analytics_retention_scale" has field "last_modified_at" @skip-validation @team:DataDog/rum-backend Scenario: Update a RUM application returns "Unprocessable Entity." response @@ -169,3 +193,18 @@ Feature: RUM And body with value {"data": {"id": "this_id_will_not_match", "type": "rum_application_update"}} When the request is sent Then the response status is 422 Unprocessable Entity. + + @skip-validation @team:DataDog/rum-backend + Scenario: Update a RUM application with Product Scales returns "OK" response + Given there is a valid "rum_application" in the system + And new "UpdateRUMApplication" request + And request contains "id" parameter from "rum_application.data.id" + And body with value {"data": {"attributes": {"name": "updated_rum_with_product_scales", "rum_event_processing_state": "ALL", "product_analytics_retention_state": "MAX"}, "id": "{{ rum_application.data.id }}", "type": "rum_application_update"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "rum_application" + And the response "data.attributes.name" is equal to "updated_rum_with_product_scales" + And the response "data.attributes.product_scales.rum_event_processing_scale.state" is equal to "ALL" + And the response "data.attributes.product_scales.product_analytics_retention_scale.state" is equal to "MAX" + And the response "data.attributes.product_scales.rum_event_processing_scale" has field "last_modified_at" + And the response "data.attributes.product_scales.product_analytics_retention_scale" has field "last_modified_at"