diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 05ce562f5..bc03f5267 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -11377,6 +11377,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: @@ -19260,6 +19330,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 @@ -19267,6 +19339,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: @@ -19294,7 +19375,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 @@ -19338,6 +19422,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 @@ -19347,12 +19432,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 @@ -19369,6 +19458,8 @@ components: step. example: 3600 format: int64 + maximum: 36000 + minimum: 60 type: integer targets: description: Specifies the collection of escalation targets for this step. @@ -19420,6 +19511,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 @@ -19429,6 +19521,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 @@ -19491,10 +19585,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. @@ -19542,8 +19637,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 @@ -19551,6 +19648,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`). @@ -19631,6 +19740,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 @@ -19640,12 +19750,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 @@ -19663,6 +19777,8 @@ components: step. example: 3600 format: int64 + maximum: 36000 + minimum: 60 type: integer id: description: Specifies the unique identifier of this step. @@ -19771,12 +19887,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: @@ -45636,7 +45753,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. @@ -45648,6 +45766,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/examples/v2_on-call_CreateOnCallEscalationPolicy.rs b/examples/v2_on-call_CreateOnCallEscalationPolicy.rs index 70a7e485e..0de603c93 100644 --- a/examples/v2_on-call_CreateOnCallEscalationPolicy.rs +++ b/examples/v2_on-call_CreateOnCallEscalationPolicy.rs @@ -13,7 +13,10 @@ use datadog_api_client::datadogV2::model::EscalationPolicyCreateRequestDataRelat use datadog_api_client::datadogV2::model::EscalationPolicyCreateRequestDataType; use datadog_api_client::datadogV2::model::EscalationPolicyStepAttributesAssignment; use datadog_api_client::datadogV2::model::EscalationPolicyStepTarget; +use datadog_api_client::datadogV2::model::EscalationPolicyStepTargetConfig; +use datadog_api_client::datadogV2::model::EscalationPolicyStepTargetConfigSchedule; use datadog_api_client::datadogV2::model::EscalationPolicyStepTargetType; +use datadog_api_client::datadogV2::model::ScheduleTargetPosition; #[tokio::main] async fn main() { @@ -37,6 +40,15 @@ async fn main() { EscalationPolicyStepTarget::new() .id(schedule_data_id.clone()) .type_(EscalationPolicyStepTargetType::SCHEDULES), + EscalationPolicyStepTarget::new() + .config( + EscalationPolicyStepTargetConfig::new().schedule( + EscalationPolicyStepTargetConfigSchedule::new() + .position(ScheduleTargetPosition::PREVIOUS), + ), + ) + .id(schedule_data_id.clone()) + .type_(EscalationPolicyStepTargetType::SCHEDULES), EscalationPolicyStepTarget::new() .id(dd_team_data_id.clone()) .type_(EscalationPolicyStepTargetType::TEAMS), diff --git a/src/datadogV2/model/mod.rs b/src/datadogV2/model/mod.rs index af304d956..4e9b52c23 100644 --- a/src/datadogV2/model/mod.rs +++ b/src/datadogV2/model/mod.rs @@ -3948,6 +3948,12 @@ pub mod model_escalation_policy_step_attributes_assignment; pub use self::model_escalation_policy_step_attributes_assignment::EscalationPolicyStepAttributesAssignment; pub mod model_escalation_policy_step_target; pub use self::model_escalation_policy_step_target::EscalationPolicyStepTarget; +pub mod model_escalation_policy_step_target_config; +pub use self::model_escalation_policy_step_target_config::EscalationPolicyStepTargetConfig; +pub mod model_escalation_policy_step_target_config_schedule; +pub use self::model_escalation_policy_step_target_config_schedule::EscalationPolicyStepTargetConfigSchedule; +pub mod model_schedule_target_position; +pub use self::model_schedule_target_position::ScheduleTargetPosition; pub mod model_escalation_policy_step_target_type; pub use self::model_escalation_policy_step_target_type::EscalationPolicyStepTargetType; pub mod model_escalation_policy_create_request_data_relationships; @@ -3976,12 +3982,6 @@ pub mod model_escalation_policy_data_relationships_steps_data_items_type; pub use self::model_escalation_policy_data_relationships_steps_data_items_type::EscalationPolicyDataRelationshipsStepsDataItemsType; pub mod model_escalation_policy_data_type; pub use self::model_escalation_policy_data_type::EscalationPolicyDataType; -pub mod model_team_reference; -pub use self::model_team_reference::TeamReference; -pub mod model_team_reference_attributes; -pub use self::model_team_reference_attributes::TeamReferenceAttributes; -pub mod model_team_reference_type; -pub use self::model_team_reference_type::TeamReferenceType; pub mod model_escalation_policy_step; pub use self::model_escalation_policy_step::EscalationPolicyStep; pub mod model_escalation_policy_step_attributes; @@ -4002,6 +4002,10 @@ pub mod model_schedule_target; pub use self::model_schedule_target::ScheduleTarget; pub mod model_schedule_target_type; pub use self::model_schedule_target_type::ScheduleTargetType; +pub mod model_configured_schedule_target; +pub use self::model_configured_schedule_target::ConfiguredScheduleTarget; +pub mod model_configured_schedule_target_type; +pub use self::model_configured_schedule_target_type::ConfiguredScheduleTargetType; pub mod model_escalation_target; pub use self::model_escalation_target::EscalationTarget; pub mod model_escalation_policy_step_type; @@ -4028,6 +4032,20 @@ pub mod model_schedule_data_relationships_layers_data_items_type; pub use self::model_schedule_data_relationships_layers_data_items_type::ScheduleDataRelationshipsLayersDataItemsType; pub mod model_schedule_data_type; pub use self::model_schedule_data_type::ScheduleDataType; +pub mod model_configured_schedule; +pub use self::model_configured_schedule::ConfiguredSchedule; +pub mod model_configured_schedule_target_attributes; +pub use self::model_configured_schedule_target_attributes::ConfiguredScheduleTargetAttributes; +pub mod model_configured_schedule_target_relationships; +pub use self::model_configured_schedule_target_relationships::ConfiguredScheduleTargetRelationships; +pub mod model_configured_schedule_target_relationships_schedule; +pub use self::model_configured_schedule_target_relationships_schedule::ConfiguredScheduleTargetRelationshipsSchedule; +pub mod model_team_reference; +pub use self::model_team_reference::TeamReference; +pub mod model_team_reference_attributes; +pub use self::model_team_reference_attributes::TeamReferenceAttributes; +pub mod model_team_reference_type; +pub use self::model_team_reference_type::TeamReferenceType; pub mod model_escalation_policy_included; pub use self::model_escalation_policy_included::EscalationPolicyIncluded; pub mod model_escalation_policy_update_request; diff --git a/src/datadogV2/model/model_configured_schedule.rs b/src/datadogV2/model/model_configured_schedule.rs new file mode 100644 index 000000000..d60b174f2 --- /dev/null +++ b/src/datadogV2/model/model_configured_schedule.rs @@ -0,0 +1,141 @@ +// 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. +use serde::de::{Error, MapAccess, Visitor}; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::skip_serializing_none; +use std::fmt::{self, Formatter}; + +/// Full resource representation of a configured schedule target with position (previous, current, or next). +#[non_exhaustive] +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize)] +pub struct ConfiguredSchedule { + /// Attributes for a configured schedule target, including position. + #[serde(rename = "attributes")] + pub attributes: crate::datadogV2::model::ConfiguredScheduleTargetAttributes, + /// Specifies the unique identifier of the configured schedule target. + #[serde(rename = "id")] + pub id: String, + /// Represents the relationships of a configured schedule target. + #[serde(rename = "relationships")] + pub relationships: crate::datadogV2::model::ConfiguredScheduleTargetRelationships, + /// Indicates that the resource is of type `schedule_target`. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::ConfiguredScheduleTargetType, + #[serde(flatten)] + pub additional_properties: std::collections::BTreeMap, + #[serde(skip)] + #[serde(default)] + pub(crate) _unparsed: bool, +} + +impl ConfiguredSchedule { + pub fn new( + attributes: crate::datadogV2::model::ConfiguredScheduleTargetAttributes, + id: String, + relationships: crate::datadogV2::model::ConfiguredScheduleTargetRelationships, + type_: crate::datadogV2::model::ConfiguredScheduleTargetType, + ) -> ConfiguredSchedule { + ConfiguredSchedule { + attributes, + id, + relationships, + type_, + additional_properties: std::collections::BTreeMap::new(), + _unparsed: false, + } + } + + pub fn additional_properties( + mut self, + value: std::collections::BTreeMap, + ) -> Self { + self.additional_properties = value; + self + } +} + +impl<'de> Deserialize<'de> for ConfiguredSchedule { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct ConfiguredScheduleVisitor; + impl<'a> Visitor<'a> for ConfiguredScheduleVisitor { + type Value = ConfiguredSchedule; + + fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.write_str("a mapping") + } + + fn visit_map(self, mut map: M) -> Result + where + M: MapAccess<'a>, + { + let mut attributes: Option< + crate::datadogV2::model::ConfiguredScheduleTargetAttributes, + > = None; + let mut id: Option = None; + let mut relationships: Option< + crate::datadogV2::model::ConfiguredScheduleTargetRelationships, + > = None; + let mut type_: Option = None; + let mut additional_properties: std::collections::BTreeMap< + String, + serde_json::Value, + > = std::collections::BTreeMap::new(); + let mut _unparsed = false; + + while let Some((k, v)) = map.next_entry::()? { + match k.as_str() { + "attributes" => { + attributes = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + "id" => { + id = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + "relationships" => { + relationships = + Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + "type" => { + type_ = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + if let Some(ref _type_) = type_ { + match _type_ { + crate::datadogV2::model::ConfiguredScheduleTargetType::UnparsedObject(_type_) => { + _unparsed = true; + }, + _ => {} + } + } + } + &_ => { + if let Ok(value) = serde_json::from_value(v.clone()) { + additional_properties.insert(k, value); + } + } + } + } + let attributes = attributes.ok_or_else(|| M::Error::missing_field("attributes"))?; + let id = id.ok_or_else(|| M::Error::missing_field("id"))?; + let relationships = + relationships.ok_or_else(|| M::Error::missing_field("relationships"))?; + let type_ = type_.ok_or_else(|| M::Error::missing_field("type_"))?; + + let content = ConfiguredSchedule { + attributes, + id, + relationships, + type_, + additional_properties, + _unparsed, + }; + + Ok(content) + } + } + + deserializer.deserialize_any(ConfiguredScheduleVisitor) + } +} diff --git a/src/datadogV2/model/model_configured_schedule_target.rs b/src/datadogV2/model/model_configured_schedule_target.rs new file mode 100644 index 000000000..9fadf3ca3 --- /dev/null +++ b/src/datadogV2/model/model_configured_schedule_target.rs @@ -0,0 +1,113 @@ +// 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. +use serde::de::{Error, MapAccess, Visitor}; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::skip_serializing_none; +use std::fmt::{self, Formatter}; + +/// Relationship reference to a configured schedule target. +#[non_exhaustive] +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize)] +pub struct ConfiguredScheduleTarget { + /// Specifies the unique identifier of the configured schedule target. + #[serde(rename = "id")] + pub id: String, + /// Indicates that the resource is of type `schedule_target`. + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::ConfiguredScheduleTargetType, + #[serde(flatten)] + pub additional_properties: std::collections::BTreeMap, + #[serde(skip)] + #[serde(default)] + pub(crate) _unparsed: bool, +} + +impl ConfiguredScheduleTarget { + pub fn new( + id: String, + type_: crate::datadogV2::model::ConfiguredScheduleTargetType, + ) -> ConfiguredScheduleTarget { + ConfiguredScheduleTarget { + id, + type_, + additional_properties: std::collections::BTreeMap::new(), + _unparsed: false, + } + } + + pub fn additional_properties( + mut self, + value: std::collections::BTreeMap, + ) -> Self { + self.additional_properties = value; + self + } +} + +impl<'de> Deserialize<'de> for ConfiguredScheduleTarget { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct ConfiguredScheduleTargetVisitor; + impl<'a> Visitor<'a> for ConfiguredScheduleTargetVisitor { + type Value = ConfiguredScheduleTarget; + + fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.write_str("a mapping") + } + + fn visit_map(self, mut map: M) -> Result + where + M: MapAccess<'a>, + { + let mut id: Option = None; + let mut type_: Option = None; + let mut additional_properties: std::collections::BTreeMap< + String, + serde_json::Value, + > = std::collections::BTreeMap::new(); + let mut _unparsed = false; + + while let Some((k, v)) = map.next_entry::()? { + match k.as_str() { + "id" => { + id = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + "type" => { + type_ = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + if let Some(ref _type_) = type_ { + match _type_ { + crate::datadogV2::model::ConfiguredScheduleTargetType::UnparsedObject(_type_) => { + _unparsed = true; + }, + _ => {} + } + } + } + &_ => { + if let Ok(value) = serde_json::from_value(v.clone()) { + additional_properties.insert(k, value); + } + } + } + } + let id = id.ok_or_else(|| M::Error::missing_field("id"))?; + let type_ = type_.ok_or_else(|| M::Error::missing_field("type_"))?; + + let content = ConfiguredScheduleTarget { + id, + type_, + additional_properties, + _unparsed, + }; + + Ok(content) + } + } + + deserializer.deserialize_any(ConfiguredScheduleTargetVisitor) + } +} diff --git a/src/datadogV2/model/model_configured_schedule_target_attributes.rs b/src/datadogV2/model/model_configured_schedule_target_attributes.rs new file mode 100644 index 000000000..f4ce1fdd1 --- /dev/null +++ b/src/datadogV2/model/model_configured_schedule_target_attributes.rs @@ -0,0 +1,102 @@ +// 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. +use serde::de::{Error, MapAccess, Visitor}; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::skip_serializing_none; +use std::fmt::{self, Formatter}; + +/// Attributes for a configured schedule target, including position. +#[non_exhaustive] +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize)] +pub struct ConfiguredScheduleTargetAttributes { + /// Specifies the position of a schedule target (example `previous`, `current`, or `next`). + #[serde(rename = "position")] + pub position: crate::datadogV2::model::ScheduleTargetPosition, + #[serde(flatten)] + pub additional_properties: std::collections::BTreeMap, + #[serde(skip)] + #[serde(default)] + pub(crate) _unparsed: bool, +} + +impl ConfiguredScheduleTargetAttributes { + pub fn new( + position: crate::datadogV2::model::ScheduleTargetPosition, + ) -> ConfiguredScheduleTargetAttributes { + ConfiguredScheduleTargetAttributes { + position, + additional_properties: std::collections::BTreeMap::new(), + _unparsed: false, + } + } + + pub fn additional_properties( + mut self, + value: std::collections::BTreeMap, + ) -> Self { + self.additional_properties = value; + self + } +} + +impl<'de> Deserialize<'de> for ConfiguredScheduleTargetAttributes { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct ConfiguredScheduleTargetAttributesVisitor; + impl<'a> Visitor<'a> for ConfiguredScheduleTargetAttributesVisitor { + type Value = ConfiguredScheduleTargetAttributes; + + fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.write_str("a mapping") + } + + fn visit_map(self, mut map: M) -> Result + where + M: MapAccess<'a>, + { + let mut position: Option = None; + let mut additional_properties: std::collections::BTreeMap< + String, + serde_json::Value, + > = std::collections::BTreeMap::new(); + let mut _unparsed = false; + + while let Some((k, v)) = map.next_entry::()? { + match k.as_str() { + "position" => { + position = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + if let Some(ref _position) = position { + match _position { + crate::datadogV2::model::ScheduleTargetPosition::UnparsedObject(_position) => { + _unparsed = true; + }, + _ => {} + } + } + } + &_ => { + if let Ok(value) = serde_json::from_value(v.clone()) { + additional_properties.insert(k, value); + } + } + } + } + let position = position.ok_or_else(|| M::Error::missing_field("position"))?; + + let content = ConfiguredScheduleTargetAttributes { + position, + additional_properties, + _unparsed, + }; + + Ok(content) + } + } + + deserializer.deserialize_any(ConfiguredScheduleTargetAttributesVisitor) + } +} diff --git a/src/datadogV2/model/model_configured_schedule_target_relationships.rs b/src/datadogV2/model/model_configured_schedule_target_relationships.rs new file mode 100644 index 000000000..69ee4a206 --- /dev/null +++ b/src/datadogV2/model/model_configured_schedule_target_relationships.rs @@ -0,0 +1,96 @@ +// 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. +use serde::de::{Error, MapAccess, Visitor}; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::skip_serializing_none; +use std::fmt::{self, Formatter}; + +/// Represents the relationships of a configured schedule target. +#[non_exhaustive] +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize)] +pub struct ConfiguredScheduleTargetRelationships { + /// Holds the schedule reference for a configured schedule target. + #[serde(rename = "schedule")] + pub schedule: crate::datadogV2::model::ConfiguredScheduleTargetRelationshipsSchedule, + #[serde(flatten)] + pub additional_properties: std::collections::BTreeMap, + #[serde(skip)] + #[serde(default)] + pub(crate) _unparsed: bool, +} + +impl ConfiguredScheduleTargetRelationships { + pub fn new( + schedule: crate::datadogV2::model::ConfiguredScheduleTargetRelationshipsSchedule, + ) -> ConfiguredScheduleTargetRelationships { + ConfiguredScheduleTargetRelationships { + schedule, + additional_properties: std::collections::BTreeMap::new(), + _unparsed: false, + } + } + + pub fn additional_properties( + mut self, + value: std::collections::BTreeMap, + ) -> Self { + self.additional_properties = value; + self + } +} + +impl<'de> Deserialize<'de> for ConfiguredScheduleTargetRelationships { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct ConfiguredScheduleTargetRelationshipsVisitor; + impl<'a> Visitor<'a> for ConfiguredScheduleTargetRelationshipsVisitor { + type Value = ConfiguredScheduleTargetRelationships; + + fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.write_str("a mapping") + } + + fn visit_map(self, mut map: M) -> Result + where + M: MapAccess<'a>, + { + let mut schedule: Option< + crate::datadogV2::model::ConfiguredScheduleTargetRelationshipsSchedule, + > = None; + let mut additional_properties: std::collections::BTreeMap< + String, + serde_json::Value, + > = std::collections::BTreeMap::new(); + let mut _unparsed = false; + + while let Some((k, v)) = map.next_entry::()? { + match k.as_str() { + "schedule" => { + schedule = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + &_ => { + if let Ok(value) = serde_json::from_value(v.clone()) { + additional_properties.insert(k, value); + } + } + } + } + let schedule = schedule.ok_or_else(|| M::Error::missing_field("schedule"))?; + + let content = ConfiguredScheduleTargetRelationships { + schedule, + additional_properties, + _unparsed, + }; + + Ok(content) + } + } + + deserializer.deserialize_any(ConfiguredScheduleTargetRelationshipsVisitor) + } +} diff --git a/src/datadogV2/model/model_configured_schedule_target_relationships_schedule.rs b/src/datadogV2/model/model_configured_schedule_target_relationships_schedule.rs new file mode 100644 index 000000000..f487d6f2d --- /dev/null +++ b/src/datadogV2/model/model_configured_schedule_target_relationships_schedule.rs @@ -0,0 +1,94 @@ +// 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. +use serde::de::{Error, MapAccess, Visitor}; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::skip_serializing_none; +use std::fmt::{self, Formatter}; + +/// Holds the schedule reference for a configured schedule target. +#[non_exhaustive] +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize)] +pub struct ConfiguredScheduleTargetRelationshipsSchedule { + /// 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'. + #[serde(rename = "data")] + pub data: crate::datadogV2::model::ScheduleTarget, + #[serde(flatten)] + pub additional_properties: std::collections::BTreeMap, + #[serde(skip)] + #[serde(default)] + pub(crate) _unparsed: bool, +} + +impl ConfiguredScheduleTargetRelationshipsSchedule { + pub fn new( + data: crate::datadogV2::model::ScheduleTarget, + ) -> ConfiguredScheduleTargetRelationshipsSchedule { + ConfiguredScheduleTargetRelationshipsSchedule { + data, + additional_properties: std::collections::BTreeMap::new(), + _unparsed: false, + } + } + + pub fn additional_properties( + mut self, + value: std::collections::BTreeMap, + ) -> Self { + self.additional_properties = value; + self + } +} + +impl<'de> Deserialize<'de> for ConfiguredScheduleTargetRelationshipsSchedule { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct ConfiguredScheduleTargetRelationshipsScheduleVisitor; + impl<'a> Visitor<'a> for ConfiguredScheduleTargetRelationshipsScheduleVisitor { + type Value = ConfiguredScheduleTargetRelationshipsSchedule; + + fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.write_str("a mapping") + } + + fn visit_map(self, mut map: M) -> Result + where + M: MapAccess<'a>, + { + let mut data: Option = None; + let mut additional_properties: std::collections::BTreeMap< + String, + serde_json::Value, + > = std::collections::BTreeMap::new(); + let mut _unparsed = false; + + while let Some((k, v)) = map.next_entry::()? { + match k.as_str() { + "data" => { + data = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + &_ => { + if let Ok(value) = serde_json::from_value(v.clone()) { + additional_properties.insert(k, value); + } + } + } + } + let data = data.ok_or_else(|| M::Error::missing_field("data"))?; + + let content = ConfiguredScheduleTargetRelationshipsSchedule { + data, + additional_properties, + _unparsed, + }; + + Ok(content) + } + } + + deserializer.deserialize_any(ConfiguredScheduleTargetRelationshipsScheduleVisitor) + } +} diff --git a/src/datadogV2/model/model_configured_schedule_target_type.rs b/src/datadogV2/model/model_configured_schedule_target_type.rs new file mode 100644 index 000000000..7a9f31ff1 --- /dev/null +++ b/src/datadogV2/model/model_configured_schedule_target_type.rs @@ -0,0 +1,48 @@ +// 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. + +use serde::{Deserialize, Deserializer, Serialize, Serializer}; + +#[non_exhaustive] +#[derive(Clone, Debug, Eq, PartialEq)] +pub enum ConfiguredScheduleTargetType { + SCHEDULE_TARGET, + UnparsedObject(crate::datadog::UnparsedObject), +} + +impl ToString for ConfiguredScheduleTargetType { + fn to_string(&self) -> String { + match self { + Self::SCHEDULE_TARGET => String::from("schedule_target"), + Self::UnparsedObject(v) => v.value.to_string(), + } + } +} + +impl Serialize for ConfiguredScheduleTargetType { + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + match self { + Self::UnparsedObject(v) => v.serialize(serializer), + _ => serializer.serialize_str(self.to_string().as_str()), + } + } +} + +impl<'de> Deserialize<'de> for ConfiguredScheduleTargetType { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + let s: String = String::deserialize(deserializer)?; + Ok(match s.as_str() { + "schedule_target" => Self::SCHEDULE_TARGET, + _ => Self::UnparsedObject(crate::datadog::UnparsedObject { + value: serde_json::Value::String(s.into()), + }), + }) + } +} diff --git a/src/datadogV2/model/model_escalation_policy_included.rs b/src/datadogV2/model/model_escalation_policy_included.rs index d943aea89..fc6dbb968 100644 --- a/src/datadogV2/model/model_escalation_policy_included.rs +++ b/src/datadogV2/model/model_escalation_policy_included.rs @@ -8,10 +8,11 @@ use serde::{Deserialize, Deserializer, Serialize}; #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(untagged)] pub enum EscalationPolicyIncluded { - TeamReference(Box), EscalationPolicyStep(Box), EscalationPolicyUser(Box), ScheduleData(Box), + ConfiguredSchedule(Box), + TeamReference(Box), UnparsedObject(crate::datadog::UnparsedObject), } @@ -21,13 +22,6 @@ impl<'de> Deserialize<'de> for EscalationPolicyIncluded { D: Deserializer<'de>, { let value: serde_json::Value = Deserialize::deserialize(deserializer)?; - if let Ok(_v) = - serde_json::from_value::>(value.clone()) - { - if !_v._unparsed { - return Ok(EscalationPolicyIncluded::TeamReference(_v)); - } - } if let Ok(_v) = serde_json::from_value::>( value.clone(), ) { @@ -49,6 +43,20 @@ impl<'de> Deserialize<'de> for EscalationPolicyIncluded { return Ok(EscalationPolicyIncluded::ScheduleData(_v)); } } + if let Ok(_v) = serde_json::from_value::>( + value.clone(), + ) { + if !_v._unparsed { + return Ok(EscalationPolicyIncluded::ConfiguredSchedule(_v)); + } + } + if let Ok(_v) = + serde_json::from_value::>(value.clone()) + { + if !_v._unparsed { + return Ok(EscalationPolicyIncluded::TeamReference(_v)); + } + } return Ok(EscalationPolicyIncluded::UnparsedObject( crate::datadog::UnparsedObject { value }, diff --git a/src/datadogV2/model/model_escalation_policy_step_target.rs b/src/datadogV2/model/model_escalation_policy_step_target.rs index 529222993..8b8f2d9c1 100644 --- a/src/datadogV2/model/model_escalation_policy_step_target.rs +++ b/src/datadogV2/model/model_escalation_policy_step_target.rs @@ -6,11 +6,14 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// 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`. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct EscalationPolicyStepTarget { + /// Configuration for an escalation target, such as schedule position. + #[serde(rename = "config")] + pub config: Option, /// Specifies the unique identifier for this target. #[serde(rename = "id")] pub id: Option, @@ -27,6 +30,7 @@ pub struct EscalationPolicyStepTarget { impl EscalationPolicyStepTarget { pub fn new() -> EscalationPolicyStepTarget { EscalationPolicyStepTarget { + config: None, id: None, type_: None, additional_properties: std::collections::BTreeMap::new(), @@ -34,6 +38,14 @@ impl EscalationPolicyStepTarget { } } + pub fn config( + mut self, + value: crate::datadogV2::model::EscalationPolicyStepTargetConfig, + ) -> Self { + self.config = Some(value); + self + } + pub fn id(mut self, value: String) -> Self { self.id = Some(value); self @@ -76,6 +88,8 @@ impl<'de> Deserialize<'de> for EscalationPolicyStepTarget { where M: MapAccess<'a>, { + let mut config: Option = + None; let mut id: Option = None; let mut type_: Option = None; @@ -87,6 +101,12 @@ impl<'de> Deserialize<'de> for EscalationPolicyStepTarget { while let Some((k, v)) = map.next_entry::()? { match k.as_str() { + "config" => { + if v.is_null() { + continue; + } + config = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } "id" => { if v.is_null() { continue; @@ -116,6 +136,7 @@ impl<'de> Deserialize<'de> for EscalationPolicyStepTarget { } let content = EscalationPolicyStepTarget { + config, id, type_, additional_properties, diff --git a/src/datadogV2/model/model_escalation_policy_step_target_config.rs b/src/datadogV2/model/model_escalation_policy_step_target_config.rs new file mode 100644 index 000000000..e75a41f30 --- /dev/null +++ b/src/datadogV2/model/model_escalation_policy_step_target_config.rs @@ -0,0 +1,110 @@ +// 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. +use serde::de::{Error, MapAccess, Visitor}; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::skip_serializing_none; +use std::fmt::{self, Formatter}; + +/// Configuration for an escalation target, such as schedule position. +#[non_exhaustive] +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize)] +pub struct EscalationPolicyStepTargetConfig { + /// Schedule-specific configuration for an escalation target. + #[serde(rename = "schedule")] + pub schedule: Option, + #[serde(flatten)] + pub additional_properties: std::collections::BTreeMap, + #[serde(skip)] + #[serde(default)] + pub(crate) _unparsed: bool, +} + +impl EscalationPolicyStepTargetConfig { + pub fn new() -> EscalationPolicyStepTargetConfig { + EscalationPolicyStepTargetConfig { + schedule: None, + additional_properties: std::collections::BTreeMap::new(), + _unparsed: false, + } + } + + pub fn schedule( + mut self, + value: crate::datadogV2::model::EscalationPolicyStepTargetConfigSchedule, + ) -> Self { + self.schedule = Some(value); + self + } + + pub fn additional_properties( + mut self, + value: std::collections::BTreeMap, + ) -> Self { + self.additional_properties = value; + self + } +} + +impl Default for EscalationPolicyStepTargetConfig { + fn default() -> Self { + Self::new() + } +} + +impl<'de> Deserialize<'de> for EscalationPolicyStepTargetConfig { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct EscalationPolicyStepTargetConfigVisitor; + impl<'a> Visitor<'a> for EscalationPolicyStepTargetConfigVisitor { + type Value = EscalationPolicyStepTargetConfig; + + fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.write_str("a mapping") + } + + fn visit_map(self, mut map: M) -> Result + where + M: MapAccess<'a>, + { + let mut schedule: Option< + crate::datadogV2::model::EscalationPolicyStepTargetConfigSchedule, + > = None; + let mut additional_properties: std::collections::BTreeMap< + String, + serde_json::Value, + > = std::collections::BTreeMap::new(); + let mut _unparsed = false; + + while let Some((k, v)) = map.next_entry::()? { + match k.as_str() { + "schedule" => { + if v.is_null() { + continue; + } + schedule = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + &_ => { + if let Ok(value) = serde_json::from_value(v.clone()) { + additional_properties.insert(k, value); + } + } + } + } + + let content = EscalationPolicyStepTargetConfig { + schedule, + additional_properties, + _unparsed, + }; + + Ok(content) + } + } + + deserializer.deserialize_any(EscalationPolicyStepTargetConfigVisitor) + } +} diff --git a/src/datadogV2/model/model_escalation_policy_step_target_config_schedule.rs b/src/datadogV2/model/model_escalation_policy_step_target_config_schedule.rs new file mode 100644 index 000000000..cf3e9ba11 --- /dev/null +++ b/src/datadogV2/model/model_escalation_policy_step_target_config_schedule.rs @@ -0,0 +1,113 @@ +// 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. +use serde::de::{Error, MapAccess, Visitor}; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::skip_serializing_none; +use std::fmt::{self, Formatter}; + +/// Schedule-specific configuration for an escalation target. +#[non_exhaustive] +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize)] +pub struct EscalationPolicyStepTargetConfigSchedule { + /// Specifies the position of a schedule target (example `previous`, `current`, or `next`). + #[serde(rename = "position")] + pub position: Option, + #[serde(flatten)] + pub additional_properties: std::collections::BTreeMap, + #[serde(skip)] + #[serde(default)] + pub(crate) _unparsed: bool, +} + +impl EscalationPolicyStepTargetConfigSchedule { + pub fn new() -> EscalationPolicyStepTargetConfigSchedule { + EscalationPolicyStepTargetConfigSchedule { + position: None, + additional_properties: std::collections::BTreeMap::new(), + _unparsed: false, + } + } + + pub fn position(mut self, value: crate::datadogV2::model::ScheduleTargetPosition) -> Self { + self.position = Some(value); + self + } + + pub fn additional_properties( + mut self, + value: std::collections::BTreeMap, + ) -> Self { + self.additional_properties = value; + self + } +} + +impl Default for EscalationPolicyStepTargetConfigSchedule { + fn default() -> Self { + Self::new() + } +} + +impl<'de> Deserialize<'de> for EscalationPolicyStepTargetConfigSchedule { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct EscalationPolicyStepTargetConfigScheduleVisitor; + impl<'a> Visitor<'a> for EscalationPolicyStepTargetConfigScheduleVisitor { + type Value = EscalationPolicyStepTargetConfigSchedule; + + fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.write_str("a mapping") + } + + fn visit_map(self, mut map: M) -> Result + where + M: MapAccess<'a>, + { + let mut position: Option = None; + let mut additional_properties: std::collections::BTreeMap< + String, + serde_json::Value, + > = std::collections::BTreeMap::new(); + let mut _unparsed = false; + + while let Some((k, v)) = map.next_entry::()? { + match k.as_str() { + "position" => { + if v.is_null() { + continue; + } + position = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + if let Some(ref _position) = position { + match _position { + crate::datadogV2::model::ScheduleTargetPosition::UnparsedObject(_position) => { + _unparsed = true; + }, + _ => {} + } + } + } + &_ => { + if let Ok(value) = serde_json::from_value(v.clone()) { + additional_properties.insert(k, value); + } + } + } + } + + let content = EscalationPolicyStepTargetConfigSchedule { + position, + additional_properties, + _unparsed, + }; + + Ok(content) + } + } + + deserializer.deserialize_any(EscalationPolicyStepTargetConfigScheduleVisitor) + } +} diff --git a/src/datadogV2/model/model_escalation_target.rs b/src/datadogV2/model/model_escalation_target.rs index 58dc07afa..a7f94d0be 100644 --- a/src/datadogV2/model/model_escalation_target.rs +++ b/src/datadogV2/model/model_escalation_target.rs @@ -3,7 +3,7 @@ // Copyright 2019-Present Datadog, Inc. use serde::{Deserialize, Deserializer, Serialize}; -/// 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. #[non_exhaustive] #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(untagged)] @@ -11,6 +11,7 @@ pub enum EscalationTarget { TeamTarget(Box), UserTarget(Box), ScheduleTarget(Box), + ConfiguredScheduleTarget(Box), UnparsedObject(crate::datadog::UnparsedObject), } @@ -41,6 +42,14 @@ impl<'de> Deserialize<'de> for EscalationTarget { return Ok(EscalationTarget::ScheduleTarget(_v)); } } + if let Ok(_v) = serde_json::from_value::< + Box, + >(value.clone()) + { + if !_v._unparsed { + return Ok(EscalationTarget::ConfiguredScheduleTarget(_v)); + } + } return Ok(EscalationTarget::UnparsedObject( crate::datadog::UnparsedObject { value }, diff --git a/src/datadogV2/model/model_schedule_target.rs b/src/datadogV2/model/model_schedule_target.rs index 8f0dfff49..23c781eec 100644 --- a/src/datadogV2/model/model_schedule_target.rs +++ b/src/datadogV2/model/model_schedule_target.rs @@ -6,7 +6,7 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// 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'. #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] diff --git a/src/datadogV2/model/model_schedule_target_position.rs b/src/datadogV2/model/model_schedule_target_position.rs new file mode 100644 index 000000000..db3cd75b9 --- /dev/null +++ b/src/datadogV2/model/model_schedule_target_position.rs @@ -0,0 +1,54 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. + +use serde::{Deserialize, Deserializer, Serialize, Serializer}; + +#[non_exhaustive] +#[derive(Clone, Debug, Eq, PartialEq)] +pub enum ScheduleTargetPosition { + PREVIOUS, + CURRENT, + NEXT, + UnparsedObject(crate::datadog::UnparsedObject), +} + +impl ToString for ScheduleTargetPosition { + fn to_string(&self) -> String { + match self { + Self::PREVIOUS => String::from("previous"), + Self::CURRENT => String::from("current"), + Self::NEXT => String::from("next"), + Self::UnparsedObject(v) => v.value.to_string(), + } + } +} + +impl Serialize for ScheduleTargetPosition { + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + match self { + Self::UnparsedObject(v) => v.serialize(serializer), + _ => serializer.serialize_str(self.to_string().as_str()), + } + } +} + +impl<'de> Deserialize<'de> for ScheduleTargetPosition { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + let s: String = String::deserialize(deserializer)?; + Ok(match s.as_str() { + "previous" => Self::PREVIOUS, + "current" => Self::CURRENT, + "next" => Self::NEXT, + _ => Self::UnparsedObject(crate::datadog::UnparsedObject { + value: serde_json::Value::String(s.into()), + }), + }) + } +} diff --git a/tests/scenarios/cassettes/v2/on-call/Create-On-Call-escalation-policy-returns-Created-response.frozen b/tests/scenarios/cassettes/v2/on-call/Create-On-Call-escalation-policy-returns-Created-response.frozen index b8ab6c292..d47e0da1f 100644 --- a/tests/scenarios/cassettes/v2/on-call/Create-On-Call-escalation-policy-returns-Created-response.frozen +++ b/tests/scenarios/cassettes/v2/on-call/Create-On-Call-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/scenarios/cassettes/v2/on-call/Create-On-Call-escalation-policy-returns-Created-response.json b/tests/scenarios/cassettes/v2/on-call/Create-On-Call-escalation-policy-returns-Created-response.json index d454b49ff..6d24f5f93 100644 --- a/tests/scenarios/cassettes/v2/on-call/Create-On-Call-escalation-policy-returns-Created-response.json +++ b/tests/scenarios/cassettes/v2/on-call/Create-On-Call-escalation-policy-returns-Created-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Create_On_Call_escalation_policy_returns_Created_response-1748494410@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", + "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Create_On_Call_escalation_policy_returns_Created_response-1764334736@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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\"}}}}}\n", + "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\"}}}}}\n", "encoding": null }, "headers": { @@ -32,12 +32,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:53:30 GMT" + "recorded_at": "Fri, 28 Nov 2025 12:58:56 GMT" }, { "request": { "body": { - "string": "{\"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\"}}", + "string": "{\"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\"}}", "encoding": null }, "headers": { @@ -53,7 +53,7 @@ }, "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\"}]}}}}", "encoding": null }, "headers": { @@ -66,12 +66,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:53:30 GMT" + "recorded_at": "Fri, 28 Nov 2025 12:58:56 GMT" }, { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-cfbc9f18713005c6\",\"name\":\"test-name-cfbc9f18713005c6\"},\"type\":\"team\"}}", + "string": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-24ceda96b794cbdd\",\"name\":\"test-name-24ceda96b794cbdd\"},\"type\":\"team\"}}", "encoding": null }, "headers": { @@ -87,12 +87,12 @@ }, "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\"}}}}}\n", + "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\"}}}}}", "encoding": null }, "headers": { "Content-Type": [ - "application/json" + "application/vnd.api+json" ] }, "status": { @@ -100,12 +100,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:53:30 GMT" + "recorded_at": "Fri, 28 Nov 2025 12:58:56 GMT" }, { "request": { "body": { - "string": "{\"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\"}}", + "string": "{\"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\"}}", "encoding": null }, "headers": { @@ -121,7 +121,7 @@ }, "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\"}}]}", "encoding": null }, "headers": { @@ -134,7 +134,7 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:53:30 GMT" + "recorded_at": "Fri, 28 Nov 2025 12:58:56 GMT" }, { "request": { @@ -145,7 +145,7 @@ ] }, "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": { @@ -158,7 +158,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:53:30 GMT" + "recorded_at": "Fri, 28 Nov 2025 12:58:56 GMT" }, { "request": { @@ -169,7 +169,7 @@ ] }, "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": { @@ -182,7 +182,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:53:30 GMT" + "recorded_at": "Fri, 28 Nov 2025 12:58:56 GMT" }, { "request": { @@ -193,7 +193,7 @@ ] }, "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": { @@ -206,7 +206,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:53:30 GMT" + "recorded_at": "Fri, 28 Nov 2025 12:58:56 GMT" }, { "request": { @@ -217,7 +217,7 @@ ] }, "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": { @@ -230,7 +230,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:53:30 GMT" + "recorded_at": "Fri, 28 Nov 2025 12:58:56 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/on-call/Create-On-Call-schedule-returns-Created-response.frozen b/tests/scenarios/cassettes/v2/on-call/Create-On-Call-schedule-returns-Created-response.frozen index 47ee6d1da..59b299377 100644 --- a/tests/scenarios/cassettes/v2/on-call/Create-On-Call-schedule-returns-Created-response.frozen +++ b/tests/scenarios/cassettes/v2/on-call/Create-On-Call-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/scenarios/cassettes/v2/on-call/Create-On-Call-schedule-returns-Created-response.json b/tests/scenarios/cassettes/v2/on-call/Create-On-Call-schedule-returns-Created-response.json index 426c5a35f..b8bed2382 100644 --- a/tests/scenarios/cassettes/v2/on-call/Create-On-Call-schedule-returns-Created-response.json +++ b/tests/scenarios/cassettes/v2/on-call/Create-On-Call-schedule-returns-Created-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Create_On_Call_schedule_returns_Created_response-1748494417@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", + "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Create_On_Call_schedule_returns_Created_response-1764252682@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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\"}}}}}\n", + "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\"}}}}}\n", "encoding": null }, "headers": { @@ -32,12 +32,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:53:37 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:22 GMT" }, { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-0ed4255faa1a4de8\",\"name\":\"test-name-0ed4255faa1a4de8\"},\"type\":\"team\"}}", + "string": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-a115b862e893678b\",\"name\":\"test-name-a115b862e893678b\"},\"type\":\"team\"}}", "encoding": null }, "headers": { @@ -53,12 +53,12 @@ }, "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\"}}}}}\n", + "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\"}}}}}", "encoding": null }, "headers": { "Content-Type": [ - "application/json" + "application/vnd.api+json" ] }, "status": { @@ -66,12 +66,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:53:37 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:22 GMT" }, { "request": { "body": { - "string": "{\"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\"}}", + "string": "{\"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\"}}", "encoding": null }, "headers": { @@ -87,7 +87,7 @@ }, "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\"}]}}}}", "encoding": null }, "headers": { @@ -100,7 +100,7 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:53:37 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:22 GMT" }, { "request": { @@ -111,7 +111,7 @@ ] }, "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": { @@ -124,7 +124,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:53:37 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:22 GMT" }, { "request": { @@ -135,7 +135,7 @@ ] }, "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": { @@ -148,7 +148,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:53:37 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:22 GMT" }, { "request": { @@ -159,7 +159,7 @@ ] }, "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": { @@ -172,7 +172,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:53:37 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:22 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/on-call/Delete-On-Call-escalation-policy-returns-No-Content-response.frozen b/tests/scenarios/cassettes/v2/on-call/Delete-On-Call-escalation-policy-returns-No-Content-response.frozen index c28891b94..214a0e6a9 100644 --- a/tests/scenarios/cassettes/v2/on-call/Delete-On-Call-escalation-policy-returns-No-Content-response.frozen +++ b/tests/scenarios/cassettes/v2/on-call/Delete-On-Call-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/scenarios/cassettes/v2/on-call/Delete-On-Call-escalation-policy-returns-No-Content-response.json b/tests/scenarios/cassettes/v2/on-call/Delete-On-Call-escalation-policy-returns-No-Content-response.json index aea02bf5e..e200fc122 100644 --- a/tests/scenarios/cassettes/v2/on-call/Delete-On-Call-escalation-policy-returns-No-Content-response.json +++ b/tests/scenarios/cassettes/v2/on-call/Delete-On-Call-escalation-policy-returns-No-Content-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1748494422@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", + "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1764252685@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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\"}}}}}\n", + "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\"}}}}}\n", "encoding": null }, "headers": { @@ -32,12 +32,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:53:42 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:25 GMT" }, { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-7311534a0fd625d8\",\"name\":\"test-name-7311534a0fd625d8\"},\"type\":\"team\"}}", + "string": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-5d85b5aacd02cab9\",\"name\":\"test-name-5d85b5aacd02cab9\"},\"type\":\"team\"}}", "encoding": null }, "headers": { @@ -53,12 +53,12 @@ }, "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\"}}}}}\n", + "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\"}}}}}", "encoding": null }, "headers": { "Content-Type": [ - "application/json" + "application/vnd.api+json" ] }, "status": { @@ -66,12 +66,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:53:42 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:25 GMT" }, { "request": { "body": { - "string": "{\"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\"}}", + "string": "{\"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\"}}", "encoding": null }, "headers": { @@ -87,7 +87,7 @@ }, "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\"}]}}}}", "encoding": null }, "headers": { @@ -100,12 +100,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:53:42 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:25 GMT" }, { "request": { "body": { - "string": "{\"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\"}}", + "string": "{\"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\"}}", "encoding": null }, "headers": { @@ -121,7 +121,7 @@ }, "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\"}]}}}}", "encoding": null }, "headers": { @@ -134,7 +134,7 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:53:42 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:25 GMT" }, { "request": { @@ -145,7 +145,7 @@ ] }, "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": { @@ -158,7 +158,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:53:42 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:25 GMT" }, { "request": { @@ -169,11 +169,11 @@ ] }, "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] not found\"}]}", + "string": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"escalation_policy[c25d7cd6-d2bc-4d84-801b-3a09d62e29bc] not found\"}]}", "encoding": null }, "headers": { @@ -186,7 +186,7 @@ "message": "Not Found" } }, - "recorded_at": "Thu, 29 May 2025 04:53:42 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:25 GMT" }, { "request": { @@ -197,7 +197,7 @@ ] }, "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": { @@ -210,7 +210,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:53:42 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:25 GMT" }, { "request": { @@ -221,7 +221,7 @@ ] }, "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": { @@ -234,7 +234,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:53:42 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:25 GMT" }, { "request": { @@ -245,7 +245,7 @@ ] }, "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": { @@ -258,7 +258,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:53:42 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:25 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/on-call/Delete-On-Call-schedule-returns-No-Content-response.frozen b/tests/scenarios/cassettes/v2/on-call/Delete-On-Call-schedule-returns-No-Content-response.frozen index faf035006..41f785378 100644 --- a/tests/scenarios/cassettes/v2/on-call/Delete-On-Call-schedule-returns-No-Content-response.frozen +++ b/tests/scenarios/cassettes/v2/on-call/Delete-On-Call-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/scenarios/cassettes/v2/on-call/Delete-On-Call-schedule-returns-No-Content-response.json b/tests/scenarios/cassettes/v2/on-call/Delete-On-Call-schedule-returns-No-Content-response.json index 4e8c8507f..5d2e4fdda 100644 --- a/tests/scenarios/cassettes/v2/on-call/Delete-On-Call-schedule-returns-No-Content-response.json +++ b/tests/scenarios/cassettes/v2/on-call/Delete-On-Call-schedule-returns-No-Content-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Delete_On_Call_schedule_returns_No_Content_response-1748494428@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", + "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Delete_On_Call_schedule_returns_No_Content_response-1764252690@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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\"}}}}}\n", + "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\"}}}}}\n", "encoding": null }, "headers": { @@ -32,12 +32,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:53:48 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:30 GMT" }, { "request": { "body": { - "string": "{\"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\"}}", + "string": "{\"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\"}}", "encoding": null }, "headers": { @@ -53,7 +53,7 @@ }, "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\"}]}}}}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:53:48 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:30 GMT" }, { "request": { @@ -77,7 +77,7 @@ ] }, "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": { @@ -90,7 +90,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:53:48 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:30 GMT" }, { "request": { @@ -101,11 +101,11 @@ ] }, "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] not found\"}]}", + "string": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"schedule[10acf747-60a0-4bdf-a0df-196e9f9291e2] not found\"}]}", "encoding": null }, "headers": { @@ -118,7 +118,7 @@ "message": "Not Found" } }, - "recorded_at": "Thu, 29 May 2025 04:53:48 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:30 GMT" }, { "request": { @@ -129,7 +129,7 @@ ] }, "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": { @@ -142,7 +142,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:53:48 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:30 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/on-call/Get-On-Call-escalation-policy-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/on-call/Get-On-Call-escalation-policy-returns-OK-response.frozen index b08c0417d..e08e7183e 100644 --- a/tests/scenarios/cassettes/v2/on-call/Get-On-Call-escalation-policy-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/on-call/Get-On-Call-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/scenarios/cassettes/v2/on-call/Get-On-Call-escalation-policy-returns-OK-response.json b/tests/scenarios/cassettes/v2/on-call/Get-On-Call-escalation-policy-returns-OK-response.json index 3e02c5ef4..4d19727a6 100644 --- a/tests/scenarios/cassettes/v2/on-call/Get-On-Call-escalation-policy-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/on-call/Get-On-Call-escalation-policy-returns-OK-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Get_On_Call_escalation_policy_returns_OK_response-1748494432@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", + "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Get_On_Call_escalation_policy_returns_OK_response-1764252693@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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\"}}}}}\n", + "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\"}}}}}\n", "encoding": null }, "headers": { @@ -32,12 +32,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:53:52 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:33 GMT" }, { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-bbce2cc58d5af798\",\"name\":\"test-name-bbce2cc58d5af798\"},\"type\":\"team\"}}", + "string": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-9b417dea223136e8\",\"name\":\"test-name-9b417dea223136e8\"},\"type\":\"team\"}}", "encoding": null }, "headers": { @@ -53,12 +53,12 @@ }, "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\"}}}}}\n", + "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\"}}}}}", "encoding": null }, "headers": { "Content-Type": [ - "application/json" + "application/vnd.api+json" ] }, "status": { @@ -66,12 +66,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:53:52 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:33 GMT" }, { "request": { "body": { - "string": "{\"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\"}}", + "string": "{\"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\"}}", "encoding": null }, "headers": { @@ -87,7 +87,7 @@ }, "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\"}]}}}}", "encoding": null }, "headers": { @@ -100,12 +100,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:53:52 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:33 GMT" }, { "request": { "body": { - "string": "{\"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\"}}", + "string": "{\"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\"}}", "encoding": null }, "headers": { @@ -121,7 +121,7 @@ }, "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\"}]}}}}", "encoding": null }, "headers": { @@ -134,7 +134,7 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:53:52 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:33 GMT" }, { "request": { @@ -145,11 +145,11 @@ ] }, "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\"}}]}", "encoding": null }, "headers": { @@ -162,7 +162,7 @@ "message": "OK" } }, - "recorded_at": "Thu, 29 May 2025 04:53:52 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:33 GMT" }, { "request": { @@ -173,7 +173,7 @@ ] }, "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": { @@ -186,7 +186,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:53:52 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:33 GMT" }, { "request": { @@ -197,7 +197,7 @@ ] }, "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": { @@ -210,7 +210,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:53:52 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:33 GMT" }, { "request": { @@ -221,7 +221,7 @@ ] }, "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": { @@ -234,7 +234,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:53:52 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:33 GMT" }, { "request": { @@ -245,7 +245,7 @@ ] }, "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": { @@ -258,7 +258,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:53:52 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:33 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/on-call/Get-On-Call-schedule-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/on-call/Get-On-Call-schedule-returns-OK-response.frozen index 0279e1e8c..e4e809a1e 100644 --- a/tests/scenarios/cassettes/v2/on-call/Get-On-Call-schedule-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/on-call/Get-On-Call-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/scenarios/cassettes/v2/on-call/Get-On-Call-schedule-returns-OK-response.json b/tests/scenarios/cassettes/v2/on-call/Get-On-Call-schedule-returns-OK-response.json index 83e75d112..03d4d36bf 100644 --- a/tests/scenarios/cassettes/v2/on-call/Get-On-Call-schedule-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/on-call/Get-On-Call-schedule-returns-OK-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Get_On_Call_schedule_returns_OK_response-1748494438@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", + "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Get_On_Call_schedule_returns_OK_response-1764252697@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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\"}}}}}\n", + "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\"}}}}}\n", "encoding": null }, "headers": { @@ -32,12 +32,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:53:58 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:37 GMT" }, { "request": { "body": { - "string": "{\"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\"}}", + "string": "{\"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\"}}", "encoding": null }, "headers": { @@ -53,7 +53,7 @@ }, "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\"}]}}}}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:53:58 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:37 GMT" }, { "request": { @@ -77,11 +77,11 @@ ] }, "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\"}]}}}}", "encoding": null }, "headers": { @@ -94,7 +94,7 @@ "message": "OK" } }, - "recorded_at": "Thu, 29 May 2025 04:53:58 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:37 GMT" }, { "request": { @@ -105,7 +105,7 @@ ] }, "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": { @@ -118,7 +118,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:53:58 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:37 GMT" }, { "request": { @@ -129,7 +129,7 @@ ] }, "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": { @@ -142,7 +142,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:53:58 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:37 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/on-call/Get-team-on-call-users-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/on-call/Get-team-on-call-users-returns-OK-response.frozen index a02b74ff9..899352609 100644 --- a/tests/scenarios/cassettes/v2/on-call/Get-team-on-call-users-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/on-call/Get-team-on-call-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/scenarios/cassettes/v2/on-call/Get-team-on-call-users-returns-OK-response.json b/tests/scenarios/cassettes/v2/on-call/Get-team-on-call-users-returns-OK-response.json index bc9e47876..57853cec2 100644 --- a/tests/scenarios/cassettes/v2/on-call/Get-team-on-call-users-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/on-call/Get-team-on-call-users-returns-OK-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Get_team_on_call_users_returns_OK_response-1763469869@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", + "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Get_team_on_call_users_returns_OK_response-1764252702@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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 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\"}}}}}\n", + "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\"}}}}}\n", "encoding": null }, "headers": { @@ -32,12 +32,12 @@ "message": "Created" } }, - "recorded_at": "Tue, 18 Nov 2025 12:44:29 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:42 GMT" }, { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-b0479fe6a2cd9873\",\"name\":\"test-name-b0479fe6a2cd9873\"},\"type\":\"team\"}}", + "string": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-ecfc4ff61997ed40\",\"name\":\"test-name-ecfc4ff61997ed40\"},\"type\":\"team\"}}", "encoding": null }, "headers": { @@ -53,7 +53,7 @@ }, "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\"}}}}}", "encoding": null }, "headers": { @@ -66,12 +66,12 @@ "message": "Created" } }, - "recorded_at": "Tue, 18 Nov 2025 12:44:29 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:42 GMT" }, { "request": { "body": { - "string": "{\"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\"}}", + "string": "{\"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\"}}", "encoding": null }, "headers": { @@ -87,7 +87,7 @@ }, "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\"}]}}}}", "encoding": null }, "headers": { @@ -100,12 +100,12 @@ "message": "Created" } }, - "recorded_at": "Tue, 18 Nov 2025 12:44:29 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:42 GMT" }, { "request": { "body": { - "string": "{\"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\"}}", + "string": "{\"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\"}}", "encoding": null }, "headers": { @@ -121,7 +121,7 @@ }, "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\"}]}}}}", "encoding": null }, "headers": { @@ -134,12 +134,12 @@ "message": "Created" } }, - "recorded_at": "Tue, 18 Nov 2025 12:44:29 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:42 GMT" }, { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"rules\":[{\"actions\":[],\"policy_id\":\"5fe7a7c8-a2c1-4f07-9510-a5d483df5ae7\",\"query\":\"\",\"urgency\":\"low\"}]},\"id\":\"11ba6480-761b-4dbd-b4a0-c77a9df6740c\",\"type\":\"team_routing_rules\"}}", + "string": "{\"data\":{\"attributes\":{\"rules\":[{\"actions\":[],\"policy_id\":\"5a7ecb26-4ebe-4496-bcfb-ff30c655a1a9\",\"query\":\"\",\"urgency\":\"low\"}]},\"id\":\"fc8f8844-54c3-4898-aabc-68d6fccbe20e\",\"type\":\"team_routing_rules\"}}", "encoding": null }, "headers": { @@ -151,11 +151,11 @@ ] }, "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\"}]}}}}", "encoding": null }, "headers": { @@ -168,7 +168,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 18 Nov 2025 12:44:29 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:42 GMT" }, { "request": { @@ -179,11 +179,11 @@ ] }, "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\"}}]}", "encoding": null }, "headers": { @@ -196,12 +196,12 @@ "message": "OK" } }, - "recorded_at": "Tue, 18 Nov 2025 12:44:29 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:42 GMT" }, { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"rules\":[]},\"id\":\"11ba6480-761b-4dbd-b4a0-c77a9df6740c\",\"type\":\"team_routing_rules\"}}", + "string": "{\"data\":{\"attributes\":{\"rules\":[]},\"id\":\"fc8f8844-54c3-4898-aabc-68d6fccbe20e\",\"type\":\"team_routing_rules\"}}", "encoding": null }, "headers": { @@ -213,11 +213,11 @@ ] }, "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\":[]}}}}", "encoding": null }, "headers": { @@ -230,7 +230,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 18 Nov 2025 12:44:29 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:42 GMT" }, { "request": { @@ -241,7 +241,7 @@ ] }, "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": { @@ -254,7 +254,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 18 Nov 2025 12:44:29 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:42 GMT" }, { "request": { @@ -265,7 +265,7 @@ ] }, "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": { @@ -278,7 +278,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 18 Nov 2025 12:44:29 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:42 GMT" }, { "request": { @@ -289,7 +289,7 @@ ] }, "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": { @@ -302,7 +302,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 18 Nov 2025 12:44:29 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:42 GMT" }, { "request": { @@ -313,7 +313,7 @@ ] }, "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": { @@ -326,7 +326,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 18 Nov 2025 12:44:29 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:42 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/on-call/Get-the-schedule-on-call-user-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/on-call/Get-the-schedule-on-call-user-returns-OK-response.frozen index 1a1c3b8e7..baa8f4a58 100644 --- a/tests/scenarios/cassettes/v2/on-call/Get-the-schedule-on-call-user-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/on-call/Get-the-schedule-on-call-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/scenarios/cassettes/v2/on-call/Get-the-schedule-on-call-user-returns-OK-response.json b/tests/scenarios/cassettes/v2/on-call/Get-the-schedule-on-call-user-returns-OK-response.json index 87a0a0498..c430414bd 100644 --- a/tests/scenarios/cassettes/v2/on-call/Get-the-schedule-on-call-user-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/on-call/Get-the-schedule-on-call-user-returns-OK-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Get_the_schedule_on_call_user_returns_OK_response-1748494448@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", + "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Get_the_schedule_on_call_user_returns_OK_response-1764252707@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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\"}}}}}\n", + "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\"}}}}}\n", "encoding": null }, "headers": { @@ -32,12 +32,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:54:08 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:47 GMT" }, { "request": { "body": { - "string": "{\"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\"}}", + "string": "{\"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\"}}", "encoding": null }, "headers": { @@ -53,7 +53,7 @@ }, "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\"}]}}}}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:54:08 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:47 GMT" }, { "request": { @@ -77,11 +77,11 @@ ] }, "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\"}}}}}", "encoding": null }, "headers": { @@ -94,7 +94,7 @@ "message": "OK" } }, - "recorded_at": "Thu, 29 May 2025 04:54:08 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:47 GMT" }, { "request": { @@ -105,7 +105,7 @@ ] }, "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": { @@ -118,7 +118,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:54:08 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:47 GMT" }, { "request": { @@ -129,7 +129,7 @@ ] }, "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": { @@ -142,7 +142,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:54:08 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:47 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/on-call/Set-On-Call-team-routing-rules-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/on-call/Set-On-Call-team-routing-rules-returns-OK-response.frozen index 2cf614d80..7a2924003 100644 --- a/tests/scenarios/cassettes/v2/on-call/Set-On-Call-team-routing-rules-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/on-call/Set-On-Call-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/scenarios/cassettes/v2/on-call/Set-On-Call-team-routing-rules-returns-OK-response.json b/tests/scenarios/cassettes/v2/on-call/Set-On-Call-team-routing-rules-returns-OK-response.json index e29bc1b21..5f94e98bf 100644 --- a/tests/scenarios/cassettes/v2/on-call/Set-On-Call-team-routing-rules-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/on-call/Set-On-Call-team-routing-rules-returns-OK-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Set_On_Call_team_routing_rules_returns_OK_response-1763471054@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", + "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Set_On_Call_team_routing_rules_returns_OK_response-1764252709@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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 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\"}}}}}\n", + "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\"}}}}}\n", "encoding": null }, "headers": { @@ -32,12 +32,12 @@ "message": "Created" } }, - "recorded_at": "Tue, 18 Nov 2025 13:04:14 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:49 GMT" }, { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-f77a37b001e848f1\",\"name\":\"test-name-f77a37b001e848f1\"},\"type\":\"team\"}}", + "string": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-a7692378c203a880\",\"name\":\"test-name-a7692378c203a880\"},\"type\":\"team\"}}", "encoding": null }, "headers": { @@ -53,7 +53,7 @@ }, "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\"}}}}}", "encoding": null }, "headers": { @@ -66,12 +66,12 @@ "message": "Created" } }, - "recorded_at": "Tue, 18 Nov 2025 13:04:14 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:49 GMT" }, { "request": { "body": { - "string": "{\"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\"}}", + "string": "{\"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\"}}", "encoding": null }, "headers": { @@ -87,7 +87,7 @@ }, "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\"}]}}}}", "encoding": null }, "headers": { @@ -100,12 +100,12 @@ "message": "Created" } }, - "recorded_at": "Tue, 18 Nov 2025 13:04:14 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:49 GMT" }, { "request": { "body": { - "string": "{\"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\"}}", + "string": "{\"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\"}}", "encoding": null }, "headers": { @@ -121,7 +121,7 @@ }, "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\"}]}}}}", "encoding": null }, "headers": { @@ -134,12 +134,12 @@ "message": "Created" } }, - "recorded_at": "Tue, 18 Nov 2025 13:04:14 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:49 GMT" }, { "request": { "body": { - "string": "{\"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\"}}", + "string": "{\"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\"}}", "encoding": null }, "headers": { @@ -151,11 +151,11 @@ ] }, "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\"}}}}]}", "encoding": null }, "headers": { @@ -168,12 +168,12 @@ "message": "OK" } }, - "recorded_at": "Tue, 18 Nov 2025 13:04:14 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:49 GMT" }, { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"rules\":[]},\"id\":\"8ab3f777-435e-42b6-8511-0c9020365b8d\",\"type\":\"team_routing_rules\"}}", + "string": "{\"data\":{\"attributes\":{\"rules\":[]},\"id\":\"ba4fe917-0da4-4b40-96da-f9d7306d97d8\",\"type\":\"team_routing_rules\"}}", "encoding": null }, "headers": { @@ -185,11 +185,11 @@ ] }, "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\":[]}}}}", "encoding": null }, "headers": { @@ -202,7 +202,7 @@ "message": "OK" } }, - "recorded_at": "Tue, 18 Nov 2025 13:04:14 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:49 GMT" }, { "request": { @@ -213,7 +213,7 @@ ] }, "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": { @@ -226,7 +226,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 18 Nov 2025 13:04:14 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:49 GMT" }, { "request": { @@ -237,7 +237,7 @@ ] }, "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": { @@ -250,7 +250,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 18 Nov 2025 13:04:14 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:49 GMT" }, { "request": { @@ -261,7 +261,7 @@ ] }, "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": { @@ -274,7 +274,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 18 Nov 2025 13:04:14 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:49 GMT" }, { "request": { @@ -285,7 +285,7 @@ ] }, "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": { @@ -298,7 +298,7 @@ "message": "No Content" } }, - "recorded_at": "Tue, 18 Nov 2025 13:04:14 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:49 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/on-call/Update-On-Call-escalation-policy-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/on-call/Update-On-Call-escalation-policy-returns-OK-response.frozen index dcfe9e953..d64fddeda 100644 --- a/tests/scenarios/cassettes/v2/on-call/Update-On-Call-escalation-policy-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/on-call/Update-On-Call-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/scenarios/cassettes/v2/on-call/Update-On-Call-escalation-policy-returns-OK-response.json b/tests/scenarios/cassettes/v2/on-call/Update-On-Call-escalation-policy-returns-OK-response.json index 19015c504..db9255a1e 100644 --- a/tests/scenarios/cassettes/v2/on-call/Update-On-Call-escalation-policy-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/on-call/Update-On-Call-escalation-policy-returns-OK-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Update_On_Call_escalation_policy_returns_OK_response-1748494458@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", + "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Update_On_Call_escalation_policy_returns_OK_response-1764252714@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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\"}}}}}\n", + "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\"}}}}}\n", "encoding": null }, "headers": { @@ -32,12 +32,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:54:18 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:54 GMT" }, { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-e987bfc60cf27d84\",\"name\":\"test-name-e987bfc60cf27d84\"},\"type\":\"team\"}}", + "string": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-87ae65b051bd37ef\",\"name\":\"test-name-87ae65b051bd37ef\"},\"type\":\"team\"}}", "encoding": null }, "headers": { @@ -53,12 +53,12 @@ }, "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\"}}}}}\n", + "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\"}}}}}", "encoding": null }, "headers": { "Content-Type": [ - "application/json" + "application/vnd.api+json" ] }, "status": { @@ -66,12 +66,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:54:18 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:54 GMT" }, { "request": { "body": { - "string": "{\"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\"}}", + "string": "{\"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\"}}", "encoding": null }, "headers": { @@ -87,7 +87,7 @@ }, "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\"}]}}}}", "encoding": null }, "headers": { @@ -100,12 +100,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:54:18 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:54 GMT" }, { "request": { "body": { - "string": "{\"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\"}}", + "string": "{\"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\"}}", "encoding": null }, "headers": { @@ -121,7 +121,7 @@ }, "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\"}]}}}}", "encoding": null }, "headers": { @@ -134,12 +134,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 29 May 2025 04:54:18 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:54 GMT" }, { "request": { "body": { - "string": "{\"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\"}}", + "string": "{\"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\"}}", "encoding": null }, "headers": { @@ -151,11 +151,11 @@ ] }, "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\"}]}}}}", "encoding": null }, "headers": { @@ -168,7 +168,7 @@ "message": "OK" } }, - "recorded_at": "Thu, 29 May 2025 04:54:18 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:54 GMT" }, { "request": { @@ -179,7 +179,7 @@ ] }, "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": { @@ -192,7 +192,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:54:18 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:54 GMT" }, { "request": { @@ -203,7 +203,7 @@ ] }, "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": { @@ -216,7 +216,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:54:18 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:54 GMT" }, { "request": { @@ -227,7 +227,7 @@ ] }, "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": { @@ -240,7 +240,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:54:18 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:54 GMT" }, { "request": { @@ -251,7 +251,7 @@ ] }, "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": { @@ -264,7 +264,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 29 May 2025 04:54:18 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:54 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/on-call/Update-On-Call-schedule-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/on-call/Update-On-Call-schedule-returns-OK-response.frozen index 2f290d18c..9c2774075 100644 --- a/tests/scenarios/cassettes/v2/on-call/Update-On-Call-schedule-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/on-call/Update-On-Call-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/scenarios/cassettes/v2/on-call/Update-On-Call-schedule-returns-OK-response.json b/tests/scenarios/cassettes/v2/on-call/Update-On-Call-schedule-returns-OK-response.json index ed469b2b9..558bd4247 100644 --- a/tests/scenarios/cassettes/v2/on-call/Update-On-Call-schedule-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/on-call/Update-On-Call-schedule-returns-OK-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Update_On_Call_schedule_returns_OK_response-1751553045@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", + "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Update_On_Call_schedule_returns_OK_response-1764252719@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "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\"}}}}}\n", + "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\"}}}}}\n", "encoding": null }, "headers": { @@ -32,12 +32,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 03 Jul 2025 14:30:45 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:59 GMT" }, { "request": { "body": { - "string": "{\"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\"}}", + "string": "{\"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\"}}", "encoding": null }, "headers": { @@ -53,7 +53,7 @@ }, "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\"}]}}}}", "encoding": null }, "headers": { @@ -66,12 +66,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 03 Jul 2025 14:30:45 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:59 GMT" }, { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-001d7ca9284aa632\",\"name\":\"test-name-001d7ca9284aa632\"},\"type\":\"team\"}}", + "string": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-0db1ad1d49052f19\",\"name\":\"test-name-0db1ad1d49052f19\"},\"type\":\"team\"}}", "encoding": null }, "headers": { @@ -87,12 +87,12 @@ }, "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\"}}}}}\n", + "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\"}}}}}", "encoding": null }, "headers": { "Content-Type": [ - "application/json" + "application/vnd.api+json" ] }, "status": { @@ -100,12 +100,12 @@ "message": "Created" } }, - "recorded_at": "Thu, 03 Jul 2025 14:30:45 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:59 GMT" }, { "request": { "body": { - "string": "{\"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\"}}", + "string": "{\"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\"}}", "encoding": null }, "headers": { @@ -117,11 +117,11 @@ ] }, "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\"}]}}}}", "encoding": null }, "headers": { @@ -134,7 +134,7 @@ "message": "OK" } }, - "recorded_at": "Thu, 03 Jul 2025 14:30:45 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:59 GMT" }, { "request": { @@ -145,7 +145,7 @@ ] }, "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": { @@ -158,7 +158,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 03 Jul 2025 14:30:45 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:59 GMT" }, { "request": { @@ -169,7 +169,7 @@ ] }, "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": { @@ -182,7 +182,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 03 Jul 2025 14:30:45 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:59 GMT" }, { "request": { @@ -193,7 +193,7 @@ ] }, "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": { @@ -206,7 +206,7 @@ "message": "No Content" } }, - "recorded_at": "Thu, 03 Jul 2025 14:30:45 GMT" + "recorded_at": "Thu, 27 Nov 2025 14:11:59 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/features/v2/given.json b/tests/scenarios/features/v2/given.json index 6c6d3bf98..2dd671379 100644 --- a/tests/scenarios/features/v2/given.json +++ b/tests/scenarios/features/v2/given.json @@ -747,7 +747,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/scenarios/features/v2/on-call.feature b/tests/scenarios/features/v2/on-call.feature index 39640938e..7bcd1d00e 100644 --- a/tests/scenarios/features/v2/on-call.feature +++ b/tests/scenarios/features/v2/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