diff --git a/.generated-info b/.generated-info index b86af9f319..5c3c962703 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "fde8b90", - "generated": "2025-08-18 20:32:42.259" + "spec_repo_commit": "4413e63", + "generated": "2025-08-19 20:28:38.330" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index cb4c1c4bb0..5dc52e4a2e 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/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 7ff6c89362..31bdac915a 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -15243,6 +15243,20 @@ datadog\_api\_client.v2.model.rum\_event\_attributes module :members: :show-inheritance: +datadog\_api\_client.v2.model.rum\_event\_processing\_scale module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.rum_event_processing_scale + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_event\_processing\_state module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.rum_event_processing_state + :members: + :show-inheritance: + datadog\_api\_client.v2.model.rum\_event\_type module ----------------------------------------------------- @@ -15446,6 +15460,27 @@ datadog\_api\_client.v2.model.rum\_metrics\_response module :members: :show-inheritance: +datadog\_api\_client.v2.model.rum\_product\_analytics\_retention\_scale module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.rum_product_analytics_retention_scale + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_product\_analytics\_retention\_state module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.rum_product_analytics_retention_state + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.rum\_product\_scales module +--------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.rum_product_scales + :members: + :show-inheritance: + datadog\_api\_client.v2.model.rum\_query\_filter module ------------------------------------------------------- diff --git a/examples/v2/rum/CreateRUMApplication_1946294560.py b/examples/v2/rum/CreateRUMApplication_1946294560.py new file mode 100644 index 0000000000..991a4d26cf --- /dev/null +++ b/examples/v2/rum/CreateRUMApplication_1946294560.py @@ -0,0 +1,31 @@ +""" +Create a new RUM application with Product Scales returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.rum_api import RUMApi +from datadog_api_client.v2.model.rum_application_create import RUMApplicationCreate +from datadog_api_client.v2.model.rum_application_create_attributes import RUMApplicationCreateAttributes +from datadog_api_client.v2.model.rum_application_create_request import RUMApplicationCreateRequest +from datadog_api_client.v2.model.rum_application_create_type import RUMApplicationCreateType +from datadog_api_client.v2.model.rum_event_processing_state import RUMEventProcessingState +from datadog_api_client.v2.model.rum_product_analytics_retention_state import RUMProductAnalyticsRetentionState + +body = RUMApplicationCreateRequest( + data=RUMApplicationCreate( + attributes=RUMApplicationCreateAttributes( + name="test-rum-with-product-scales-5c67ebb32077e1d9", + type="browser", + rum_event_processing_state=RUMEventProcessingState.ERROR_FOCUSED_MODE, + product_analytics_retention_state=RUMProductAnalyticsRetentionState.NONE, + ), + type=RUMApplicationCreateType.RUM_APPLICATION_CREATE, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = RUMApi(api_client) + response = api_instance.create_rum_application(body=body) + + print(response) diff --git a/examples/v2/rum/UpdateRUMApplication_394074053.py b/examples/v2/rum/UpdateRUMApplication_394074053.py new file mode 100644 index 0000000000..90e25ef573 --- /dev/null +++ b/examples/v2/rum/UpdateRUMApplication_394074053.py @@ -0,0 +1,35 @@ +""" +Update a RUM application with Product Scales returns "OK" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.rum_api import RUMApi +from datadog_api_client.v2.model.rum_application_update import RUMApplicationUpdate +from datadog_api_client.v2.model.rum_application_update_attributes import RUMApplicationUpdateAttributes +from datadog_api_client.v2.model.rum_application_update_request import RUMApplicationUpdateRequest +from datadog_api_client.v2.model.rum_application_update_type import RUMApplicationUpdateType +from datadog_api_client.v2.model.rum_event_processing_state import RUMEventProcessingState +from datadog_api_client.v2.model.rum_product_analytics_retention_state import RUMProductAnalyticsRetentionState + +# there is a valid "rum_application" in the system +RUM_APPLICATION_DATA_ID = environ["RUM_APPLICATION_DATA_ID"] + +body = RUMApplicationUpdateRequest( + data=RUMApplicationUpdate( + attributes=RUMApplicationUpdateAttributes( + name="updated_rum_with_product_scales", + rum_event_processing_state=RUMEventProcessingState.ALL, + product_analytics_retention_state=RUMProductAnalyticsRetentionState.MAX, + ), + id=RUM_APPLICATION_DATA_ID, + type=RUMApplicationUpdateType.RUM_APPLICATION_UPDATE, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = RUMApi(api_client) + response = api_instance.update_rum_application(id=RUM_APPLICATION_DATA_ID, body=body) + + print(response) diff --git a/src/datadog_api_client/v2/model/rum_application_attributes.py b/src/datadog_api_client/v2/model/rum_application_attributes.py index ff837d786e..7a11940764 100644 --- a/src/datadog_api_client/v2/model/rum_application_attributes.py +++ b/src/datadog_api_client/v2/model/rum_application_attributes.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Union +from typing import Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -13,6 +13,10 @@ ) +if TYPE_CHECKING: + from datadog_api_client.v2.model.rum_product_scales import RUMProductScales + + class RUMApplicationAttributes(ModelNormal): validations = { "org_id": { @@ -22,6 +26,8 @@ class RUMApplicationAttributes(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.rum_product_scales import RUMProductScales + return { "application_id": (str,), "client_token": (str,), @@ -31,6 +37,7 @@ def openapi_types(_): "is_active": (bool,), "name": (str,), "org_id": (int,), + "product_scales": (RUMProductScales,), "type": (str,), "updated_at": (int,), "updated_by_handle": (str,), @@ -45,6 +52,7 @@ def openapi_types(_): "is_active": "is_active", "name": "name", "org_id": "org_id", + "product_scales": "product_scales", "type": "type", "updated_at": "updated_at", "updated_by_handle": "updated_by_handle", @@ -63,6 +71,7 @@ def __init__( updated_by_handle: str, hash: Union[str, UnsetType] = unset, is_active: Union[bool, UnsetType] = unset, + product_scales: Union[RUMProductScales, UnsetType] = unset, **kwargs, ): """ @@ -92,6 +101,9 @@ def __init__( :param org_id: Org ID of the RUM application. :type org_id: int + :param product_scales: Product Scales configuration for the RUM application. + :type product_scales: RUMProductScales, optional + :param type: Type of the RUM application. Supported values are ``browser`` , ``ios`` , ``android`` , ``react-native`` , ``flutter`` , ``roku`` , ``electron`` , ``unity`` , ``kotlin-multiplatform``. :type type: str @@ -105,6 +117,8 @@ def __init__( kwargs["hash"] = hash if is_active is not unset: kwargs["is_active"] = is_active + if product_scales is not unset: + kwargs["product_scales"] = product_scales super().__init__(kwargs) self_.application_id = application_id diff --git a/src/datadog_api_client/v2/model/rum_application_create_attributes.py b/src/datadog_api_client/v2/model/rum_application_create_attributes.py index 79d8597438..40b0b70a53 100644 --- a/src/datadog_api_client/v2/model/rum_application_create_attributes.py +++ b/src/datadog_api_client/v2/model/rum_application_create_attributes.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Union +from typing import Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -13,29 +13,58 @@ ) +if TYPE_CHECKING: + from datadog_api_client.v2.model.rum_product_analytics_retention_state import RUMProductAnalyticsRetentionState + from datadog_api_client.v2.model.rum_event_processing_state import RUMEventProcessingState + + class RUMApplicationCreateAttributes(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.rum_product_analytics_retention_state import RUMProductAnalyticsRetentionState + from datadog_api_client.v2.model.rum_event_processing_state import RUMEventProcessingState + return { "name": (str,), + "product_analytics_retention_state": (RUMProductAnalyticsRetentionState,), + "rum_event_processing_state": (RUMEventProcessingState,), "type": (str,), } attribute_map = { "name": "name", + "product_analytics_retention_state": "product_analytics_retention_state", + "rum_event_processing_state": "rum_event_processing_state", "type": "type", } - def __init__(self_, name: str, type: Union[str, UnsetType] = unset, **kwargs): + def __init__( + self_, + name: str, + product_analytics_retention_state: Union[RUMProductAnalyticsRetentionState, UnsetType] = unset, + rum_event_processing_state: Union[RUMEventProcessingState, UnsetType] = unset, + type: Union[str, UnsetType] = unset, + **kwargs, + ): """ RUM application creation attributes. :param name: Name of the RUM application. :type name: str + :param product_analytics_retention_state: Controls the retention policy for Product Analytics data derived from RUM events. + :type product_analytics_retention_state: RUMProductAnalyticsRetentionState, optional + + :param rum_event_processing_state: Configures which RUM events are processed and stored for the application. + :type rum_event_processing_state: RUMEventProcessingState, optional + :param type: Type of the RUM application. Supported values are ``browser`` , ``ios`` , ``android`` , ``react-native`` , ``flutter`` , ``roku`` , ``electron`` , ``unity`` , ``kotlin-multiplatform``. :type type: str, optional """ + if product_analytics_retention_state is not unset: + kwargs["product_analytics_retention_state"] = product_analytics_retention_state + if rum_event_processing_state is not unset: + kwargs["rum_event_processing_state"] = rum_event_processing_state if type is not unset: kwargs["type"] = type super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/rum_application_list_attributes.py b/src/datadog_api_client/v2/model/rum_application_list_attributes.py index 75c1438917..79476b116c 100644 --- a/src/datadog_api_client/v2/model/rum_application_list_attributes.py +++ b/src/datadog_api_client/v2/model/rum_application_list_attributes.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Union +from typing import Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -13,6 +13,10 @@ ) +if TYPE_CHECKING: + from datadog_api_client.v2.model.rum_product_scales import RUMProductScales + + class RUMApplicationListAttributes(ModelNormal): validations = { "org_id": { @@ -22,6 +26,8 @@ class RUMApplicationListAttributes(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.rum_product_scales import RUMProductScales + return { "application_id": (str,), "created_at": (int,), @@ -30,6 +36,7 @@ def openapi_types(_): "is_active": (bool,), "name": (str,), "org_id": (int,), + "product_scales": (RUMProductScales,), "type": (str,), "updated_at": (int,), "updated_by_handle": (str,), @@ -43,6 +50,7 @@ def openapi_types(_): "is_active": "is_active", "name": "name", "org_id": "org_id", + "product_scales": "product_scales", "type": "type", "updated_at": "updated_at", "updated_by_handle": "updated_by_handle", @@ -60,6 +68,7 @@ def __init__( updated_by_handle: str, hash: Union[str, UnsetType] = unset, is_active: Union[bool, UnsetType] = unset, + product_scales: Union[RUMProductScales, UnsetType] = unset, **kwargs, ): """ @@ -86,6 +95,9 @@ def __init__( :param org_id: Org ID of the RUM application. :type org_id: int + :param product_scales: Product Scales configuration for the RUM application. + :type product_scales: RUMProductScales, optional + :param type: Type of the RUM application. Supported values are ``browser`` , ``ios`` , ``android`` , ``react-native`` , ``flutter`` , ``roku`` , ``electron`` , ``unity`` , ``kotlin-multiplatform``. :type type: str @@ -99,6 +111,8 @@ def __init__( kwargs["hash"] = hash if is_active is not unset: kwargs["is_active"] = is_active + if product_scales is not unset: + kwargs["product_scales"] = product_scales super().__init__(kwargs) self_.application_id = application_id diff --git a/src/datadog_api_client/v2/model/rum_application_update_attributes.py b/src/datadog_api_client/v2/model/rum_application_update_attributes.py index 9ba99558dc..fd8543199f 100644 --- a/src/datadog_api_client/v2/model/rum_application_update_attributes.py +++ b/src/datadog_api_client/v2/model/rum_application_update_attributes.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Union +from typing import Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -13,31 +13,60 @@ ) +if TYPE_CHECKING: + from datadog_api_client.v2.model.rum_product_analytics_retention_state import RUMProductAnalyticsRetentionState + from datadog_api_client.v2.model.rum_event_processing_state import RUMEventProcessingState + + class RUMApplicationUpdateAttributes(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.rum_product_analytics_retention_state import RUMProductAnalyticsRetentionState + from datadog_api_client.v2.model.rum_event_processing_state import RUMEventProcessingState + return { "name": (str,), + "product_analytics_retention_state": (RUMProductAnalyticsRetentionState,), + "rum_event_processing_state": (RUMEventProcessingState,), "type": (str,), } attribute_map = { "name": "name", + "product_analytics_retention_state": "product_analytics_retention_state", + "rum_event_processing_state": "rum_event_processing_state", "type": "type", } - def __init__(self_, name: Union[str, UnsetType] = unset, type: Union[str, UnsetType] = unset, **kwargs): + def __init__( + self_, + name: Union[str, UnsetType] = unset, + product_analytics_retention_state: Union[RUMProductAnalyticsRetentionState, UnsetType] = unset, + rum_event_processing_state: Union[RUMEventProcessingState, UnsetType] = unset, + type: Union[str, UnsetType] = unset, + **kwargs, + ): """ RUM application update attributes. :param name: Name of the RUM application. :type name: str, optional + :param product_analytics_retention_state: Controls the retention policy for Product Analytics data derived from RUM events. + :type product_analytics_retention_state: RUMProductAnalyticsRetentionState, optional + + :param rum_event_processing_state: Configures which RUM events are processed and stored for the application. + :type rum_event_processing_state: RUMEventProcessingState, optional + :param type: Type of the RUM application. Supported values are ``browser`` , ``ios`` , ``android`` , ``react-native`` , ``flutter`` , ``roku`` , ``electron`` , ``unity`` , ``kotlin-multiplatform``. :type type: str, optional """ if name is not unset: kwargs["name"] = name + if product_analytics_retention_state is not unset: + kwargs["product_analytics_retention_state"] = product_analytics_retention_state + if rum_event_processing_state is not unset: + kwargs["rum_event_processing_state"] = rum_event_processing_state if type is not unset: kwargs["type"] = type super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/rum_event_processing_scale.py b/src/datadog_api_client/v2/model/rum_event_processing_scale.py new file mode 100644 index 0000000000..73d162889a --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_event_processing_scale.py @@ -0,0 +1,54 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.rum_event_processing_state import RUMEventProcessingState + + +class RUMEventProcessingScale(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.rum_event_processing_state import RUMEventProcessingState + + return { + "last_modified_at": (int,), + "state": (RUMEventProcessingState,), + } + + attribute_map = { + "last_modified_at": "last_modified_at", + "state": "state", + } + + def __init__( + self_, + last_modified_at: Union[int, UnsetType] = unset, + state: Union[RUMEventProcessingState, UnsetType] = unset, + **kwargs, + ): + """ + RUM event processing scale configuration. + + :param last_modified_at: Timestamp in milliseconds when this scale was last modified. + :type last_modified_at: int, optional + + :param state: Configures which RUM events are processed and stored for the application. + :type state: RUMEventProcessingState, optional + """ + if last_modified_at is not unset: + kwargs["last_modified_at"] = last_modified_at + if state is not unset: + kwargs["state"] = state + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/rum_event_processing_state.py b/src/datadog_api_client/v2/model/rum_event_processing_state.py new file mode 100644 index 0000000000..bf341176eb --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_event_processing_state.py @@ -0,0 +1,41 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class RUMEventProcessingState(ModelSimple): + """ + Configures which RUM events are processed and stored for the application. + + :param value: Must be one of ["ALL", "ERROR_FOCUSED_MODE", "NONE"]. + :type value: str + """ + + allowed_values = { + "ALL", + "ERROR_FOCUSED_MODE", + "NONE", + } + ALL: ClassVar["RUMEventProcessingState"] + ERROR_FOCUSED_MODE: ClassVar["RUMEventProcessingState"] + NONE: ClassVar["RUMEventProcessingState"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +RUMEventProcessingState.ALL = RUMEventProcessingState("ALL") +RUMEventProcessingState.ERROR_FOCUSED_MODE = RUMEventProcessingState("ERROR_FOCUSED_MODE") +RUMEventProcessingState.NONE = RUMEventProcessingState("NONE") diff --git a/src/datadog_api_client/v2/model/rum_product_analytics_retention_scale.py b/src/datadog_api_client/v2/model/rum_product_analytics_retention_scale.py new file mode 100644 index 0000000000..bac5ffe9fb --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_product_analytics_retention_scale.py @@ -0,0 +1,54 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.rum_product_analytics_retention_state import RUMProductAnalyticsRetentionState + + +class RUMProductAnalyticsRetentionScale(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.rum_product_analytics_retention_state import RUMProductAnalyticsRetentionState + + return { + "last_modified_at": (int,), + "state": (RUMProductAnalyticsRetentionState,), + } + + attribute_map = { + "last_modified_at": "last_modified_at", + "state": "state", + } + + def __init__( + self_, + last_modified_at: Union[int, UnsetType] = unset, + state: Union[RUMProductAnalyticsRetentionState, UnsetType] = unset, + **kwargs, + ): + """ + Product Analytics retention scale configuration. + + :param last_modified_at: Timestamp in milliseconds when this scale was last modified. + :type last_modified_at: int, optional + + :param state: Controls the retention policy for Product Analytics data derived from RUM events. + :type state: RUMProductAnalyticsRetentionState, optional + """ + if last_modified_at is not unset: + kwargs["last_modified_at"] = last_modified_at + if state is not unset: + kwargs["state"] = state + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/rum_product_analytics_retention_state.py b/src/datadog_api_client/v2/model/rum_product_analytics_retention_state.py new file mode 100644 index 0000000000..e1ffff859e --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_product_analytics_retention_state.py @@ -0,0 +1,38 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class RUMProductAnalyticsRetentionState(ModelSimple): + """ + Controls the retention policy for Product Analytics data derived from RUM events. + + :param value: Must be one of ["MAX", "NONE"]. + :type value: str + """ + + allowed_values = { + "MAX", + "NONE", + } + MAX: ClassVar["RUMProductAnalyticsRetentionState"] + NONE: ClassVar["RUMProductAnalyticsRetentionState"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +RUMProductAnalyticsRetentionState.MAX = RUMProductAnalyticsRetentionState("MAX") +RUMProductAnalyticsRetentionState.NONE = RUMProductAnalyticsRetentionState("NONE") diff --git a/src/datadog_api_client/v2/model/rum_product_scales.py b/src/datadog_api_client/v2/model/rum_product_scales.py new file mode 100644 index 0000000000..2fdc6aadb0 --- /dev/null +++ b/src/datadog_api_client/v2/model/rum_product_scales.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.rum_product_analytics_retention_scale import RUMProductAnalyticsRetentionScale + from datadog_api_client.v2.model.rum_event_processing_scale import RUMEventProcessingScale + + +class RUMProductScales(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.rum_product_analytics_retention_scale import RUMProductAnalyticsRetentionScale + from datadog_api_client.v2.model.rum_event_processing_scale import RUMEventProcessingScale + + return { + "product_analytics_retention_scale": (RUMProductAnalyticsRetentionScale,), + "rum_event_processing_scale": (RUMEventProcessingScale,), + } + + attribute_map = { + "product_analytics_retention_scale": "product_analytics_retention_scale", + "rum_event_processing_scale": "rum_event_processing_scale", + } + + def __init__( + self_, + product_analytics_retention_scale: Union[RUMProductAnalyticsRetentionScale, UnsetType] = unset, + rum_event_processing_scale: Union[RUMEventProcessingScale, UnsetType] = unset, + **kwargs, + ): + """ + Product Scales configuration for the RUM application. + + :param product_analytics_retention_scale: Product Analytics retention scale configuration. + :type product_analytics_retention_scale: RUMProductAnalyticsRetentionScale, optional + + :param rum_event_processing_scale: RUM event processing scale configuration. + :type rum_event_processing_scale: RUMEventProcessingScale, optional + """ + if product_analytics_retention_scale is not unset: + kwargs["product_analytics_retention_scale"] = product_analytics_retention_scale + if rum_event_processing_scale is not unset: + kwargs["rum_event_processing_scale"] = rum_event_processing_scale + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index f169eba3aa..76b18d03ca 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -2865,12 +2865,17 @@ from datadog_api_client.v2.model.rum_compute_type import RUMComputeType from datadog_api_client.v2.model.rum_event import RUMEvent from datadog_api_client.v2.model.rum_event_attributes import RUMEventAttributes +from datadog_api_client.v2.model.rum_event_processing_scale import RUMEventProcessingScale +from datadog_api_client.v2.model.rum_event_processing_state import RUMEventProcessingState from datadog_api_client.v2.model.rum_event_type import RUMEventType from datadog_api_client.v2.model.rum_events_response import RUMEventsResponse from datadog_api_client.v2.model.rum_group_by import RUMGroupBy from datadog_api_client.v2.model.rum_group_by_histogram import RUMGroupByHistogram from datadog_api_client.v2.model.rum_group_by_missing import RUMGroupByMissing from datadog_api_client.v2.model.rum_group_by_total import RUMGroupByTotal +from datadog_api_client.v2.model.rum_product_analytics_retention_scale import RUMProductAnalyticsRetentionScale +from datadog_api_client.v2.model.rum_product_analytics_retention_state import RUMProductAnalyticsRetentionState +from datadog_api_client.v2.model.rum_product_scales import RUMProductScales from datadog_api_client.v2.model.rum_query_filter import RUMQueryFilter from datadog_api_client.v2.model.rum_query_options import RUMQueryOptions from datadog_api_client.v2.model.rum_query_page_options import RUMQueryPageOptions @@ -5990,12 +5995,17 @@ "RUMComputeType", "RUMEvent", "RUMEventAttributes", + "RUMEventProcessingScale", + "RUMEventProcessingState", "RUMEventType", "RUMEventsResponse", "RUMGroupBy", "RUMGroupByHistogram", "RUMGroupByMissing", "RUMGroupByTotal", + "RUMProductAnalyticsRetentionScale", + "RUMProductAnalyticsRetentionState", + "RUMProductScales", "RUMQueryFilter", "RUMQueryOptions", "RUMQueryPageOptions", diff --git a/tests/v2/cassettes/test_scenarios/test_create_a_new_rum_application_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_a_new_rum_application_returns_ok_response.frozen index e202229624..751be95903 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_a_new_rum_application_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_create_a_new_rum_application_returns_ok_response.frozen @@ -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/tests/v2/cassettes/test_scenarios/test_create_a_new_rum_application_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_a_new_rum_application_returns_ok_response.yaml index acb1c0bc85..1cb56db948 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_a_new_rum_application_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_create_a_new_rum_application_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"name":"test-rum-5be7aad200899ffd","type":"ios"},"type":"rum_application_create"}}' + body: '{"data":{"attributes":{"name":"test-rum-33452889744bdeee","type":"ios"},"type":"rum_application_create"}}' headers: accept: - application/json @@ -10,7 +10,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/rum/applications response: body: - string: '{"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"}} + string: '{"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"}} ' headers: @@ -25,7 +25,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/rum/applications/2ce2bdc3-efa2-4182-9bc1-b75b2ff09be4 + uri: https://api.datadoghq.com/api/v2/rum/applications/ee0b4d74-7159-4498-bec7-2b4f2b5ba642 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_create_a_new_rum_application_with_product_scales_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_a_new_rum_application_with_product_scales_returns_ok_response.frozen new file mode 100644 index 0000000000..40a71dd36f --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_create_a_new_rum_application_with_product_scales_returns_ok_response.frozen @@ -0,0 +1 @@ +2025-08-19T14:01:52.966Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_a_new_rum_application_with_product_scales_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_a_new_rum_application_with_product_scales_returns_ok_response.yaml new file mode 100644 index 0000000000..ed71743695 --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_create_a_new_rum_application_with_product_scales_returns_ok_response.yaml @@ -0,0 +1,36 @@ +interactions: +- request: + body: '{"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: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/rum/applications + response: + body: + string: '{"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}}} + + ' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/rum/applications/51419fd9-a73f-4508-9f74-ad07d6669a47 + response: + body: + string: '' + headers: {} + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_get_a_rum_application_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_a_rum_application_returns_ok_response.frozen index 86ca008c81..b77bb23923 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_a_rum_application_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_a_rum_application_returns_ok_response.frozen @@ -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/tests/v2/cassettes/test_scenarios/test_get_a_rum_application_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_a_rum_application_returns_ok_response.yaml index bcc208bcf7..1b0cc9ed29 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_a_rum_application_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_get_a_rum_application_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"name":"test-rum-27e6a81538211560","type":"ios"},"type":"rum_application_create"}}' + body: '{"data":{"attributes":{"name":"test-rum-4a6d822e36907848","type":"ios"},"type":"rum_application_create"}}' headers: accept: - application/json @@ -10,7 +10,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/rum/applications response: body: - string: '{"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"}} + string: '{"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"}}} ' headers: @@ -25,10 +25,10 @@ interactions: accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/rum/applications/77826c21-2a07-4b5a-a54d-8912e1802854 + uri: https://api.datadoghq.com/api/v2/rum/applications/60ddadf3-d37f-4d33-bdf1-f56b674ae8ed response: body: - string: '{"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"}} + string: '{"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"}} ' headers: @@ -43,7 +43,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/rum/applications/77826c21-2a07-4b5a-a54d-8912e1802854 + uri: https://api.datadoghq.com/api/v2/rum/applications/60ddadf3-d37f-4d33-bdf1-f56b674ae8ed response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_list_all_the_rum_applications_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_list_all_the_rum_applications_returns_ok_response.frozen index f86a32bc29..f4b8f8d2ca 100644 --- a/tests/v2/cassettes/test_scenarios/test_list_all_the_rum_applications_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_list_all_the_rum_applications_returns_ok_response.frozen @@ -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/tests/v2/cassettes/test_scenarios/test_list_all_the_rum_applications_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_list_all_the_rum_applications_returns_ok_response.yaml index d25f96c533..ecd1be1a99 100644 --- a/tests/v2/cassettes/test_scenarios/test_list_all_the_rum_applications_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_list_all_the_rum_applications_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"name":"test-rum-688346277e8afe02","type":"ios"},"type":"rum_application_create"}}' + body: '{"data":{"attributes":{"name":"test-rum-a630eb80b3e09124","type":"ios"},"type":"rum_application_create"}}' headers: accept: - application/json @@ -10,7 +10,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/rum/applications response: body: - string: '{"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"}} + string: '{"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}}} ' headers: @@ -28,8 +28,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/rum/applications response: body: - string: '{"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"}]} + string: '{"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"}]} ' headers: @@ -44,7 +44,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/rum/applications/9b00e648-de1e-4d5f-af81-3d465b925b0d + uri: https://api.datadoghq.com/api/v2/rum/applications/cfc4270c-7df3-4a8b-a24a-20f2a25e15b2 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_update_a_rum_application_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_a_rum_application_returns_ok_response.frozen index 929c624ea2..7134dffc5e 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_a_rum_application_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_a_rum_application_returns_ok_response.frozen @@ -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/tests/v2/cassettes/test_scenarios/test_update_a_rum_application_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_a_rum_application_returns_ok_response.yaml index acd4d834ac..5329c71c99 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_a_rum_application_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_update_a_rum_application_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"name":"test-rum-08f8f866ac73a2f6","type":"ios"},"type":"rum_application_create"}}' + body: '{"data":{"attributes":{"name":"test-rum-2befac64eeb0a1b0","type":"ios"},"type":"rum_application_create"}}' headers: accept: - application/json @@ -10,7 +10,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/rum/applications response: body: - string: '{"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"}} + string: '{"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"}} ' headers: @@ -20,17 +20,17 @@ interactions: code: 200 message: OK - request: - body: '{"data":{"attributes":{"name":"updated_name_for_my_existing_rum_application","type":"browser"},"id":"04898090-77be-4047-a2cb-654f5e050929","type":"rum_application_update"}}' + body: '{"data":{"attributes":{"name":"updated_name_for_my_existing_rum_application","type":"browser"},"id":"94f76d3a-a8b2-4d1a-9938-771568a36f50","type":"rum_application_update"}}' headers: accept: - application/json content-type: - application/json method: PATCH - uri: https://api.datadoghq.com/api/v2/rum/applications/04898090-77be-4047-a2cb-654f5e050929 + uri: https://api.datadoghq.com/api/v2/rum/applications/94f76d3a-a8b2-4d1a-9938-771568a36f50 response: body: - string: '{"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"}} + string: '{"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"}} ' headers: @@ -45,7 +45,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/rum/applications/04898090-77be-4047-a2cb-654f5e050929 + uri: https://api.datadoghq.com/api/v2/rum/applications/94f76d3a-a8b2-4d1a-9938-771568a36f50 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_update_a_rum_application_with_product_scales_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_a_rum_application_with_product_scales_returns_ok_response.frozen new file mode 100644 index 0000000000..49869dc4be --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_update_a_rum_application_with_product_scales_returns_ok_response.frozen @@ -0,0 +1 @@ +2025-08-19T14:03:03.148Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_a_rum_application_with_product_scales_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_a_rum_application_with_product_scales_returns_ok_response.yaml new file mode 100644 index 0000000000..e0cafcab0f --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_update_a_rum_application_with_product_scales_returns_ok_response.yaml @@ -0,0 +1,56 @@ +interactions: +- request: + body: '{"data":{"attributes":{"name":"test-rum-437f87a61b37ca7e","type":"ios"},"type":"rum_application_create"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/rum/applications + response: + body: + string: '{"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"}} + + ' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +- request: + body: '{"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: + accept: + - application/json + content-type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/rum/applications/c82755b7-9938-4241-ae5a-24dd5760402b + response: + body: + string: '{"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"}} + + ' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +- request: + body: null + headers: + accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/rum/applications/c82755b7-9938-4241-ae5a-24dd5760402b + response: + body: + string: '' + headers: {} + status: + code: 204 + message: No Content +version: 1 diff --git a/tests/v2/features/rum.feature b/tests/v2/features/rum.feature index f86e1ee618..e25922fb48 100644 --- a/tests/v2/features/rum.feature +++ b/tests/v2/features/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"