From 282677c4913a350aa7bf72e05a96524dbc1913f5 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 28 Nov 2025 14:28:18 +0000 Subject: [PATCH] Regenerate client from commit 35ab545 of spec repo --- .generator/schemas/v2/openapi.yaml | 143 +++++++++++++++++- docs/datadog_api_client.v2.model.rst | 63 ++++++++ .../on-call/CreateOnCallEscalationPolicy.py | 14 ++ .../v2/model/configured_schedule.py | 73 +++++++++ .../v2/model/configured_schedule_target.py | 46 ++++++ .../configured_schedule_target_attributes.py | 40 +++++ ...onfigured_schedule_target_relationships.py | 44 ++++++ ..._schedule_target_relationships_schedule.py | 40 +++++ .../model/configured_schedule_target_type.py | 35 +++++ .../v2/model/escalation_policy.py | 12 +- ...n_policy_create_request_data_attributes.py | 14 ++ ...ate_request_data_attributes_steps_items.py | 7 + .../escalation_policy_data_attributes.py | 10 ++ .../v2/model/escalation_policy_included.py | 18 ++- .../v2/model/escalation_policy_step_target.py | 12 +- .../escalation_policy_step_target_config.py | 46 ++++++ ...tion_policy_step_target_config_schedule.py | 42 +++++ ...n_policy_update_request_data_attributes.py | 14 ++ ...ate_request_data_attributes_steps_items.py | 7 + .../v2/model/escalation_target.py | 4 +- .../v2/model/escalation_targets.py | 5 +- .../v2/model/schedule_target.py | 2 +- .../v2/model/schedule_target_position.py | 41 +++++ src/datadog_api_client/v2/models/__init__.py | 22 +++ ...ion_policy_returns_created_response.frozen | 2 +- ...ation_policy_returns_created_response.yaml | 32 ++-- ...l_schedule_returns_created_response.frozen | 2 +- ...all_schedule_returns_created_response.yaml | 26 ++-- ..._policy_returns_no_content_response.frozen | 2 +- ...on_policy_returns_no_content_response.yaml | 36 +++-- ...chedule_returns_no_content_response.frozen | 2 +- ..._schedule_returns_no_content_response.yaml | 20 +-- ...calation_policy_returns_ok_response.frozen | 2 +- ...escalation_policy_returns_ok_response.yaml | 36 +++-- ...oncall_schedule_returns_ok_response.frozen | 2 +- ...t_oncall_schedule_returns_ok_response.yaml | 20 +-- ...am_oncall_users_returns_ok_response.frozen | 2 +- ...team_oncall_users_returns_ok_response.yaml | 42 ++--- ...ule_oncall_user_returns_ok_response.frozen | 2 +- ...edule_oncall_user_returns_ok_response.yaml | 20 +-- ...m_routing_rules_returns_ok_response.frozen | 2 +- ...eam_routing_rules_returns_ok_response.yaml | 38 ++--- ...calation_policy_returns_ok_response.frozen | 2 +- ...escalation_policy_returns_ok_response.yaml | 38 +++-- ...oncall_schedule_returns_ok_response.frozen | 2 +- ...e_oncall_schedule_returns_ok_response.yaml | 34 ++--- tests/v2/features/given.json | 2 +- tests/v2/features/on-call.feature | 4 +- 48 files changed, 913 insertions(+), 211 deletions(-) create mode 100644 src/datadog_api_client/v2/model/configured_schedule.py create mode 100644 src/datadog_api_client/v2/model/configured_schedule_target.py create mode 100644 src/datadog_api_client/v2/model/configured_schedule_target_attributes.py create mode 100644 src/datadog_api_client/v2/model/configured_schedule_target_relationships.py create mode 100644 src/datadog_api_client/v2/model/configured_schedule_target_relationships_schedule.py create mode 100644 src/datadog_api_client/v2/model/configured_schedule_target_type.py create mode 100644 src/datadog_api_client/v2/model/escalation_policy_step_target_config.py create mode 100644 src/datadog_api_client/v2/model/escalation_policy_step_target_config_schedule.py create mode 100644 src/datadog_api_client/v2/model/schedule_target_position.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9bceb71549..59638d25e3 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -11227,6 +11227,76 @@ components: required: - type type: object + ConfiguredSchedule: + description: Full resource representation of a configured schedule target with + position (previous, current, or next). + properties: + attributes: + $ref: '#/components/schemas/ConfiguredScheduleTargetAttributes' + id: + description: Specifies the unique identifier of the configured schedule + target. + example: 00000000-aba1-0000-0000-000000000000_previous + type: string + relationships: + $ref: '#/components/schemas/ConfiguredScheduleTargetRelationships' + type: + $ref: '#/components/schemas/ConfiguredScheduleTargetType' + required: + - type + - id + - attributes + - relationships + type: object + ConfiguredScheduleTarget: + description: Relationship reference to a configured schedule target. + properties: + id: + description: Specifies the unique identifier of the configured schedule + target. + example: 00000000-aba1-0000-0000-000000000000_previous + type: string + type: + $ref: '#/components/schemas/ConfiguredScheduleTargetType' + required: + - type + - id + type: object + ConfiguredScheduleTargetAttributes: + description: Attributes for a configured schedule target, including position. + example: + position: previous + properties: + position: + $ref: '#/components/schemas/ScheduleTargetPosition' + required: + - position + type: object + ConfiguredScheduleTargetRelationships: + description: Represents the relationships of a configured schedule target. + properties: + schedule: + $ref: '#/components/schemas/ConfiguredScheduleTargetRelationshipsSchedule' + required: + - schedule + type: object + ConfiguredScheduleTargetRelationshipsSchedule: + description: Holds the schedule reference for a configured schedule target. + properties: + data: + $ref: '#/components/schemas/ScheduleTarget' + required: + - data + type: object + ConfiguredScheduleTargetType: + default: schedule_target + description: Indicates that the resource is of type `schedule_target`. + enum: + - schedule_target + example: schedule_target + type: string + x-enum-varnames: + - SCHEDULE_TARGET ConfluentAccountCreateRequest: description: Payload schema when adding a Confluent account. properties: @@ -18936,6 +19006,8 @@ components: type: users - id: 00000000-aba2-0000-0000-000000000000 type: schedules + - id: 00000000-aba2-0000-0000-000000000000_previous + type: schedule_target - id: 00000000-aba3-0000-0000-000000000000 type: teams type: steps @@ -18943,6 +19015,15 @@ components: type: users - id: 00000000-aba2-0000-0000-000000000000 type: schedules + - attributes: + position: previous + id: 00000000-aba2-0000-0000-000000000000_previous + relationships: + schedule: + data: + id: 00000000-aba2-0000-0000-000000000000 + type: schedules + type: schedule_target - id: 00000000-aba3-0000-0000-000000000000 type: teams properties: @@ -18970,7 +19051,10 @@ components: targets: - id: 00000000-aba1-0000-0000-000000000000 type: users - - id: 00000000-aba2-0000-0000-000000000000 + - config: + schedule: + position: previous + id: 00000000-aba2-0000-0000-000000000000 type: schedules - id: 00000000-aba3-0000-0000-000000000000 type: teams @@ -19014,6 +19098,7 @@ components: name: description: Specifies the name for the new escalation policy. example: On-Call Escalation Policy + minLength: 1 type: string resolve_page_on_policy_end: description: Indicates whether the page is automatically resolved when the @@ -19023,12 +19108,16 @@ components: description: Specifies how many times the escalation sequence is retried if there is no response. format: int64 + maximum: 10 + minimum: 0 type: integer steps: description: A list of escalation steps, each defining assignment, escalation timeout, and targets for the new policy. items: $ref: '#/components/schemas/EscalationPolicyCreateRequestDataAttributesStepsItems' + maxItems: 10 + minItems: 1 type: array required: - name @@ -19045,6 +19134,8 @@ components: step. example: 3600 format: int64 + maximum: 36000 + minimum: 60 type: integer targets: description: Specifies the collection of escalation targets for this step. @@ -19096,6 +19187,7 @@ components: name: description: Specifies the name of the escalation policy. example: On-Call Escalation Policy + minLength: 1 type: string resolve_page_on_policy_end: description: Indicates whether the page is automatically resolved when the @@ -19105,6 +19197,8 @@ components: description: Specifies how many times the escalation sequence is retried if there is no response. format: int64 + maximum: 10 + minimum: 0 type: integer required: - name @@ -19167,10 +19261,11 @@ components: description: Represents included related resources when retrieving an escalation policy, such as teams, steps, or targets. oneOf: - - $ref: '#/components/schemas/TeamReference' - $ref: '#/components/schemas/EscalationPolicyStep' - $ref: '#/components/schemas/EscalationPolicyUser' - $ref: '#/components/schemas/ScheduleData' + - $ref: '#/components/schemas/ConfiguredSchedule' + - $ref: '#/components/schemas/TeamReference' EscalationPolicyStep: description: Represents a single step in an escalation policy, including its attributes, relationships, and resource type. @@ -19218,8 +19313,10 @@ components: type: object EscalationPolicyStepTarget: description: Defines a single escalation target within a step for an escalation - policy creation request. Contains `id` and `type`. + policy creation request. Contains `id`, `type`, and optional `config`. properties: + config: + $ref: '#/components/schemas/EscalationPolicyStepTargetConfig' id: description: Specifies the unique identifier for this target. example: 00000000-aba1-0000-0000-000000000000 @@ -19227,6 +19324,18 @@ components: type: $ref: '#/components/schemas/EscalationPolicyStepTargetType' type: object + EscalationPolicyStepTargetConfig: + description: Configuration for an escalation target, such as schedule position. + properties: + schedule: + $ref: '#/components/schemas/EscalationPolicyStepTargetConfigSchedule' + type: object + EscalationPolicyStepTargetConfigSchedule: + description: Schedule-specific configuration for an escalation target. + properties: + position: + $ref: '#/components/schemas/ScheduleTargetPosition' + type: object EscalationPolicyStepTargetType: description: Specifies the type of escalation target (example `users`, `schedules`, or `teams`). @@ -19307,6 +19416,7 @@ components: name: description: Specifies the name of the escalation policy. example: On-Call Escalation Policy + minLength: 1 type: string resolve_page_on_policy_end: description: Indicates whether the page is automatically resolved when the @@ -19316,12 +19426,16 @@ components: description: Specifies how many times the escalation sequence is retried if there is no response. format: int64 + maximum: 10 + minimum: 0 type: integer steps: description: A list of escalation steps, each defining assignment, escalation timeout, and targets. items: $ref: '#/components/schemas/EscalationPolicyUpdateRequestDataAttributesStepsItems' + maxItems: 10 + minItems: 1 type: array required: - name @@ -19339,6 +19453,8 @@ components: step. example: 3600 format: int64 + maximum: 36000 + minimum: 60 type: integer id: description: Specifies the unique identifier of this step. @@ -19447,12 +19563,13 @@ components: x-enum-varnames: - USERS EscalationTarget: - description: Represents an escalation target, which can be a team, user, or - schedule. + description: Represents an escalation target, which can be a team, user, schedule, + or configured schedule target. oneOf: - $ref: '#/components/schemas/TeamTarget' - $ref: '#/components/schemas/UserTarget' - $ref: '#/components/schemas/ScheduleTarget' + - $ref: '#/components/schemas/ConfiguredScheduleTarget' EscalationTargets: description: A list of escalation targets for a step properties: @@ -44917,7 +45034,8 @@ components: type: object ScheduleTarget: description: Represents a schedule target for an escalation policy step, including - its ID and resource type. + its ID and resource type. This is a shortcut for a configured schedule target + with position set to 'current'. properties: id: description: Specifies the unique identifier of the schedule resource. @@ -44929,6 +45047,19 @@ components: - type - id type: object + ScheduleTargetPosition: + description: Specifies the position of a schedule target (example `previous`, + `current`, or `next`). + enum: + - previous + - current + - next + example: previous + type: string + x-enum-varnames: + - PREVIOUS + - CURRENT + - NEXT ScheduleTargetType: default: schedules description: Indicates that the resource is of type `schedules`. diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 60fdfd49e2..aeb30f5469 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -4344,6 +4344,48 @@ datadog\_api\_client.v2.model.config\_cat\_sdk\_key\_update module :members: :show-inheritance: +datadog\_api\_client.v2.model.configured\_schedule module +--------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.configured_schedule + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.configured\_schedule\_target module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.configured_schedule_target + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.configured\_schedule\_target\_attributes module +----------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.configured_schedule_target_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.configured\_schedule\_target\_relationships module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.configured_schedule_target_relationships + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.configured\_schedule\_target\_relationships\_schedule module +------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.configured_schedule_target_relationships_schedule + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.configured\_schedule\_target\_type module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.configured_schedule_target_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.confluent\_account\_create\_request module ------------------------------------------------------------------------ @@ -7963,6 +8005,20 @@ datadog\_api\_client.v2.model.escalation\_policy\_step\_target module :members: :show-inheritance: +datadog\_api\_client.v2.model.escalation\_policy\_step\_target\_config module +----------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.escalation_policy_step_target_config + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.escalation\_policy\_step\_target\_config\_schedule module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.escalation_policy_step_target_config_schedule + :members: + :show-inheritance: + datadog\_api\_client.v2.model.escalation\_policy\_step\_target\_type module --------------------------------------------------------------------------- @@ -19982,6 +20038,13 @@ datadog\_api\_client.v2.model.schedule\_target module :members: :show-inheritance: +datadog\_api\_client.v2.model.schedule\_target\_position module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.schedule_target_position + :members: + :show-inheritance: + datadog\_api\_client.v2.model.schedule\_target\_type module ----------------------------------------------------------- diff --git a/examples/v2/on-call/CreateOnCallEscalationPolicy.py b/examples/v2/on-call/CreateOnCallEscalationPolicy.py index cc30b56f98..0ae98fa834 100644 --- a/examples/v2/on-call/CreateOnCallEscalationPolicy.py +++ b/examples/v2/on-call/CreateOnCallEscalationPolicy.py @@ -24,7 +24,12 @@ EscalationPolicyStepAttributesAssignment, ) from datadog_api_client.v2.model.escalation_policy_step_target import EscalationPolicyStepTarget +from datadog_api_client.v2.model.escalation_policy_step_target_config import EscalationPolicyStepTargetConfig +from datadog_api_client.v2.model.escalation_policy_step_target_config_schedule import ( + EscalationPolicyStepTargetConfigSchedule, +) from datadog_api_client.v2.model.escalation_policy_step_target_type import EscalationPolicyStepTargetType +from datadog_api_client.v2.model.schedule_target_position import ScheduleTargetPosition # there is a valid "user" in the system USER_DATA_ID = environ["USER_DATA_ID"] @@ -54,6 +59,15 @@ id=SCHEDULE_DATA_ID, type=EscalationPolicyStepTargetType.SCHEDULES, ), + EscalationPolicyStepTarget( + config=EscalationPolicyStepTargetConfig( + schedule=EscalationPolicyStepTargetConfigSchedule( + position=ScheduleTargetPosition.PREVIOUS, + ), + ), + id=SCHEDULE_DATA_ID, + type=EscalationPolicyStepTargetType.SCHEDULES, + ), EscalationPolicyStepTarget( id=DD_TEAM_DATA_ID, type=EscalationPolicyStepTargetType.TEAMS, diff --git a/src/datadog_api_client/v2/model/configured_schedule.py b/src/datadog_api_client/v2/model/configured_schedule.py new file mode 100644 index 0000000000..1d84b770ef --- /dev/null +++ b/src/datadog_api_client/v2/model/configured_schedule.py @@ -0,0 +1,73 @@ +# 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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.configured_schedule_target_attributes import ConfiguredScheduleTargetAttributes + from datadog_api_client.v2.model.configured_schedule_target_relationships import ( + ConfiguredScheduleTargetRelationships, + ) + from datadog_api_client.v2.model.configured_schedule_target_type import ConfiguredScheduleTargetType + + +class ConfiguredSchedule(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.configured_schedule_target_attributes import ConfiguredScheduleTargetAttributes + from datadog_api_client.v2.model.configured_schedule_target_relationships import ( + ConfiguredScheduleTargetRelationships, + ) + from datadog_api_client.v2.model.configured_schedule_target_type import ConfiguredScheduleTargetType + + return { + "attributes": (ConfiguredScheduleTargetAttributes,), + "id": (str,), + "relationships": (ConfiguredScheduleTargetRelationships,), + "type": (ConfiguredScheduleTargetType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "relationships": "relationships", + "type": "type", + } + + def __init__( + self_, + attributes: ConfiguredScheduleTargetAttributes, + id: str, + relationships: ConfiguredScheduleTargetRelationships, + type: ConfiguredScheduleTargetType, + **kwargs, + ): + """ + Full resource representation of a configured schedule target with position (previous, current, or next). + + :param attributes: Attributes for a configured schedule target, including position. + :type attributes: ConfiguredScheduleTargetAttributes + + :param id: Specifies the unique identifier of the configured schedule target. + :type id: str + + :param relationships: Represents the relationships of a configured schedule target. + :type relationships: ConfiguredScheduleTargetRelationships + + :param type: Indicates that the resource is of type ``schedule_target``. + :type type: ConfiguredScheduleTargetType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.relationships = relationships + self_.type = type diff --git a/src/datadog_api_client/v2/model/configured_schedule_target.py b/src/datadog_api_client/v2/model/configured_schedule_target.py new file mode 100644 index 0000000000..eff42eca31 --- /dev/null +++ b/src/datadog_api_client/v2/model/configured_schedule_target.py @@ -0,0 +1,46 @@ +# 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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.configured_schedule_target_type import ConfiguredScheduleTargetType + + +class ConfiguredScheduleTarget(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.configured_schedule_target_type import ConfiguredScheduleTargetType + + return { + "id": (str,), + "type": (ConfiguredScheduleTargetType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: ConfiguredScheduleTargetType, **kwargs): + """ + Relationship reference to a configured schedule target. + + :param id: Specifies the unique identifier of the configured schedule target. + :type id: str + + :param type: Indicates that the resource is of type ``schedule_target``. + :type type: ConfiguredScheduleTargetType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/configured_schedule_target_attributes.py b/src/datadog_api_client/v2/model/configured_schedule_target_attributes.py new file mode 100644 index 0000000000..829526e0cd --- /dev/null +++ b/src/datadog_api_client/v2/model/configured_schedule_target_attributes.py @@ -0,0 +1,40 @@ +# 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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.schedule_target_position import ScheduleTargetPosition + + +class ConfiguredScheduleTargetAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.schedule_target_position import ScheduleTargetPosition + + return { + "position": (ScheduleTargetPosition,), + } + + attribute_map = { + "position": "position", + } + + def __init__(self_, position: ScheduleTargetPosition, **kwargs): + """ + Attributes for a configured schedule target, including position. + + :param position: Specifies the position of a schedule target (example ``previous`` , ``current`` , or ``next`` ). + :type position: ScheduleTargetPosition + """ + super().__init__(kwargs) + + self_.position = position diff --git a/src/datadog_api_client/v2/model/configured_schedule_target_relationships.py b/src/datadog_api_client/v2/model/configured_schedule_target_relationships.py new file mode 100644 index 0000000000..8c6209387f --- /dev/null +++ b/src/datadog_api_client/v2/model/configured_schedule_target_relationships.py @@ -0,0 +1,44 @@ +# 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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.configured_schedule_target_relationships_schedule import ( + ConfiguredScheduleTargetRelationshipsSchedule, + ) + + +class ConfiguredScheduleTargetRelationships(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.configured_schedule_target_relationships_schedule import ( + ConfiguredScheduleTargetRelationshipsSchedule, + ) + + return { + "schedule": (ConfiguredScheduleTargetRelationshipsSchedule,), + } + + attribute_map = { + "schedule": "schedule", + } + + def __init__(self_, schedule: ConfiguredScheduleTargetRelationshipsSchedule, **kwargs): + """ + Represents the relationships of a configured schedule target. + + :param schedule: Holds the schedule reference for a configured schedule target. + :type schedule: ConfiguredScheduleTargetRelationshipsSchedule + """ + super().__init__(kwargs) + + self_.schedule = schedule diff --git a/src/datadog_api_client/v2/model/configured_schedule_target_relationships_schedule.py b/src/datadog_api_client/v2/model/configured_schedule_target_relationships_schedule.py new file mode 100644 index 0000000000..222311b1cf --- /dev/null +++ b/src/datadog_api_client/v2/model/configured_schedule_target_relationships_schedule.py @@ -0,0 +1,40 @@ +# 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 TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.schedule_target import ScheduleTarget + + +class ConfiguredScheduleTargetRelationshipsSchedule(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.schedule_target import ScheduleTarget + + return { + "data": (ScheduleTarget,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: ScheduleTarget, **kwargs): + """ + Holds the schedule reference for a configured schedule target. + + :param data: Represents a schedule target for an escalation policy step, including its ID and resource type. This is a shortcut for a configured schedule target with position set to 'current'. + :type data: ScheduleTarget + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/configured_schedule_target_type.py b/src/datadog_api_client/v2/model/configured_schedule_target_type.py new file mode 100644 index 0000000000..f2c206644a --- /dev/null +++ b/src/datadog_api_client/v2/model/configured_schedule_target_type.py @@ -0,0 +1,35 @@ +# 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 ConfiguredScheduleTargetType(ModelSimple): + """ + Indicates that the resource is of type `schedule_target`. + + :param value: If omitted defaults to "schedule_target". Must be one of ["schedule_target"]. + :type value: str + """ + + allowed_values = { + "schedule_target", + } + SCHEDULE_TARGET: ClassVar["ConfiguredScheduleTargetType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ConfiguredScheduleTargetType.SCHEDULE_TARGET = ConfiguredScheduleTargetType("schedule_target") diff --git a/src/datadog_api_client/v2/model/escalation_policy.py b/src/datadog_api_client/v2/model/escalation_policy.py index 10a87101b9..9b323f729e 100644 --- a/src/datadog_api_client/v2/model/escalation_policy.py +++ b/src/datadog_api_client/v2/model/escalation_policy.py @@ -16,10 +16,11 @@ if TYPE_CHECKING: from datadog_api_client.v2.model.escalation_policy_data import EscalationPolicyData from datadog_api_client.v2.model.escalation_policy_included import EscalationPolicyIncluded - from datadog_api_client.v2.model.team_reference import TeamReference from datadog_api_client.v2.model.escalation_policy_step import EscalationPolicyStep from datadog_api_client.v2.model.escalation_policy_user import EscalationPolicyUser from datadog_api_client.v2.model.schedule_data import ScheduleData + from datadog_api_client.v2.model.configured_schedule import ConfiguredSchedule + from datadog_api_client.v2.model.team_reference import TeamReference class EscalationPolicy(ModelNormal): @@ -43,7 +44,14 @@ def __init__( data: Union[EscalationPolicyData, UnsetType] = unset, included: Union[ List[ - Union[EscalationPolicyIncluded, TeamReference, EscalationPolicyStep, EscalationPolicyUser, ScheduleData] + Union[ + EscalationPolicyIncluded, + EscalationPolicyStep, + EscalationPolicyUser, + ScheduleData, + ConfiguredSchedule, + TeamReference, + ] ], UnsetType, ] = unset, diff --git a/src/datadog_api_client/v2/model/escalation_policy_create_request_data_attributes.py b/src/datadog_api_client/v2/model/escalation_policy_create_request_data_attributes.py index 2d34a37a95..09e333db2c 100644 --- a/src/datadog_api_client/v2/model/escalation_policy_create_request_data_attributes.py +++ b/src/datadog_api_client/v2/model/escalation_policy_create_request_data_attributes.py @@ -20,6 +20,20 @@ class EscalationPolicyCreateRequestDataAttributes(ModelNormal): + validations = { + "name": { + "min_length": 1, + }, + "retries": { + "inclusive_maximum": 10, + "inclusive_minimum": 0, + }, + "steps": { + "max_items": 10, + "min_items": 1, + }, + } + @cached_property def openapi_types(_): from datadog_api_client.v2.model.escalation_policy_create_request_data_attributes_steps_items import ( diff --git a/src/datadog_api_client/v2/model/escalation_policy_create_request_data_attributes_steps_items.py b/src/datadog_api_client/v2/model/escalation_policy_create_request_data_attributes_steps_items.py index a98abdf315..26264fd58e 100644 --- a/src/datadog_api_client/v2/model/escalation_policy_create_request_data_attributes_steps_items.py +++ b/src/datadog_api_client/v2/model/escalation_policy_create_request_data_attributes_steps_items.py @@ -21,6 +21,13 @@ class EscalationPolicyCreateRequestDataAttributesStepsItems(ModelNormal): + validations = { + "escalate_after_seconds": { + "inclusive_maximum": 36000, + "inclusive_minimum": 60, + }, + } + @cached_property def openapi_types(_): from datadog_api_client.v2.model.escalation_policy_step_attributes_assignment import ( diff --git a/src/datadog_api_client/v2/model/escalation_policy_data_attributes.py b/src/datadog_api_client/v2/model/escalation_policy_data_attributes.py index 054623b340..f2d126341a 100644 --- a/src/datadog_api_client/v2/model/escalation_policy_data_attributes.py +++ b/src/datadog_api_client/v2/model/escalation_policy_data_attributes.py @@ -14,6 +14,16 @@ class EscalationPolicyDataAttributes(ModelNormal): + validations = { + "name": { + "min_length": 1, + }, + "retries": { + "inclusive_maximum": 10, + "inclusive_minimum": 0, + }, + } + @cached_property def openapi_types(_): return { diff --git a/src/datadog_api_client/v2/model/escalation_policy_included.py b/src/datadog_api_client/v2/model/escalation_policy_included.py index 155198a573..26292f77e2 100644 --- a/src/datadog_api_client/v2/model/escalation_policy_included.py +++ b/src/datadog_api_client/v2/model/escalation_policy_included.py @@ -15,17 +15,17 @@ def __init__(self, **kwargs): """ Represents included related resources when retrieving an escalation policy, such as teams, steps, or targets. - :param attributes: Encapsulates the basic attributes of a Team reference, such as name, handle, and an optional avatar or description. - :type attributes: TeamReferenceAttributes, optional + :param attributes: Defines attributes for an escalation policy step, such as assignment strategy and escalation timeout. + :type attributes: EscalationPolicyStepAttributes, optional - :param id: The team's unique identifier. + :param id: Specifies the unique identifier of this escalation policy step. :type id: str, optional - :param type: Teams resource type. - :type type: TeamReferenceType - :param relationships: Represents the relationship of an escalation policy step to its targets. :type relationships: EscalationPolicyStepRelationships, optional + + :param type: Indicates that the resource is of type `steps`. + :type type: EscalationPolicyStepType """ super().__init__(kwargs) @@ -38,16 +38,18 @@ def _composed_schemas(_): # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading - from datadog_api_client.v2.model.team_reference import TeamReference from datadog_api_client.v2.model.escalation_policy_step import EscalationPolicyStep from datadog_api_client.v2.model.escalation_policy_user import EscalationPolicyUser from datadog_api_client.v2.model.schedule_data import ScheduleData + from datadog_api_client.v2.model.configured_schedule import ConfiguredSchedule + from datadog_api_client.v2.model.team_reference import TeamReference return { "oneOf": [ - TeamReference, EscalationPolicyStep, EscalationPolicyUser, ScheduleData, + ConfiguredSchedule, + TeamReference, ], } diff --git a/src/datadog_api_client/v2/model/escalation_policy_step_target.py b/src/datadog_api_client/v2/model/escalation_policy_step_target.py index 04aceab8da..5fd1554f24 100644 --- a/src/datadog_api_client/v2/model/escalation_policy_step_target.py +++ b/src/datadog_api_client/v2/model/escalation_policy_step_target.py @@ -14,32 +14,40 @@ if TYPE_CHECKING: + from datadog_api_client.v2.model.escalation_policy_step_target_config import EscalationPolicyStepTargetConfig from datadog_api_client.v2.model.escalation_policy_step_target_type import EscalationPolicyStepTargetType class EscalationPolicyStepTarget(ModelNormal): @cached_property def openapi_types(_): + from datadog_api_client.v2.model.escalation_policy_step_target_config import EscalationPolicyStepTargetConfig from datadog_api_client.v2.model.escalation_policy_step_target_type import EscalationPolicyStepTargetType return { + "config": (EscalationPolicyStepTargetConfig,), "id": (str,), "type": (EscalationPolicyStepTargetType,), } attribute_map = { + "config": "config", "id": "id", "type": "type", } def __init__( self_, + config: Union[EscalationPolicyStepTargetConfig, UnsetType] = unset, id: Union[str, UnsetType] = unset, type: Union[EscalationPolicyStepTargetType, UnsetType] = unset, **kwargs, ): """ - Defines a single escalation target within a step for an escalation policy creation request. Contains ``id`` and ``type``. + Defines a single escalation target within a step for an escalation policy creation request. Contains ``id`` , ``type`` , and optional ``config``. + + :param config: Configuration for an escalation target, such as schedule position. + :type config: EscalationPolicyStepTargetConfig, optional :param id: Specifies the unique identifier for this target. :type id: str, optional @@ -47,6 +55,8 @@ def __init__( :param type: Specifies the type of escalation target (example ``users`` , ``schedules`` , or ``teams`` ). :type type: EscalationPolicyStepTargetType, optional """ + if config is not unset: + kwargs["config"] = config if id is not unset: kwargs["id"] = id if type is not unset: diff --git a/src/datadog_api_client/v2/model/escalation_policy_step_target_config.py b/src/datadog_api_client/v2/model/escalation_policy_step_target_config.py new file mode 100644 index 0000000000..59287128e5 --- /dev/null +++ b/src/datadog_api_client/v2/model/escalation_policy_step_target_config.py @@ -0,0 +1,46 @@ +# 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.escalation_policy_step_target_config_schedule import ( + EscalationPolicyStepTargetConfigSchedule, + ) + + +class EscalationPolicyStepTargetConfig(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.escalation_policy_step_target_config_schedule import ( + EscalationPolicyStepTargetConfigSchedule, + ) + + return { + "schedule": (EscalationPolicyStepTargetConfigSchedule,), + } + + attribute_map = { + "schedule": "schedule", + } + + def __init__(self_, schedule: Union[EscalationPolicyStepTargetConfigSchedule, UnsetType] = unset, **kwargs): + """ + Configuration for an escalation target, such as schedule position. + + :param schedule: Schedule-specific configuration for an escalation target. + :type schedule: EscalationPolicyStepTargetConfigSchedule, optional + """ + if schedule is not unset: + kwargs["schedule"] = schedule + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/escalation_policy_step_target_config_schedule.py b/src/datadog_api_client/v2/model/escalation_policy_step_target_config_schedule.py new file mode 100644 index 0000000000..b1bac2edc9 --- /dev/null +++ b/src/datadog_api_client/v2/model/escalation_policy_step_target_config_schedule.py @@ -0,0 +1,42 @@ +# 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.schedule_target_position import ScheduleTargetPosition + + +class EscalationPolicyStepTargetConfigSchedule(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.schedule_target_position import ScheduleTargetPosition + + return { + "position": (ScheduleTargetPosition,), + } + + attribute_map = { + "position": "position", + } + + def __init__(self_, position: Union[ScheduleTargetPosition, UnsetType] = unset, **kwargs): + """ + Schedule-specific configuration for an escalation target. + + :param position: Specifies the position of a schedule target (example ``previous`` , ``current`` , or ``next`` ). + :type position: ScheduleTargetPosition, optional + """ + if position is not unset: + kwargs["position"] = position + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/escalation_policy_update_request_data_attributes.py b/src/datadog_api_client/v2/model/escalation_policy_update_request_data_attributes.py index 101ec3256d..744f238ccb 100644 --- a/src/datadog_api_client/v2/model/escalation_policy_update_request_data_attributes.py +++ b/src/datadog_api_client/v2/model/escalation_policy_update_request_data_attributes.py @@ -20,6 +20,20 @@ class EscalationPolicyUpdateRequestDataAttributes(ModelNormal): + validations = { + "name": { + "min_length": 1, + }, + "retries": { + "inclusive_maximum": 10, + "inclusive_minimum": 0, + }, + "steps": { + "max_items": 10, + "min_items": 1, + }, + } + @cached_property def openapi_types(_): from datadog_api_client.v2.model.escalation_policy_update_request_data_attributes_steps_items import ( diff --git a/src/datadog_api_client/v2/model/escalation_policy_update_request_data_attributes_steps_items.py b/src/datadog_api_client/v2/model/escalation_policy_update_request_data_attributes_steps_items.py index 249bd95f73..f2829afd3e 100644 --- a/src/datadog_api_client/v2/model/escalation_policy_update_request_data_attributes_steps_items.py +++ b/src/datadog_api_client/v2/model/escalation_policy_update_request_data_attributes_steps_items.py @@ -21,6 +21,13 @@ class EscalationPolicyUpdateRequestDataAttributesStepsItems(ModelNormal): + validations = { + "escalate_after_seconds": { + "inclusive_maximum": 36000, + "inclusive_minimum": 60, + }, + } + @cached_property def openapi_types(_): from datadog_api_client.v2.model.escalation_policy_step_attributes_assignment import ( diff --git a/src/datadog_api_client/v2/model/escalation_target.py b/src/datadog_api_client/v2/model/escalation_target.py index 70e6c0b7f4..b3ab9ab559 100644 --- a/src/datadog_api_client/v2/model/escalation_target.py +++ b/src/datadog_api_client/v2/model/escalation_target.py @@ -13,7 +13,7 @@ class EscalationTarget(ModelComposed): def __init__(self, **kwargs): """ - Represents an escalation target, which can be a team, user, or schedule. + Represents an escalation target, which can be a team, user, schedule, or configured schedule target. :param id: Specifies the unique identifier of the team resource. :type id: str @@ -35,11 +35,13 @@ def _composed_schemas(_): from datadog_api_client.v2.model.team_target import TeamTarget from datadog_api_client.v2.model.user_target import UserTarget from datadog_api_client.v2.model.schedule_target import ScheduleTarget + from datadog_api_client.v2.model.configured_schedule_target import ConfiguredScheduleTarget return { "oneOf": [ TeamTarget, UserTarget, ScheduleTarget, + ConfiguredScheduleTarget, ], } diff --git a/src/datadog_api_client/v2/model/escalation_targets.py b/src/datadog_api_client/v2/model/escalation_targets.py index 7d493a5800..34125778e9 100644 --- a/src/datadog_api_client/v2/model/escalation_targets.py +++ b/src/datadog_api_client/v2/model/escalation_targets.py @@ -18,6 +18,7 @@ from datadog_api_client.v2.model.team_target import TeamTarget from datadog_api_client.v2.model.user_target import UserTarget from datadog_api_client.v2.model.schedule_target import ScheduleTarget + from datadog_api_client.v2.model.configured_schedule_target import ConfiguredScheduleTarget class EscalationTargets(ModelNormal): @@ -35,7 +36,9 @@ def openapi_types(_): def __init__( self_, - data: Union[List[Union[EscalationTarget, TeamTarget, UserTarget, ScheduleTarget]], UnsetType] = unset, + data: Union[ + List[Union[EscalationTarget, TeamTarget, UserTarget, ScheduleTarget, ConfiguredScheduleTarget]], UnsetType + ] = unset, **kwargs, ): """ diff --git a/src/datadog_api_client/v2/model/schedule_target.py b/src/datadog_api_client/v2/model/schedule_target.py index a11272e137..3d3998cc5b 100644 --- a/src/datadog_api_client/v2/model/schedule_target.py +++ b/src/datadog_api_client/v2/model/schedule_target.py @@ -32,7 +32,7 @@ def openapi_types(_): def __init__(self_, id: str, type: ScheduleTargetType, **kwargs): """ - Represents a schedule target for an escalation policy step, including its ID and resource type. + Represents a schedule target for an escalation policy step, including its ID and resource type. This is a shortcut for a configured schedule target with position set to 'current'. :param id: Specifies the unique identifier of the schedule resource. :type id: str diff --git a/src/datadog_api_client/v2/model/schedule_target_position.py b/src/datadog_api_client/v2/model/schedule_target_position.py new file mode 100644 index 0000000000..18be02e2d5 --- /dev/null +++ b/src/datadog_api_client/v2/model/schedule_target_position.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 ScheduleTargetPosition(ModelSimple): + """ + Specifies the position of a schedule target (example `previous`, `current`, or `next`). + + :param value: Must be one of ["previous", "current", "next"]. + :type value: str + """ + + allowed_values = { + "previous", + "current", + "next", + } + PREVIOUS: ClassVar["ScheduleTargetPosition"] + CURRENT: ClassVar["ScheduleTargetPosition"] + NEXT: ClassVar["ScheduleTargetPosition"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ScheduleTargetPosition.PREVIOUS = ScheduleTargetPosition("previous") +ScheduleTargetPosition.CURRENT = ScheduleTargetPosition("current") +ScheduleTargetPosition.NEXT = ScheduleTargetPosition("next") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 9cece11cff..f7eead41c8 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -845,6 +845,14 @@ from datadog_api_client.v2.model.config_cat_sdk_key import ConfigCatSDKKey from datadog_api_client.v2.model.config_cat_sdk_key_type import ConfigCatSDKKeyType from datadog_api_client.v2.model.config_cat_sdk_key_update import ConfigCatSDKKeyUpdate +from datadog_api_client.v2.model.configured_schedule import ConfiguredSchedule +from datadog_api_client.v2.model.configured_schedule_target import ConfiguredScheduleTarget +from datadog_api_client.v2.model.configured_schedule_target_attributes import ConfiguredScheduleTargetAttributes +from datadog_api_client.v2.model.configured_schedule_target_relationships import ConfiguredScheduleTargetRelationships +from datadog_api_client.v2.model.configured_schedule_target_relationships_schedule import ( + ConfiguredScheduleTargetRelationshipsSchedule, +) +from datadog_api_client.v2.model.configured_schedule_target_type import ConfiguredScheduleTargetType from datadog_api_client.v2.model.confluent_account_create_request import ConfluentAccountCreateRequest from datadog_api_client.v2.model.confluent_account_create_request_attributes import ( ConfluentAccountCreateRequestAttributes, @@ -1581,6 +1589,10 @@ ) from datadog_api_client.v2.model.escalation_policy_step_relationships import EscalationPolicyStepRelationships from datadog_api_client.v2.model.escalation_policy_step_target import EscalationPolicyStepTarget +from datadog_api_client.v2.model.escalation_policy_step_target_config import EscalationPolicyStepTargetConfig +from datadog_api_client.v2.model.escalation_policy_step_target_config_schedule import ( + EscalationPolicyStepTargetConfigSchedule, +) from datadog_api_client.v2.model.escalation_policy_step_target_type import EscalationPolicyStepTargetType from datadog_api_client.v2.model.escalation_policy_step_type import EscalationPolicyStepType from datadog_api_client.v2.model.escalation_policy_update_request import EscalationPolicyUpdateRequest @@ -3993,6 +4005,7 @@ ScheduleRequestDataAttributesLayersItemsMembersItemsUser, ) from datadog_api_client.v2.model.schedule_target import ScheduleTarget +from datadog_api_client.v2.model.schedule_target_position import ScheduleTargetPosition from datadog_api_client.v2.model.schedule_target_type import ScheduleTargetType from datadog_api_client.v2.model.schedule_trigger import ScheduleTrigger from datadog_api_client.v2.model.schedule_trigger_wrapper import ScheduleTriggerWrapper @@ -5571,6 +5584,12 @@ "ConfigCatSDKKey", "ConfigCatSDKKeyType", "ConfigCatSDKKeyUpdate", + "ConfiguredSchedule", + "ConfiguredScheduleTarget", + "ConfiguredScheduleTargetAttributes", + "ConfiguredScheduleTargetRelationships", + "ConfiguredScheduleTargetRelationshipsSchedule", + "ConfiguredScheduleTargetType", "ConfluentAccountCreateRequest", "ConfluentAccountCreateRequestAttributes", "ConfluentAccountCreateRequestData", @@ -6087,6 +6106,8 @@ "EscalationPolicyStepAttributesAssignment", "EscalationPolicyStepRelationships", "EscalationPolicyStepTarget", + "EscalationPolicyStepTargetConfig", + "EscalationPolicyStepTargetConfigSchedule", "EscalationPolicyStepTargetType", "EscalationPolicyStepType", "EscalationPolicyUpdateRequest", @@ -7813,6 +7834,7 @@ "ScheduleRequestDataAttributesLayersItemsMembersItems", "ScheduleRequestDataAttributesLayersItemsMembersItemsUser", "ScheduleTarget", + "ScheduleTargetPosition", "ScheduleTargetType", "ScheduleTrigger", "ScheduleTriggerWrapper", diff --git a/tests/v2/cassettes/test_scenarios/test_create_oncall_escalation_policy_returns_created_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_oncall_escalation_policy_returns_created_response.frozen index b8ab6c2926..d47e0da1fa 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_oncall_escalation_policy_returns_created_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_create_oncall_escalation_policy_returns_created_response.frozen @@ -1 +1 @@ -2025-05-29T04:53:30.847Z \ No newline at end of file +2025-11-28T12:58:56.434Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_oncall_escalation_policy_returns_created_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_oncall_escalation_policy_returns_created_response.yaml index 1a75cbc8a8..61920393da 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_oncall_escalation_policy_returns_created_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_create_oncall_escalation_policy_returns_created_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Create_On_Call_escalation_policy_returns_Created_response-1748494410@datadoghq.com","title":"user + body: '{"data":{"attributes":{"email":"Test-Create_On_Call_escalation_policy_returns_Created_response-1764334736@datadoghq.com","title":"user title"},"type":"users"}}' headers: accept: @@ -11,8 +11,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/users response: body: - string: '{"data":{"type":"users","id":"de86b01f-3c48-11f0-927d-aedf77869272","attributes":{"name":null,"handle":"test-create_on_call_escalation_policy_returns_created_response-1748494410@datadoghq.com","created_at":"2025-05-29T04:53:31.716641+00:00","modified_at":"2025-05-29T04:53:31.716641+00:00","email":"test-create_on_call_escalation_policy_returns_created_response-1748494410@datadoghq.com","icon":"https://secure.gravatar.com/avatar/bd817280fe52b9652bd2877bf9041f78?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + string: '{"data":{"type":"users","id":"005f5c53-cc5a-11f0-84fc-d6e063989c3f","attributes":{"name":null,"handle":"test-create_on_call_escalation_policy_returns_created_response-1764334736@datadoghq.com","created_at":"2025-11-28T12:58:57.385841+00:00","modified_at":"2025-11-28T12:58:57.385841+00:00","email":"test-create_on_call_escalation_policy_returns_created_response-1764334736@datadoghq.com","icon":"https://secure.gravatar.com/avatar/990f6066d8c3647475a637255f95cc7f?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' headers: @@ -22,8 +22,8 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T04:53:30.847Z","end_date":"2025-06-08T04:53:30.847Z","interval":{"days":1},"members":[{"user":{"id":"de86b01f-3c48-11f0-927d-aedf77869272"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T04:53:30.847Z"}],"name":"Test-Create_On_Call_escalation_policy_returns_Created_response-1748494410","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-18T12:58:56.434Z","end_date":"2025-12-08T12:58:56.434Z","interval":{"days":1},"members":[{"user":{"id":"005f5c53-cc5a-11f0-84fc-d6e063989c3f"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-23T12:58:56.434Z"}],"name":"Test-Create_On_Call_escalation_policy_returns_Created_response-1764334736","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: accept: - application/json @@ -33,7 +33,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/on-call/schedules response: body: - string: '{"data":{"id":"2e70ff45-cb63-4609-900b-cc9fe95e063b","type":"schedules","attributes":{"name":"Test-Create_On_Call_escalation_policy_returns_Created_response-1748494410","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"f1949bc4-1f01-4081-8002-d6029ace0bc9","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"c6a8f167-908f-4ca5-ba30-a33a00adfe11","type":"schedules","attributes":{"name":"Test-Create_On_Call_escalation_policy_returns_Created_response-1764334736","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"928407db-da13-4516-bd6a-3b92e3095b56","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -41,7 +41,7 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"handle":"test-handle-cfbc9f18713005c6","name":"test-name-cfbc9f18713005c6"},"type":"team"}}' + body: '{"data":{"attributes":{"handle":"test-handle-24ceda96b794cbdd","name":"test-name-24ceda96b794cbdd"},"type":"team"}}' headers: accept: - application/json @@ -51,17 +51,15 @@ interactions: uri: https://api.datadoghq.com/api/v2/team response: body: - string: '{"data":{"type":"team","id":"fa4d082c-6733-4bd0-9083-f7bf2f8d4259","attributes":{"name":"test-name-cfbc9f18713005c6","handle":"test-handle-cfbc9f18713005c6","summary":null,"description":null,"avatar":null,"banner":14,"visible_modules":[],"hidden_modules":[],"created_at":"2025-05-29T04:53:32.646359+00:00","modified_at":"2025-05-29T04:53:32.646369+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/fa4d082c-6733-4bd0-9083-f7bf2f8d4259/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/fa4d082c-6733-4bd0-9083-f7bf2f8d4259/permission-settings"}}}}} - - ' + string: '{"data":{"id":"e5057194-b5fd-4ff5-b9d3-6977d8bbd774","type":"team","attributes":{"avatar":null,"banner":1,"created_at":"2025-11-28T12:58:58.058854+00:00","description":null,"handle":"test-handle-24ceda96b794cbdd","hidden_modules":[],"link_count":0,"modified_at":"2025-11-28T12:58:58.058854+00:00","name":"test-name-24ceda96b794cbdd","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/e5057194-b5fd-4ff5-b9d3-6977d8bbd774/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/e5057194-b5fd-4ff5-b9d3-6977d8bbd774/permission-settings"}}}}}' headers: content-type: - - application/json + - application/vnd.api+json status: code: 201 message: Created - request: - body: '{"data":{"attributes":{"name":"Test-Create_On_Call_escalation_policy_returns_Created_response-1748494410","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"de86b01f-3c48-11f0-927d-aedf77869272","type":"users"},{"id":"2e70ff45-cb63-4609-900b-cc9fe95e063b","type":"schedules"},{"id":"fa4d082c-6733-4bd0-9083-f7bf2f8d4259","type":"teams"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"fa4d082c-6733-4bd0-9083-f7bf2f8d4259","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"fa4d082c-6733-4bd0-9083-f7bf2f8d4259","type":"teams"}]}},"type":"policies"}}' + body: '{"data":{"attributes":{"name":"Test-Create_On_Call_escalation_policy_returns_Created_response-1764334736","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"005f5c53-cc5a-11f0-84fc-d6e063989c3f","type":"users"},{"id":"c6a8f167-908f-4ca5-ba30-a33a00adfe11","type":"schedules"},{"config":{"schedule":{"position":"previous"}},"id":"c6a8f167-908f-4ca5-ba30-a33a00adfe11","type":"schedules"},{"id":"e5057194-b5fd-4ff5-b9d3-6977d8bbd774","type":"teams"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"e5057194-b5fd-4ff5-b9d3-6977d8bbd774","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"e5057194-b5fd-4ff5-b9d3-6977d8bbd774","type":"teams"}]}},"type":"policies"}}' headers: accept: - application/json @@ -71,7 +69,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies?include=steps.targets response: body: - string: '{"data":{"id":"cf3a523c-3ca3-4ac4-aee2-7afaac13c6f7","type":"policies","attributes":{"name":"Test-Create_On_Call_escalation_policy_returns_Created_response-1748494410","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"ba22e9ae-1740-4522-b95c-26f601a37484","type":"steps"},{"id":"335dc81f-929a-47e1-a8f8-cc7830c2d272","type":"steps"}]},"teams":{"data":[{"id":"fa4d082c-6733-4bd0-9083-f7bf2f8d4259","type":"teams"}]}}},"included":[{"id":"ba22e9ae-1740-4522-b95c-26f601a37484","type":"steps","attributes":{"assignment":"default","escalate_after_seconds":3600},"relationships":{"targets":{"data":[{"id":"de86b01f-3c48-11f0-927d-aedf77869272","type":"users"},{"id":"2e70ff45-cb63-4609-900b-cc9fe95e063b","type":"schedules"},{"id":"fa4d082c-6733-4bd0-9083-f7bf2f8d4259","type":"teams"}]}}},{"id":"335dc81f-929a-47e1-a8f8-cc7830c2d272","type":"steps","attributes":{"assignment":"round-robin","escalate_after_seconds":3600},"relationships":{"targets":{"data":[{"id":"fa4d082c-6733-4bd0-9083-f7bf2f8d4259","type":"teams"}]}}},{"id":"de86b01f-3c48-11f0-927d-aedf77869272","type":"users","attributes":{"email":"test-create_on_call_escalation_policy_returns_created_response-1748494410@datadoghq.com","name":"","status":"pending"}},{"id":"2e70ff45-cb63-4609-900b-cc9fe95e063b","type":"schedules","attributes":{"name":"Test-Create_On_Call_escalation_policy_returns_Created_response-1748494410","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"f1949bc4-1f01-4081-8002-d6029ace0bc9","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}},{"id":"fa4d082c-6733-4bd0-9083-f7bf2f8d4259","type":"teams","attributes":{"avatar":"","description":"","handle":"test-handle-cfbc9f18713005c6","name":"test-name-cfbc9f18713005c6"}}]}' + string: '{"data":{"id":"84f3ac2b-77da-42f2-a2bb-cb9a5ea9cf55","type":"policies","attributes":{"name":"Test-Create_On_Call_escalation_policy_returns_Created_response-1764334736","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"055817d0-41cb-402f-bb93-0d5989083cd1","type":"steps"},{"id":"ddab41bb-c15d-4ad8-bf29-8d0ddcbb2df1","type":"steps"}]},"teams":{"data":[{"id":"e5057194-b5fd-4ff5-b9d3-6977d8bbd774","type":"teams"}]}}},"included":[{"id":"055817d0-41cb-402f-bb93-0d5989083cd1","type":"steps","attributes":{"assignment":"default","escalate_after_seconds":3600},"relationships":{"targets":{"data":[{"id":"005f5c53-cc5a-11f0-84fc-d6e063989c3f","type":"users"},{"id":"c6a8f167-908f-4ca5-ba30-a33a00adfe11","type":"schedules"},{"id":"c6a8f167-908f-4ca5-ba30-a33a00adfe11_previous","type":"schedule_target"},{"id":"e5057194-b5fd-4ff5-b9d3-6977d8bbd774","type":"teams"}]}}},{"id":"c6a8f167-908f-4ca5-ba30-a33a00adfe11_previous","type":"schedule_target","attributes":{"position":"previous"},"relationships":{"schedule":{"data":{"id":"c6a8f167-908f-4ca5-ba30-a33a00adfe11","type":"schedules"}}}},{"id":"ddab41bb-c15d-4ad8-bf29-8d0ddcbb2df1","type":"steps","attributes":{"assignment":"round-robin","escalate_after_seconds":3600},"relationships":{"targets":{"data":[{"id":"e5057194-b5fd-4ff5-b9d3-6977d8bbd774","type":"teams"}]}}},{"id":"005f5c53-cc5a-11f0-84fc-d6e063989c3f","type":"users","attributes":{"email":"test-create_on_call_escalation_policy_returns_created_response-1764334736@datadoghq.com","name":"","status":"pending"}},{"id":"c6a8f167-908f-4ca5-ba30-a33a00adfe11","type":"schedules","attributes":{"name":"Test-Create_On_Call_escalation_policy_returns_Created_response-1764334736","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"928407db-da13-4516-bd6a-3b92e3095b56","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}},{"id":"e5057194-b5fd-4ff5-b9d3-6977d8bbd774","type":"teams","attributes":{"avatar":"","description":"","handle":"test-handle-24ceda96b794cbdd","name":"test-name-24ceda96b794cbdd"}}]}' headers: content-type: - application/vnd.api+json @@ -84,7 +82,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/cf3a523c-3ca3-4ac4-aee2-7afaac13c6f7 + uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/84f3ac2b-77da-42f2-a2bb-cb9a5ea9cf55 response: body: string: '' @@ -98,7 +96,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/fa4d082c-6733-4bd0-9083-f7bf2f8d4259 + uri: https://api.datadoghq.com/api/v2/team/e5057194-b5fd-4ff5-b9d3-6977d8bbd774 response: body: string: '' @@ -112,7 +110,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/2e70ff45-cb63-4609-900b-cc9fe95e063b + uri: https://api.datadoghq.com/api/v2/on-call/schedules/c6a8f167-908f-4ca5-ba30-a33a00adfe11 response: body: string: '' @@ -126,7 +124,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/de86b01f-3c48-11f0-927d-aedf77869272 + uri: https://api.datadoghq.com/api/v2/users/005f5c53-cc5a-11f0-84fc-d6e063989c3f response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_create_oncall_schedule_returns_created_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_oncall_schedule_returns_created_response.frozen index 47ee6d1da6..59b299377c 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_oncall_schedule_returns_created_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_create_oncall_schedule_returns_created_response.frozen @@ -1 +1 @@ -2025-05-29T04:53:37.175Z \ No newline at end of file +2025-11-27T14:11:22.484Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_oncall_schedule_returns_created_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_oncall_schedule_returns_created_response.yaml index 2fb099f0d0..fa42698ffc 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_oncall_schedule_returns_created_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_create_oncall_schedule_returns_created_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Create_On_Call_schedule_returns_Created_response-1748494417@datadoghq.com","title":"user + body: '{"data":{"attributes":{"email":"Test-Create_On_Call_schedule_returns_Created_response-1764252682@datadoghq.com","title":"user title"},"type":"users"}}' headers: accept: @@ -11,8 +11,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/users response: body: - string: '{"data":{"type":"users","id":"e2438320-3c48-11f0-b6eb-6e406f40657f","attributes":{"name":null,"handle":"test-create_on_call_schedule_returns_created_response-1748494417@datadoghq.com","created_at":"2025-05-29T04:53:37.987288+00:00","modified_at":"2025-05-29T04:53:37.987288+00:00","email":"test-create_on_call_schedule_returns_created_response-1748494417@datadoghq.com","icon":"https://secure.gravatar.com/avatar/61f85c2f88e7f4fa078405eae231fb73?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + string: '{"data":{"type":"users","id":"f4106d12-cb9a-11f0-a56e-4e680b759023","attributes":{"name":null,"handle":"test-create_on_call_schedule_returns_created_response-1764252682@datadoghq.com","created_at":"2025-11-27T14:11:22.860522+00:00","modified_at":"2025-11-27T14:11:22.860522+00:00","email":"test-create_on_call_schedule_returns_created_response-1764252682@datadoghq.com","icon":"https://secure.gravatar.com/avatar/97f54253d0353bf6811320274d5cf8eb?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' headers: @@ -22,7 +22,7 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"handle":"test-handle-0ed4255faa1a4de8","name":"test-name-0ed4255faa1a4de8"},"type":"team"}}' + body: '{"data":{"attributes":{"handle":"test-handle-a115b862e893678b","name":"test-name-a115b862e893678b"},"type":"team"}}' headers: accept: - application/json @@ -32,18 +32,16 @@ interactions: uri: https://api.datadoghq.com/api/v2/team response: body: - string: '{"data":{"type":"team","id":"8c44e5e8-f1f0-4e12-ada2-f91c9aeab153","attributes":{"name":"test-name-0ed4255faa1a4de8","handle":"test-handle-0ed4255faa1a4de8","summary":null,"description":null,"avatar":null,"banner":5,"visible_modules":[],"hidden_modules":[],"created_at":"2025-05-29T04:53:38.641602+00:00","modified_at":"2025-05-29T04:53:38.641612+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/8c44e5e8-f1f0-4e12-ada2-f91c9aeab153/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/8c44e5e8-f1f0-4e12-ada2-f91c9aeab153/permission-settings"}}}}} - - ' + string: '{"data":{"id":"8802359f-5663-4ed4-b3c8-06d5618def25","type":"team","attributes":{"avatar":null,"banner":2,"created_at":"2025-11-27T14:11:23.389409+00:00","description":null,"handle":"test-handle-a115b862e893678b","hidden_modules":[],"link_count":0,"modified_at":"2025-11-27T14:11:23.389409+00:00","name":"test-name-a115b862e893678b","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/8802359f-5663-4ed4-b3c8-06d5618def25/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/8802359f-5663-4ed4-b3c8-06d5618def25/permission-settings"}}}}}' headers: content-type: - - application/json + - application/vnd.api+json status: code: 201 message: Created - request: - body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T04:53:37.175Z","end_date":"2025-06-08T04:53:37.175Z","interval":{"days":1},"members":[{"user":{"id":"e2438320-3c48-11f0-b6eb-6e406f40657f"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T04:53:37.175Z"}],"name":"Test-Create_On_Call_schedule_returns_Created_response-1748494417","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"8c44e5e8-f1f0-4e12-ada2-f91c9aeab153","type":"teams"}]}},"type":"schedules"}}' + body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:22.484Z","end_date":"2025-12-07T14:11:22.484Z","interval":{"days":1},"members":[{"user":{"id":"f4106d12-cb9a-11f0-a56e-4e680b759023"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:22.484Z"}],"name":"Test-Create_On_Call_schedule_returns_Created_response-1764252682","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"8802359f-5663-4ed4-b3c8-06d5618def25","type":"teams"}]}},"type":"schedules"}}' headers: accept: - application/json @@ -53,7 +51,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/on-call/schedules response: body: - string: '{"data":{"id":"e57f69cc-5f56-41bf-abd2-69196d0b4b41","type":"schedules","attributes":{"name":"Test-Create_On_Call_schedule_returns_Created_response-1748494417","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"7cb8837f-5ebd-46c7-914d-d017eae7f3fc","type":"layers"}]},"teams":{"data":[{"id":"8c44e5e8-f1f0-4e12-ada2-f91c9aeab153","type":"teams"}]}}}}' + string: '{"data":{"id":"f56173aa-b72e-4a29-a9dd-e8a4fe57f47a","type":"schedules","attributes":{"name":"Test-Create_On_Call_schedule_returns_Created_response-1764252682","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"886b9854-9487-4b13-a4a1-955922ced1cf","type":"layers"}]},"teams":{"data":[{"id":"8802359f-5663-4ed4-b3c8-06d5618def25","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -66,7 +64,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/e57f69cc-5f56-41bf-abd2-69196d0b4b41 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/f56173aa-b72e-4a29-a9dd-e8a4fe57f47a response: body: string: '' @@ -80,7 +78,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/8c44e5e8-f1f0-4e12-ada2-f91c9aeab153 + uri: https://api.datadoghq.com/api/v2/team/8802359f-5663-4ed4-b3c8-06d5618def25 response: body: string: '' @@ -94,7 +92,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/e2438320-3c48-11f0-b6eb-6e406f40657f + uri: https://api.datadoghq.com/api/v2/users/f4106d12-cb9a-11f0-a56e-4e680b759023 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_delete_oncall_escalation_policy_returns_no_content_response.frozen b/tests/v2/cassettes/test_scenarios/test_delete_oncall_escalation_policy_returns_no_content_response.frozen index c28891b940..214a0e6a9b 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_oncall_escalation_policy_returns_no_content_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_delete_oncall_escalation_policy_returns_no_content_response.frozen @@ -1 +1 @@ -2025-05-29T04:53:42.215Z \ No newline at end of file +2025-11-27T14:11:25.538Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_oncall_escalation_policy_returns_no_content_response.yaml b/tests/v2/cassettes/test_scenarios/test_delete_oncall_escalation_policy_returns_no_content_response.yaml index 987a1d6c90..c3d6674bcb 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_oncall_escalation_policy_returns_no_content_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_delete_oncall_escalation_policy_returns_no_content_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1748494422@datadoghq.com","title":"user + body: '{"data":{"attributes":{"email":"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1764252685@datadoghq.com","title":"user title"},"type":"users"}}' headers: accept: @@ -11,8 +11,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/users response: body: - string: '{"data":{"type":"users","id":"e524a559-3c48-11f0-b6eb-6e406f40657f","attributes":{"name":null,"handle":"test-delete_on_call_escalation_policy_returns_no_content_response-1748494422@datadoghq.com","created_at":"2025-05-29T04:53:42.818165+00:00","modified_at":"2025-05-29T04:53:42.818165+00:00","email":"test-delete_on_call_escalation_policy_returns_no_content_response-1748494422@datadoghq.com","icon":"https://secure.gravatar.com/avatar/89925b9919d7e93a599c4d49d51b35ee?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + string: '{"data":{"type":"users","id":"f5e7c666-cb9a-11f0-ae87-2a5e5028fcef","attributes":{"name":null,"handle":"test-delete_on_call_escalation_policy_returns_no_content_response-1764252685@datadoghq.com","created_at":"2025-11-27T14:11:25.949558+00:00","modified_at":"2025-11-27T14:11:25.949558+00:00","email":"test-delete_on_call_escalation_policy_returns_no_content_response-1764252685@datadoghq.com","icon":"https://secure.gravatar.com/avatar/92ce6e94a63e99ed9306c4b09eb69918?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' headers: @@ -22,7 +22,7 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"handle":"test-handle-7311534a0fd625d8","name":"test-name-7311534a0fd625d8"},"type":"team"}}' + body: '{"data":{"attributes":{"handle":"test-handle-5d85b5aacd02cab9","name":"test-name-5d85b5aacd02cab9"},"type":"team"}}' headers: accept: - application/json @@ -32,18 +32,16 @@ interactions: uri: https://api.datadoghq.com/api/v2/team response: body: - string: '{"data":{"type":"team","id":"5007e30b-5736-4abe-be9c-51cf508c9554","attributes":{"name":"test-name-7311534a0fd625d8","handle":"test-handle-7311534a0fd625d8","summary":null,"description":null,"avatar":null,"banner":10,"visible_modules":[],"hidden_modules":[],"created_at":"2025-05-29T04:53:43.705893+00:00","modified_at":"2025-05-29T04:53:43.705903+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/5007e30b-5736-4abe-be9c-51cf508c9554/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/5007e30b-5736-4abe-be9c-51cf508c9554/permission-settings"}}}}} - - ' + string: '{"data":{"id":"a42481db-6918-45ef-a923-5548004f044a","type":"team","attributes":{"avatar":null,"banner":9,"created_at":"2025-11-27T14:11:26.456007+00:00","description":null,"handle":"test-handle-5d85b5aacd02cab9","hidden_modules":[],"link_count":0,"modified_at":"2025-11-27T14:11:26.456008+00:00","name":"test-name-5d85b5aacd02cab9","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/a42481db-6918-45ef-a923-5548004f044a/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/a42481db-6918-45ef-a923-5548004f044a/permission-settings"}}}}}' headers: content-type: - - application/json + - application/vnd.api+json status: code: 201 message: Created - request: - body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T04:53:42.215Z","end_date":"2025-06-08T04:53:42.215Z","interval":{"days":1},"members":[{"user":{"id":"e524a559-3c48-11f0-b6eb-6e406f40657f"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T04:53:42.215Z"}],"name":"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1748494422","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:25.538Z","end_date":"2025-12-07T14:11:25.538Z","interval":{"days":1},"members":[{"user":{"id":"f5e7c666-cb9a-11f0-ae87-2a5e5028fcef"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:25.538Z"}],"name":"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1764252685","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: accept: - application/json @@ -53,7 +51,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/on-call/schedules response: body: - string: '{"data":{"id":"5bedf04a-b064-4748-861d-2f32970de31e","type":"schedules","attributes":{"name":"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1748494422","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"242425ed-6c98-4bda-b0eb-8eb0d66fc40f","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"cf196f34-3ce0-4cff-a27e-ed5035db9442","type":"schedules","attributes":{"name":"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1764252685","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"2f2ea0a9-a33e-4d2f-9a0b-5cbfb0bed071","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -61,7 +59,7 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"name":"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1748494422","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"5007e30b-5736-4abe-be9c-51cf508c9554","type":"teams"},{"id":"5bedf04a-b064-4748-861d-2f32970de31e","type":"schedules"},{"id":"e524a559-3c48-11f0-b6eb-6e406f40657f","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"5007e30b-5736-4abe-be9c-51cf508c9554","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"5007e30b-5736-4abe-be9c-51cf508c9554","type":"teams"}]}},"type":"policies"}}' + body: '{"data":{"attributes":{"name":"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1764252685","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"a42481db-6918-45ef-a923-5548004f044a","type":"teams"},{"id":"cf196f34-3ce0-4cff-a27e-ed5035db9442","type":"schedules"},{"config":{"schedule":{"position":"previous"}},"id":"cf196f34-3ce0-4cff-a27e-ed5035db9442","type":"schedules"},{"id":"f5e7c666-cb9a-11f0-ae87-2a5e5028fcef","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"a42481db-6918-45ef-a923-5548004f044a","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"a42481db-6918-45ef-a923-5548004f044a","type":"teams"}]}},"type":"policies"}}' headers: accept: - application/json @@ -71,7 +69,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies response: body: - string: '{"data":{"id":"897cc698-80ee-47cf-b59a-130323f2d483","type":"policies","attributes":{"name":"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1748494422","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"70f924ad-d57b-4b37-92b1-adc275a37923","type":"steps"},{"id":"06639547-3fbf-431c-9719-c7211a3d34aa","type":"steps"}]},"teams":{"data":[{"id":"5007e30b-5736-4abe-be9c-51cf508c9554","type":"teams"}]}}}}' + string: '{"data":{"id":"c25d7cd6-d2bc-4d84-801b-3a09d62e29bc","type":"policies","attributes":{"name":"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1764252685","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"b445f325-7fca-44d5-a7e2-2a16e8bc2837","type":"steps"},{"id":"b9c6527e-9c8d-4c93-92cf-100b5c180a1e","type":"steps"}]},"teams":{"data":[{"id":"a42481db-6918-45ef-a923-5548004f044a","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -84,7 +82,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/897cc698-80ee-47cf-b59a-130323f2d483 + uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/c25d7cd6-d2bc-4d84-801b-3a09d62e29bc response: body: string: '' @@ -98,10 +96,10 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/897cc698-80ee-47cf-b59a-130323f2d483 + uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/c25d7cd6-d2bc-4d84-801b-3a09d62e29bc response: body: - string: '{"errors":[{"title":"Generic Error","detail":"escalation_policy[897cc698-80ee-47cf-b59a-130323f2d483] + string: '{"errors":[{"title":"Generic Error","detail":"escalation_policy[c25d7cd6-d2bc-4d84-801b-3a09d62e29bc] not found"}]}' headers: content-type: @@ -115,7 +113,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/5bedf04a-b064-4748-861d-2f32970de31e + uri: https://api.datadoghq.com/api/v2/on-call/schedules/cf196f34-3ce0-4cff-a27e-ed5035db9442 response: body: string: '' @@ -129,7 +127,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/5007e30b-5736-4abe-be9c-51cf508c9554 + uri: https://api.datadoghq.com/api/v2/team/a42481db-6918-45ef-a923-5548004f044a response: body: string: '' @@ -143,7 +141,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/e524a559-3c48-11f0-b6eb-6e406f40657f + uri: https://api.datadoghq.com/api/v2/users/f5e7c666-cb9a-11f0-ae87-2a5e5028fcef response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_delete_oncall_schedule_returns_no_content_response.frozen b/tests/v2/cassettes/test_scenarios/test_delete_oncall_schedule_returns_no_content_response.frozen index faf0350066..41f7853784 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_oncall_schedule_returns_no_content_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_delete_oncall_schedule_returns_no_content_response.frozen @@ -1 +1 @@ -2025-05-29T04:53:48.818Z \ No newline at end of file +2025-11-27T14:11:30.983Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_oncall_schedule_returns_no_content_response.yaml b/tests/v2/cassettes/test_scenarios/test_delete_oncall_schedule_returns_no_content_response.yaml index 509f500b3d..d5750456ad 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_oncall_schedule_returns_no_content_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_delete_oncall_schedule_returns_no_content_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Delete_On_Call_schedule_returns_No_Content_response-1748494428@datadoghq.com","title":"user + body: '{"data":{"attributes":{"email":"Test-Delete_On_Call_schedule_returns_No_Content_response-1764252690@datadoghq.com","title":"user title"},"type":"users"}}' headers: accept: @@ -11,8 +11,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/users response: body: - string: '{"data":{"type":"users","id":"e913c34d-3c48-11f0-b10e-2e2b611e1022","attributes":{"name":null,"handle":"test-delete_on_call_schedule_returns_no_content_response-1748494428@datadoghq.com","created_at":"2025-05-29T04:53:49.418406+00:00","modified_at":"2025-05-29T04:53:49.418406+00:00","email":"test-delete_on_call_schedule_returns_no_content_response-1748494428@datadoghq.com","icon":"https://secure.gravatar.com/avatar/97e38917640a0eb3c61f6e1219165929?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + string: '{"data":{"type":"users","id":"f9249a49-cb9a-11f0-a56e-4e680b759023","attributes":{"name":null,"handle":"test-delete_on_call_schedule_returns_no_content_response-1764252690@datadoghq.com","created_at":"2025-11-27T14:11:31.381378+00:00","modified_at":"2025-11-27T14:11:31.381378+00:00","email":"test-delete_on_call_schedule_returns_no_content_response-1764252690@datadoghq.com","icon":"https://secure.gravatar.com/avatar/4d40d1e80a1a87fede5c7a11db2bf7f2?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' headers: @@ -22,8 +22,8 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T04:53:48.818Z","end_date":"2025-06-08T04:53:48.818Z","interval":{"days":1},"members":[{"user":{"id":"e913c34d-3c48-11f0-b10e-2e2b611e1022"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T04:53:48.818Z"}],"name":"Test-Delete_On_Call_schedule_returns_No_Content_response-1748494428","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:30.983Z","end_date":"2025-12-07T14:11:30.983Z","interval":{"days":1},"members":[{"user":{"id":"f9249a49-cb9a-11f0-a56e-4e680b759023"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:30.983Z"}],"name":"Test-Delete_On_Call_schedule_returns_No_Content_response-1764252690","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: accept: - application/json @@ -33,7 +33,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/on-call/schedules response: body: - string: '{"data":{"id":"4068aec3-24f3-41c6-8778-72f8754684c3","type":"schedules","attributes":{"name":"Test-Delete_On_Call_schedule_returns_No_Content_response-1748494428","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"671b7e9e-1bcf-4e7a-817e-3b825b7dd3e6","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"10acf747-60a0-4bdf-a0df-196e9f9291e2","type":"schedules","attributes":{"name":"Test-Delete_On_Call_schedule_returns_No_Content_response-1764252690","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"806b7079-20af-41d1-9f50-badf49b324f5","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -46,7 +46,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/4068aec3-24f3-41c6-8778-72f8754684c3 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/10acf747-60a0-4bdf-a0df-196e9f9291e2 response: body: string: '' @@ -60,10 +60,10 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/4068aec3-24f3-41c6-8778-72f8754684c3 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/10acf747-60a0-4bdf-a0df-196e9f9291e2 response: body: - string: '{"errors":[{"title":"Generic Error","detail":"schedule[4068aec3-24f3-41c6-8778-72f8754684c3] + string: '{"errors":[{"title":"Generic Error","detail":"schedule[10acf747-60a0-4bdf-a0df-196e9f9291e2] not found"}]}' headers: content-type: @@ -77,7 +77,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/e913c34d-3c48-11f0-b10e-2e2b611e1022 + uri: https://api.datadoghq.com/api/v2/users/f9249a49-cb9a-11f0-a56e-4e680b759023 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_get_oncall_escalation_policy_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_oncall_escalation_policy_returns_ok_response.frozen index b08c0417dc..e08e7183ed 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_oncall_escalation_policy_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_oncall_escalation_policy_returns_ok_response.frozen @@ -1 +1 @@ -2025-05-29T04:53:52.267Z \ No newline at end of file +2025-11-27T14:11:33.368Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_oncall_escalation_policy_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_oncall_escalation_policy_returns_ok_response.yaml index 7735553207..b9504b318d 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_oncall_escalation_policy_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_get_oncall_escalation_policy_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Get_On_Call_escalation_policy_returns_OK_response-1748494432@datadoghq.com","title":"user + body: '{"data":{"attributes":{"email":"Test-Get_On_Call_escalation_policy_returns_OK_response-1764252693@datadoghq.com","title":"user title"},"type":"users"}}' headers: accept: @@ -11,8 +11,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/users response: body: - string: '{"data":{"type":"users","id":"eb22c300-3c48-11f0-b6eb-6e406f40657f","attributes":{"name":null,"handle":"test-get_on_call_escalation_policy_returns_ok_response-1748494432@datadoghq.com","created_at":"2025-05-29T04:53:52.872150+00:00","modified_at":"2025-05-29T04:53:52.872150+00:00","email":"test-get_on_call_escalation_policy_returns_ok_response-1748494432@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28954a95ef3e23c51599bc32b67118de?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + string: '{"data":{"type":"users","id":"fa8dbd27-cb9a-11f0-84fc-d6e063989c3f","attributes":{"name":null,"handle":"test-get_on_call_escalation_policy_returns_ok_response-1764252693@datadoghq.com","created_at":"2025-11-27T14:11:33.748105+00:00","modified_at":"2025-11-27T14:11:33.748105+00:00","email":"test-get_on_call_escalation_policy_returns_ok_response-1764252693@datadoghq.com","icon":"https://secure.gravatar.com/avatar/3b312cc1a86be5f85aab5fada68c24c4?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' headers: @@ -22,7 +22,7 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"handle":"test-handle-bbce2cc58d5af798","name":"test-name-bbce2cc58d5af798"},"type":"team"}}' + body: '{"data":{"attributes":{"handle":"test-handle-9b417dea223136e8","name":"test-name-9b417dea223136e8"},"type":"team"}}' headers: accept: - application/json @@ -32,18 +32,16 @@ interactions: uri: https://api.datadoghq.com/api/v2/team response: body: - string: '{"data":{"type":"team","id":"dba59993-2c99-46f0-b91b-9e7936a4a78e","attributes":{"name":"test-name-bbce2cc58d5af798","handle":"test-handle-bbce2cc58d5af798","summary":null,"description":null,"avatar":null,"banner":9,"visible_modules":[],"hidden_modules":[],"created_at":"2025-05-29T04:53:53.543425+00:00","modified_at":"2025-05-29T04:53:53.543434+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/dba59993-2c99-46f0-b91b-9e7936a4a78e/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/dba59993-2c99-46f0-b91b-9e7936a4a78e/permission-settings"}}}}} - - ' + string: '{"data":{"id":"bf2fad34-c495-4de0-b1ec-c5727a2ae216","type":"team","attributes":{"avatar":null,"banner":8,"created_at":"2025-11-27T14:11:34.252521+00:00","description":null,"handle":"test-handle-9b417dea223136e8","hidden_modules":[],"link_count":0,"modified_at":"2025-11-27T14:11:34.252521+00:00","name":"test-name-9b417dea223136e8","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/bf2fad34-c495-4de0-b1ec-c5727a2ae216/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/bf2fad34-c495-4de0-b1ec-c5727a2ae216/permission-settings"}}}}}' headers: content-type: - - application/json + - application/vnd.api+json status: code: 201 message: Created - request: - body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T04:53:52.267Z","end_date":"2025-06-08T04:53:52.267Z","interval":{"days":1},"members":[{"user":{"id":"eb22c300-3c48-11f0-b6eb-6e406f40657f"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T04:53:52.267Z"}],"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1748494432","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:33.368Z","end_date":"2025-12-07T14:11:33.368Z","interval":{"days":1},"members":[{"user":{"id":"fa8dbd27-cb9a-11f0-84fc-d6e063989c3f"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:33.368Z"}],"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1764252693","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: accept: - application/json @@ -53,7 +51,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/on-call/schedules response: body: - string: '{"data":{"id":"996bb88f-ddaf-491b-84df-b8c60c9c358a","type":"schedules","attributes":{"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1748494432","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"016cfd54-38ec-4d23-938b-f07e8643a3f7","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"d8834350-ae3c-45eb-ad84-9f9a3cef46f3","type":"schedules","attributes":{"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1764252693","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"8d44f496-4fe0-4cc9-b3d7-81bbc3e68464","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -61,7 +59,7 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1748494432","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"dba59993-2c99-46f0-b91b-9e7936a4a78e","type":"teams"},{"id":"996bb88f-ddaf-491b-84df-b8c60c9c358a","type":"schedules"},{"id":"eb22c300-3c48-11f0-b6eb-6e406f40657f","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"dba59993-2c99-46f0-b91b-9e7936a4a78e","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"dba59993-2c99-46f0-b91b-9e7936a4a78e","type":"teams"}]}},"type":"policies"}}' + body: '{"data":{"attributes":{"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1764252693","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"bf2fad34-c495-4de0-b1ec-c5727a2ae216","type":"teams"},{"id":"d8834350-ae3c-45eb-ad84-9f9a3cef46f3","type":"schedules"},{"config":{"schedule":{"position":"previous"}},"id":"d8834350-ae3c-45eb-ad84-9f9a3cef46f3","type":"schedules"},{"id":"fa8dbd27-cb9a-11f0-84fc-d6e063989c3f","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"bf2fad34-c495-4de0-b1ec-c5727a2ae216","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"bf2fad34-c495-4de0-b1ec-c5727a2ae216","type":"teams"}]}},"type":"policies"}}' headers: accept: - application/json @@ -71,7 +69,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies response: body: - string: '{"data":{"id":"e75b436d-cbb7-44d6-bf87-4f53073a5bb5","type":"policies","attributes":{"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1748494432","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"c4cd74b1-1eb4-48a7-9fc0-a66f4e12919b","type":"steps"},{"id":"f11818e3-db9e-4601-b1e1-391fa54b6087","type":"steps"}]},"teams":{"data":[{"id":"dba59993-2c99-46f0-b91b-9e7936a4a78e","type":"teams"}]}}}}' + string: '{"data":{"id":"7e36daf1-25ef-46af-ba33-23aac9271dc5","type":"policies","attributes":{"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1764252693","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"e4f3f753-15bd-4649-bdeb-70011094d294","type":"steps"},{"id":"984250f3-e780-4aae-80c1-143859d0f14b","type":"steps"}]},"teams":{"data":[{"id":"bf2fad34-c495-4de0-b1ec-c5727a2ae216","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -84,10 +82,10 @@ interactions: accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/e75b436d-cbb7-44d6-bf87-4f53073a5bb5?include=steps.targets + uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/7e36daf1-25ef-46af-ba33-23aac9271dc5?include=steps.targets response: body: - string: '{"data":{"id":"e75b436d-cbb7-44d6-bf87-4f53073a5bb5","type":"policies","attributes":{"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1748494432","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"c4cd74b1-1eb4-48a7-9fc0-a66f4e12919b","type":"steps"},{"id":"f11818e3-db9e-4601-b1e1-391fa54b6087","type":"steps"}]},"teams":{"data":[{"id":"dba59993-2c99-46f0-b91b-9e7936a4a78e","type":"teams"}]}}},"included":[{"id":"c4cd74b1-1eb4-48a7-9fc0-a66f4e12919b","type":"steps","attributes":{"assignment":"default","escalate_after_seconds":3600},"relationships":{"targets":{"data":[{"id":"dba59993-2c99-46f0-b91b-9e7936a4a78e","type":"teams"},{"id":"996bb88f-ddaf-491b-84df-b8c60c9c358a","type":"schedules"},{"id":"eb22c300-3c48-11f0-b6eb-6e406f40657f","type":"users"}]}}},{"id":"f11818e3-db9e-4601-b1e1-391fa54b6087","type":"steps","attributes":{"assignment":"round-robin","escalate_after_seconds":3600},"relationships":{"targets":{"data":[{"id":"dba59993-2c99-46f0-b91b-9e7936a4a78e","type":"teams"}]}}},{"id":"996bb88f-ddaf-491b-84df-b8c60c9c358a","type":"schedules","attributes":{"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1748494432","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"016cfd54-38ec-4d23-938b-f07e8643a3f7","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}},{"id":"eb22c300-3c48-11f0-b6eb-6e406f40657f","type":"users","attributes":{"email":"test-get_on_call_escalation_policy_returns_ok_response-1748494432@datadoghq.com","name":"","status":"pending"}},{"id":"dba59993-2c99-46f0-b91b-9e7936a4a78e","type":"teams","attributes":{"avatar":"","description":"","handle":"test-handle-bbce2cc58d5af798","name":"test-name-bbce2cc58d5af798"}}]}' + string: '{"data":{"id":"7e36daf1-25ef-46af-ba33-23aac9271dc5","type":"policies","attributes":{"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1764252693","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"e4f3f753-15bd-4649-bdeb-70011094d294","type":"steps"},{"id":"984250f3-e780-4aae-80c1-143859d0f14b","type":"steps"}]},"teams":{"data":[{"id":"bf2fad34-c495-4de0-b1ec-c5727a2ae216","type":"teams"}]}}},"included":[{"id":"e4f3f753-15bd-4649-bdeb-70011094d294","type":"steps","attributes":{"assignment":"default","escalate_after_seconds":3600},"relationships":{"targets":{"data":[{"id":"bf2fad34-c495-4de0-b1ec-c5727a2ae216","type":"teams"},{"id":"d8834350-ae3c-45eb-ad84-9f9a3cef46f3","type":"schedules"},{"id":"d8834350-ae3c-45eb-ad84-9f9a3cef46f3_previous","type":"schedule_target"},{"id":"fa8dbd27-cb9a-11f0-84fc-d6e063989c3f","type":"users"}]}}},{"id":"d8834350-ae3c-45eb-ad84-9f9a3cef46f3_previous","type":"schedule_target","attributes":{"position":"previous"},"relationships":{"schedule":{"data":{"id":"d8834350-ae3c-45eb-ad84-9f9a3cef46f3","type":"schedules"}}}},{"id":"984250f3-e780-4aae-80c1-143859d0f14b","type":"steps","attributes":{"assignment":"round-robin","escalate_after_seconds":3600},"relationships":{"targets":{"data":[{"id":"bf2fad34-c495-4de0-b1ec-c5727a2ae216","type":"teams"}]}}},{"id":"bf2fad34-c495-4de0-b1ec-c5727a2ae216","type":"teams","attributes":{"avatar":"","description":"","handle":"test-handle-9b417dea223136e8","name":"test-name-9b417dea223136e8"}},{"id":"d8834350-ae3c-45eb-ad84-9f9a3cef46f3","type":"schedules","attributes":{"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1764252693","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"8d44f496-4fe0-4cc9-b3d7-81bbc3e68464","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}},{"id":"fa8dbd27-cb9a-11f0-84fc-d6e063989c3f","type":"users","attributes":{"email":"test-get_on_call_escalation_policy_returns_ok_response-1764252693@datadoghq.com","name":"","status":"pending"}}]}' headers: content-type: - application/vnd.api+json @@ -100,7 +98,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/e75b436d-cbb7-44d6-bf87-4f53073a5bb5 + uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/7e36daf1-25ef-46af-ba33-23aac9271dc5 response: body: string: '' @@ -114,7 +112,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/996bb88f-ddaf-491b-84df-b8c60c9c358a + uri: https://api.datadoghq.com/api/v2/on-call/schedules/d8834350-ae3c-45eb-ad84-9f9a3cef46f3 response: body: string: '' @@ -128,7 +126,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/dba59993-2c99-46f0-b91b-9e7936a4a78e + uri: https://api.datadoghq.com/api/v2/team/bf2fad34-c495-4de0-b1ec-c5727a2ae216 response: body: string: '' @@ -142,7 +140,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/eb22c300-3c48-11f0-b6eb-6e406f40657f + uri: https://api.datadoghq.com/api/v2/users/fa8dbd27-cb9a-11f0-84fc-d6e063989c3f response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_get_oncall_schedule_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_oncall_schedule_returns_ok_response.frozen index 0279e1e8ca..e4e809a1e3 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_oncall_schedule_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_oncall_schedule_returns_ok_response.frozen @@ -1 +1 @@ -2025-05-29T04:53:58.508Z \ No newline at end of file +2025-11-27T14:11:37.612Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_oncall_schedule_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_oncall_schedule_returns_ok_response.yaml index 1302992302..3493ad1437 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_oncall_schedule_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_get_oncall_schedule_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Get_On_Call_schedule_returns_OK_response-1748494438@datadoghq.com","title":"user + body: '{"data":{"attributes":{"email":"Test-Get_On_Call_schedule_returns_OK_response-1764252697@datadoghq.com","title":"user title"},"type":"users"}}' headers: accept: @@ -11,8 +11,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/users response: body: - string: '{"data":{"type":"users","id":"eedd114a-3c48-11f0-927d-aedf77869272","attributes":{"name":null,"handle":"test-get_on_call_schedule_returns_ok_response-1748494438@datadoghq.com","created_at":"2025-05-29T04:53:59.126285+00:00","modified_at":"2025-05-29T04:53:59.126285+00:00","email":"test-get_on_call_schedule_returns_ok_response-1748494438@datadoghq.com","icon":"https://secure.gravatar.com/avatar/0accc7b5a2e934dd438cd3b30841dcad?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + string: '{"data":{"type":"users","id":"fd12eb55-cb9a-11f0-8fcd-5ac0b02adf59","attributes":{"name":null,"handle":"test-get_on_call_schedule_returns_ok_response-1764252697@datadoghq.com","created_at":"2025-11-27T14:11:37.976362+00:00","modified_at":"2025-11-27T14:11:37.976362+00:00","email":"test-get_on_call_schedule_returns_ok_response-1764252697@datadoghq.com","icon":"https://secure.gravatar.com/avatar/56aea300d0912ed694b8ff04cfcc86aa?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' headers: @@ -22,8 +22,8 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T04:53:58.508Z","end_date":"2025-06-08T04:53:58.508Z","interval":{"days":1},"members":[{"user":{"id":"eedd114a-3c48-11f0-927d-aedf77869272"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T04:53:58.508Z"}],"name":"Test-Get_On_Call_schedule_returns_OK_response-1748494438","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:37.612Z","end_date":"2025-12-07T14:11:37.612Z","interval":{"days":1},"members":[{"user":{"id":"fd12eb55-cb9a-11f0-8fcd-5ac0b02adf59"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:37.612Z"}],"name":"Test-Get_On_Call_schedule_returns_OK_response-1764252697","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: accept: - application/json @@ -33,7 +33,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/on-call/schedules response: body: - string: '{"data":{"id":"cec4edfd-3f99-4da9-bd71-75c80c5629f8","type":"schedules","attributes":{"name":"Test-Get_On_Call_schedule_returns_OK_response-1748494438","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"9f5d591e-e81b-4262-b0cd-145b52b9f23f","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"ba513209-ef94-4826-8511-1c5ccb912070","type":"schedules","attributes":{"name":"Test-Get_On_Call_schedule_returns_OK_response-1764252697","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"9bb587a7-8302-49f3-8130-cb417de4ecd5","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -46,10 +46,10 @@ interactions: accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/on-call/schedules/cec4edfd-3f99-4da9-bd71-75c80c5629f8 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/ba513209-ef94-4826-8511-1c5ccb912070 response: body: - string: '{"data":{"id":"cec4edfd-3f99-4da9-bd71-75c80c5629f8","type":"schedules","attributes":{"name":"Test-Get_On_Call_schedule_returns_OK_response-1748494438","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"9f5d591e-e81b-4262-b0cd-145b52b9f23f","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"ba513209-ef94-4826-8511-1c5ccb912070","type":"schedules","attributes":{"name":"Test-Get_On_Call_schedule_returns_OK_response-1764252697","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"9bb587a7-8302-49f3-8130-cb417de4ecd5","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -62,7 +62,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/cec4edfd-3f99-4da9-bd71-75c80c5629f8 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/ba513209-ef94-4826-8511-1c5ccb912070 response: body: string: '' @@ -76,7 +76,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/eedd114a-3c48-11f0-927d-aedf77869272 + uri: https://api.datadoghq.com/api/v2/users/fd12eb55-cb9a-11f0-8fcd-5ac0b02adf59 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_get_team_oncall_users_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_team_oncall_users_returns_ok_response.frozen index a02b74ff96..899352609f 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_team_oncall_users_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_team_oncall_users_returns_ok_response.frozen @@ -1 +1 @@ -2025-11-18T12:44:29.751Z \ No newline at end of file +2025-11-27T14:11:42.299Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_team_oncall_users_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_team_oncall_users_returns_ok_response.yaml index 68a1416461..01f8f4267d 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_team_oncall_users_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_get_team_oncall_users_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Get_team_on_call_users_returns_OK_response-1763469869@datadoghq.com","title":"user + body: '{"data":{"attributes":{"email":"Test-Get_team_on_call_users_returns_OK_response-1764252702@datadoghq.com","title":"user title"},"type":"users"}}' headers: accept: @@ -11,7 +11,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/users response: body: - string: '{"data":{"type":"users","id":"537c2919-c47c-11f0-9b08-ce88c9776d95","attributes":{"name":null,"handle":"test-get_team_on_call_users_returns_ok_response-1763469869@datadoghq.com","created_at":"2025-11-18T12:44:30.412060+00:00","modified_at":"2025-11-18T12:44:30.412060+00:00","email":"test-get_team_on_call_users_returns_ok_response-1763469869@datadoghq.com","icon":"https://secure.gravatar.com/avatar/e1a08271c5b3a54aaa074185b1550add?s=48&d=retro","title":"user + string: '{"data":{"type":"users","id":"ffde914a-cb9a-11f0-ae87-2a5e5028fcef","attributes":{"name":null,"handle":"test-get_team_on_call_users_returns_ok_response-1764252702@datadoghq.com","created_at":"2025-11-27T14:11:42.666467+00:00","modified_at":"2025-11-27T14:11:42.666467+00:00","email":"test-get_team_on_call_users_returns_ok_response-1764252702@datadoghq.com","icon":"https://secure.gravatar.com/avatar/0bc277f36ed2ab487375205fafaaebc7?s=48&d=retro","title":"user title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' @@ -22,7 +22,7 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"handle":"test-handle-b0479fe6a2cd9873","name":"test-name-b0479fe6a2cd9873"},"type":"team"}}' + body: '{"data":{"attributes":{"handle":"test-handle-ecfc4ff61997ed40","name":"test-name-ecfc4ff61997ed40"},"type":"team"}}' headers: accept: - application/json @@ -32,7 +32,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/team response: body: - string: '{"data":{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"team","attributes":{"avatar":null,"banner":15,"created_at":"2025-11-18T12:44:31.250613+00:00","description":null,"handle":"test-handle-b0479fe6a2cd9873","hidden_modules":[],"link_count":0,"modified_at":"2025-11-18T12:44:31.250613+00:00","name":"test-name-b0479fe6a2cd9873","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/11ba6480-761b-4dbd-b4a0-c77a9df6740c/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/11ba6480-761b-4dbd-b4a0-c77a9df6740c/permission-settings"}}}}}' + string: '{"data":{"id":"fc8f8844-54c3-4898-aabc-68d6fccbe20e","type":"team","attributes":{"avatar":null,"banner":11,"created_at":"2025-11-27T14:11:43.090563+00:00","description":null,"handle":"test-handle-ecfc4ff61997ed40","hidden_modules":[],"link_count":0,"modified_at":"2025-11-27T14:11:43.090563+00:00","name":"test-name-ecfc4ff61997ed40","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/fc8f8844-54c3-4898-aabc-68d6fccbe20e/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/fc8f8844-54c3-4898-aabc-68d6fccbe20e/permission-settings"}}}}}' headers: content-type: - application/vnd.api+json @@ -40,8 +40,8 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-08T12:44:29.751Z","end_date":"2025-11-28T12:44:29.751Z","interval":{"days":1},"members":[{"user":{"id":"537c2919-c47c-11f0-9b08-ce88c9776d95"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-13T12:44:29.751Z"}],"name":"Test-Get_team_on_call_users_returns_OK_response-1763469869","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:42.299Z","end_date":"2025-12-07T14:11:42.299Z","interval":{"days":1},"members":[{"user":{"id":"ffde914a-cb9a-11f0-ae87-2a5e5028fcef"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:42.299Z"}],"name":"Test-Get_team_on_call_users_returns_OK_response-1764252702","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: accept: - application/json @@ -51,7 +51,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/on-call/schedules response: body: - string: '{"data":{"id":"3be141a8-848d-4af1-86de-e5d76cd6e4fc","type":"schedules","attributes":{"name":"Test-Get_team_on_call_users_returns_OK_response-1763469869","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"0c2a552f-a2e0-47ca-ad8b-4407608b3f67","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"4325ddef-dc72-4609-90c2-01167759f277","type":"schedules","attributes":{"name":"Test-Get_team_on_call_users_returns_OK_response-1764252702","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"86d3719a-7516-46f0-bfc4-2bd40ad1b855","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -59,7 +59,7 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"name":"Test-Get_team_on_call_users_returns_OK_response-1763469869","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"teams"},{"id":"3be141a8-848d-4af1-86de-e5d76cd6e4fc","type":"schedules"},{"id":"537c2919-c47c-11f0-9b08-ce88c9776d95","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"teams"}]}},"type":"policies"}}' + body: '{"data":{"attributes":{"name":"Test-Get_team_on_call_users_returns_OK_response-1764252702","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"fc8f8844-54c3-4898-aabc-68d6fccbe20e","type":"teams"},{"id":"4325ddef-dc72-4609-90c2-01167759f277","type":"schedules"},{"config":{"schedule":{"position":"previous"}},"id":"4325ddef-dc72-4609-90c2-01167759f277","type":"schedules"},{"id":"ffde914a-cb9a-11f0-ae87-2a5e5028fcef","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"fc8f8844-54c3-4898-aabc-68d6fccbe20e","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"fc8f8844-54c3-4898-aabc-68d6fccbe20e","type":"teams"}]}},"type":"policies"}}' headers: accept: - application/json @@ -69,7 +69,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies response: body: - string: '{"data":{"id":"5fe7a7c8-a2c1-4f07-9510-a5d483df5ae7","type":"policies","attributes":{"name":"Test-Get_team_on_call_users_returns_OK_response-1763469869","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"11f436b4-85bf-47c8-ab21-e851974ccf60","type":"steps"},{"id":"6f0da5a9-4b7d-4d12-a859-4799599f074d","type":"steps"}]},"teams":{"data":[{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"teams"}]}}}}' + string: '{"data":{"id":"5a7ecb26-4ebe-4496-bcfb-ff30c655a1a9","type":"policies","attributes":{"name":"Test-Get_team_on_call_users_returns_OK_response-1764252702","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"2694ac87-8900-4b0f-a108-fb8961c7ef89","type":"steps"},{"id":"e41057da-895e-4a23-81f2-617f61c53a84","type":"steps"}]},"teams":{"data":[{"id":"fc8f8844-54c3-4898-aabc-68d6fccbe20e","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -77,17 +77,17 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"rules":[{"actions":[],"policy_id":"5fe7a7c8-a2c1-4f07-9510-a5d483df5ae7","query":"","urgency":"low"}]},"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"team_routing_rules"}}' + body: '{"data":{"attributes":{"rules":[{"actions":[],"policy_id":"5a7ecb26-4ebe-4496-bcfb-ff30c655a1a9","query":"","urgency":"low"}]},"id":"fc8f8844-54c3-4898-aabc-68d6fccbe20e","type":"team_routing_rules"}}' headers: accept: - application/json content-type: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/on-call/teams/11ba6480-761b-4dbd-b4a0-c77a9df6740c/routing-rules + uri: https://api.datadoghq.com/api/v2/on-call/teams/fc8f8844-54c3-4898-aabc-68d6fccbe20e/routing-rules response: body: - string: '{"data":{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"team_routing_rules","relationships":{"rules":{"data":[{"id":"virtual-11ba6480-761b-4dbd-b4a0-c77a9df6740c-rule-0","type":"team_routing_rules"}]}}}}' + string: '{"data":{"id":"fc8f8844-54c3-4898-aabc-68d6fccbe20e","type":"team_routing_rules","relationships":{"rules":{"data":[{"id":"virtual-fc8f8844-54c3-4898-aabc-68d6fccbe20e-rule-0","type":"team_routing_rules"}]}}}}' headers: content-type: - application/vnd.api+json @@ -100,10 +100,10 @@ interactions: accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/on-call/teams/11ba6480-761b-4dbd-b4a0-c77a9df6740c/on-call?include=responders%2Cescalations.responders + uri: https://api.datadoghq.com/api/v2/on-call/teams/fc8f8844-54c3-4898-aabc-68d6fccbe20e/on-call?include=responders%2Cescalations.responders response: body: - string: '{"data":{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c-1763469873","type":"team_oncall_responders","relationships":{"escalations":{"data":[]},"responders":{"data":[{"id":"537c2919-c47c-11f0-9b08-ce88c9776d95","type":"users"}]}}},"included":[{"id":"537c2919-c47c-11f0-9b08-ce88c9776d95","type":"users","attributes":{"email":"test-get_team_on_call_users_returns_ok_response-1763469869@datadoghq.com","name":"","status":"pending"}}]}' + string: '{"data":{"id":"fc8f8844-54c3-4898-aabc-68d6fccbe20e-1764252704","type":"team_oncall_responders","relationships":{"escalations":{"data":[]},"responders":{"data":[{"id":"ffde914a-cb9a-11f0-ae87-2a5e5028fcef","type":"users"}]}}},"included":[{"id":"ffde914a-cb9a-11f0-ae87-2a5e5028fcef","type":"users","attributes":{"email":"test-get_team_on_call_users_returns_ok_response-1764252702@datadoghq.com","name":"","status":"pending"}}]}' headers: content-type: - application/vnd.api+json @@ -111,17 +111,17 @@ interactions: code: 200 message: OK - request: - body: '{"data":{"attributes":{"rules":[]},"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"team_routing_rules"}}' + body: '{"data":{"attributes":{"rules":[]},"id":"fc8f8844-54c3-4898-aabc-68d6fccbe20e","type":"team_routing_rules"}}' headers: accept: - application/json content-type: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/on-call/teams/11ba6480-761b-4dbd-b4a0-c77a9df6740c/routing-rules + uri: https://api.datadoghq.com/api/v2/on-call/teams/fc8f8844-54c3-4898-aabc-68d6fccbe20e/routing-rules response: body: - string: '{"data":{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"team_routing_rules","relationships":{"rules":{"data":[]}}}}' + string: '{"data":{"id":"fc8f8844-54c3-4898-aabc-68d6fccbe20e","type":"team_routing_rules","relationships":{"rules":{"data":[]}}}}' headers: content-type: - application/vnd.api+json @@ -134,7 +134,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/5fe7a7c8-a2c1-4f07-9510-a5d483df5ae7 + uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/5a7ecb26-4ebe-4496-bcfb-ff30c655a1a9 response: body: string: '' @@ -148,7 +148,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/3be141a8-848d-4af1-86de-e5d76cd6e4fc + uri: https://api.datadoghq.com/api/v2/on-call/schedules/4325ddef-dc72-4609-90c2-01167759f277 response: body: string: '' @@ -162,7 +162,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/11ba6480-761b-4dbd-b4a0-c77a9df6740c + uri: https://api.datadoghq.com/api/v2/team/fc8f8844-54c3-4898-aabc-68d6fccbe20e response: body: string: '' @@ -176,7 +176,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/537c2919-c47c-11f0-9b08-ce88c9776d95 + uri: https://api.datadoghq.com/api/v2/users/ffde914a-cb9a-11f0-ae87-2a5e5028fcef response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_get_the_schedule_oncall_user_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_the_schedule_oncall_user_returns_ok_response.frozen index 1a1c3b8e70..baa8f4a589 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_the_schedule_oncall_user_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_the_schedule_oncall_user_returns_ok_response.frozen @@ -1 +1 @@ -2025-05-29T04:54:08.864Z \ No newline at end of file +2025-11-27T14:11:47.631Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_the_schedule_oncall_user_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_the_schedule_oncall_user_returns_ok_response.yaml index cdf2fce550..c9baa23df8 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_the_schedule_oncall_user_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_get_the_schedule_oncall_user_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Get_the_schedule_on_call_user_returns_OK_response-1748494448@datadoghq.com","title":"user + body: '{"data":{"attributes":{"email":"Test-Get_the_schedule_on_call_user_returns_OK_response-1764252707@datadoghq.com","title":"user title"},"type":"users"}}' headers: accept: @@ -11,8 +11,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/users response: body: - string: '{"data":{"type":"users","id":"f506d945-3c48-11f0-b6eb-6e406f40657f","attributes":{"name":null,"handle":"test-get_the_schedule_on_call_user_returns_ok_response-1748494448@datadoghq.com","created_at":"2025-05-29T04:54:09.466437+00:00","modified_at":"2025-05-29T04:54:09.466437+00:00","email":"test-get_the_schedule_on_call_user_returns_ok_response-1748494448@datadoghq.com","icon":"https://secure.gravatar.com/avatar/6c6e9988bfb6ab3c5c5ae2111d47fc54?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + string: '{"data":{"type":"users","id":"030e767a-cb9b-11f0-8fcd-5ac0b02adf59","attributes":{"name":null,"handle":"test-get_the_schedule_on_call_user_returns_ok_response-1764252707@datadoghq.com","created_at":"2025-11-27T14:11:48.013486+00:00","modified_at":"2025-11-27T14:11:48.013486+00:00","email":"test-get_the_schedule_on_call_user_returns_ok_response-1764252707@datadoghq.com","icon":"https://secure.gravatar.com/avatar/a9e8940d153698e24c0b29024875d46f?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' headers: @@ -22,8 +22,8 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T04:54:08.864Z","end_date":"2025-06-08T04:54:08.864Z","interval":{"days":1},"members":[{"user":{"id":"f506d945-3c48-11f0-b6eb-6e406f40657f"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T04:54:08.864Z"}],"name":"Test-Get_the_schedule_on_call_user_returns_OK_response-1748494448","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:47.631Z","end_date":"2025-12-07T14:11:47.631Z","interval":{"days":1},"members":[{"user":{"id":"030e767a-cb9b-11f0-8fcd-5ac0b02adf59"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:47.631Z"}],"name":"Test-Get_the_schedule_on_call_user_returns_OK_response-1764252707","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: accept: - application/json @@ -33,7 +33,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/on-call/schedules response: body: - string: '{"data":{"id":"3e8644f0-f579-4459-8cb3-e585cd817db1","type":"schedules","attributes":{"name":"Test-Get_the_schedule_on_call_user_returns_OK_response-1748494448","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"00847dac-89e7-4a60-8e72-9a5897a3a1e5","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"93a33505-71dc-4be4-a55d-95eb23b6b400","type":"schedules","attributes":{"name":"Test-Get_the_schedule_on_call_user_returns_OK_response-1764252707","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"c9addf6a-059c-4b07-aced-a2c287fd969f","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -46,10 +46,10 @@ interactions: accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/on-call/schedules/3e8644f0-f579-4459-8cb3-e585cd817db1/on-call + uri: https://api.datadoghq.com/api/v2/on-call/schedules/93a33505-71dc-4be4-a55d-95eb23b6b400/on-call response: body: - string: '{"data":{"id":"f506d945-3c48-11f0-b6eb-6e406f40657f-2025-05-29T00:54:10-04:00-2025-05-30T00:54:08-04:00","type":"shifts","attributes":{"end":"2025-05-30T00:54:08-04:00","start":"2025-05-29T00:54:10.138754-04:00"},"relationships":{"user":{"data":{"id":"f506d945-3c48-11f0-b6eb-6e406f40657f","type":"users"}}}}}' + string: '{"data":{"id":"030e767a-cb9b-11f0-8fcd-5ac0b02adf59-2025-11-27T09:11:48-05:00-2025-11-28T09:11:47-05:00","type":"shifts","attributes":{"end":"2025-11-28T09:11:47-05:00","start":"2025-11-27T09:11:48.47496-05:00"},"relationships":{"user":{"data":{"id":"030e767a-cb9b-11f0-8fcd-5ac0b02adf59","type":"users"}}}}}' headers: content-type: - application/vnd.api+json @@ -62,7 +62,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/3e8644f0-f579-4459-8cb3-e585cd817db1 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/93a33505-71dc-4be4-a55d-95eb23b6b400 response: body: string: '' @@ -76,7 +76,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/f506d945-3c48-11f0-b6eb-6e406f40657f + uri: https://api.datadoghq.com/api/v2/users/030e767a-cb9b-11f0-8fcd-5ac0b02adf59 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_set_oncall_team_routing_rules_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_set_oncall_team_routing_rules_returns_ok_response.frozen index 2cf614d806..7a29240030 100644 --- a/tests/v2/cassettes/test_scenarios/test_set_oncall_team_routing_rules_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_set_oncall_team_routing_rules_returns_ok_response.frozen @@ -1 +1 @@ -2025-11-18T13:04:14.085Z \ No newline at end of file +2025-11-27T14:11:49.966Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_set_oncall_team_routing_rules_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_set_oncall_team_routing_rules_returns_ok_response.yaml index 6b058007f8..0c06835bb5 100644 --- a/tests/v2/cassettes/test_scenarios/test_set_oncall_team_routing_rules_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_set_oncall_team_routing_rules_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Set_On_Call_team_routing_rules_returns_OK_response-1763471054@datadoghq.com","title":"user + body: '{"data":{"attributes":{"email":"Test-Set_On_Call_team_routing_rules_returns_OK_response-1764252709@datadoghq.com","title":"user title"},"type":"users"}}' headers: accept: @@ -11,7 +11,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/users response: body: - string: '{"data":{"type":"users","id":"15c47aed-c47f-11f0-9f0b-be6d33dcd787","attributes":{"name":null,"handle":"test-set_on_call_team_routing_rules_returns_ok_response-1763471054@datadoghq.com","created_at":"2025-11-18T13:04:15.357470+00:00","modified_at":"2025-11-18T13:04:15.357470+00:00","email":"test-set_on_call_team_routing_rules_returns_ok_response-1763471054@datadoghq.com","icon":"https://secure.gravatar.com/avatar/958eeb5c5b80b7b5b4ec2f1794031763?s=48&d=retro","title":"user + string: '{"data":{"type":"users","id":"0473ca92-cb9b-11f0-85f9-9a82ffe01443","attributes":{"name":null,"handle":"test-set_on_call_team_routing_rules_returns_ok_response-1764252709@datadoghq.com","created_at":"2025-11-27T14:11:50.355271+00:00","modified_at":"2025-11-27T14:11:50.355271+00:00","email":"test-set_on_call_team_routing_rules_returns_ok_response-1764252709@datadoghq.com","icon":"https://secure.gravatar.com/avatar/ad92f892fdf302962d879c0d02664d8e?s=48&d=retro","title":"user title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' @@ -22,7 +22,7 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"handle":"test-handle-f77a37b001e848f1","name":"test-name-f77a37b001e848f1"},"type":"team"}}' + body: '{"data":{"attributes":{"handle":"test-handle-a7692378c203a880","name":"test-name-a7692378c203a880"},"type":"team"}}' headers: accept: - application/json @@ -32,7 +32,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/team response: body: - string: '{"data":{"id":"8ab3f777-435e-42b6-8511-0c9020365b8d","type":"team","attributes":{"avatar":null,"banner":6,"created_at":"2025-11-18T13:04:15.712638+00:00","description":null,"handle":"test-handle-f77a37b001e848f1","hidden_modules":[],"link_count":0,"modified_at":"2025-11-18T13:04:15.712638+00:00","name":"test-name-f77a37b001e848f1","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/8ab3f777-435e-42b6-8511-0c9020365b8d/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/8ab3f777-435e-42b6-8511-0c9020365b8d/permission-settings"}}}}}' + string: '{"data":{"id":"ba4fe917-0da4-4b40-96da-f9d7306d97d8","type":"team","attributes":{"avatar":null,"banner":14,"created_at":"2025-11-27T14:11:50.842947+00:00","description":null,"handle":"test-handle-a7692378c203a880","hidden_modules":[],"link_count":0,"modified_at":"2025-11-27T14:11:50.842947+00:00","name":"test-name-a7692378c203a880","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/ba4fe917-0da4-4b40-96da-f9d7306d97d8/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/ba4fe917-0da4-4b40-96da-f9d7306d97d8/permission-settings"}}}}}' headers: content-type: - application/vnd.api+json @@ -40,8 +40,8 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-08T13:04:14.085Z","end_date":"2025-11-28T13:04:14.085Z","interval":{"days":1},"members":[{"user":{"id":"15c47aed-c47f-11f0-9f0b-be6d33dcd787"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-13T13:04:14.085Z"}],"name":"Test-Set_On_Call_team_routing_rules_returns_OK_response-1763471054","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:49.966Z","end_date":"2025-12-07T14:11:49.966Z","interval":{"days":1},"members":[{"user":{"id":"0473ca92-cb9b-11f0-85f9-9a82ffe01443"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:49.966Z"}],"name":"Test-Set_On_Call_team_routing_rules_returns_OK_response-1764252709","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: accept: - application/json @@ -51,7 +51,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/on-call/schedules response: body: - string: '{"data":{"id":"10ab1649-e333-41ac-9271-3484b87939a7","type":"schedules","attributes":{"name":"Test-Set_On_Call_team_routing_rules_returns_OK_response-1763471054","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"f0e28d78-8563-4d83-8d67-0b079bd7fab7","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"1f9b0595-17a3-4d95-9b2e-edcea3b6e737","type":"schedules","attributes":{"name":"Test-Set_On_Call_team_routing_rules_returns_OK_response-1764252709","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"0eecb6fe-83c6-48c9-9e0e-82379498f733","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -59,7 +59,7 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"name":"Test-Set_On_Call_team_routing_rules_returns_OK_response-1763471054","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"8ab3f777-435e-42b6-8511-0c9020365b8d","type":"teams"},{"id":"10ab1649-e333-41ac-9271-3484b87939a7","type":"schedules"},{"id":"15c47aed-c47f-11f0-9f0b-be6d33dcd787","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"8ab3f777-435e-42b6-8511-0c9020365b8d","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"8ab3f777-435e-42b6-8511-0c9020365b8d","type":"teams"}]}},"type":"policies"}}' + body: '{"data":{"attributes":{"name":"Test-Set_On_Call_team_routing_rules_returns_OK_response-1764252709","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"ba4fe917-0da4-4b40-96da-f9d7306d97d8","type":"teams"},{"id":"1f9b0595-17a3-4d95-9b2e-edcea3b6e737","type":"schedules"},{"config":{"schedule":{"position":"previous"}},"id":"1f9b0595-17a3-4d95-9b2e-edcea3b6e737","type":"schedules"},{"id":"0473ca92-cb9b-11f0-85f9-9a82ffe01443","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"ba4fe917-0da4-4b40-96da-f9d7306d97d8","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"ba4fe917-0da4-4b40-96da-f9d7306d97d8","type":"teams"}]}},"type":"policies"}}' headers: accept: - application/json @@ -69,7 +69,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies response: body: - string: '{"data":{"id":"ad66e3aa-4df4-4ab0-b928-03abd68cc44e","type":"policies","attributes":{"name":"Test-Set_On_Call_team_routing_rules_returns_OK_response-1763471054","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"975ba331-0aaa-4878-9660-c1f580b01711","type":"steps"},{"id":"4b342992-de9c-4163-9360-ee63a115519a","type":"steps"}]},"teams":{"data":[{"id":"8ab3f777-435e-42b6-8511-0c9020365b8d","type":"teams"}]}}}}' + string: '{"data":{"id":"66f0e922-2834-4d68-aa0b-98cc81fc2a9d","type":"policies","attributes":{"name":"Test-Set_On_Call_team_routing_rules_returns_OK_response-1764252709","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"533f661e-6a1f-4327-8d3f-035add94cff8","type":"steps"},{"id":"b8948730-6aec-4a51-8662-cce4026b94dc","type":"steps"}]},"teams":{"data":[{"id":"ba4fe917-0da4-4b40-96da-f9d7306d97d8","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -77,17 +77,17 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"rules":[{"actions":[{"channel":"channel","type":"send_slack_message","workspace":"workspace"}],"query":"tags.service:test","time_restriction":{"restrictions":[{"end_day":"monday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"},{"end_day":"tuesday","end_time":"17:00:00","start_day":"tuesday","start_time":"09:00:00"}],"time_zone":"Europe/Paris"}},{"policy_id":"ad66e3aa-4df4-4ab0-b928-03abd68cc44e","query":"","urgency":"low"}]},"id":"8ab3f777-435e-42b6-8511-0c9020365b8d","type":"team_routing_rules"}}' + body: '{"data":{"attributes":{"rules":[{"actions":[{"channel":"channel","type":"send_slack_message","workspace":"workspace"}],"query":"tags.service:test","time_restriction":{"restrictions":[{"end_day":"monday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"},{"end_day":"tuesday","end_time":"17:00:00","start_day":"tuesday","start_time":"09:00:00"}],"time_zone":"Europe/Paris"}},{"policy_id":"66f0e922-2834-4d68-aa0b-98cc81fc2a9d","query":"","urgency":"low"}]},"id":"ba4fe917-0da4-4b40-96da-f9d7306d97d8","type":"team_routing_rules"}}' headers: accept: - application/json content-type: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/on-call/teams/8ab3f777-435e-42b6-8511-0c9020365b8d/routing-rules?include=rules + uri: https://api.datadoghq.com/api/v2/on-call/teams/ba4fe917-0da4-4b40-96da-f9d7306d97d8/routing-rules?include=rules response: body: - string: '{"data":{"id":"8ab3f777-435e-42b6-8511-0c9020365b8d","type":"team_routing_rules","relationships":{"rules":{"data":[{"id":"virtual-8ab3f777-435e-42b6-8511-0c9020365b8d-rule-0","type":"team_routing_rules"},{"id":"virtual-8ab3f777-435e-42b6-8511-0c9020365b8d-rule-1","type":"team_routing_rules"}]}}},"included":[{"id":"virtual-8ab3f777-435e-42b6-8511-0c9020365b8d-rule-0","type":"team_routing_rules","attributes":{"actions":[{"type":"send_slack_message","channel":"channel","workspace":"workspace"}],"query":"tags.service:test","time_restriction":{"time_zone":"Europe/Paris","restrictions":[{"start_time":"09:00:00","start_day":"monday","end_time":"17:00:00","end_day":"monday"},{"start_time":"09:00:00","start_day":"tuesday","end_time":"17:00:00","end_day":"tuesday"}]}},"relationships":{"policy":{"data":null}}},{"id":"virtual-8ab3f777-435e-42b6-8511-0c9020365b8d-rule-1","type":"team_routing_rules","attributes":{"actions":[],"query":"","urgency":"low"},"relationships":{"policy":{"data":{"id":"ad66e3aa-4df4-4ab0-b928-03abd68cc44e","type":"policies"}}}}]}' + string: '{"data":{"id":"ba4fe917-0da4-4b40-96da-f9d7306d97d8","type":"team_routing_rules","relationships":{"rules":{"data":[{"id":"virtual-ba4fe917-0da4-4b40-96da-f9d7306d97d8-rule-0","type":"team_routing_rules"},{"id":"virtual-ba4fe917-0da4-4b40-96da-f9d7306d97d8-rule-1","type":"team_routing_rules"}]}}},"included":[{"id":"virtual-ba4fe917-0da4-4b40-96da-f9d7306d97d8-rule-0","type":"team_routing_rules","attributes":{"actions":[{"type":"send_slack_message","channel":"channel","workspace":"workspace"}],"query":"tags.service:test","time_restriction":{"time_zone":"Europe/Paris","restrictions":[{"start_time":"09:00:00","start_day":"monday","end_time":"17:00:00","end_day":"monday"},{"start_time":"09:00:00","start_day":"tuesday","end_time":"17:00:00","end_day":"tuesday"}]}},"relationships":{"policy":{"data":null}}},{"id":"virtual-ba4fe917-0da4-4b40-96da-f9d7306d97d8-rule-1","type":"team_routing_rules","attributes":{"actions":[],"query":"","urgency":"low"},"relationships":{"policy":{"data":{"id":"66f0e922-2834-4d68-aa0b-98cc81fc2a9d","type":"policies"}}}}]}' headers: content-type: - application/vnd.api+json @@ -95,17 +95,17 @@ interactions: code: 200 message: OK - request: - body: '{"data":{"attributes":{"rules":[]},"id":"8ab3f777-435e-42b6-8511-0c9020365b8d","type":"team_routing_rules"}}' + body: '{"data":{"attributes":{"rules":[]},"id":"ba4fe917-0da4-4b40-96da-f9d7306d97d8","type":"team_routing_rules"}}' headers: accept: - application/json content-type: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/on-call/teams/8ab3f777-435e-42b6-8511-0c9020365b8d/routing-rules + uri: https://api.datadoghq.com/api/v2/on-call/teams/ba4fe917-0da4-4b40-96da-f9d7306d97d8/routing-rules response: body: - string: '{"data":{"id":"8ab3f777-435e-42b6-8511-0c9020365b8d","type":"team_routing_rules","relationships":{"rules":{"data":[]}}}}' + string: '{"data":{"id":"ba4fe917-0da4-4b40-96da-f9d7306d97d8","type":"team_routing_rules","relationships":{"rules":{"data":[]}}}}' headers: content-type: - application/vnd.api+json @@ -118,7 +118,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/ad66e3aa-4df4-4ab0-b928-03abd68cc44e + uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/66f0e922-2834-4d68-aa0b-98cc81fc2a9d response: body: string: '' @@ -132,7 +132,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/10ab1649-e333-41ac-9271-3484b87939a7 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/1f9b0595-17a3-4d95-9b2e-edcea3b6e737 response: body: string: '' @@ -146,7 +146,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/8ab3f777-435e-42b6-8511-0c9020365b8d + uri: https://api.datadoghq.com/api/v2/team/ba4fe917-0da4-4b40-96da-f9d7306d97d8 response: body: string: '' @@ -160,7 +160,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/15c47aed-c47f-11f0-9f0b-be6d33dcd787 + uri: https://api.datadoghq.com/api/v2/users/0473ca92-cb9b-11f0-85f9-9a82ffe01443 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_update_oncall_escalation_policy_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_oncall_escalation_policy_returns_ok_response.frozen index dcfe9e9535..d64fddeda7 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_oncall_escalation_policy_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_oncall_escalation_policy_returns_ok_response.frozen @@ -1 +1 @@ -2025-05-29T04:54:18.437Z \ No newline at end of file +2025-11-27T14:11:54.763Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_oncall_escalation_policy_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_oncall_escalation_policy_returns_ok_response.yaml index 3f503ebccd..9098117b02 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_oncall_escalation_policy_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_update_oncall_escalation_policy_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Update_On_Call_escalation_policy_returns_OK_response-1748494458@datadoghq.com","title":"user + body: '{"data":{"attributes":{"email":"Test-Update_On_Call_escalation_policy_returns_OK_response-1764252714@datadoghq.com","title":"user title"},"type":"users"}}' headers: accept: @@ -11,8 +11,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/users response: body: - string: '{"data":{"type":"users","id":"fabd9ae0-3c48-11f0-b407-16d8dc894a02","attributes":{"name":null,"handle":"test-update_on_call_escalation_policy_returns_ok_response-1748494458@datadoghq.com","created_at":"2025-05-29T04:54:19.052756+00:00","modified_at":"2025-05-29T04:54:19.052756+00:00","email":"test-update_on_call_escalation_policy_returns_ok_response-1748494458@datadoghq.com","icon":"https://secure.gravatar.com/avatar/cf87c53bf68b572610145962e6965e0c?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + string: '{"data":{"type":"users","id":"074d412b-cb9b-11f0-85f9-9a82ffe01443","attributes":{"name":null,"handle":"test-update_on_call_escalation_policy_returns_ok_response-1764252714@datadoghq.com","created_at":"2025-11-27T14:11:55.135880+00:00","modified_at":"2025-11-27T14:11:55.135880+00:00","email":"test-update_on_call_escalation_policy_returns_ok_response-1764252714@datadoghq.com","icon":"https://secure.gravatar.com/avatar/56710b9d4c6476f7e9cb32cf32f2d8fa?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' headers: @@ -22,7 +22,7 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"handle":"test-handle-e987bfc60cf27d84","name":"test-name-e987bfc60cf27d84"},"type":"team"}}' + body: '{"data":{"attributes":{"handle":"test-handle-87ae65b051bd37ef","name":"test-name-87ae65b051bd37ef"},"type":"team"}}' headers: accept: - application/json @@ -32,18 +32,16 @@ interactions: uri: https://api.datadoghq.com/api/v2/team response: body: - string: '{"data":{"type":"team","id":"37ea8c60-77bd-4154-ba2e-ac59d25541c6","attributes":{"name":"test-name-e987bfc60cf27d84","handle":"test-handle-e987bfc60cf27d84","summary":null,"description":null,"avatar":null,"banner":3,"visible_modules":[],"hidden_modules":[],"created_at":"2025-05-29T04:54:19.729870+00:00","modified_at":"2025-05-29T04:54:19.729879+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/37ea8c60-77bd-4154-ba2e-ac59d25541c6/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/37ea8c60-77bd-4154-ba2e-ac59d25541c6/permission-settings"}}}}} - - ' + string: '{"data":{"id":"f38d82f9-3de9-4a4a-8a48-650c0b19151f","type":"team","attributes":{"avatar":null,"banner":11,"created_at":"2025-11-27T14:11:55.632151+00:00","description":null,"handle":"test-handle-87ae65b051bd37ef","hidden_modules":[],"link_count":0,"modified_at":"2025-11-27T14:11:55.632152+00:00","name":"test-name-87ae65b051bd37ef","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/f38d82f9-3de9-4a4a-8a48-650c0b19151f/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/f38d82f9-3de9-4a4a-8a48-650c0b19151f/permission-settings"}}}}}' headers: content-type: - - application/json + - application/vnd.api+json status: code: 201 message: Created - request: - body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T04:54:18.437Z","end_date":"2025-06-08T04:54:18.437Z","interval":{"days":1},"members":[{"user":{"id":"fabd9ae0-3c48-11f0-b407-16d8dc894a02"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T04:54:18.437Z"}],"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1748494458","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:54.763Z","end_date":"2025-12-07T14:11:54.763Z","interval":{"days":1},"members":[{"user":{"id":"074d412b-cb9b-11f0-85f9-9a82ffe01443"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:54.763Z"}],"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1764252714","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: accept: - application/json @@ -53,7 +51,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/on-call/schedules response: body: - string: '{"data":{"id":"f8a9543a-dc0f-4d81-bb16-7054201fa099","type":"schedules","attributes":{"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1748494458","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"f2cc2a31-c4f9-40bf-9820-93af15c77625","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"1ab20921-4556-4f30-80df-e1ce748c3fc1","type":"schedules","attributes":{"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1764252714","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"94644551-c1bd-4b16-8774-ddbf0b6ce12c","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -61,7 +59,7 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1748494458","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"37ea8c60-77bd-4154-ba2e-ac59d25541c6","type":"teams"},{"id":"f8a9543a-dc0f-4d81-bb16-7054201fa099","type":"schedules"},{"id":"fabd9ae0-3c48-11f0-b407-16d8dc894a02","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"37ea8c60-77bd-4154-ba2e-ac59d25541c6","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"37ea8c60-77bd-4154-ba2e-ac59d25541c6","type":"teams"}]}},"type":"policies"}}' + body: '{"data":{"attributes":{"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1764252714","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"f38d82f9-3de9-4a4a-8a48-650c0b19151f","type":"teams"},{"id":"1ab20921-4556-4f30-80df-e1ce748c3fc1","type":"schedules"},{"config":{"schedule":{"position":"previous"}},"id":"1ab20921-4556-4f30-80df-e1ce748c3fc1","type":"schedules"},{"id":"074d412b-cb9b-11f0-85f9-9a82ffe01443","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"f38d82f9-3de9-4a4a-8a48-650c0b19151f","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"f38d82f9-3de9-4a4a-8a48-650c0b19151f","type":"teams"}]}},"type":"policies"}}' headers: accept: - application/json @@ -71,7 +69,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies response: body: - string: '{"data":{"id":"05ee91ac-c049-4e7c-b43b-3f673a7ce96d","type":"policies","attributes":{"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1748494458","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"6a0d2106-0430-4211-af70-54ea18031d0d","type":"steps"},{"id":"f4c4d70e-72e5-4f5c-89fb-bf7aea612c1b","type":"steps"}]},"teams":{"data":[{"id":"37ea8c60-77bd-4154-ba2e-ac59d25541c6","type":"teams"}]}}}}' + string: '{"data":{"id":"b20fdf89-f87f-4237-8f19-ed8c9c57cf5c","type":"policies","attributes":{"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1764252714","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"6d4b5398-50bf-425d-93b8-3eae379ff8a0","type":"steps"},{"id":"b3f4a0dd-337f-42b7-9fda-b2f4486e700f","type":"steps"}]},"teams":{"data":[{"id":"f38d82f9-3de9-4a4a-8a48-650c0b19151f","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -79,17 +77,17 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1748494458-updated","resolve_page_on_policy_end":false,"retries":0,"steps":[{"assignment":"default","escalate_after_seconds":3600,"id":"6a0d2106-0430-4211-af70-54ea18031d0d","targets":[{"id":"fabd9ae0-3c48-11f0-b407-16d8dc894a02","type":"users"}]}]},"id":"05ee91ac-c049-4e7c-b43b-3f673a7ce96d","relationships":{"teams":{"data":[{"id":"37ea8c60-77bd-4154-ba2e-ac59d25541c6","type":"teams"}]}},"type":"policies"}}' + body: '{"data":{"attributes":{"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1764252714-updated","resolve_page_on_policy_end":false,"retries":0,"steps":[{"assignment":"default","escalate_after_seconds":3600,"id":"6d4b5398-50bf-425d-93b8-3eae379ff8a0","targets":[{"id":"074d412b-cb9b-11f0-85f9-9a82ffe01443","type":"users"}]}]},"id":"b20fdf89-f87f-4237-8f19-ed8c9c57cf5c","relationships":{"teams":{"data":[{"id":"f38d82f9-3de9-4a4a-8a48-650c0b19151f","type":"teams"}]}},"type":"policies"}}' headers: accept: - application/json content-type: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/05ee91ac-c049-4e7c-b43b-3f673a7ce96d + uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/b20fdf89-f87f-4237-8f19-ed8c9c57cf5c response: body: - string: '{"data":{"id":"05ee91ac-c049-4e7c-b43b-3f673a7ce96d","type":"policies","attributes":{"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1748494458-updated","resolve_page_on_policy_end":false,"retries":0},"relationships":{"steps":{"data":[{"id":"6a0d2106-0430-4211-af70-54ea18031d0d","type":"steps"}]},"teams":{"data":[{"id":"37ea8c60-77bd-4154-ba2e-ac59d25541c6","type":"teams"}]}}}}' + string: '{"data":{"id":"b20fdf89-f87f-4237-8f19-ed8c9c57cf5c","type":"policies","attributes":{"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1764252714-updated","resolve_page_on_policy_end":false,"retries":0},"relationships":{"steps":{"data":[{"id":"6d4b5398-50bf-425d-93b8-3eae379ff8a0","type":"steps"}]},"teams":{"data":[{"id":"f38d82f9-3de9-4a4a-8a48-650c0b19151f","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -102,7 +100,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/05ee91ac-c049-4e7c-b43b-3f673a7ce96d + uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/b20fdf89-f87f-4237-8f19-ed8c9c57cf5c response: body: string: '' @@ -116,7 +114,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/f8a9543a-dc0f-4d81-bb16-7054201fa099 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/1ab20921-4556-4f30-80df-e1ce748c3fc1 response: body: string: '' @@ -130,7 +128,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/37ea8c60-77bd-4154-ba2e-ac59d25541c6 + uri: https://api.datadoghq.com/api/v2/team/f38d82f9-3de9-4a4a-8a48-650c0b19151f response: body: string: '' @@ -144,7 +142,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/fabd9ae0-3c48-11f0-b407-16d8dc894a02 + uri: https://api.datadoghq.com/api/v2/users/074d412b-cb9b-11f0-85f9-9a82ffe01443 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_update_oncall_schedule_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_oncall_schedule_returns_ok_response.frozen index 2f290d18c0..9c27740750 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_oncall_schedule_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_oncall_schedule_returns_ok_response.frozen @@ -1 +1 @@ -2025-07-03T14:30:45.232Z \ No newline at end of file +2025-11-27T14:11:59.069Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_oncall_schedule_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_oncall_schedule_returns_ok_response.yaml index 2fa814fbf9..e1c88fcf5d 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_oncall_schedule_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_update_oncall_schedule_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Update_On_Call_schedule_returns_OK_response-1751553045@datadoghq.com","title":"user + body: '{"data":{"attributes":{"email":"Test-Update_On_Call_schedule_returns_OK_response-1764252719@datadoghq.com","title":"user title"},"type":"users"}}' headers: accept: @@ -11,8 +11,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/users response: body: - string: '{"data":{"type":"users","id":"4ea279a2-581a-11f0-bb4d-bed6e06a25e4","attributes":{"name":null,"handle":"test-update_on_call_schedule_returns_ok_response-1751553045@datadoghq.com","created_at":"2025-07-03T14:30:46.015046+00:00","modified_at":"2025-07-03T14:30:46.015046+00:00","email":"test-update_on_call_schedule_returns_ok_response-1751553045@datadoghq.com","icon":"https://secure.gravatar.com/avatar/8c4a38455f71bb12d82add5157f105a0?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + string: '{"data":{"type":"users","id":"09e2b0f4-cb9b-11f0-a56e-4e680b759023","attributes":{"name":null,"handle":"test-update_on_call_schedule_returns_ok_response-1764252719@datadoghq.com","created_at":"2025-11-27T14:11:59.470672+00:00","modified_at":"2025-11-27T14:11:59.470672+00:00","email":"test-update_on_call_schedule_returns_ok_response-1764252719@datadoghq.com","icon":"https://secure.gravatar.com/avatar/62638e49f4a83e63caabec2a6ab50bba?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' headers: @@ -22,8 +22,8 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-06-23T14:30:45.232Z","end_date":"2025-07-13T14:30:45.232Z","interval":{"days":1},"members":[{"user":{"id":"4ea279a2-581a-11f0-bb4d-bed6e06a25e4"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-06-28T14:30:45.232Z"}],"name":"Test-Update_On_Call_schedule_returns_OK_response-1751553045","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:59.069Z","end_date":"2025-12-07T14:11:59.069Z","interval":{"days":1},"members":[{"user":{"id":"09e2b0f4-cb9b-11f0-a56e-4e680b759023"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:59.069Z"}],"name":"Test-Update_On_Call_schedule_returns_OK_response-1764252719","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: accept: - application/json @@ -33,7 +33,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/on-call/schedules response: body: - string: '{"data":{"id":"3cb80fa4-f506-4b2f-9187-2af6c2253698","type":"schedules","attributes":{"name":"Test-Update_On_Call_schedule_returns_OK_response-1751553045","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"70f75d0e-19d0-46a1-9c1c-19d2de171744","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"0e2c2b38-3f21-4216-aeb7-49eb8b371c09","type":"schedules","attributes":{"name":"Test-Update_On_Call_schedule_returns_OK_response-1764252719","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"140f452a-0ecf-48ab-b7e9-e358a2cf925b","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -41,7 +41,7 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"handle":"test-handle-001d7ca9284aa632","name":"test-name-001d7ca9284aa632"},"type":"team"}}' + body: '{"data":{"attributes":{"handle":"test-handle-0db1ad1d49052f19","name":"test-name-0db1ad1d49052f19"},"type":"team"}}' headers: accept: - application/json @@ -51,28 +51,26 @@ interactions: uri: https://api.datadoghq.com/api/v2/team response: body: - string: '{"data":{"type":"team","id":"9ca20f11-ede5-4147-addb-25b7f91ce508","attributes":{"name":"test-name-001d7ca9284aa632","handle":"test-handle-001d7ca9284aa632","summary":null,"description":null,"avatar":null,"banner":13,"visible_modules":[],"hidden_modules":[],"created_at":"2025-07-03T14:30:46.275583+00:00","modified_at":"2025-07-03T14:30:46.275594+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/9ca20f11-ede5-4147-addb-25b7f91ce508/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/9ca20f11-ede5-4147-addb-25b7f91ce508/permission-settings"}}}}} - - ' + string: '{"data":{"id":"500acba0-bf4f-4f5c-83be-d0de24c5739c","type":"team","attributes":{"avatar":null,"banner":8,"created_at":"2025-11-27T14:12:00.429799+00:00","description":null,"handle":"test-handle-0db1ad1d49052f19","hidden_modules":[],"link_count":0,"modified_at":"2025-11-27T14:12:00.429799+00:00","name":"test-name-0db1ad1d49052f19","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/500acba0-bf4f-4f5c-83be-d0de24c5739c/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/500acba0-bf4f-4f5c-83be-d0de24c5739c/permission-settings"}}}}}' headers: content-type: - - application/json + - application/vnd.api+json status: code: 201 message: Created - request: - body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-06-23T14:30:45.232Z","end_date":"2025-07-13T14:30:45.232Z","id":"70f75d0e-19d0-46a1-9c1c-19d2de171744","interval":{"seconds":3600},"members":[{"user":{"id":"4ea279a2-581a-11f0-bb4d-bed6e06a25e4"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-06-28T14:30:45.232Z"}],"name":"Test-Update_On_Call_schedule_returns_OK_response-1751553045","time_zone":"America/New_York"},"id":"3cb80fa4-f506-4b2f-9187-2af6c2253698","relationships":{"teams":{"data":[{"id":"9ca20f11-ede5-4147-addb-25b7f91ce508","type":"teams"}]}},"type":"schedules"}}' + body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:59.069Z","end_date":"2025-12-07T14:11:59.069Z","id":"140f452a-0ecf-48ab-b7e9-e358a2cf925b","interval":{"seconds":3600},"members":[{"user":{"id":"09e2b0f4-cb9b-11f0-a56e-4e680b759023"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:59.069Z"}],"name":"Test-Update_On_Call_schedule_returns_OK_response-1764252719","time_zone":"America/New_York"},"id":"0e2c2b38-3f21-4216-aeb7-49eb8b371c09","relationships":{"teams":{"data":[{"id":"500acba0-bf4f-4f5c-83be-d0de24c5739c","type":"teams"}]}},"type":"schedules"}}' headers: accept: - application/json content-type: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/on-call/schedules/3cb80fa4-f506-4b2f-9187-2af6c2253698 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/0e2c2b38-3f21-4216-aeb7-49eb8b371c09 response: body: - string: '{"data":{"id":"3cb80fa4-f506-4b2f-9187-2af6c2253698","type":"schedules","attributes":{"name":"Test-Update_On_Call_schedule_returns_OK_response-1751553045","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"70f75d0e-19d0-46a1-9c1c-19d2de171744","type":"layers"}]},"teams":{"data":[{"id":"9ca20f11-ede5-4147-addb-25b7f91ce508","type":"teams"}]}}}}' + string: '{"data":{"id":"0e2c2b38-3f21-4216-aeb7-49eb8b371c09","type":"schedules","attributes":{"name":"Test-Update_On_Call_schedule_returns_OK_response-1764252719","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"140f452a-0ecf-48ab-b7e9-e358a2cf925b","type":"layers"}]},"teams":{"data":[{"id":"500acba0-bf4f-4f5c-83be-d0de24c5739c","type":"teams"}]}}}}' headers: content-type: - application/vnd.api+json @@ -85,7 +83,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/9ca20f11-ede5-4147-addb-25b7f91ce508 + uri: https://api.datadoghq.com/api/v2/team/500acba0-bf4f-4f5c-83be-d0de24c5739c response: body: string: '' @@ -99,7 +97,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/3cb80fa4-f506-4b2f-9187-2af6c2253698 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/0e2c2b38-3f21-4216-aeb7-49eb8b371c09 response: body: string: '' @@ -113,7 +111,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/4ea279a2-581a-11f0-bb4d-bed6e06a25e4 + uri: https://api.datadoghq.com/api/v2/users/09e2b0f4-cb9b-11f0-a56e-4e680b759023 response: body: string: '' diff --git a/tests/v2/features/given.json b/tests/v2/features/given.json index 198c7af1b5..d336556f6f 100644 --- a/tests/v2/features/given.json +++ b/tests/v2/features/given.json @@ -735,7 +735,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"resolve_page_on_policy_end\": true,\n \"retries\": 2,\n \"steps\": [\n {\n \"assignment\": \"default\",\n \"escalate_after_seconds\": 3600,\n \"targets\": [\n {\n \"id\": \"{{ dd_team.data.id }}\",\n \"type\": \"teams\"\n },\n {\n \"id\": \"{{ schedule.data.id }}\",\n \"type\": \"schedules\"\n },\n {\n \"id\": \"{{ user.data.id }}\",\n \"type\": \"users\"\n }\n ]\n },\n {\n \"assignment\": \"round-robin\",\n \"escalate_after_seconds\": 3600,\n \"targets\": [\n {\n \"id\": \"{{ dd_team.data.id }}\",\n \"type\": \"teams\"\n }\n ]\n }\n ]\n },\n \"relationships\": {\n \"teams\": {\n \"data\": [\n {\n \"id\": \"{{ dd_team.data.id }}\",\n \"type\": \"teams\"\n }\n ]\n }\n },\n \"type\": \"policies\"\n }\n}" + "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"resolve_page_on_policy_end\": true,\n \"retries\": 2,\n \"steps\": [\n {\n \"assignment\": \"default\",\n \"escalate_after_seconds\": 3600,\n \"targets\": [\n {\n \"id\": \"{{ dd_team.data.id }}\",\n \"type\": \"teams\"\n },\n {\n \"id\": \"{{ schedule.data.id }}\",\n \"type\": \"schedules\"\n },\n {\n \"id\": \"{{ schedule.data.id }}\",\n \"type\": \"schedules\",\n \"config\": {\n \"schedule\": {\n \"position\": \"previous\"\n }\n }\n },\n {\n \"id\": \"{{ user.data.id }}\",\n \"type\": \"users\"\n }\n ]\n },\n {\n \"assignment\": \"round-robin\",\n \"escalate_after_seconds\": 3600,\n \"targets\": [\n {\n \"id\": \"{{ dd_team.data.id }}\",\n \"type\": \"teams\"\n }\n ]\n }\n ]\n },\n \"relationships\": {\n \"teams\": {\n \"data\": [\n {\n \"id\": \"{{ dd_team.data.id }}\",\n \"type\": \"teams\"\n }\n ]\n }\n },\n \"type\": \"policies\"\n }\n}" } ], "step": "there is a valid \"escalation_policy\" in the system", diff --git a/tests/v2/features/on-call.feature b/tests/v2/features/on-call.feature index 39640938e4..7bcd1d00e1 100644 --- a/tests/v2/features/on-call.feature +++ b/tests/v2/features/on-call.feature @@ -12,7 +12,7 @@ Feature: On-Call @generated @skip @team:DataDog/on-call Scenario: Create On-Call escalation policy returns "Bad Request" response Given new "CreateOnCallEscalationPolicy" request - And body with value {"data": {"attributes": {"name": "Escalation Policy 1", "resolve_page_on_policy_end": true, "retries": 2, "steps": [{"assignment": "default", "escalate_after_seconds": 3600, "targets": [{"id": "00000000-aba1-0000-0000-000000000000", "type": "users"}, {"id": "00000000-aba2-0000-0000-000000000000", "type": "schedules"}, {"id": "00000000-aba3-0000-0000-000000000000", "type": "teams"}]}, {"assignment": "round-robin", "escalate_after_seconds": 3600, "targets": [{"id": "00000000-aba1-0000-0000-000000000000", "type": "users"}, {"id": "00000000-abb1-0000-0000-000000000000", "type": "users"}]}]}, "relationships": {"teams": {"data": [{"id": "00000000-da3a-0000-0000-000000000000", "type": "teams"}]}}, "type": "policies"}} + And body with value {"data": {"attributes": {"name": "Escalation Policy 1", "resolve_page_on_policy_end": true, "retries": 2, "steps": [{"assignment": "default", "escalate_after_seconds": 3600, "targets": [{"id": "00000000-aba1-0000-0000-000000000000", "type": "users"}, {"config": {"schedule": {"position": "previous"}}, "id": "00000000-aba2-0000-0000-000000000000", "type": "schedules"}, {"id": "00000000-aba3-0000-0000-000000000000", "type": "teams"}]}, {"assignment": "round-robin", "escalate_after_seconds": 3600, "targets": [{"id": "00000000-aba1-0000-0000-000000000000", "type": "users"}, {"id": "00000000-abb1-0000-0000-000000000000", "type": "users"}]}]}, "relationships": {"teams": {"data": [{"id": "00000000-da3a-0000-0000-000000000000", "type": "teams"}]}}, "type": "policies"}} When the request is sent Then the response status is 400 Bad Request @@ -22,7 +22,7 @@ Feature: On-Call And there is a valid "user" in the system And there is a valid "schedule" in the system And there is a valid "dd_team" in the system - And body with value {"data": {"attributes": {"name": "{{ unique }}", "resolve_page_on_policy_end": true, "retries": 2, "steps": [{"assignment": "default", "escalate_after_seconds": 3600, "targets": [{"id": "{{ user.data.id }}", "type": "users"}, {"id": "{{ schedule.data.id }}", "type": "schedules"}, {"id": "{{ dd_team.data.id }}", "type": "teams"}]}, {"assignment": "round-robin", "escalate_after_seconds": 3600, "targets": [{"id": "{{ dd_team.data.id }}", "type": "teams"}]}]}, "relationships": {"teams": {"data": [{"id": "{{ dd_team.data.id }}", "type": "teams"}]}}, "type": "policies"}} + And body with value {"data": {"attributes": {"name": "{{ unique }}", "resolve_page_on_policy_end": true, "retries": 2, "steps": [{"assignment": "default", "escalate_after_seconds": 3600, "targets": [{"id": "{{ user.data.id }}", "type": "users"}, {"id": "{{ schedule.data.id }}", "type": "schedules"}, {"config": {"schedule": {"position": "previous"}}, "id": "{{ schedule.data.id }}", "type": "schedules"}, {"id": "{{ dd_team.data.id }}", "type": "teams"}]}, {"assignment": "round-robin", "escalate_after_seconds": 3600, "targets": [{"id": "{{ dd_team.data.id }}", "type": "teams"}]}]}, "relationships": {"teams": {"data": [{"id": "{{ dd_team.data.id }}", "type": "teams"}]}}, "type": "policies"}} And request contains "include" parameter with value "steps.targets" When the request is sent Then the response status is 201 Created