diff --git a/.apigentools-info b/.apigentools-info index 37d63fd512a..d37d485f720 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-05-23 16:55:09.087295", - "spec_repo_commit": "6a0ddfd8" + "regenerated": "2025-05-23 19:26:08.077787", + "spec_repo_commit": "471c4a2a" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-05-23 16:55:09.104040", - "spec_repo_commit": "6a0ddfd8" + "regenerated": "2025-05-23 19:26:08.093640", + "spec_repo_commit": "471c4a2a" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 4814503b499..86cc1adcb82 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -9584,12 +9584,11 @@ components: description: Information about the target to notify (such as a team or user). properties: identifier: - description: A unique ID for the target (for example, team handle or user - UUID). + description: Identifier for the target (for example, team handle or user + ID). type: string type: - description: The kind of target, `team_uuid` | `team_handle` | `user_uuid`. - type: string + $ref: '#/components/schemas/OnCallPageTargetType' type: object CreatePageRequestDataType: default: pages @@ -13631,7 +13630,6 @@ components: example: data: attributes: - description: Escalation Policy 1 description name: Escalation Policy 1 resolve_page_on_policy_end: true retries: 2 @@ -13690,7 +13688,6 @@ components: example: data: attributes: - description: Escalation Policy 1 description name: Escalation Policy 1 resolve_page_on_policy_end: true retries: 2 @@ -13741,13 +13738,9 @@ components: description: Defines the attributes for creating an escalation policy, including its description, name, resolution behavior, retries, and steps. properties: - description: - description: Provides a detailed text description of the new escalation - policy. - type: string name: description: Specifies the name for the new escalation policy. - example: On-call Escalation Policy + example: On-Call Escalation Policy type: string resolve_page_on_policy_end: description: Indicates whether the page is automatically resolved when the @@ -13825,14 +13818,11 @@ components: type: object EscalationPolicyDataAttributes: description: Defines the main attributes of an escalation policy, such as its - description, name, and behavior on policy end. + name and behavior on policy end. properties: - description: - description: Provides a detailed text description of the escalation policy. - type: string name: description: Specifies the name of the escalation policy. - example: On-call Escalation Policy + example: On-Call Escalation Policy type: string resolve_page_on_policy_end: description: Indicates whether the page is automatically resolved when the @@ -13951,7 +13941,7 @@ components: targets. properties: targets: - $ref: '#/components/schemas/EscalationTarget' + $ref: '#/components/schemas/EscalationTargets' type: object EscalationPolicyStepTarget: description: Defines a single escalation target within a step for an escalation @@ -13992,7 +13982,6 @@ components: example: data: attributes: - description: Escalation Policy 1 description name: Escalation Policy 1 resolve_page_on_policy_end: false retries: 2 @@ -14042,12 +14031,9 @@ components: description: Defines the attributes that can be updated for an escalation policy, such as description, name, resolution behavior, retries, and steps. properties: - description: - description: Provides a detailed text description of the escalation policy. - type: string name: description: Specifies the name of the escalation policy. - example: On-call Escalation Policy + example: On-Call Escalation Policy type: string resolve_page_on_policy_end: description: Indicates whether the page is automatically resolved when the @@ -14154,6 +14140,15 @@ components: - $ref: '#/components/schemas/TeamTarget' - $ref: '#/components/schemas/UserTarget' - $ref: '#/components/schemas/ScheduleTarget' + EscalationTargets: + description: A list of escalation targets for a step + properties: + data: + description: The `EscalationTargets` `data`. + items: + $ref: '#/components/schemas/EscalationTarget' + type: array + type: object Event: description: The metadata associated with a request. properties: @@ -26578,6 +26573,18 @@ components: $ref: '#/components/schemas/OktaAccountResponseData' type: array type: object + OnCallPageTargetType: + description: The kind of target, `team_id` | `team_handle` | `user_id`. + enum: + - team_id + - team_handle + - user_id + example: team_id + type: string + x-enum-varnames: + - TEAM_ID + - TEAM_HANDLE + - USER_ID OnDemandConcurrencyCap: description: On-demand concurrency cap. properties: @@ -31424,9 +31431,6 @@ components: data: attributes: name: On-Call Schedule - tags: - - tag1 - - tag2 time_zone: America/New_York id: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d relationships: @@ -31510,9 +31514,6 @@ components: start_time: 09:00:00 rotation_start: '2025-02-01T00:00:00Z' name: On-Call Schedule - tags: - - tag1 - - tag2 time_zone: America/New_York relationships: teams: @@ -31542,10 +31543,10 @@ components: type: object ScheduleCreateRequestDataAttributes: description: Describes the main attributes for creating a new schedule, including - name, layers, time zone, and tags. + name, layers, and time zone. properties: layers: - description: The layers of on-call coverage that define rotation intervals + description: The layers of On-Call coverage that define rotation intervals and restrictions. items: $ref: '#/components/schemas/ScheduleCreateRequestDataAttributesLayersItems' @@ -31554,11 +31555,6 @@ components: description: A human-readable name for the new schedule. example: Team A On-Call type: string - tags: - description: A list of tags for categorizing or filtering the schedule. - items: - type: string - type: array time_zone: description: The time zone in which the schedule is defined. example: America/New_York @@ -31646,18 +31642,13 @@ components: - type type: object ScheduleDataAttributes: - description: Provides core properties of a schedule object, such as its name, - time zone, and tags. + description: Provides core properties of a schedule object such as its name + and time zone. properties: name: description: A short name for the schedule. example: Primary On-Call type: string - tags: - description: A list of tags associated with this schedule. - items: - type: string - type: array time_zone: description: The time zone in which this schedule operates. example: America/New_York @@ -31863,10 +31854,6 @@ components: start_time: 09:00:00 rotation_start: '2025-02-01T00:00:00Z' name: On-Call Schedule Updated - tags: - - tag1 - - tag2 - - tag3 time_zone: America/New_York id: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d relationships: @@ -31883,7 +31870,7 @@ components: type: object ScheduleUpdateRequestData: description: Contains all data needed to update an existing schedule, including - its attributes (such as name, layers, or tags) and any relationships to teams. + its attributes (such as name and time zone) and any relationships to teams. properties: attributes: $ref: '#/components/schemas/ScheduleUpdateRequestDataAttributes' @@ -31902,7 +31889,7 @@ components: type: object ScheduleUpdateRequestDataAttributes: description: Defines the updatable attributes for a schedule, such as name, - time zone, tags, and layers. + time zone, and layers. properties: layers: description: The updated list of layers (rotations) for this schedule. @@ -31913,14 +31900,6 @@ components: description: A short name for the schedule. example: Primary On-Call type: string - tags: - description: A list of tags that you can associate with this schedule. - example: - - front-end - - team-a - items: - type: string - type: array time_zone: description: The time zone used when interpreting rotation times. example: America/New_York @@ -37861,8 +37840,6 @@ components: id: description: The team's unique identifier. type: string - relationships: - $ref: '#/components/schemas/TeamReferenceRelationships' type: $ref: '#/components/schemas/TeamReferenceType' required: @@ -37885,46 +37862,6 @@ components: description: The full, human-readable name of the team. type: string type: object - TeamReferenceRelationships: - description: Collects the key relationship fields for a team reference, specifically - on-call users. - properties: - oncall_users: - $ref: '#/components/schemas/TeamReferenceRelationshipsOncallUsers' - type: object - TeamReferenceRelationshipsOncallUsers: - description: Defines which users are on-call within a team, stored as an array - of references. - properties: - data: - description: The list of user references who are on-call for this team. - items: - $ref: '#/components/schemas/TeamReferenceRelationshipsOncallUsersDataItems' - type: array - type: object - TeamReferenceRelationshipsOncallUsersDataItems: - description: References a user who is on-call within this team, identified by - `id` and `type`. - properties: - id: - description: The unique identifier of the user. - example: 00000000-aba1-0000-0000-000000000000 - type: string - type: - $ref: '#/components/schemas/TeamReferenceRelationshipsOncallUsersDataItemsType' - required: - - type - - id - type: object - TeamReferenceRelationshipsOncallUsersDataItemsType: - default: users - description: Users resource type. - enum: - - users - example: users - type: string - x-enum-varnames: - - USERS TeamReferenceType: default: teams description: Teams resource type. @@ -51623,7 +51560,7 @@ paths: contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/on-call/escalation-policies: post: - description: Create a new on-call escalation policy + description: Create a new On-Call escalation policy operationId: CreateOnCallEscalationPolicy parameters: - description: 'Comma-separated list of included relationships to be returned. @@ -51657,7 +51594,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Create on-call escalation policy + summary: Create On-Call escalation policy tags: - On-Call x-permission: @@ -51666,7 +51603,7 @@ paths: - on_call_write /api/v2/on-call/escalation-policies/{policy_id}: delete: - description: Delete an on-call escalation policy + description: Delete an On-Call escalation policy operationId: DeleteOnCallEscalationPolicy parameters: - description: The ID of the escalation policy @@ -51691,7 +51628,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Delete on-call escalation policy + summary: Delete On-Call escalation policy tags: - On-Call x-permission: @@ -51699,7 +51636,7 @@ paths: permissions: - on_call_write get: - description: Get an on-call escalation policy + description: Get an On-Call escalation policy operationId: GetOnCallEscalationPolicy parameters: - description: The ID of the escalation policy @@ -51736,7 +51673,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Get on-call escalation policy + summary: Get On-Call escalation policy tags: - On-Call x-permission: @@ -51744,7 +51681,7 @@ paths: permissions: - on_call_read put: - description: Update an on-call escalation policy + description: Update an On-Call escalation policy operationId: UpdateOnCallEscalationPolicy parameters: - description: The ID of the escalation policy @@ -51787,7 +51724,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Update on-call escalation policy + summary: Update On-Call escalation policy tags: - On-Call x-permission: @@ -52017,7 +51954,7 @@ paths: - On-Call Paging /api/v2/on-call/schedules: post: - description: Create a new on-call schedule + description: Create a new On-Call schedule operationId: CreateOnCallSchedule parameters: - description: 'Comma-separated list of included relationships to be returned. @@ -52051,7 +51988,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Create on-call schedule + summary: Create On-Call schedule tags: - On-Call x-permission: @@ -52060,7 +51997,7 @@ paths: - on_call_write /api/v2/on-call/schedules/{schedule_id}: delete: - description: Delete an on-call schedule + description: Delete an On-Call schedule operationId: DeleteOnCallSchedule parameters: - description: The ID of the schedule @@ -52085,7 +52022,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Delete on-call schedule + summary: Delete On-Call schedule tags: - On-Call x-permission: @@ -52093,7 +52030,7 @@ paths: permissions: - on_call_write get: - description: Get an on-call schedule + description: Get an On-Call schedule operationId: GetOnCallSchedule parameters: - description: 'Comma-separated list of included relationships to be returned. @@ -52128,7 +52065,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Get on-call schedule + summary: Get On-Call schedule tags: - On-Call x-permission: @@ -52136,7 +52073,7 @@ paths: permissions: - on_call_read put: - description: Update a new on-call schedule + description: Update a new On-Call schedule operationId: UpdateOnCallSchedule parameters: - description: 'Comma-separated list of included relationships to be returned. @@ -52179,7 +52116,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Update on-call schedule + summary: Update On-Call schedule tags: - On-Call x-permission: @@ -52238,7 +52175,7 @@ paths: - On-Call /api/v2/on-call/teams/{team_id}/routing-rules: get: - description: Get a team's on-call routing rules + description: Get a team's On-Call routing rules operationId: GetOnCallTeamRoutingRules parameters: - description: The team ID @@ -52267,7 +52204,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Get on-call team routing rules + summary: Get On-Call team routing rules tags: - On-Call x-permission: @@ -52275,7 +52212,7 @@ paths: permissions: - on_call_read put: - description: Set a team's on-call routing rules + description: Set a team's On-Call routing rules operationId: SetOnCallTeamRoutingRules parameters: - description: The team ID @@ -52310,7 +52247,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Set on-call team routing rules + summary: Set On-Call team routing rules tags: - On-Call x-permission: diff --git a/examples/v2/on-call-paging/CreateOnCallPage.java b/examples/v2/on-call-paging/CreateOnCallPage.java index 24d6e31f666..1e524f66c3d 100644 --- a/examples/v2/on-call-paging/CreateOnCallPage.java +++ b/examples/v2/on-call-paging/CreateOnCallPage.java @@ -9,6 +9,7 @@ import com.datadog.api.client.v2.model.CreatePageRequestDataAttributesTarget; import com.datadog.api.client.v2.model.CreatePageRequestDataType; import com.datadog.api.client.v2.model.CreatePageResponse; +import com.datadog.api.client.v2.model.OnCallPageTargetType; import com.datadog.api.client.v2.model.PageUrgency; import java.util.Collections; @@ -28,7 +29,7 @@ public static void main(String[] args) { .target( new CreatePageRequestDataAttributesTarget() .identifier("my-team") - .type("team_handle")) + .type(OnCallPageTargetType.TEAM_HANDLE)) .title("Page title") .urgency(PageUrgency.LOW)) .type(CreatePageRequestDataType.PAGES)); diff --git a/examples/v2/on-call/CreateOnCallEscalationPolicy.java b/examples/v2/on-call/CreateOnCallEscalationPolicy.java index b4e06cefe0d..12958603a14 100644 --- a/examples/v2/on-call/CreateOnCallEscalationPolicy.java +++ b/examples/v2/on-call/CreateOnCallEscalationPolicy.java @@ -1,8 +1,9 @@ -// Create on-call escalation policy returns "Created" response +// Create On-Call escalation policy returns "Created" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.OnCallApi; +import com.datadog.api.client.v2.api.OnCallApi.CreateOnCallEscalationPolicyOptionalParameters; import com.datadog.api.client.v2.model.DataRelationshipsTeams; import com.datadog.api.client.v2.model.DataRelationshipsTeamsDataItems; import com.datadog.api.client.v2.model.DataRelationshipsTeamsDataItemsType; @@ -39,7 +40,6 @@ public static void main(String[] args) { new EscalationPolicyCreateRequestData() .attributes( new EscalationPolicyCreateRequestDataAttributes() - .description("Escalation Policy 1 description") .name("Example-On-Call") .resolvePageOnPolicyEnd(true) .retries(2L) @@ -81,7 +81,9 @@ public static void main(String[] args) { .type(EscalationPolicyCreateRequestDataType.POLICIES)); try { - EscalationPolicy result = apiInstance.createOnCallEscalationPolicy(body); + EscalationPolicy result = + apiInstance.createOnCallEscalationPolicy( + body, new CreateOnCallEscalationPolicyOptionalParameters().include("steps.targets")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OnCallApi#createOnCallEscalationPolicy"); diff --git a/examples/v2/on-call/CreateOnCallSchedule.java b/examples/v2/on-call/CreateOnCallSchedule.java index 1d1939be578..25ad04e5146 100644 --- a/examples/v2/on-call/CreateOnCallSchedule.java +++ b/examples/v2/on-call/CreateOnCallSchedule.java @@ -1,4 +1,4 @@ -// Create on-call schedule returns "Created" response +// Create On-Call schedule returns "Created" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.OnCallApi; @@ -18,7 +18,6 @@ import com.datadog.api.client.v2.model.TimeRestriction; import com.datadog.api.client.v2.model.Weekday; import java.time.OffsetDateTime; -import java.util.Arrays; import java.util.Collections; public class Example { @@ -60,7 +59,6 @@ public static void main(String[] args) { .startTime("09:00:00"))) .rotationStart(OffsetDateTime.now().plusDays(-5)))) .name("Example-On-Call") - .tags(Arrays.asList("tag1", "tag2")) .timeZone("America/New_York")) .relationships( new ScheduleCreateRequestDataRelationships() diff --git a/examples/v2/on-call/DeleteOnCallEscalationPolicy.java b/examples/v2/on-call/DeleteOnCallEscalationPolicy.java index 87e49f36e3a..515ed5e42e2 100644 --- a/examples/v2/on-call/DeleteOnCallEscalationPolicy.java +++ b/examples/v2/on-call/DeleteOnCallEscalationPolicy.java @@ -1,4 +1,4 @@ -// Delete on-call escalation policy returns "No Content" response +// Delete On-Call escalation policy returns "No Content" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/on-call/DeleteOnCallSchedule.java b/examples/v2/on-call/DeleteOnCallSchedule.java index 162878bcf4b..3d9d791a2e2 100644 --- a/examples/v2/on-call/DeleteOnCallSchedule.java +++ b/examples/v2/on-call/DeleteOnCallSchedule.java @@ -1,4 +1,4 @@ -// Delete on-call schedule returns "No Content" response +// Delete On-Call schedule returns "No Content" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/on-call/GetOnCallEscalationPolicy.java b/examples/v2/on-call/GetOnCallEscalationPolicy.java index f1e4ac71179..ec0d78a0c3e 100644 --- a/examples/v2/on-call/GetOnCallEscalationPolicy.java +++ b/examples/v2/on-call/GetOnCallEscalationPolicy.java @@ -1,8 +1,9 @@ -// Get on-call escalation policy returns "OK" response +// Get On-Call escalation policy returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.OnCallApi; +import com.datadog.api.client.v2.api.OnCallApi.GetOnCallEscalationPolicyOptionalParameters; import com.datadog.api.client.v2.model.EscalationPolicy; public class Example { @@ -14,7 +15,10 @@ public static void main(String[] args) { String ESCALATION_POLICY_DATA_ID = System.getenv("ESCALATION_POLICY_DATA_ID"); try { - EscalationPolicy result = apiInstance.getOnCallEscalationPolicy(ESCALATION_POLICY_DATA_ID); + EscalationPolicy result = + apiInstance.getOnCallEscalationPolicy( + ESCALATION_POLICY_DATA_ID, + new GetOnCallEscalationPolicyOptionalParameters().include("steps.targets")); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OnCallApi#getOnCallEscalationPolicy"); diff --git a/examples/v2/on-call/GetOnCallSchedule.java b/examples/v2/on-call/GetOnCallSchedule.java index 3eac72dcf64..9079c225850 100644 --- a/examples/v2/on-call/GetOnCallSchedule.java +++ b/examples/v2/on-call/GetOnCallSchedule.java @@ -1,4 +1,4 @@ -// Get on-call schedule returns "OK" response +// Get On-Call schedule returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/on-call/GetOnCallTeamRoutingRules.java b/examples/v2/on-call/GetOnCallTeamRoutingRules.java index ee1dab92377..4a8816bb0bb 100644 --- a/examples/v2/on-call/GetOnCallTeamRoutingRules.java +++ b/examples/v2/on-call/GetOnCallTeamRoutingRules.java @@ -1,4 +1,4 @@ -// Get on-call team routing rules returns "OK" response +// Get On-Call team routing rules returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/on-call/SetOnCallTeamRoutingRules.java b/examples/v2/on-call/SetOnCallTeamRoutingRules.java index 3d59f0fab6b..f6b3d707fee 100644 --- a/examples/v2/on-call/SetOnCallTeamRoutingRules.java +++ b/examples/v2/on-call/SetOnCallTeamRoutingRules.java @@ -1,4 +1,4 @@ -// Set on-call team routing rules returns "OK" response +// Set On-Call team routing rules returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/on-call/UpdateOnCallEscalationPolicy.java b/examples/v2/on-call/UpdateOnCallEscalationPolicy.java index 1aac3d1ce05..1e9648a9f05 100644 --- a/examples/v2/on-call/UpdateOnCallEscalationPolicy.java +++ b/examples/v2/on-call/UpdateOnCallEscalationPolicy.java @@ -1,4 +1,4 @@ -// Update on-call escalation policy returns "OK" response +// Update On-Call escalation policy returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -40,7 +40,6 @@ public static void main(String[] args) { new EscalationPolicyUpdateRequestData() .attributes( new EscalationPolicyUpdateRequestDataAttributes() - .description("Example-On-Call") .name("Example-On-Call-updated") .resolvePageOnPolicyEnd(false) .retries(0L) diff --git a/examples/v2/on-call/UpdateOnCallSchedule.java b/examples/v2/on-call/UpdateOnCallSchedule.java index aa1fa86d047..c4cbf6eed4e 100644 --- a/examples/v2/on-call/UpdateOnCallSchedule.java +++ b/examples/v2/on-call/UpdateOnCallSchedule.java @@ -1,4 +1,4 @@ -// Update on-call schedule returns "OK" response +// Update On-Call schedule returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.OnCallApi; @@ -18,7 +18,6 @@ import com.datadog.api.client.v2.model.TimeRestriction; import com.datadog.api.client.v2.model.Weekday; import java.time.OffsetDateTime; -import java.util.Arrays; import java.util.Collections; public class Example { @@ -67,7 +66,6 @@ public static void main(String[] args) { .startTime("09:00:00"))) .rotationStart(OffsetDateTime.now().plusDays(-5)))) .name("Example-On-Call") - .tags(Arrays.asList("tag1", "tag2", "tag3")) .timeZone("America/New_York")) .relationships( new ScheduleUpdateRequestDataRelationships() diff --git a/src/main/java/com/datadog/api/client/v2/api/OnCallApi.java b/src/main/java/com/datadog/api/client/v2/api/OnCallApi.java index cfa4bab2beb..02811c7a337 100644 --- a/src/main/java/com/datadog/api/client/v2/api/OnCallApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/OnCallApi.java @@ -70,7 +70,7 @@ public CreateOnCallEscalationPolicyOptionalParameters include(String include) { } /** - * Create on-call escalation policy. + * Create On-Call escalation policy. * *

See {@link #createOnCallEscalationPolicyWithHttpInfo}. * @@ -86,7 +86,7 @@ body, new CreateOnCallEscalationPolicyOptionalParameters()) } /** - * Create on-call escalation policy. + * Create On-Call escalation policy. * *

See {@link #createOnCallEscalationPolicyWithHttpInfoAsync}. * @@ -104,7 +104,7 @@ body, new CreateOnCallEscalationPolicyOptionalParameters()) } /** - * Create on-call escalation policy. + * Create On-Call escalation policy. * *

See {@link #createOnCallEscalationPolicyWithHttpInfo}. * @@ -120,7 +120,7 @@ public EscalationPolicy createOnCallEscalationPolicy( } /** - * Create on-call escalation policy. + * Create On-Call escalation policy. * *

See {@link #createOnCallEscalationPolicyWithHttpInfoAsync}. * @@ -139,7 +139,7 @@ public CompletableFuture createOnCallEscalationPolicyAsync( } /** - * Create a new on-call escalation policy + * Create a new On-Call escalation policy * * @param body (required) * @param parameters Optional parameters for the request. @@ -196,7 +196,7 @@ public ApiResponse createOnCallEscalationPolicyWithHttpInfo( } /** - * Create on-call escalation policy. + * Create On-Call escalation policy. * *

See {@link #createOnCallEscalationPolicyWithHttpInfo}. * @@ -274,7 +274,7 @@ public CreateOnCallScheduleOptionalParameters include(String include) { } /** - * Create on-call schedule. + * Create On-Call schedule. * *

See {@link #createOnCallScheduleWithHttpInfo}. * @@ -288,7 +288,7 @@ public Schedule createOnCallSchedule(ScheduleCreateRequest body) throws ApiExcep } /** - * Create on-call schedule. + * Create On-Call schedule. * *

See {@link #createOnCallScheduleWithHttpInfoAsync}. * @@ -304,7 +304,7 @@ public CompletableFuture createOnCallScheduleAsync(ScheduleCreateReque } /** - * Create on-call schedule. + * Create On-Call schedule. * *

See {@link #createOnCallScheduleWithHttpInfo}. * @@ -320,7 +320,7 @@ public Schedule createOnCallSchedule( } /** - * Create on-call schedule. + * Create On-Call schedule. * *

See {@link #createOnCallScheduleWithHttpInfoAsync}. * @@ -338,7 +338,7 @@ public CompletableFuture createOnCallScheduleAsync( } /** - * Create a new on-call schedule + * Create a new On-Call schedule * * @param body (required) * @param parameters Optional parameters for the request. @@ -395,7 +395,7 @@ public ApiResponse createOnCallScheduleWithHttpInfo( } /** - * Create on-call schedule. + * Create On-Call schedule. * *

See {@link #createOnCallScheduleWithHttpInfo}. * @@ -452,7 +452,7 @@ public CompletableFuture> createOnCallScheduleWithHttpInfo } /** - * Delete on-call escalation policy. + * Delete On-Call escalation policy. * *

See {@link #deleteOnCallEscalationPolicyWithHttpInfo}. * @@ -464,7 +464,7 @@ public void deleteOnCallEscalationPolicy(String policyId) throws ApiException { } /** - * Delete on-call escalation policy. + * Delete On-Call escalation policy. * *

See {@link #deleteOnCallEscalationPolicyWithHttpInfoAsync}. * @@ -480,7 +480,7 @@ public CompletableFuture deleteOnCallEscalationPolicyAsync(String policyId } /** - * Delete an on-call escalation policy + * Delete an On-Call escalation policy * * @param policyId The ID of the escalation policy (required) * @return ApiResponse<Void> @@ -534,7 +534,7 @@ public ApiResponse deleteOnCallEscalationPolicyWithHttpInfo(String policyI } /** - * Delete on-call escalation policy. + * Delete On-Call escalation policy. * *

See {@link #deleteOnCallEscalationPolicyWithHttpInfo}. * @@ -590,7 +590,7 @@ public CompletableFuture> deleteOnCallEscalationPolicyWithHttp } /** - * Delete on-call schedule. + * Delete On-Call schedule. * *

See {@link #deleteOnCallScheduleWithHttpInfo}. * @@ -602,7 +602,7 @@ public void deleteOnCallSchedule(String scheduleId) throws ApiException { } /** - * Delete on-call schedule. + * Delete On-Call schedule. * *

See {@link #deleteOnCallScheduleWithHttpInfoAsync}. * @@ -618,7 +618,7 @@ public CompletableFuture deleteOnCallScheduleAsync(String scheduleId) { } /** - * Delete an on-call schedule + * Delete an On-Call schedule * * @param scheduleId The ID of the schedule (required) * @return ApiResponse<Void> @@ -671,7 +671,7 @@ public ApiResponse deleteOnCallScheduleWithHttpInfo(String scheduleId) thr } /** - * Delete on-call schedule. + * Delete On-Call schedule. * *

See {@link #deleteOnCallScheduleWithHttpInfo}. * @@ -744,7 +744,7 @@ public GetOnCallEscalationPolicyOptionalParameters include(String include) { } /** - * Get on-call escalation policy. + * Get On-Call escalation policy. * *

See {@link #getOnCallEscalationPolicyWithHttpInfo}. * @@ -759,7 +759,7 @@ policyId, new GetOnCallEscalationPolicyOptionalParameters()) } /** - * Get on-call escalation policy. + * Get On-Call escalation policy. * *

See {@link #getOnCallEscalationPolicyWithHttpInfoAsync}. * @@ -776,7 +776,7 @@ policyId, new GetOnCallEscalationPolicyOptionalParameters()) } /** - * Get on-call escalation policy. + * Get On-Call escalation policy. * *

See {@link #getOnCallEscalationPolicyWithHttpInfo}. * @@ -791,7 +791,7 @@ public EscalationPolicy getOnCallEscalationPolicy( } /** - * Get on-call escalation policy. + * Get On-Call escalation policy. * *

See {@link #getOnCallEscalationPolicyWithHttpInfoAsync}. * @@ -809,7 +809,7 @@ public CompletableFuture getOnCallEscalationPolicyAsync( } /** - * Get an on-call escalation policy + * Get an On-Call escalation policy * * @param policyId The ID of the escalation policy (required) * @param parameters Optional parameters for the request. @@ -868,7 +868,7 @@ public ApiResponse getOnCallEscalationPolicyWithHttpInfo( } /** - * Get on-call escalation policy. + * Get On-Call escalation policy. * *

See {@link #getOnCallEscalationPolicyWithHttpInfo}. * @@ -947,7 +947,7 @@ public GetOnCallScheduleOptionalParameters include(String include) { } /** - * Get on-call schedule. + * Get On-Call schedule. * *

See {@link #getOnCallScheduleWithHttpInfo}. * @@ -961,7 +961,7 @@ public Schedule getOnCallSchedule(String scheduleId) throws ApiException { } /** - * Get on-call schedule. + * Get On-Call schedule. * *

See {@link #getOnCallScheduleWithHttpInfoAsync}. * @@ -977,7 +977,7 @@ public CompletableFuture getOnCallScheduleAsync(String scheduleId) { } /** - * Get on-call schedule. + * Get On-Call schedule. * *

See {@link #getOnCallScheduleWithHttpInfo}. * @@ -992,7 +992,7 @@ public Schedule getOnCallSchedule( } /** - * Get on-call schedule. + * Get On-Call schedule. * *

See {@link #getOnCallScheduleWithHttpInfoAsync}. * @@ -1010,7 +1010,7 @@ public CompletableFuture getOnCallScheduleAsync( } /** - * Get an on-call schedule + * Get an On-Call schedule * * @param scheduleId The ID of the schedule (required) * @param parameters Optional parameters for the request. @@ -1069,7 +1069,7 @@ public ApiResponse getOnCallScheduleWithHttpInfo( } /** - * Get on-call schedule. + * Get On-Call schedule. * *

See {@link #getOnCallScheduleWithHttpInfo}. * @@ -1146,7 +1146,7 @@ public GetOnCallTeamRoutingRulesOptionalParameters include(String include) { } /** - * Get on-call team routing rules. + * Get On-Call team routing rules. * *

See {@link #getOnCallTeamRoutingRulesWithHttpInfo}. * @@ -1161,7 +1161,7 @@ teamId, new GetOnCallTeamRoutingRulesOptionalParameters()) } /** - * Get on-call team routing rules. + * Get On-Call team routing rules. * *

See {@link #getOnCallTeamRoutingRulesWithHttpInfoAsync}. * @@ -1178,7 +1178,7 @@ teamId, new GetOnCallTeamRoutingRulesOptionalParameters()) } /** - * Get on-call team routing rules. + * Get On-Call team routing rules. * *

See {@link #getOnCallTeamRoutingRulesWithHttpInfo}. * @@ -1193,7 +1193,7 @@ public TeamRoutingRules getOnCallTeamRoutingRules( } /** - * Get on-call team routing rules. + * Get On-Call team routing rules. * *

See {@link #getOnCallTeamRoutingRulesWithHttpInfoAsync}. * @@ -1211,7 +1211,7 @@ public CompletableFuture getOnCallTeamRoutingRulesAsync( } /** - * Get a team's on-call routing rules + * Get a team's On-Call routing rules * * @param teamId The team ID (required) * @param parameters Optional parameters for the request. @@ -1266,7 +1266,7 @@ public ApiResponse getOnCallTeamRoutingRulesWithHttpInfo( } /** - * Get on-call team routing rules. + * Get On-Call team routing rules. * *

See {@link #getOnCallTeamRoutingRulesWithHttpInfo}. * @@ -1564,7 +1564,7 @@ public SetOnCallTeamRoutingRulesOptionalParameters include(String include) { } /** - * Set on-call team routing rules. + * Set On-Call team routing rules. * *

See {@link #setOnCallTeamRoutingRulesWithHttpInfo}. * @@ -1581,7 +1581,7 @@ teamId, body, new SetOnCallTeamRoutingRulesOptionalParameters()) } /** - * Set on-call team routing rules. + * Set On-Call team routing rules. * *

See {@link #setOnCallTeamRoutingRulesWithHttpInfoAsync}. * @@ -1600,7 +1600,7 @@ teamId, body, new SetOnCallTeamRoutingRulesOptionalParameters()) } /** - * Set on-call team routing rules. + * Set On-Call team routing rules. * *

See {@link #setOnCallTeamRoutingRulesWithHttpInfo}. * @@ -1619,7 +1619,7 @@ public TeamRoutingRules setOnCallTeamRoutingRules( } /** - * Set on-call team routing rules. + * Set On-Call team routing rules. * *

See {@link #setOnCallTeamRoutingRulesWithHttpInfoAsync}. * @@ -1640,7 +1640,7 @@ public CompletableFuture setOnCallTeamRoutingRulesAsync( } /** - * Set a team's on-call routing rules + * Set a team's On-Call routing rules * * @param teamId The team ID (required) * @param body (required) @@ -1705,7 +1705,7 @@ public ApiResponse setOnCallTeamRoutingRulesWithHttpInfo( } /** - * Set on-call team routing rules. + * Set On-Call team routing rules. * *

See {@link #setOnCallTeamRoutingRulesWithHttpInfo}. * @@ -1795,7 +1795,7 @@ public UpdateOnCallEscalationPolicyOptionalParameters include(String include) { } /** - * Update on-call escalation policy. + * Update On-Call escalation policy. * *

See {@link #updateOnCallEscalationPolicyWithHttpInfo}. * @@ -1812,7 +1812,7 @@ policyId, body, new UpdateOnCallEscalationPolicyOptionalParameters()) } /** - * Update on-call escalation policy. + * Update On-Call escalation policy. * *

See {@link #updateOnCallEscalationPolicyWithHttpInfoAsync}. * @@ -1831,7 +1831,7 @@ policyId, body, new UpdateOnCallEscalationPolicyOptionalParameters()) } /** - * Update on-call escalation policy. + * Update On-Call escalation policy. * *

See {@link #updateOnCallEscalationPolicyWithHttpInfo}. * @@ -1850,7 +1850,7 @@ public EscalationPolicy updateOnCallEscalationPolicy( } /** - * Update on-call escalation policy. + * Update On-Call escalation policy. * *

See {@link #updateOnCallEscalationPolicyWithHttpInfoAsync}. * @@ -1871,7 +1871,7 @@ public CompletableFuture updateOnCallEscalationPolicyAsync( } /** - * Update an on-call escalation policy + * Update an On-Call escalation policy * * @param policyId The ID of the escalation policy (required) * @param body (required) @@ -1941,7 +1941,7 @@ public ApiResponse updateOnCallEscalationPolicyWithHttpInfo( } /** - * Update on-call escalation policy. + * Update On-Call escalation policy. * *

See {@link #updateOnCallEscalationPolicyWithHttpInfo}. * @@ -2034,7 +2034,7 @@ public UpdateOnCallScheduleOptionalParameters include(String include) { } /** - * Update on-call schedule. + * Update On-Call schedule. * *

See {@link #updateOnCallScheduleWithHttpInfo}. * @@ -2051,7 +2051,7 @@ scheduleId, body, new UpdateOnCallScheduleOptionalParameters()) } /** - * Update on-call schedule. + * Update On-Call schedule. * *

See {@link #updateOnCallScheduleWithHttpInfoAsync}. * @@ -2070,7 +2070,7 @@ scheduleId, body, new UpdateOnCallScheduleOptionalParameters()) } /** - * Update on-call schedule. + * Update On-Call schedule. * *

See {@link #updateOnCallScheduleWithHttpInfo}. * @@ -2089,7 +2089,7 @@ public Schedule updateOnCallSchedule( } /** - * Update on-call schedule. + * Update On-Call schedule. * *

See {@link #updateOnCallScheduleWithHttpInfoAsync}. * @@ -2110,7 +2110,7 @@ public CompletableFuture updateOnCallScheduleAsync( } /** - * Update a new on-call schedule + * Update a new On-Call schedule * * @param scheduleId The ID of the schedule (required) * @param body (required) @@ -2180,7 +2180,7 @@ public ApiResponse updateOnCallScheduleWithHttpInfo( } /** - * Update on-call schedule. + * Update On-Call schedule. * *

See {@link #updateOnCallScheduleWithHttpInfo}. * diff --git a/src/main/java/com/datadog/api/client/v2/model/CreatePageRequestDataAttributesTarget.java b/src/main/java/com/datadog/api/client/v2/model/CreatePageRequestDataAttributesTarget.java index 5ce5a24d2cd..aa7780ea8b1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CreatePageRequestDataAttributesTarget.java +++ b/src/main/java/com/datadog/api/client/v2/model/CreatePageRequestDataAttributesTarget.java @@ -29,7 +29,7 @@ public class CreatePageRequestDataAttributesTarget { private String identifier; public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + private OnCallPageTargetType type; public CreatePageRequestDataAttributesTarget identifier(String identifier) { this.identifier = identifier; @@ -37,7 +37,7 @@ public CreatePageRequestDataAttributesTarget identifier(String identifier) { } /** - * A unique ID for the target (for example, team handle or user UUID). + * Identifier for the target (for example, team handle or user ID). * * @return identifier */ @@ -52,24 +52,28 @@ public void setIdentifier(String identifier) { this.identifier = identifier; } - public CreatePageRequestDataAttributesTarget type(String type) { + public CreatePageRequestDataAttributesTarget type(OnCallPageTargetType type) { this.type = type; + this.unparsed |= !type.isValid(); return this; } /** - * The kind of target, team_uuid | team_handle | user_uuid. + * The kind of target, team_id | team_handle | user_id. * * @return type */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { + public OnCallPageTargetType getType() { return type; } - public void setType(String type) { + public void setType(OnCallPageTargetType type) { + if (!type.isValid()) { + this.unparsed = true; + } this.type = type; } diff --git a/src/main/java/com/datadog/api/client/v2/model/EscalationPolicyCreateRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/EscalationPolicyCreateRequestDataAttributes.java index 0153a75469d..0658bc19da7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EscalationPolicyCreateRequestDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/EscalationPolicyCreateRequestDataAttributes.java @@ -24,7 +24,6 @@ * resolution behavior, retries, and steps. */ @JsonPropertyOrder({ - EscalationPolicyCreateRequestDataAttributes.JSON_PROPERTY_DESCRIPTION, EscalationPolicyCreateRequestDataAttributes.JSON_PROPERTY_NAME, EscalationPolicyCreateRequestDataAttributes.JSON_PROPERTY_RESOLVE_PAGE_ON_POLICY_END, EscalationPolicyCreateRequestDataAttributes.JSON_PROPERTY_RETRIES, @@ -34,9 +33,6 @@ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EscalationPolicyCreateRequestDataAttributes { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DESCRIPTION = "description"; - private String description; - public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -61,27 +57,6 @@ public EscalationPolicyCreateRequestDataAttributes( this.steps = steps; } - public EscalationPolicyCreateRequestDataAttributes description(String description) { - this.description = description; - return this; - } - - /** - * Provides a detailed text description of the new escalation policy. - * - * @return description - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - public EscalationPolicyCreateRequestDataAttributes name(String name) { this.name = name; return this; @@ -235,8 +210,7 @@ public boolean equals(Object o) { } EscalationPolicyCreateRequestDataAttributes escalationPolicyCreateRequestDataAttributes = (EscalationPolicyCreateRequestDataAttributes) o; - return Objects.equals(this.description, escalationPolicyCreateRequestDataAttributes.description) - && Objects.equals(this.name, escalationPolicyCreateRequestDataAttributes.name) + return Objects.equals(this.name, escalationPolicyCreateRequestDataAttributes.name) && Objects.equals( this.resolvePageOnPolicyEnd, escalationPolicyCreateRequestDataAttributes.resolvePageOnPolicyEnd) @@ -249,15 +223,13 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash( - description, name, resolvePageOnPolicyEnd, retries, steps, additionalProperties); + return Objects.hash(name, resolvePageOnPolicyEnd, retries, steps, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EscalationPolicyCreateRequestDataAttributes {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" resolvePageOnPolicyEnd: ") .append(toIndentedString(resolvePageOnPolicyEnd)) diff --git a/src/main/java/com/datadog/api/client/v2/model/EscalationPolicyData.java b/src/main/java/com/datadog/api/client/v2/model/EscalationPolicyData.java index 99455d37608..805b58b417a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EscalationPolicyData.java +++ b/src/main/java/com/datadog/api/client/v2/model/EscalationPolicyData.java @@ -59,8 +59,8 @@ public EscalationPolicyData attributes(EscalationPolicyDataAttributes attributes } /** - * Defines the main attributes of an escalation policy, such as its description, name, and - * behavior on policy end. + * Defines the main attributes of an escalation policy, such as its name and behavior on policy + * end. * * @return attributes */ diff --git a/src/main/java/com/datadog/api/client/v2/model/EscalationPolicyDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/EscalationPolicyDataAttributes.java index 6f484f6eab0..066926b6604 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EscalationPolicyDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/EscalationPolicyDataAttributes.java @@ -18,11 +18,9 @@ import java.util.Objects; /** - * Defines the main attributes of an escalation policy, such as its description, name, and behavior - * on policy end. + * Defines the main attributes of an escalation policy, such as its name and behavior on policy end. */ @JsonPropertyOrder({ - EscalationPolicyDataAttributes.JSON_PROPERTY_DESCRIPTION, EscalationPolicyDataAttributes.JSON_PROPERTY_NAME, EscalationPolicyDataAttributes.JSON_PROPERTY_RESOLVE_PAGE_ON_POLICY_END, EscalationPolicyDataAttributes.JSON_PROPERTY_RETRIES @@ -31,9 +29,6 @@ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EscalationPolicyDataAttributes { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DESCRIPTION = "description"; - private String description; - public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -52,27 +47,6 @@ public EscalationPolicyDataAttributes( this.name = name; } - public EscalationPolicyDataAttributes description(String description) { - this.description = description; - return this; - } - - /** - * Provides a detailed text description of the escalation policy. - * - * @return description - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - public EscalationPolicyDataAttributes name(String name) { this.name = name; return this; @@ -192,8 +166,7 @@ public boolean equals(Object o) { } EscalationPolicyDataAttributes escalationPolicyDataAttributes = (EscalationPolicyDataAttributes) o; - return Objects.equals(this.description, escalationPolicyDataAttributes.description) - && Objects.equals(this.name, escalationPolicyDataAttributes.name) + return Objects.equals(this.name, escalationPolicyDataAttributes.name) && Objects.equals( this.resolvePageOnPolicyEnd, escalationPolicyDataAttributes.resolvePageOnPolicyEnd) && Objects.equals(this.retries, escalationPolicyDataAttributes.retries) @@ -203,14 +176,13 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(description, name, resolvePageOnPolicyEnd, retries, additionalProperties); + return Objects.hash(name, resolvePageOnPolicyEnd, retries, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EscalationPolicyDataAttributes {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" resolvePageOnPolicyEnd: ") .append(toIndentedString(resolvePageOnPolicyEnd)) diff --git a/src/main/java/com/datadog/api/client/v2/model/EscalationPolicyStepRelationships.java b/src/main/java/com/datadog/api/client/v2/model/EscalationPolicyStepRelationships.java index 40846cbf990..aefd3954e0e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EscalationPolicyStepRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/EscalationPolicyStepRelationships.java @@ -23,27 +23,27 @@ public class EscalationPolicyStepRelationships { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_TARGETS = "targets"; - private EscalationTarget targets; + private EscalationTargets targets; - public EscalationPolicyStepRelationships targets(EscalationTarget targets) { + public EscalationPolicyStepRelationships targets(EscalationTargets targets) { this.targets = targets; this.unparsed |= targets.unparsed; return this; } /** - * Represents an escalation target, which can be a team, user, or schedule. + * A list of escalation targets for a step * * @return targets */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TARGETS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public EscalationTarget getTargets() { + public EscalationTargets getTargets() { return targets; } - public void setTargets(EscalationTarget targets) { + public void setTargets(EscalationTargets targets) { this.targets = targets; } diff --git a/src/main/java/com/datadog/api/client/v2/model/EscalationPolicyUpdateRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/EscalationPolicyUpdateRequestDataAttributes.java index 3f83cff332e..f0521b05ac5 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EscalationPolicyUpdateRequestDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/EscalationPolicyUpdateRequestDataAttributes.java @@ -24,7 +24,6 @@ * resolution behavior, retries, and steps. */ @JsonPropertyOrder({ - EscalationPolicyUpdateRequestDataAttributes.JSON_PROPERTY_DESCRIPTION, EscalationPolicyUpdateRequestDataAttributes.JSON_PROPERTY_NAME, EscalationPolicyUpdateRequestDataAttributes.JSON_PROPERTY_RESOLVE_PAGE_ON_POLICY_END, EscalationPolicyUpdateRequestDataAttributes.JSON_PROPERTY_RETRIES, @@ -34,9 +33,6 @@ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EscalationPolicyUpdateRequestDataAttributes { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DESCRIPTION = "description"; - private String description; - public static final String JSON_PROPERTY_NAME = "name"; private String name; @@ -61,27 +57,6 @@ public EscalationPolicyUpdateRequestDataAttributes( this.steps = steps; } - public EscalationPolicyUpdateRequestDataAttributes description(String description) { - this.description = description; - return this; - } - - /** - * Provides a detailed text description of the escalation policy. - * - * @return description - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - public EscalationPolicyUpdateRequestDataAttributes name(String name) { this.name = name; return this; @@ -234,8 +209,7 @@ public boolean equals(Object o) { } EscalationPolicyUpdateRequestDataAttributes escalationPolicyUpdateRequestDataAttributes = (EscalationPolicyUpdateRequestDataAttributes) o; - return Objects.equals(this.description, escalationPolicyUpdateRequestDataAttributes.description) - && Objects.equals(this.name, escalationPolicyUpdateRequestDataAttributes.name) + return Objects.equals(this.name, escalationPolicyUpdateRequestDataAttributes.name) && Objects.equals( this.resolvePageOnPolicyEnd, escalationPolicyUpdateRequestDataAttributes.resolvePageOnPolicyEnd) @@ -248,15 +222,13 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash( - description, name, resolvePageOnPolicyEnd, retries, steps, additionalProperties); + return Objects.hash(name, resolvePageOnPolicyEnd, retries, steps, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EscalationPolicyUpdateRequestDataAttributes {\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" resolvePageOnPolicyEnd: ") .append(toIndentedString(resolvePageOnPolicyEnd)) diff --git a/src/main/java/com/datadog/api/client/v2/model/TeamReferenceRelationshipsOncallUsers.java b/src/main/java/com/datadog/api/client/v2/model/EscalationTargets.java similarity index 70% rename from src/main/java/com/datadog/api/client/v2/model/TeamReferenceRelationshipsOncallUsers.java rename to src/main/java/com/datadog/api/client/v2/model/EscalationTargets.java index 9485f9a74e3..45d5c05154d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TeamReferenceRelationshipsOncallUsers.java +++ b/src/main/java/com/datadog/api/client/v2/model/EscalationTargets.java @@ -18,26 +18,24 @@ import java.util.Map; import java.util.Objects; -/** Defines which users are on-call within a team, stored as an array of references. */ -@JsonPropertyOrder({TeamReferenceRelationshipsOncallUsers.JSON_PROPERTY_DATA}) +/** A list of escalation targets for a step */ +@JsonPropertyOrder({EscalationTargets.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class TeamReferenceRelationshipsOncallUsers { +public class EscalationTargets { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private List data = null; + private List data = null; - public TeamReferenceRelationshipsOncallUsers data( - List data) { + public EscalationTargets data(List data) { this.data = data; - for (TeamReferenceRelationshipsOncallUsersDataItems item : data) { + for (EscalationTarget item : data) { this.unparsed |= item.unparsed; } return this; } - public TeamReferenceRelationshipsOncallUsers addDataItem( - TeamReferenceRelationshipsOncallUsersDataItems dataItem) { + public EscalationTargets addDataItem(EscalationTarget dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -47,18 +45,18 @@ public TeamReferenceRelationshipsOncallUsers addDataItem( } /** - * The list of user references who are on-call for this team. + * The EscalationTargets data. * * @return data */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { + public List getData() { return data; } - public void setData(List data) { + public void setData(List data) { this.data = data; } @@ -74,10 +72,10 @@ public void setData(List data) { * * @param key The arbitrary key to set * @param value The associated value - * @return TeamReferenceRelationshipsOncallUsers + * @return EscalationTargets */ @JsonAnySetter - public TeamReferenceRelationshipsOncallUsers putAdditionalProperty(String key, Object value) { + public EscalationTargets putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -108,7 +106,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this TeamReferenceRelationshipsOncallUsers object is equal to o. */ + /** Return true if this EscalationTargets object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -117,11 +115,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - TeamReferenceRelationshipsOncallUsers teamReferenceRelationshipsOncallUsers = - (TeamReferenceRelationshipsOncallUsers) o; - return Objects.equals(this.data, teamReferenceRelationshipsOncallUsers.data) - && Objects.equals( - this.additionalProperties, teamReferenceRelationshipsOncallUsers.additionalProperties); + EscalationTargets escalationTargets = (EscalationTargets) o; + return Objects.equals(this.data, escalationTargets.data) + && Objects.equals(this.additionalProperties, escalationTargets.additionalProperties); } @Override @@ -132,7 +128,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class TeamReferenceRelationshipsOncallUsers {\n"); + sb.append("class EscalationTargets {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/OnCallPageTargetType.java b/src/main/java/com/datadog/api/client/v2/model/OnCallPageTargetType.java new file mode 100644 index 00000000000..76740fdfbb3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OnCallPageTargetType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The kind of target, team_id | team_handle | user_id. */ +@JsonSerialize(using = OnCallPageTargetType.OnCallPageTargetTypeSerializer.class) +public class OnCallPageTargetType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("team_id", "team_handle", "user_id")); + + public static final OnCallPageTargetType TEAM_ID = new OnCallPageTargetType("team_id"); + public static final OnCallPageTargetType TEAM_HANDLE = new OnCallPageTargetType("team_handle"); + public static final OnCallPageTargetType USER_ID = new OnCallPageTargetType("user_id"); + + OnCallPageTargetType(String value) { + super(value, allowedValues); + } + + public static class OnCallPageTargetTypeSerializer extends StdSerializer { + public OnCallPageTargetTypeSerializer(Class t) { + super(t); + } + + public OnCallPageTargetTypeSerializer() { + this(null); + } + + @Override + public void serialize( + OnCallPageTargetType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static OnCallPageTargetType fromValue(String value) { + return new OnCallPageTargetType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ScheduleCreateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/ScheduleCreateRequestData.java index 773a483fe9d..d1a8cb0fb4c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScheduleCreateRequestData.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScheduleCreateRequestData.java @@ -60,8 +60,8 @@ public ScheduleCreateRequestData attributes(ScheduleCreateRequestDataAttributes } /** - * Describes the main attributes for creating a new schedule, including name, layers, time zone, - * and tags. + * Describes the main attributes for creating a new schedule, including name, layers, and time + * zone. * * @return attributes */ diff --git a/src/main/java/com/datadog/api/client/v2/model/ScheduleCreateRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ScheduleCreateRequestDataAttributes.java index 253ae3ead32..4ab1d9cf7f2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScheduleCreateRequestDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScheduleCreateRequestDataAttributes.java @@ -20,13 +20,11 @@ import java.util.Objects; /** - * Describes the main attributes for creating a new schedule, including name, layers, time zone, and - * tags. + * Describes the main attributes for creating a new schedule, including name, layers, and time zone. */ @JsonPropertyOrder({ ScheduleCreateRequestDataAttributes.JSON_PROPERTY_LAYERS, ScheduleCreateRequestDataAttributes.JSON_PROPERTY_NAME, - ScheduleCreateRequestDataAttributes.JSON_PROPERTY_TAGS, ScheduleCreateRequestDataAttributes.JSON_PROPERTY_TIME_ZONE }) @jakarta.annotation.Generated( @@ -39,9 +37,6 @@ public class ScheduleCreateRequestDataAttributes { public static final String JSON_PROPERTY_NAME = "name"; private String name; - public static final String JSON_PROPERTY_TAGS = "tags"; - private List tags = null; - public static final String JSON_PROPERTY_TIME_ZONE = "time_zone"; private String timeZone; @@ -75,7 +70,7 @@ public ScheduleCreateRequestDataAttributes addLayersItem( } /** - * The layers of on-call coverage that define rotation intervals and restrictions. + * The layers of On-Call coverage that define rotation intervals and restrictions. * * @return layers */ @@ -109,35 +104,6 @@ public void setName(String name) { this.name = name; } - public ScheduleCreateRequestDataAttributes tags(List tags) { - this.tags = tags; - return this; - } - - public ScheduleCreateRequestDataAttributes addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * A list of tags for categorizing or filtering the schedule. - * - * @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - public ScheduleCreateRequestDataAttributes timeZone(String timeZone) { this.timeZone = timeZone; return this; @@ -217,7 +183,6 @@ public boolean equals(Object o) { (ScheduleCreateRequestDataAttributes) o; return Objects.equals(this.layers, scheduleCreateRequestDataAttributes.layers) && Objects.equals(this.name, scheduleCreateRequestDataAttributes.name) - && Objects.equals(this.tags, scheduleCreateRequestDataAttributes.tags) && Objects.equals(this.timeZone, scheduleCreateRequestDataAttributes.timeZone) && Objects.equals( this.additionalProperties, scheduleCreateRequestDataAttributes.additionalProperties); @@ -225,7 +190,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(layers, name, tags, timeZone, additionalProperties); + return Objects.hash(layers, name, timeZone, additionalProperties); } @Override @@ -234,7 +199,6 @@ public String toString() { sb.append("class ScheduleCreateRequestDataAttributes {\n"); sb.append(" layers: ").append(toIndentedString(layers)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/ScheduleData.java b/src/main/java/com/datadog/api/client/v2/model/ScheduleData.java index 2482eb1b3fe..9c873a5c564 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScheduleData.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScheduleData.java @@ -56,7 +56,7 @@ public ScheduleData attributes(ScheduleDataAttributes attributes) { } /** - * Provides core properties of a schedule object, such as its name, time zone, and tags. + * Provides core properties of a schedule object such as its name and time zone. * * @return attributes */ diff --git a/src/main/java/com/datadog/api/client/v2/model/ScheduleDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ScheduleDataAttributes.java index 57a03181f3e..44636f7f6a7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScheduleDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScheduleDataAttributes.java @@ -12,16 +12,13 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.ArrayList; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.Objects; -/** Provides core properties of a schedule object, such as its name, time zone, and tags. */ +/** Provides core properties of a schedule object such as its name and time zone. */ @JsonPropertyOrder({ ScheduleDataAttributes.JSON_PROPERTY_NAME, - ScheduleDataAttributes.JSON_PROPERTY_TAGS, ScheduleDataAttributes.JSON_PROPERTY_TIME_ZONE }) @jakarta.annotation.Generated( @@ -31,9 +28,6 @@ public class ScheduleDataAttributes { public static final String JSON_PROPERTY_NAME = "name"; private String name; - public static final String JSON_PROPERTY_TAGS = "tags"; - private List tags = null; - public static final String JSON_PROPERTY_TIME_ZONE = "time_zone"; private String timeZone; @@ -58,35 +52,6 @@ public void setName(String name) { this.name = name; } - public ScheduleDataAttributes tags(List tags) { - this.tags = tags; - return this; - } - - public ScheduleDataAttributes addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * A list of tags associated with this schedule. - * - * @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - public ScheduleDataAttributes timeZone(String timeZone) { this.timeZone = timeZone; return this; @@ -165,14 +130,13 @@ public boolean equals(Object o) { } ScheduleDataAttributes scheduleDataAttributes = (ScheduleDataAttributes) o; return Objects.equals(this.name, scheduleDataAttributes.name) - && Objects.equals(this.tags, scheduleDataAttributes.tags) && Objects.equals(this.timeZone, scheduleDataAttributes.timeZone) && Objects.equals(this.additionalProperties, scheduleDataAttributes.additionalProperties); } @Override public int hashCode() { - return Objects.hash(name, tags, timeZone, additionalProperties); + return Objects.hash(name, timeZone, additionalProperties); } @Override @@ -180,7 +144,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ScheduleDataAttributes {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/ScheduleUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/ScheduleUpdateRequest.java index 32bc202937e..3243ea72317 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScheduleUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScheduleUpdateRequest.java @@ -45,8 +45,8 @@ public ScheduleUpdateRequest data(ScheduleUpdateRequestData data) { } /** - * Contains all data needed to update an existing schedule, including its attributes (such as - * name, layers, or tags) and any relationships to teams. + * Contains all data needed to update an existing schedule, including its attributes (such as name + * and time zone) and any relationships to teams. * * @return data */ diff --git a/src/main/java/com/datadog/api/client/v2/model/ScheduleUpdateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/ScheduleUpdateRequestData.java index dcbae873ea5..4efa015dcab 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScheduleUpdateRequestData.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScheduleUpdateRequestData.java @@ -18,8 +18,8 @@ import java.util.Objects; /** - * Contains all data needed to update an existing schedule, including its attributes (such as name, - * layers, or tags) and any relationships to teams. + * Contains all data needed to update an existing schedule, including its attributes (such as name + * and time zone) and any relationships to teams. */ @JsonPropertyOrder({ ScheduleUpdateRequestData.JSON_PROPERTY_ATTRIBUTES, @@ -66,7 +66,7 @@ public ScheduleUpdateRequestData attributes(ScheduleUpdateRequestDataAttributes } /** - * Defines the updatable attributes for a schedule, such as name, time zone, tags, and layers. + * Defines the updatable attributes for a schedule, such as name, time zone, and layers. * * @return attributes */ diff --git a/src/main/java/com/datadog/api/client/v2/model/ScheduleUpdateRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ScheduleUpdateRequestDataAttributes.java index 1bd26bd944f..6809ea022b2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScheduleUpdateRequestDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScheduleUpdateRequestDataAttributes.java @@ -19,11 +19,10 @@ import java.util.Map; import java.util.Objects; -/** Defines the updatable attributes for a schedule, such as name, time zone, tags, and layers. */ +/** Defines the updatable attributes for a schedule, such as name, time zone, and layers. */ @JsonPropertyOrder({ ScheduleUpdateRequestDataAttributes.JSON_PROPERTY_LAYERS, ScheduleUpdateRequestDataAttributes.JSON_PROPERTY_NAME, - ScheduleUpdateRequestDataAttributes.JSON_PROPERTY_TAGS, ScheduleUpdateRequestDataAttributes.JSON_PROPERTY_TIME_ZONE }) @jakarta.annotation.Generated( @@ -36,9 +35,6 @@ public class ScheduleUpdateRequestDataAttributes { public static final String JSON_PROPERTY_NAME = "name"; private String name; - public static final String JSON_PROPERTY_TAGS = "tags"; - private List tags = null; - public static final String JSON_PROPERTY_TIME_ZONE = "time_zone"; private String timeZone; @@ -106,35 +102,6 @@ public void setName(String name) { this.name = name; } - public ScheduleUpdateRequestDataAttributes tags(List tags) { - this.tags = tags; - return this; - } - - public ScheduleUpdateRequestDataAttributes addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * A list of tags that you can associate with this schedule. - * - * @return tags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - public ScheduleUpdateRequestDataAttributes timeZone(String timeZone) { this.timeZone = timeZone; return this; @@ -214,7 +181,6 @@ public boolean equals(Object o) { (ScheduleUpdateRequestDataAttributes) o; return Objects.equals(this.layers, scheduleUpdateRequestDataAttributes.layers) && Objects.equals(this.name, scheduleUpdateRequestDataAttributes.name) - && Objects.equals(this.tags, scheduleUpdateRequestDataAttributes.tags) && Objects.equals(this.timeZone, scheduleUpdateRequestDataAttributes.timeZone) && Objects.equals( this.additionalProperties, scheduleUpdateRequestDataAttributes.additionalProperties); @@ -222,7 +188,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(layers, name, tags, timeZone, additionalProperties); + return Objects.hash(layers, name, timeZone, additionalProperties); } @Override @@ -231,7 +197,6 @@ public String toString() { sb.append("class ScheduleUpdateRequestDataAttributes {\n"); sb.append(" layers: ").append(toIndentedString(layers)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/TeamReference.java b/src/main/java/com/datadog/api/client/v2/model/TeamReference.java index 2db192699b5..5cf1f0c576b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/TeamReference.java +++ b/src/main/java/com/datadog/api/client/v2/model/TeamReference.java @@ -21,7 +21,6 @@ @JsonPropertyOrder({ TeamReference.JSON_PROPERTY_ATTRIBUTES, TeamReference.JSON_PROPERTY_ID, - TeamReference.JSON_PROPERTY_RELATIONSHIPS, TeamReference.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( @@ -34,9 +33,6 @@ public class TeamReference { public static final String JSON_PROPERTY_ID = "id"; private String id; - public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; - private TeamReferenceRelationships relationships; - public static final String JSON_PROPERTY_TYPE = "type"; private TeamReferenceType type = TeamReferenceType.TEAMS; @@ -93,28 +89,6 @@ public void setId(String id) { this.id = id; } - public TeamReference relationships(TeamReferenceRelationships relationships) { - this.relationships = relationships; - this.unparsed |= relationships.unparsed; - return this; - } - - /** - * Collects the key relationship fields for a team reference, specifically on-call users. - * - * @return relationships - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TeamReferenceRelationships getRelationships() { - return relationships; - } - - public void setRelationships(TeamReferenceRelationships relationships) { - this.relationships = relationships; - } - public TeamReference type(TeamReferenceType type) { this.type = type; this.unparsed |= !type.isValid(); @@ -197,14 +171,13 @@ public boolean equals(Object o) { TeamReference teamReference = (TeamReference) o; return Objects.equals(this.attributes, teamReference.attributes) && Objects.equals(this.id, teamReference.id) - && Objects.equals(this.relationships, teamReference.relationships) && Objects.equals(this.type, teamReference.type) && Objects.equals(this.additionalProperties, teamReference.additionalProperties); } @Override public int hashCode() { - return Objects.hash(attributes, id, relationships, type, additionalProperties); + return Objects.hash(attributes, id, type, additionalProperties); } @Override @@ -213,7 +186,6 @@ public String toString() { sb.append("class TeamReference {\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/TeamReferenceRelationships.java b/src/main/java/com/datadog/api/client/v2/model/TeamReferenceRelationships.java deleted file mode 100644 index cf2d0fe3f78..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/TeamReferenceRelationships.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** Collects the key relationship fields for a team reference, specifically on-call users. */ -@JsonPropertyOrder({TeamReferenceRelationships.JSON_PROPERTY_ONCALL_USERS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class TeamReferenceRelationships { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_ONCALL_USERS = "oncall_users"; - private TeamReferenceRelationshipsOncallUsers oncallUsers; - - public TeamReferenceRelationships oncallUsers(TeamReferenceRelationshipsOncallUsers oncallUsers) { - this.oncallUsers = oncallUsers; - this.unparsed |= oncallUsers.unparsed; - return this; - } - - /** - * Defines which users are on-call within a team, stored as an array of references. - * - * @return oncallUsers - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ONCALL_USERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public TeamReferenceRelationshipsOncallUsers getOncallUsers() { - return oncallUsers; - } - - public void setOncallUsers(TeamReferenceRelationshipsOncallUsers oncallUsers) { - this.oncallUsers = oncallUsers; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return TeamReferenceRelationships - */ - @JsonAnySetter - public TeamReferenceRelationships putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** Return true if this TeamReferenceRelationships object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TeamReferenceRelationships teamReferenceRelationships = (TeamReferenceRelationships) o; - return Objects.equals(this.oncallUsers, teamReferenceRelationships.oncallUsers) - && Objects.equals( - this.additionalProperties, teamReferenceRelationships.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(oncallUsers, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TeamReferenceRelationships {\n"); - sb.append(" oncallUsers: ").append(toIndentedString(oncallUsers)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/TeamReferenceRelationshipsOncallUsersDataItems.java b/src/main/java/com/datadog/api/client/v2/model/TeamReferenceRelationshipsOncallUsersDataItems.java deleted file mode 100644 index 21427f15e53..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/TeamReferenceRelationshipsOncallUsersDataItems.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** - * References a user who is on-call within this team, identified by id and type - * . - */ -@JsonPropertyOrder({ - TeamReferenceRelationshipsOncallUsersDataItems.JSON_PROPERTY_ID, - TeamReferenceRelationshipsOncallUsersDataItems.JSON_PROPERTY_TYPE -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class TeamReferenceRelationshipsOncallUsersDataItems { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_ID = "id"; - private String id; - - public static final String JSON_PROPERTY_TYPE = "type"; - private TeamReferenceRelationshipsOncallUsersDataItemsType type = - TeamReferenceRelationshipsOncallUsersDataItemsType.USERS; - - public TeamReferenceRelationshipsOncallUsersDataItems() {} - - @JsonCreator - public TeamReferenceRelationshipsOncallUsersDataItems( - @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) - TeamReferenceRelationshipsOncallUsersDataItemsType type) { - this.id = id; - this.type = type; - this.unparsed |= !type.isValid(); - } - - public TeamReferenceRelationshipsOncallUsersDataItems id(String id) { - this.id = id; - return this; - } - - /** - * The unique identifier of the user. - * - * @return id - */ - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public TeamReferenceRelationshipsOncallUsersDataItems type( - TeamReferenceRelationshipsOncallUsersDataItemsType type) { - this.type = type; - this.unparsed |= !type.isValid(); - return this; - } - - /** - * Users resource type. - * - * @return type - */ - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public TeamReferenceRelationshipsOncallUsersDataItemsType getType() { - return type; - } - - public void setType(TeamReferenceRelationshipsOncallUsersDataItemsType type) { - if (!type.isValid()) { - this.unparsed = true; - } - this.type = type; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return TeamReferenceRelationshipsOncallUsersDataItems - */ - @JsonAnySetter - public TeamReferenceRelationshipsOncallUsersDataItems putAdditionalProperty( - String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** Return true if this TeamReferenceRelationshipsOncallUsersDataItems object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TeamReferenceRelationshipsOncallUsersDataItems teamReferenceRelationshipsOncallUsersDataItems = - (TeamReferenceRelationshipsOncallUsersDataItems) o; - return Objects.equals(this.id, teamReferenceRelationshipsOncallUsersDataItems.id) - && Objects.equals(this.type, teamReferenceRelationshipsOncallUsersDataItems.type) - && Objects.equals( - this.additionalProperties, - teamReferenceRelationshipsOncallUsersDataItems.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(id, type, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TeamReferenceRelationshipsOncallUsersDataItems {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/TeamReferenceRelationshipsOncallUsersDataItemsType.java b/src/main/java/com/datadog/api/client/v2/model/TeamReferenceRelationshipsOncallUsersDataItemsType.java deleted file mode 100644 index 19f6aed34e7..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/TeamReferenceRelationshipsOncallUsersDataItemsType.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.datadog.api.client.ModelEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.ser.std.StdSerializer; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; - -/** Users resource type. */ -@JsonSerialize( - using = - TeamReferenceRelationshipsOncallUsersDataItemsType - .TeamReferenceRelationshipsOncallUsersDataItemsTypeSerializer.class) -public class TeamReferenceRelationshipsOncallUsersDataItemsType extends ModelEnum { - - private static final Set allowedValues = new HashSet(Arrays.asList("users")); - - public static final TeamReferenceRelationshipsOncallUsersDataItemsType USERS = - new TeamReferenceRelationshipsOncallUsersDataItemsType("users"); - - TeamReferenceRelationshipsOncallUsersDataItemsType(String value) { - super(value, allowedValues); - } - - public static class TeamReferenceRelationshipsOncallUsersDataItemsTypeSerializer - extends StdSerializer { - public TeamReferenceRelationshipsOncallUsersDataItemsTypeSerializer( - Class t) { - super(t); - } - - public TeamReferenceRelationshipsOncallUsersDataItemsTypeSerializer() { - this(null); - } - - @Override - public void serialize( - TeamReferenceRelationshipsOncallUsersDataItemsType value, - JsonGenerator jgen, - SerializerProvider provider) - throws IOException, JsonProcessingException { - jgen.writeObject(value.value); - } - } - - @JsonCreator - public static TeamReferenceRelationshipsOncallUsersDataItemsType fromValue(String value) { - return new TeamReferenceRelationshipsOncallUsersDataItemsType(value); - } -} diff --git a/src/test/resources/cassettes/features/v2/Create_On_Call_escalation_policy_returns_Created_response.freeze b/src/test/resources/cassettes/features/v2/Create_On_Call_escalation_policy_returns_Created_response.freeze new file mode 100644 index 00000000000..6ffd5131319 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_On_Call_escalation_policy_returns_Created_response.freeze @@ -0,0 +1 @@ +2025-05-22T07:28:52.187Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_On_Call_escalation_policy_returns_Created_response.json b/src/test/resources/cassettes/features/v2/Create_On_Call_escalation_policy_returns_Created_response.json new file mode 100644 index 00000000000..f39792daa97 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_On_Call_escalation_policy_returns_Created_response.json @@ -0,0 +1,211 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-05-12T07:28:52.187Z\",\"end_date\":\"2025-06-01T07:28:52.187Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-05-17T07:28:52.187Z\"}],\"name\":\"Test-Create_On_Call_escalation_policy_returns_Created_response-1747898932\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/on-call/schedules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"b1732c80-9bb6-47e6-878d-9e672e4148a6\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Create_On_Call_escalation_policy_returns_Created_response-1747898932\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"98d7c183-739e-4ef5-ae40-27e7612bf939\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "65272199-52a2-05e7-f1e0-bfc448832a3f" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-af3e241f3f3acc33\",\"name\":\"test-name-af3e241f3f3acc33\"},\"type\":\"team\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/team", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"team\",\"id\":\"403df2c1-7163-494a-8f34-6b73a2e51893\",\"attributes\":{\"name\":\"test-name-af3e241f3f3acc33\",\"handle\":\"test-handle-af3e241f3f3acc33\",\"summary\":null,\"description\":null,\"avatar\":null,\"banner\":13,\"visible_modules\":[],\"hidden_modules\":[],\"created_at\":\"2025-05-22T07:28:53.300763+00:00\",\"modified_at\":\"2025-05-22T07:28:53.300772+00:00\",\"user_count\":0,\"link_count\":0},\"relationships\":{\"team_links\":{\"links\":{\"related\":\"/api/v2/team/403df2c1-7163-494a-8f34-6b73a2e51893/links\"}},\"user_team_permissions\":{\"links\":{\"related\":\"/api/v2/team/403df2c1-7163-494a-8f34-6b73a2e51893/permission-settings\"}}}}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "a267d2d6-a478-89d2-c56e-b9114dcc313c" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"email\":\"Test-Create_On_Call_escalation_policy_returns_Created_response-1747898932@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/users", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"users\",\"id\":\"6a0710e3-36de-11f0-b303-0a167fbfaaab\",\"attributes\":{\"name\":null,\"handle\":\"test-create_on_call_escalation_policy_returns_created_response-1747898932@datadoghq.com\",\"created_at\":\"2025-05-22T07:28:53.797325+00:00\",\"modified_at\":\"2025-05-22T07:28:53.797325+00:00\",\"email\":\"test-create_on_call_escalation_policy_returns_created_response-1747898932@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/004cc14226c3e9b0e2d890d1cf40991a?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", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "478faaf1-0e01-3d12-5fb4-0643244ad165" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Create_On_Call_escalation_policy_returns_Created_response-1747898932\",\"resolve_page_on_policy_end\":true,\"retries\":2,\"steps\":[{\"assignment\":\"default\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"6a0710e3-36de-11f0-b303-0a167fbfaaab\",\"type\":\"users\"},{\"id\":\"b1732c80-9bb6-47e6-878d-9e672e4148a6\",\"type\":\"schedules\"},{\"id\":\"403df2c1-7163-494a-8f34-6b73a2e51893\",\"type\":\"teams\"}]},{\"assignment\":\"round-robin\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"403df2c1-7163-494a-8f34-6b73a2e51893\",\"type\":\"teams\"}]}]},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"403df2c1-7163-494a-8f34-6b73a2e51893\",\"type\":\"teams\"}]}},\"type\":\"policies\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/on-call/escalation-policies", + "queryStringParameters": { + "include": [ + "steps.targets" + ] + }, + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"7c3eb6f9-15e8-4709-a2f9-21897597d44b\",\"type\":\"policies\",\"attributes\":{\"name\":\"Test-Create_On_Call_escalation_policy_returns_Created_response-1747898932\",\"resolve_page_on_policy_end\":true,\"retries\":2},\"relationships\":{\"steps\":{\"data\":[{\"id\":\"896e047c-2219-467b-a1ba-897ec456044e\",\"type\":\"steps\"},{\"id\":\"b405cc13-e555-4465-bb3f-7facb8ff8b4b\",\"type\":\"steps\"}]},\"teams\":{\"data\":[{\"id\":\"403df2c1-7163-494a-8f34-6b73a2e51893\",\"type\":\"teams\"}]}}},\"included\":[{\"id\":\"896e047c-2219-467b-a1ba-897ec456044e\",\"type\":\"steps\",\"attributes\":{\"assignment\":\"default\",\"escalate_after_seconds\":3600},\"relationships\":{\"targets\":{\"data\":[{\"id\":\"6a0710e3-36de-11f0-b303-0a167fbfaaab\",\"type\":\"users\"},{\"id\":\"b1732c80-9bb6-47e6-878d-9e672e4148a6\",\"type\":\"schedules\"},{\"id\":\"403df2c1-7163-494a-8f34-6b73a2e51893\",\"type\":\"teams\"}]}}},{\"id\":\"b405cc13-e555-4465-bb3f-7facb8ff8b4b\",\"type\":\"steps\",\"attributes\":{\"assignment\":\"round-robin\",\"escalate_after_seconds\":3600},\"relationships\":{\"targets\":{\"data\":[{\"id\":\"403df2c1-7163-494a-8f34-6b73a2e51893\",\"type\":\"teams\"}]}}},{\"id\":\"b1732c80-9bb6-47e6-878d-9e672e4148a6\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Create_On_Call_escalation_policy_returns_Created_response-1747898932\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"98d7c183-739e-4ef5-ae40-27e7612bf939\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}},{\"id\":\"403df2c1-7163-494a-8f34-6b73a2e51893\",\"type\":\"teams\",\"attributes\":{\"avatar\":\"\",\"description\":\"\",\"handle\":\"test-handle-af3e241f3f3acc33\",\"name\":\"test-name-af3e241f3f3acc33\"}},{\"id\":\"6a0710e3-36de-11f0-b303-0a167fbfaaab\",\"type\":\"users\",\"attributes\":{\"email\":\"test-create_on_call_escalation_policy_returns_created_response-1747898932@datadoghq.com\",\"name\":\"\",\"status\":\"pending\"}}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "6c622326-aa52-285e-dd84-993561bd5ff8" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/on-call/escalation-policies/7c3eb6f9-15e8-4709-a2f9-21897597d44b", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "93210378-80b9-9151-64fd-b1ccb28eea39" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/users/6a0710e3-36de-11f0-b303-0a167fbfaaab", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "74368f72-c9bb-6dee-6611-50faf2b6673d" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/team/403df2c1-7163-494a-8f34-6b73a2e51893", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "fb4c5b56-c672-2500-7102-3445e97de557" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/on-call/schedules/b1732c80-9bb6-47e6-878d-9e672e4148a6", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "48f15978-c8c3-65b9-2061-03a53b2641d3" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_On_Call_schedule_returns_Created_response.freeze b/src/test/resources/cassettes/features/v2/Create_On_Call_schedule_returns_Created_response.freeze new file mode 100644 index 00000000000..435d9b833f2 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_On_Call_schedule_returns_Created_response.freeze @@ -0,0 +1 @@ +2025-05-21T11:01:51.393Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_on_call_schedule_returns_Created_response.json b/src/test/resources/cassettes/features/v2/Create_On_Call_schedule_returns_Created_response.json similarity index 57% rename from src/test/resources/cassettes/features/v2/Create_on_call_schedule_returns_Created_response.json rename to src/test/resources/cassettes/features/v2/Create_On_Call_schedule_returns_Created_response.json index bed720bea93..edd75ecc838 100644 --- a/src/test/resources/cassettes/features/v2/Create_on_call_schedule_returns_Created_response.json +++ b/src/test/resources/cassettes/features/v2/Create_On_Call_schedule_returns_Created_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"email\":\"Test-Create_on_call_schedule_returns_Created_response-1745462967@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" + "json": "{\"data\":{\"attributes\":{\"email\":\"Test-Create_On_Call_schedule_returns_Created_response-1747825311@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"type\":\"users\",\"id\":\"bd4b5c17-20b6-11f0-9b89-56a869ed3f0e\",\"attributes\":{\"name\":null,\"handle\":\"test-create_on_call_schedule_returns_created_response-1745462967@datadoghq.com\",\"created_at\":\"2025-04-24T02:49:28.045501+00:00\",\"modified_at\":\"2025-04-24T02:49:28.045501+00:00\",\"email\":\"test-create_on_call_schedule_returns_created_response-1745462967@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/774508323ca0432fa93ee1fdf7111c87?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", + "body": "{\"data\":{\"type\":\"users\",\"id\":\"ffb657ae-3632-11f0-8139-36deebce65db\",\"attributes\":{\"name\":null,\"handle\":\"test-create_on_call_schedule_returns_created_response-1747825311@datadoghq.com\",\"created_at\":\"2025-05-21T11:01:51.489047+00:00\",\"modified_at\":\"2025-05-21T11:01:51.489047+00:00\",\"email\":\"test-create_on_call_schedule_returns_created_response-1747825311@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/fe3b4171de3845d28a158ca806834463?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", "headers": { "Content-Type": [ "application/json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "8bfe4249-ed75-2ef7-6133-6d6290fbab1a" + "id": "4c9546fd-2b59-087e-59a2-608f89e20859" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-3bb36357ae7d207e\",\"name\":\"test-name-3bb36357ae7d207e\"},\"type\":\"team\"}}" + "json": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-74af482e94498992\",\"name\":\"test-name-74af482e94498992\"},\"type\":\"team\"}}" }, "headers": {}, "method": "POST", @@ -42,7 +42,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"type\":\"team\",\"id\":\"04f134fc-d975-4111-825d-5447611962c3\",\"attributes\":{\"name\":\"test-name-3bb36357ae7d207e\",\"handle\":\"test-handle-3bb36357ae7d207e\",\"summary\":null,\"description\":null,\"avatar\":null,\"banner\":0,\"visible_modules\":[],\"hidden_modules\":[],\"created_at\":\"2025-04-24T02:49:28.946742+00:00\",\"modified_at\":\"2025-04-24T02:49:28.946751+00:00\",\"user_count\":0,\"link_count\":0},\"relationships\":{\"team_links\":{\"links\":{\"related\":\"/api/v2/team/04f134fc-d975-4111-825d-5447611962c3/links\"}},\"user_team_permissions\":{\"links\":{\"related\":\"/api/v2/team/04f134fc-d975-4111-825d-5447611962c3/permission-settings\"}}}}}\n", + "body": "{\"data\":{\"type\":\"team\",\"id\":\"85d4d10d-ce4a-4bc6-91a4-2f391b4979db\",\"attributes\":{\"name\":\"test-name-74af482e94498992\",\"handle\":\"test-handle-74af482e94498992\",\"summary\":null,\"description\":null,\"avatar\":null,\"banner\":9,\"visible_modules\":[],\"hidden_modules\":[],\"created_at\":\"2025-05-21T11:01:51.607592+00:00\",\"modified_at\":\"2025-05-21T11:01:51.607602+00:00\",\"user_count\":0,\"link_count\":0},\"relationships\":{\"team_links\":{\"links\":{\"related\":\"/api/v2/team/85d4d10d-ce4a-4bc6-91a4-2f391b4979db/links\"}},\"user_team_permissions\":{\"links\":{\"related\":\"/api/v2/team/85d4d10d-ce4a-4bc6-91a4-2f391b4979db/permission-settings\"}}}}}\n", "headers": { "Content-Type": [ "application/json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "b3f6b7ed-e9d6-8ba8-f5c3-4b4a0753128a" + "id": "51589af2-0c52-ac0c-78ff-5cc79800d931" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-04-14T02:49:27.251Z\",\"end_date\":\"2025-05-04T02:49:27.251Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"bd4b5c17-20b6-11f0-9b89-56a869ed3f0e\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-04-19T02:49:27.251Z\"}],\"name\":\"Test-Create_on_call_schedule_returns_Created_response-1745462967\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"04f134fc-d975-4111-825d-5447611962c3\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" + "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-05-11T11:01:51.393Z\",\"end_date\":\"2025-05-31T11:01:51.393Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"ffb657ae-3632-11f0-8139-36deebce65db\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-05-16T11:01:51.393Z\"}],\"name\":\"Test-Create_On_Call_schedule_returns_Created_response-1747825311\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"85d4d10d-ce4a-4bc6-91a4-2f391b4979db\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" }, "headers": {}, "method": "POST", @@ -72,7 +72,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"123b1c19-c34b-45b6-9c33-41f9e4dda1dd\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Create_on_call_schedule_returns_Created_response-1745462967\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"ed1f2d1b-726e-4a53-b54e-1c6bf2b5901e\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"04f134fc-d975-4111-825d-5447611962c3\",\"type\":\"teams\"}]}}}}", + "body": "{\"data\":{\"id\":\"4f083dc5-6d02-49ee-9f93-6937253db90b\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Create_On_Call_schedule_returns_Created_response-1747825311\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"dfa67783-0231-4672-80dc-7d1c634eb068\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"85d4d10d-ce4a-4bc6-91a4-2f391b4979db\",\"type\":\"teams\"}]}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -87,13 +87,13 @@ "timeToLive": { "unlimited": true }, - "id": "5d36fd19-bd5b-7b5b-d2d2-8a308c3ddcef" + "id": "13b7f0dc-a35d-231e-e0db-4c4eafd26cb3" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/on-call/schedules/123b1c19-c34b-45b6-9c33-41f9e4dda1dd", + "path": "/api/v2/on-call/schedules/4f083dc5-6d02-49ee-9f93-6937253db90b", "keepAlive": false, "secure": true }, @@ -108,13 +108,13 @@ "timeToLive": { "unlimited": true }, - "id": "435783fa-7c9f-d8fc-e35a-7ee2254b539d" + "id": "44f3f5cf-9255-14c0-7eb3-4884c4836ad1" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/team/04f134fc-d975-4111-825d-5447611962c3", + "path": "/api/v2/team/85d4d10d-ce4a-4bc6-91a4-2f391b4979db", "keepAlive": false, "secure": true }, @@ -129,13 +129,13 @@ "timeToLive": { "unlimited": true }, - "id": "702b6332-87fd-9ca4-33d1-fa57fd3295cc" + "id": "8240f59f-2cbb-695d-f901-5ecd6b237f0f" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/users/bd4b5c17-20b6-11f0-9b89-56a869ed3f0e", + "path": "/api/v2/users/ffb657ae-3632-11f0-8139-36deebce65db", "keepAlive": false, "secure": true }, @@ -150,6 +150,6 @@ "timeToLive": { "unlimited": true }, - "id": "a32ba13a-c060-2260-9b05-5b2dd0537844" + "id": "f046346e-9b76-98b3-751c-59326531fae8" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_on_call_escalation_policy_returns_Created_response.freeze b/src/test/resources/cassettes/features/v2/Create_on_call_escalation_policy_returns_Created_response.freeze deleted file mode 100644 index 4200b1edc2d..00000000000 --- a/src/test/resources/cassettes/features/v2/Create_on_call_escalation_policy_returns_Created_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-04-24T03:17:05.259Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_on_call_escalation_policy_returns_Created_response.json b/src/test/resources/cassettes/features/v2/Create_on_call_escalation_policy_returns_Created_response.json deleted file mode 100644 index b9a25ad3f65..00000000000 --- a/src/test/resources/cassettes/features/v2/Create_on_call_escalation_policy_returns_Created_response.json +++ /dev/null @@ -1,206 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-04-14T03:17:05.259Z\",\"end_date\":\"2025-05-04T03:17:05.259Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-04-19T03:17:05.259Z\"}],\"name\":\"Test-Create_on_call_escalation_policy_returns_Created_response-1745464625\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/on-call/schedules", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"2a44a887-add2-47f7-9535-92a2a8ebea79\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Create_on_call_escalation_policy_returns_Created_response-1745464625\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"accb6605-37be-410c-86ad-a7d3400919a3\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "eea30ed4-f9cc-2616-a333-a5d72e6d0c60" - }, - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-e9912af3975c2380\",\"name\":\"test-name-e9912af3975c2380\"},\"type\":\"team\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/team", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"type\":\"team\",\"id\":\"15667dfa-83d1-4a17-a100-d8474fdb723d\",\"attributes\":{\"name\":\"test-name-e9912af3975c2380\",\"handle\":\"test-handle-e9912af3975c2380\",\"summary\":null,\"description\":null,\"avatar\":null,\"banner\":1,\"visible_modules\":[],\"hidden_modules\":[],\"created_at\":\"2025-04-24T03:17:06.086645+00:00\",\"modified_at\":\"2025-04-24T03:17:06.086653+00:00\",\"user_count\":0,\"link_count\":0},\"relationships\":{\"team_links\":{\"links\":{\"related\":\"/api/v2/team/15667dfa-83d1-4a17-a100-d8474fdb723d/links\"}},\"user_team_permissions\":{\"links\":{\"related\":\"/api/v2/team/15667dfa-83d1-4a17-a100-d8474fdb723d/permission-settings\"}}}}}\n", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "e00cc29b-7204-7edb-4444-2af7bd175f2e" - }, - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"email\":\"Test-Create_on_call_escalation_policy_returns_Created_response-1745464625@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/users", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"type\":\"users\",\"id\":\"99c39f2a-20ba-11f0-892a-8ed3debb4e3c\",\"attributes\":{\"name\":null,\"handle\":\"test-create_on_call_escalation_policy_returns_created_response-1745464625@datadoghq.com\",\"created_at\":\"2025-04-24T03:17:06.422591+00:00\",\"modified_at\":\"2025-04-24T03:17:06.422591+00:00\",\"email\":\"test-create_on_call_escalation_policy_returns_created_response-1745464625@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/c1e19926cae1d8a175b99b6952c20aca?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", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "2bfb184c-bed6-1d2a-403a-1c38c50287ac" - }, - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"description\":\"Escalation Policy 1 description\",\"name\":\"Test-Create_on_call_escalation_policy_returns_Created_response-1745464625\",\"resolve_page_on_policy_end\":true,\"retries\":2,\"steps\":[{\"assignment\":\"default\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"99c39f2a-20ba-11f0-892a-8ed3debb4e3c\",\"type\":\"users\"},{\"id\":\"2a44a887-add2-47f7-9535-92a2a8ebea79\",\"type\":\"schedules\"},{\"id\":\"15667dfa-83d1-4a17-a100-d8474fdb723d\",\"type\":\"teams\"}]},{\"assignment\":\"round-robin\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"15667dfa-83d1-4a17-a100-d8474fdb723d\",\"type\":\"teams\"}]}]},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"15667dfa-83d1-4a17-a100-d8474fdb723d\",\"type\":\"teams\"}]}},\"type\":\"policies\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/on-call/escalation-policies", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"9269a3cc-3191-435d-b878-438cbe9f288e\",\"type\":\"policies\",\"attributes\":{\"description\":\"Escalation Policy 1 description\",\"name\":\"Test-Create_on_call_escalation_policy_returns_Created_response-1745464625\",\"resolve_page_on_policy_end\":true,\"retries\":2},\"relationships\":{\"steps\":{\"data\":[{\"id\":\"b292cc93-8f52-426d-88fb-0ac2b4a6fa10\",\"type\":\"steps\"},{\"id\":\"aa60c048-510f-4e0d-bb1d-fc51606a66a1\",\"type\":\"steps\"}]},\"teams\":{\"data\":[{\"id\":\"15667dfa-83d1-4a17-a100-d8474fdb723d\",\"type\":\"teams\"}]}}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "d49a0836-700f-cdfd-73e8-4837d5f1381c" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/on-call/escalation-policies/9269a3cc-3191-435d-b878-438cbe9f288e", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "137d7481-a122-777b-296e-47751e83bc18" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/users/99c39f2a-20ba-11f0-892a-8ed3debb4e3c", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "19675d27-8736-59b9-a5b1-46e2109f9f93" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/team/15667dfa-83d1-4a17-a100-d8474fdb723d", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "31d6227b-873a-83ed-ea88-ef3afe4ac82a" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/on-call/schedules/2a44a887-add2-47f7-9535-92a2a8ebea79", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "564587d5-9023-60af-34bc-e55dd34712c3" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_on_call_schedule_returns_Created_response.freeze b/src/test/resources/cassettes/features/v2/Create_on_call_schedule_returns_Created_response.freeze deleted file mode 100644 index 89de8af07b9..00000000000 --- a/src/test/resources/cassettes/features/v2/Create_on_call_schedule_returns_Created_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-04-24T02:49:27.251Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_On_Call_escalation_policy_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Delete_On_Call_escalation_policy_returns_No_Content_response.freeze new file mode 100644 index 00000000000..957b16f8641 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_On_Call_escalation_policy_returns_No_Content_response.freeze @@ -0,0 +1 @@ +2025-05-21T11:01:52.363Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_On_Call_escalation_policy_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_On_Call_escalation_policy_returns_No_Content_response.json new file mode 100644 index 00000000000..7e759662a62 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_On_Call_escalation_policy_returns_No_Content_response.json @@ -0,0 +1,232 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"email\":\"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1747825312@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/users", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"users\",\"id\":\"004c79ee-3633-11f0-a44d-32fc981820e1\",\"attributes\":{\"name\":null,\"handle\":\"test-delete_on_call_escalation_policy_returns_no_content_response-1747825312@datadoghq.com\",\"created_at\":\"2025-05-21T11:01:52.473018+00:00\",\"modified_at\":\"2025-05-21T11:01:52.473018+00:00\",\"email\":\"test-delete_on_call_escalation_policy_returns_no_content_response-1747825312@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/ad3c6a2c3812a95dae5fa21afd4d2431?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", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "a5481ce5-4de2-190a-48d1-d4b574114c20" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-da5b39657e7d313b\",\"name\":\"test-name-da5b39657e7d313b\"},\"type\":\"team\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/team", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"team\",\"id\":\"9c6994c3-9ea3-44df-8321-0b83ceb1af69\",\"attributes\":{\"name\":\"test-name-da5b39657e7d313b\",\"handle\":\"test-handle-da5b39657e7d313b\",\"summary\":null,\"description\":null,\"avatar\":null,\"banner\":11,\"visible_modules\":[],\"hidden_modules\":[],\"created_at\":\"2025-05-21T11:01:52.600302+00:00\",\"modified_at\":\"2025-05-21T11:01:52.600311+00:00\",\"user_count\":0,\"link_count\":0},\"relationships\":{\"team_links\":{\"links\":{\"related\":\"/api/v2/team/9c6994c3-9ea3-44df-8321-0b83ceb1af69/links\"}},\"user_team_permissions\":{\"links\":{\"related\":\"/api/v2/team/9c6994c3-9ea3-44df-8321-0b83ceb1af69/permission-settings\"}}}}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "5f397445-ca8e-0382-e390-1da63a2ee1a2" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-05-11T11:01:52.363Z\",\"end_date\":\"2025-05-31T11:01:52.363Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-05-16T11:01:52.363Z\"}],\"name\":\"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1747825312\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/on-call/schedules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"48c6b04f-1120-46b0-9600-b85a5253965c\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1747825312\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"3e17a286-28fa-4525-9336-94bb0d8fac37\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "3c4f4363-5588-247e-e29f-d901cf2ca25f" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1747825312\",\"resolve_page_on_policy_end\":true,\"retries\":2,\"steps\":[{\"assignment\":\"default\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"9c6994c3-9ea3-44df-8321-0b83ceb1af69\",\"type\":\"teams\"},{\"id\":\"48c6b04f-1120-46b0-9600-b85a5253965c\",\"type\":\"schedules\"},{\"id\":\"004c79ee-3633-11f0-a44d-32fc981820e1\",\"type\":\"users\"}]},{\"assignment\":\"round-robin\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"9c6994c3-9ea3-44df-8321-0b83ceb1af69\",\"type\":\"teams\"}]}]},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"9c6994c3-9ea3-44df-8321-0b83ceb1af69\",\"type\":\"teams\"}]}},\"type\":\"policies\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/on-call/escalation-policies", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"4b1100c9-814e-4444-9eab-7b42fa66865d\",\"type\":\"policies\",\"attributes\":{\"name\":\"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1747825312\",\"resolve_page_on_policy_end\":true,\"retries\":2},\"relationships\":{\"steps\":{\"data\":[{\"id\":\"4b81dc5d-0d54-4b9a-8864-0f5ed3591c14\",\"type\":\"steps\"},{\"id\":\"c0227ecd-8eb6-49ff-abb4-c7f9e22438df\",\"type\":\"steps\"}]},\"teams\":{\"data\":[{\"id\":\"9c6994c3-9ea3-44df-8321-0b83ceb1af69\",\"type\":\"teams\"}]}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "03b1571c-8ad9-b3e4-e090-c963aab6ef83" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/on-call/escalation-policies/4b1100c9-814e-4444-9eab-7b42fa66865d", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "6631c164-7744-ac4e-86f8-b0318a3aea54" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/on-call/escalation-policies/4b1100c9-814e-4444-9eab-7b42fa66865d", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"escalation_policy[4b1100c9-814e-4444-9eab-7b42fa66865d] not found\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "6631c164-7744-ac4e-86f8-b0318a3aea55" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/on-call/schedules/48c6b04f-1120-46b0-9600-b85a5253965c", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "b6eaa5cd-377a-cee9-96b1-276ddf4486fe" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/team/9c6994c3-9ea3-44df-8321-0b83ceb1af69", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "d3299997-3b43-177a-a276-e12607f39a03" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/users/004c79ee-3633-11f0-a44d-32fc981820e1", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "3e8447c3-a6b6-9cc3-2e91-59b0c7b257c2" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_On_Call_schedule_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Delete_On_Call_schedule_returns_No_Content_response.freeze new file mode 100644 index 00000000000..9d8615cb28d --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_On_Call_schedule_returns_No_Content_response.freeze @@ -0,0 +1 @@ +2025-05-21T11:01:53.526Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_on_call_schedule_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_On_Call_schedule_returns_No_Content_response.json similarity index 54% rename from src/test/resources/cassettes/features/v2/Delete_on_call_schedule_returns_No_Content_response.json rename to src/test/resources/cassettes/features/v2/Delete_On_Call_schedule_returns_No_Content_response.json index 4e956ba30bf..5dd1187a11a 100644 --- a/src/test/resources/cassettes/features/v2/Delete_on_call_schedule_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_On_Call_schedule_returns_No_Content_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-04-14T02:49:38.725Z\",\"end_date\":\"2025-05-04T02:49:38.725Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-04-19T02:49:38.725Z\"}],\"name\":\"Test-Delete_on_call_schedule_returns_No_Content_response-1745462978\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" + "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-05-11T11:01:53.526Z\",\"end_date\":\"2025-05-31T11:01:53.526Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-05-16T11:01:53.526Z\"}],\"name\":\"Test-Delete_On_Call_schedule_returns_No_Content_response-1747825313\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"f35f8c7d-faeb-47b6-bd93-0f5f6690f480\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Delete_on_call_schedule_returns_No_Content_response-1745462978\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"08b5e153-5fe7-422c-93b1-4a0c03fffeb1\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", + "body": "{\"data\":{\"id\":\"cb45fcec-a893-423f-94d1-a401bd31e09c\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Delete_On_Call_schedule_returns_No_Content_response-1747825313\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"56bdebe0-3f79-4571-a92f-c8fb422c7a3e\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "51576e0f-0fff-fd0c-a500-da248c70cde4" + "id": "ddcc67ac-4ec9-9c2f-c904-851d18a62b00" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/on-call/schedules/f35f8c7d-faeb-47b6-bd93-0f5f6690f480", + "path": "/api/v2/on-call/schedules/cb45fcec-a893-423f-94d1-a401bd31e09c", "keepAlive": false, "secure": true }, @@ -48,18 +48,18 @@ "timeToLive": { "unlimited": true }, - "id": "89c36c69-e7d9-7862-7fc5-b0e8a429c2c9" + "id": "db503c54-8334-1811-d75e-439c4af46910" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/on-call/schedules/f35f8c7d-faeb-47b6-bd93-0f5f6690f480", + "path": "/api/v2/on-call/schedules/cb45fcec-a893-423f-94d1-a401bd31e09c", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"schedule[f35f8c7d-faeb-47b6-bd93-0f5f6690f480] not found\"}]}", + "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"schedule[cb45fcec-a893-423f-94d1-a401bd31e09c] not found\"}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "89c36c69-e7d9-7862-7fc5-b0e8a429c2ca" + "id": "db503c54-8334-1811-d75e-439c4af46911" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_on_call_escalation_policy_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Delete_on_call_escalation_policy_returns_No_Content_response.freeze deleted file mode 100644 index 934268745e1..00000000000 --- a/src/test/resources/cassettes/features/v2/Delete_on_call_escalation_policy_returns_No_Content_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-04-24T02:49:32.262Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_on_call_escalation_policy_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_on_call_escalation_policy_returns_No_Content_response.json deleted file mode 100644 index 755a14a6bed..00000000000 --- a/src/test/resources/cassettes/features/v2/Delete_on_call_escalation_policy_returns_No_Content_response.json +++ /dev/null @@ -1,232 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"email\":\"Test-Delete_on_call_escalation_policy_returns_No_Content_response-1745462972@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/users", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"type\":\"users\",\"id\":\"c02f8d1c-20b6-11f0-ab2c-227bd670db64\",\"attributes\":{\"name\":null,\"handle\":\"test-delete_on_call_escalation_policy_returns_no_content_response-1745462972@datadoghq.com\",\"created_at\":\"2025-04-24T02:49:32.896419+00:00\",\"modified_at\":\"2025-04-24T02:49:32.896419+00:00\",\"email\":\"test-delete_on_call_escalation_policy_returns_no_content_response-1745462972@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/c62c48dab244e5889d7e9acaf2f87894?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", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "7cb2b72b-3460-9bbc-51ee-4b75b2ee1114" - }, - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-7e60a3022d9f9ad9\",\"name\":\"test-name-7e60a3022d9f9ad9\"},\"type\":\"team\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/team", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"type\":\"team\",\"id\":\"2deba622-02f4-4c79-8120-0dc23ce700fc\",\"attributes\":{\"name\":\"test-name-7e60a3022d9f9ad9\",\"handle\":\"test-handle-7e60a3022d9f9ad9\",\"summary\":null,\"description\":null,\"avatar\":null,\"banner\":7,\"visible_modules\":[],\"hidden_modules\":[],\"created_at\":\"2025-04-24T02:49:33.597906+00:00\",\"modified_at\":\"2025-04-24T02:49:33.597915+00:00\",\"user_count\":0,\"link_count\":0},\"relationships\":{\"team_links\":{\"links\":{\"related\":\"/api/v2/team/2deba622-02f4-4c79-8120-0dc23ce700fc/links\"}},\"user_team_permissions\":{\"links\":{\"related\":\"/api/v2/team/2deba622-02f4-4c79-8120-0dc23ce700fc/permission-settings\"}}}}}\n", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "b5701162-ddbd-2a7a-a3f2-2f48331569c9" - }, - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-04-14T02:49:32.262Z\",\"end_date\":\"2025-05-04T02:49:32.262Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-04-19T02:49:32.262Z\"}],\"name\":\"Test-Delete_on_call_escalation_policy_returns_No_Content_response-1745462972\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/on-call/schedules", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"b521cc12-a23b-4fa2-b3d4-891484f6271c\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Delete_on_call_escalation_policy_returns_No_Content_response-1745462972\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"a50d4ce3-8ae0-4bda-b9b3-05d37298a129\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "288bbda9-f50b-d29f-c1f0-e174f0903bfc" - }, - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"description\":\"Test-Delete_on_call_escalation_policy_returns_No_Content_response-1745462972\",\"name\":\"Test-Delete_on_call_escalation_policy_returns_No_Content_response-1745462972\",\"resolve_page_on_policy_end\":true,\"retries\":2,\"steps\":[{\"assignment\":\"default\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"2deba622-02f4-4c79-8120-0dc23ce700fc\",\"type\":\"teams\"},{\"id\":\"b521cc12-a23b-4fa2-b3d4-891484f6271c\",\"type\":\"schedules\"},{\"id\":\"c02f8d1c-20b6-11f0-ab2c-227bd670db64\",\"type\":\"users\"}]},{\"assignment\":\"round-robin\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"2deba622-02f4-4c79-8120-0dc23ce700fc\",\"type\":\"teams\"}]}]},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"2deba622-02f4-4c79-8120-0dc23ce700fc\",\"type\":\"teams\"}]}},\"type\":\"policies\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/on-call/escalation-policies", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"44dd85a9-41bc-44f2-ac29-08ccbc4f1a21\",\"type\":\"policies\",\"attributes\":{\"description\":\"Test-Delete_on_call_escalation_policy_returns_No_Content_response-1745462972\",\"name\":\"Test-Delete_on_call_escalation_policy_returns_No_Content_response-1745462972\",\"resolve_page_on_policy_end\":true,\"retries\":2},\"relationships\":{\"steps\":{\"data\":[{\"id\":\"51a3a324-9905-4d72-9131-980f991160f6\",\"type\":\"steps\"},{\"id\":\"170630ee-f429-4cf2-9e11-22d5b4ff7ab2\",\"type\":\"steps\"}]},\"teams\":{\"data\":[{\"id\":\"2deba622-02f4-4c79-8120-0dc23ce700fc\",\"type\":\"teams\"}]}}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "cedaad80-d39c-6d4a-13f4-66dd62092073" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/on-call/escalation-policies/44dd85a9-41bc-44f2-ac29-08ccbc4f1a21", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "3c06a303-2fd5-3826-2f64-bb7d160af6e9" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/on-call/escalation-policies/44dd85a9-41bc-44f2-ac29-08ccbc4f1a21", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"escalation_policy[44dd85a9-41bc-44f2-ac29-08ccbc4f1a21] not found\"}]}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 404, - "reasonPhrase": "Not Found" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "3c06a303-2fd5-3826-2f64-bb7d160af6ea" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/on-call/schedules/b521cc12-a23b-4fa2-b3d4-891484f6271c", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "828b3323-6dfb-ce1a-4673-50c8cc966e57" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/team/2deba622-02f4-4c79-8120-0dc23ce700fc", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "3d77ad6a-3ea4-78fe-8b19-b7521be52de3" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/users/c02f8d1c-20b6-11f0-ab2c-227bd670db64", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "c2114528-96d8-3f90-8097-6ab6edbca205" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_on_call_schedule_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Delete_on_call_schedule_returns_No_Content_response.freeze deleted file mode 100644 index 34bf952c756..00000000000 --- a/src/test/resources/cassettes/features/v2/Delete_on_call_schedule_returns_No_Content_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-04-24T02:49:38.725Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_On_Call_escalation_policy_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_On_Call_escalation_policy_returns_OK_response.freeze new file mode 100644 index 00000000000..948876221d3 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_On_Call_escalation_policy_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-05-22T08:13:16.150Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_On_Call_escalation_policy_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_On_Call_escalation_policy_returns_OK_response.json new file mode 100644 index 00000000000..732deb3b5eb --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_On_Call_escalation_policy_returns_OK_response.json @@ -0,0 +1,237 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"email\":\"Test-Get_On_Call_escalation_policy_returns_OK_response-1747901596@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/users", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"users\",\"id\":\"9d53cb80-36e4-11f0-a925-6205a5ac8b82\",\"attributes\":{\"name\":null,\"handle\":\"test-get_on_call_escalation_policy_returns_ok_response-1747901596@datadoghq.com\",\"created_at\":\"2025-05-22T08:13:16.844359+00:00\",\"modified_at\":\"2025-05-22T08:13:16.844359+00:00\",\"email\":\"test-get_on_call_escalation_policy_returns_ok_response-1747901596@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/e764229bedd0fcaaf713b8470d33ff30?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", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "e1f36e8f-18a0-e0e5-0fd9-7b5341781227" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-59a9a0ccb3d041ed\",\"name\":\"test-name-59a9a0ccb3d041ed\"},\"type\":\"team\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/team", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"team\",\"id\":\"11dfbd58-960b-4b61-b2ee-a1d754a0c968\",\"attributes\":{\"name\":\"test-name-59a9a0ccb3d041ed\",\"handle\":\"test-handle-59a9a0ccb3d041ed\",\"summary\":null,\"description\":null,\"avatar\":null,\"banner\":12,\"visible_modules\":[],\"hidden_modules\":[],\"created_at\":\"2025-05-22T08:13:17.120509+00:00\",\"modified_at\":\"2025-05-22T08:13:17.120518+00:00\",\"user_count\":0,\"link_count\":0},\"relationships\":{\"team_links\":{\"links\":{\"related\":\"/api/v2/team/11dfbd58-960b-4b61-b2ee-a1d754a0c968/links\"}},\"user_team_permissions\":{\"links\":{\"related\":\"/api/v2/team/11dfbd58-960b-4b61-b2ee-a1d754a0c968/permission-settings\"}}}}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "d7507709-316d-d4ca-d850-4dc941ce8aa9" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-05-12T08:13:16.150Z\",\"end_date\":\"2025-06-01T08:13:16.150Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-05-17T08:13:16.150Z\"}],\"name\":\"Test-Get_On_Call_escalation_policy_returns_OK_response-1747901596\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/on-call/schedules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"f4321cbc-072d-49c7-9f2d-dd63e6b17604\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Get_On_Call_escalation_policy_returns_OK_response-1747901596\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"c0103435-9e63-49bc-b358-e3509d4538d9\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "c66d6e1d-1b9d-855f-0951-b4eb9a5ef333" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Get_On_Call_escalation_policy_returns_OK_response-1747901596\",\"resolve_page_on_policy_end\":true,\"retries\":2,\"steps\":[{\"assignment\":\"default\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"11dfbd58-960b-4b61-b2ee-a1d754a0c968\",\"type\":\"teams\"},{\"id\":\"f4321cbc-072d-49c7-9f2d-dd63e6b17604\",\"type\":\"schedules\"},{\"id\":\"9d53cb80-36e4-11f0-a925-6205a5ac8b82\",\"type\":\"users\"}]},{\"assignment\":\"round-robin\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"11dfbd58-960b-4b61-b2ee-a1d754a0c968\",\"type\":\"teams\"}]}]},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"11dfbd58-960b-4b61-b2ee-a1d754a0c968\",\"type\":\"teams\"}]}},\"type\":\"policies\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/on-call/escalation-policies", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"76c1a88a-9590-40a0-b848-b64a3acc3668\",\"type\":\"policies\",\"attributes\":{\"name\":\"Test-Get_On_Call_escalation_policy_returns_OK_response-1747901596\",\"resolve_page_on_policy_end\":true,\"retries\":2},\"relationships\":{\"steps\":{\"data\":[{\"id\":\"69b0a8d5-9706-49cd-92a1-2d5ddb96cbee\",\"type\":\"steps\"},{\"id\":\"aa2918d5-9024-4ca6-b214-69238907fdf9\",\"type\":\"steps\"}]},\"teams\":{\"data\":[{\"id\":\"11dfbd58-960b-4b61-b2ee-a1d754a0c968\",\"type\":\"teams\"}]}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "6d9879d9-e003-c994-0a84-48e667bacf03" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/on-call/escalation-policies/76c1a88a-9590-40a0-b848-b64a3acc3668", + "queryStringParameters": { + "include": [ + "steps.targets" + ] + }, + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"76c1a88a-9590-40a0-b848-b64a3acc3668\",\"type\":\"policies\",\"attributes\":{\"name\":\"Test-Get_On_Call_escalation_policy_returns_OK_response-1747901596\",\"resolve_page_on_policy_end\":true,\"retries\":2},\"relationships\":{\"steps\":{\"data\":[{\"id\":\"69b0a8d5-9706-49cd-92a1-2d5ddb96cbee\",\"type\":\"steps\"},{\"id\":\"aa2918d5-9024-4ca6-b214-69238907fdf9\",\"type\":\"steps\"}]},\"teams\":{\"data\":[{\"id\":\"11dfbd58-960b-4b61-b2ee-a1d754a0c968\",\"type\":\"teams\"}]}}},\"included\":[{\"id\":\"69b0a8d5-9706-49cd-92a1-2d5ddb96cbee\",\"type\":\"steps\",\"attributes\":{\"assignment\":\"default\",\"escalate_after_seconds\":3600},\"relationships\":{\"targets\":{\"data\":[{\"id\":\"11dfbd58-960b-4b61-b2ee-a1d754a0c968\",\"type\":\"teams\"},{\"id\":\"f4321cbc-072d-49c7-9f2d-dd63e6b17604\",\"type\":\"schedules\"},{\"id\":\"9d53cb80-36e4-11f0-a925-6205a5ac8b82\",\"type\":\"users\"}]}}},{\"id\":\"aa2918d5-9024-4ca6-b214-69238907fdf9\",\"type\":\"steps\",\"attributes\":{\"assignment\":\"round-robin\",\"escalate_after_seconds\":3600},\"relationships\":{\"targets\":{\"data\":[{\"id\":\"11dfbd58-960b-4b61-b2ee-a1d754a0c968\",\"type\":\"teams\"}]}}},{\"id\":\"11dfbd58-960b-4b61-b2ee-a1d754a0c968\",\"type\":\"teams\",\"attributes\":{\"avatar\":\"\",\"description\":\"\",\"handle\":\"test-handle-59a9a0ccb3d041ed\",\"name\":\"test-name-59a9a0ccb3d041ed\"}},{\"id\":\"f4321cbc-072d-49c7-9f2d-dd63e6b17604\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Get_On_Call_escalation_policy_returns_OK_response-1747901596\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"c0103435-9e63-49bc-b358-e3509d4538d9\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}},{\"id\":\"9d53cb80-36e4-11f0-a925-6205a5ac8b82\",\"type\":\"users\",\"attributes\":{\"email\":\"test-get_on_call_escalation_policy_returns_ok_response-1747901596@datadoghq.com\",\"name\":\"\",\"status\":\"pending\"}}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "b39480cd-657c-0103-d092-c7a8c78b1c7e" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/on-call/escalation-policies/76c1a88a-9590-40a0-b848-b64a3acc3668", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "f9fb9f16-255f-cc2e-2f2b-71932c0f97ff" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/on-call/schedules/f4321cbc-072d-49c7-9f2d-dd63e6b17604", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "46efae2e-f2e2-2c37-16f3-3351e840c083" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/team/11dfbd58-960b-4b61-b2ee-a1d754a0c968", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "e014ac51-bced-61d4-5a8a-cdc65e4f61a1" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/users/9d53cb80-36e4-11f0-a925-6205a5ac8b82", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "b5c88d3c-3d07-9bfe-89be-c84dd3c7d88d" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_On_Call_schedule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_On_Call_schedule_returns_OK_response.freeze new file mode 100644 index 00000000000..e218d1ad69e --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_On_Call_schedule_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-05-21T11:01:55.033Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_On_Call_schedule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_On_Call_schedule_returns_OK_response.json new file mode 100644 index 00000000000..8028a9b3d5f --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_On_Call_schedule_returns_OK_response.json @@ -0,0 +1,79 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-05-11T11:01:55.033Z\",\"end_date\":\"2025-05-31T11:01:55.033Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-05-16T11:01:55.033Z\"}],\"name\":\"Test-Get_On_Call_schedule_returns_OK_response-1747825315\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/on-call/schedules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"68403f49-4f50-4307-bdf2-663ebab53587\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Get_On_Call_schedule_returns_OK_response-1747825315\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"15bf3013-34f8-474c-925f-87f468e3eaff\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "cee8831b-d404-7133-bf73-f8273d58ba9c" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/on-call/schedules/68403f49-4f50-4307-bdf2-663ebab53587", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"68403f49-4f50-4307-bdf2-663ebab53587\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Get_On_Call_schedule_returns_OK_response-1747825315\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"15bf3013-34f8-474c-925f-87f468e3eaff\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "66010346-21dd-3790-9342-dd7dc562e4ed" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/on-call/schedules/68403f49-4f50-4307-bdf2-663ebab53587", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "e5d95b66-b104-2f2c-42c1-4af9ed1a73fd" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_on_call_escalation_policy_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_on_call_escalation_policy_returns_OK_response.freeze deleted file mode 100644 index 9f3ddd2fab7..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_on_call_escalation_policy_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-04-24T02:49:40.684Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_on_call_escalation_policy_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_on_call_escalation_policy_returns_OK_response.json deleted file mode 100644 index c1578c1d541..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_on_call_escalation_policy_returns_OK_response.json +++ /dev/null @@ -1,232 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"email\":\"Test-Get_on_call_escalation_policy_returns_OK_response-1745462980@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/users", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"type\":\"users\",\"id\":\"c52fbdf7-20b6-11f0-9fba-9e18c50abaf7\",\"attributes\":{\"name\":null,\"handle\":\"test-get_on_call_escalation_policy_returns_ok_response-1745462980@datadoghq.com\",\"created_at\":\"2025-04-24T02:49:41.286277+00:00\",\"modified_at\":\"2025-04-24T02:49:41.286277+00:00\",\"email\":\"test-get_on_call_escalation_policy_returns_ok_response-1745462980@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/353d353320f41d073ed3b9ac3377a373?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", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "ad6b3432-51e8-98de-a279-0b033285bcd3" - }, - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-8daac668ecee431a\",\"name\":\"test-name-8daac668ecee431a\"},\"type\":\"team\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/team", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"type\":\"team\",\"id\":\"c0735ecc-f533-4a25-9677-18899e041a6d\",\"attributes\":{\"name\":\"test-name-8daac668ecee431a\",\"handle\":\"test-handle-8daac668ecee431a\",\"summary\":null,\"description\":null,\"avatar\":null,\"banner\":7,\"visible_modules\":[],\"hidden_modules\":[],\"created_at\":\"2025-04-24T02:49:41.969128+00:00\",\"modified_at\":\"2025-04-24T02:49:41.969136+00:00\",\"user_count\":0,\"link_count\":0},\"relationships\":{\"team_links\":{\"links\":{\"related\":\"/api/v2/team/c0735ecc-f533-4a25-9677-18899e041a6d/links\"}},\"user_team_permissions\":{\"links\":{\"related\":\"/api/v2/team/c0735ecc-f533-4a25-9677-18899e041a6d/permission-settings\"}}}}}\n", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "b326c3ee-8a16-ff0a-1f3f-fe6ea8963214" - }, - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-04-14T02:49:40.684Z\",\"end_date\":\"2025-05-04T02:49:40.684Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-04-19T02:49:40.684Z\"}],\"name\":\"Test-Get_on_call_escalation_policy_returns_OK_response-1745462980\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/on-call/schedules", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"dc1207ba-103f-48f3-b12a-47bdaf445fe8\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Get_on_call_escalation_policy_returns_OK_response-1745462980\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"81eb06b1-e7e9-4dab-ab70-857841269370\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "24206299-155e-fa49-5110-467761e78b1d" - }, - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"description\":\"Test-Get_on_call_escalation_policy_returns_OK_response-1745462980\",\"name\":\"Test-Get_on_call_escalation_policy_returns_OK_response-1745462980\",\"resolve_page_on_policy_end\":true,\"retries\":2,\"steps\":[{\"assignment\":\"default\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"c0735ecc-f533-4a25-9677-18899e041a6d\",\"type\":\"teams\"},{\"id\":\"dc1207ba-103f-48f3-b12a-47bdaf445fe8\",\"type\":\"schedules\"},{\"id\":\"c52fbdf7-20b6-11f0-9fba-9e18c50abaf7\",\"type\":\"users\"}]},{\"assignment\":\"round-robin\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"c0735ecc-f533-4a25-9677-18899e041a6d\",\"type\":\"teams\"}]}]},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"c0735ecc-f533-4a25-9677-18899e041a6d\",\"type\":\"teams\"}]}},\"type\":\"policies\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/on-call/escalation-policies", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"34dcaf58-bd09-4f13-b832-9ef37eee4188\",\"type\":\"policies\",\"attributes\":{\"description\":\"Test-Get_on_call_escalation_policy_returns_OK_response-1745462980\",\"name\":\"Test-Get_on_call_escalation_policy_returns_OK_response-1745462980\",\"resolve_page_on_policy_end\":true,\"retries\":2},\"relationships\":{\"steps\":{\"data\":[{\"id\":\"e1412324-b7d2-4547-8648-f6df812bbe94\",\"type\":\"steps\"},{\"id\":\"fe4f58e3-211d-4ff7-b0fe-94b1fd595e45\",\"type\":\"steps\"}]},\"teams\":{\"data\":[{\"id\":\"c0735ecc-f533-4a25-9677-18899e041a6d\",\"type\":\"teams\"}]}}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "f71896c9-e9cf-881b-ea31-84c0a1563a28" - }, - { - "httpRequest": { - "headers": {}, - "method": "GET", - "path": "/api/v2/on-call/escalation-policies/34dcaf58-bd09-4f13-b832-9ef37eee4188", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"34dcaf58-bd09-4f13-b832-9ef37eee4188\",\"type\":\"policies\",\"attributes\":{\"description\":\"Test-Get_on_call_escalation_policy_returns_OK_response-1745462980\",\"name\":\"Test-Get_on_call_escalation_policy_returns_OK_response-1745462980\",\"resolve_page_on_policy_end\":true,\"retries\":2},\"relationships\":{\"steps\":{\"data\":[{\"id\":\"e1412324-b7d2-4547-8648-f6df812bbe94\",\"type\":\"steps\"},{\"id\":\"fe4f58e3-211d-4ff7-b0fe-94b1fd595e45\",\"type\":\"steps\"}]},\"teams\":{\"data\":[{\"id\":\"c0735ecc-f533-4a25-9677-18899e041a6d\",\"type\":\"teams\"}]}}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "1227c6c6-7ac2-922a-58a1-6c63d1873971" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/on-call/escalation-policies/34dcaf58-bd09-4f13-b832-9ef37eee4188", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "8f9e74e2-1041-a4d3-32ef-5537161c4c23" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/on-call/schedules/dc1207ba-103f-48f3-b12a-47bdaf445fe8", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "09c7ddca-8188-69e2-c86f-a424c85b22ab" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/team/c0735ecc-f533-4a25-9677-18899e041a6d", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "426c1a89-82da-a069-bce9-76fe193848f7" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/users/c52fbdf7-20b6-11f0-9fba-9e18c50abaf7", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "8b7be110-afc4-a4a9-9edd-45a382866036" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_on_call_schedule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_on_call_schedule_returns_OK_response.freeze deleted file mode 100644 index a050f793a18..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_on_call_schedule_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-04-24T02:49:47.598Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_on_call_schedule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_on_call_schedule_returns_OK_response.json deleted file mode 100644 index f241b47c6e6..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_on_call_schedule_returns_OK_response.json +++ /dev/null @@ -1,79 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-04-14T02:49:47.598Z\",\"end_date\":\"2025-05-04T02:49:47.598Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-04-19T02:49:47.598Z\"}],\"name\":\"Test-Get_on_call_schedule_returns_OK_response-1745462987\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/on-call/schedules", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"512937e2-423b-4f87-b48c-886c60795556\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Get_on_call_schedule_returns_OK_response-1745462987\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"c06d3fa1-b68c-4ea4-a2bf-ce8af43c1e8b\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "1b726d53-483a-749e-7929-95f711e443cb" - }, - { - "httpRequest": { - "headers": {}, - "method": "GET", - "path": "/api/v2/on-call/schedules/512937e2-423b-4f87-b48c-886c60795556", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"512937e2-423b-4f87-b48c-886c60795556\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Get_on_call_schedule_returns_OK_response-1745462987\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"c06d3fa1-b68c-4ea4-a2bf-ce8af43c1e8b\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "2b546bb0-d978-5217-add3-5bc5c85da02c" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/on-call/schedules/512937e2-423b-4f87-b48c-886c60795556", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "a177593d-f6ac-f091-32dc-754ae039418a" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_the_schedule_on_call_user_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_the_schedule_on_call_user_returns_OK_response.freeze index e788455d937..6d73c6656d5 100644 --- a/src/test/resources/cassettes/features/v2/Get_the_schedule_on_call_user_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_the_schedule_on_call_user_returns_OK_response.freeze @@ -1 +1 @@ -2025-05-13T23:33:52.641Z \ No newline at end of file +2025-05-21T11:01:55.256Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_the_schedule_on_call_user_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_the_schedule_on_call_user_returns_OK_response.json index 7537c1b7f7c..5f178c98c0b 100644 --- a/src/test/resources/cassettes/features/v2/Get_the_schedule_on_call_user_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_the_schedule_on_call_user_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-05-03T23:33:52.641Z\",\"end_date\":\"2025-05-23T23:33:52.641Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-05-08T23:33:52.641Z\"}],\"name\":\"Test-Get_the_schedule_on_call_user_returns_OK_response-1747179232\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" + "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-05-11T11:01:55.256Z\",\"end_date\":\"2025-05-31T11:01:55.256Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-05-16T11:01:55.256Z\"}],\"name\":\"Test-Get_the_schedule_on_call_user_returns_OK_response-1747825315\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"37ca26fb-0143-4b2a-802c-8c01cd2179ab\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Get_the_schedule_on_call_user_returns_OK_response-1747179232\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"bf12302a-842c-4d31-bfe8-198ac926c41c\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", + "body": "{\"data\":{\"id\":\"253ef9a9-6ab9-4c53-9f16-abcf2942b39d\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Get_the_schedule_on_call_user_returns_OK_response-1747825315\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"d1f6d8a7-ad53-45c9-a226-ebd60587cc80\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "5bbb5dec-e55a-189c-bfc9-0e1d38e64742" + "id": "bc5a1073-ee34-c21f-0d30-e0bd3dfe84ba" }, { "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/on-call/schedules/37ca26fb-0143-4b2a-802c-8c01cd2179ab/on-call", + "path": "/api/v2/on-call/schedules/253ef9a9-6ab9-4c53-9f16-abcf2942b39d/on-call", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596-2025-05-13T19:33:53-04:00-2025-05-14T19:33:52-04:00\",\"type\":\"shifts\",\"attributes\":{\"end\":\"2025-05-14T19:33:52-04:00\",\"start\":\"2025-05-13T19:33:53.520152-04:00\"},\"relationships\":{\"user\":{\"data\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596\",\"type\":\"users\"}}}}}", + "body": "{\"data\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596-2025-05-21T07:01:55-04:00-2025-05-22T07:01:55-04:00\",\"type\":\"shifts\",\"attributes\":{\"end\":\"2025-05-22T07:01:55-04:00\",\"start\":\"2025-05-21T07:01:55.332323-04:00\"},\"relationships\":{\"user\":{\"data\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596\",\"type\":\"users\"}}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -53,13 +53,13 @@ "timeToLive": { "unlimited": true }, - "id": "6e214919-4238-0754-66a7-18279206c28d" + "id": "9dfb382d-c393-81be-6428-56317516a2a6" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/on-call/schedules/37ca26fb-0143-4b2a-802c-8c01cd2179ab", + "path": "/api/v2/on-call/schedules/253ef9a9-6ab9-4c53-9f16-abcf2942b39d", "keepAlive": false, "secure": true }, @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "1c9640b3-c94a-4581-f63a-548fc2896a24" + "id": "b5f93d15-49f0-ff27-a4cb-3e84db77874b" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Set_On_Call_team_routing_rules_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Set_On_Call_team_routing_rules_returns_OK_response.freeze new file mode 100644 index 00000000000..8f21581f616 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Set_On_Call_team_routing_rules_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-05-21T11:01:55.512Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Set_on_call_team_routing_rules_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Set_On_Call_team_routing_rules_returns_OK_response.json similarity index 53% rename from src/test/resources/cassettes/features/v2/Set_on_call_team_routing_rules_returns_OK_response.json rename to src/test/resources/cassettes/features/v2/Set_On_Call_team_routing_rules_returns_OK_response.json index fc69847f56f..0d161204503 100644 --- a/src/test/resources/cassettes/features/v2/Set_on_call_team_routing_rules_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Set_On_Call_team_routing_rules_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"email\":\"Test-Set_on_call_team_routing_rules_returns_OK_response-1746170915@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" + "json": "{\"data\":{\"attributes\":{\"email\":\"Test-Set_On_Call_team_routing_rules_returns_OK_response-1747825315@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"type\":\"users\",\"id\":\"0f6790f5-2727-11f0-a9cb-b6ff84ad8646\",\"attributes\":{\"name\":null,\"handle\":\"test-set_on_call_team_routing_rules_returns_ok_response-1746170915@datadoghq.com\",\"created_at\":\"2025-05-02T07:28:36.413905+00:00\",\"modified_at\":\"2025-05-02T07:28:36.413905+00:00\",\"email\":\"test-set_on_call_team_routing_rules_returns_ok_response-1746170915@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/b9e2f38a22d0273582e08252ffbae94a?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", + "body": "{\"data\":{\"type\":\"users\",\"id\":\"022c3a60-3633-11f0-b7ed-ce2381807b05\",\"attributes\":{\"name\":null,\"handle\":\"test-set_on_call_team_routing_rules_returns_ok_response-1747825315@datadoghq.com\",\"created_at\":\"2025-05-21T11:01:55.617066+00:00\",\"modified_at\":\"2025-05-21T11:01:55.617066+00:00\",\"email\":\"test-set_on_call_team_routing_rules_returns_ok_response-1747825315@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/83f881635a4cf010167f0bf22fa154a3?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", "headers": { "Content-Type": [ "application/json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "d3d2bbd9-f411-6534-0ae6-30111f65af92" + "id": "e64a7905-fcd3-e328-ef36-d1f00a0d42a0" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-f6cbca2a9dc51017\",\"name\":\"test-name-f6cbca2a9dc51017\"},\"type\":\"team\"}}" + "json": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-deb316d25d38fe23\",\"name\":\"test-name-deb316d25d38fe23\"},\"type\":\"team\"}}" }, "headers": {}, "method": "POST", @@ -42,7 +42,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"type\":\"team\",\"id\":\"0db9884c-62de-4b52-ae74-1d256d8ecb75\",\"attributes\":{\"name\":\"test-name-f6cbca2a9dc51017\",\"handle\":\"test-handle-f6cbca2a9dc51017\",\"summary\":null,\"description\":null,\"avatar\":null,\"banner\":9,\"visible_modules\":[],\"hidden_modules\":[],\"created_at\":\"2025-05-02T07:28:36.528008+00:00\",\"modified_at\":\"2025-05-02T07:28:36.528018+00:00\",\"user_count\":0,\"link_count\":0},\"relationships\":{\"team_links\":{\"links\":{\"related\":\"/api/v2/team/0db9884c-62de-4b52-ae74-1d256d8ecb75/links\"}},\"user_team_permissions\":{\"links\":{\"related\":\"/api/v2/team/0db9884c-62de-4b52-ae74-1d256d8ecb75/permission-settings\"}}}}}\n", + "body": "{\"data\":{\"type\":\"team\",\"id\":\"68a584b9-c8e4-414a-aedd-31f30ab44d27\",\"attributes\":{\"name\":\"test-name-deb316d25d38fe23\",\"handle\":\"test-handle-deb316d25d38fe23\",\"summary\":null,\"description\":null,\"avatar\":null,\"banner\":1,\"visible_modules\":[],\"hidden_modules\":[],\"created_at\":\"2025-05-21T11:01:55.737730+00:00\",\"modified_at\":\"2025-05-21T11:01:55.737740+00:00\",\"user_count\":0,\"link_count\":0},\"relationships\":{\"team_links\":{\"links\":{\"related\":\"/api/v2/team/68a584b9-c8e4-414a-aedd-31f30ab44d27/links\"}},\"user_team_permissions\":{\"links\":{\"related\":\"/api/v2/team/68a584b9-c8e4-414a-aedd-31f30ab44d27/permission-settings\"}}}}}\n", "headers": { "Content-Type": [ "application/json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "acf0ae84-792b-d4a0-ba6f-166ba70844c5" + "id": "5e279696-9952-68c9-3a3a-d48040897950" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-04-22T07:28:35.869Z\",\"end_date\":\"2025-05-12T07:28:35.869Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-04-27T07:28:35.869Z\"}],\"name\":\"Test-Set_on_call_team_routing_rules_returns_OK_response-1746170915\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" + "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-05-11T11:01:55.512Z\",\"end_date\":\"2025-05-31T11:01:55.512Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-05-16T11:01:55.512Z\"}],\"name\":\"Test-Set_On_Call_team_routing_rules_returns_OK_response-1747825315\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" }, "headers": {}, "method": "POST", @@ -72,7 +72,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"f4ae5b94-3985-490a-bdc0-e7f64890968c\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Set_on_call_team_routing_rules_returns_OK_response-1746170915\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"498723e5-43d7-407c-b7cb-171e9c08f402\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", + "body": "{\"data\":{\"id\":\"b1819128-6086-4eb2-b555-87f33398825d\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Set_On_Call_team_routing_rules_returns_OK_response-1747825315\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"19e523ad-b55a-4f32-8c41-008ba17be5fe\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -87,13 +87,13 @@ "timeToLive": { "unlimited": true }, - "id": "8a6c5a36-02e0-26b7-38fb-8d85fe465eec" + "id": "105e223a-bcce-d9e7-b293-415ece603fd4" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"description\":\"Test-Set_on_call_team_routing_rules_returns_OK_response-1746170915\",\"name\":\"Test-Set_on_call_team_routing_rules_returns_OK_response-1746170915\",\"resolve_page_on_policy_end\":true,\"retries\":2,\"steps\":[{\"assignment\":\"default\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"0db9884c-62de-4b52-ae74-1d256d8ecb75\",\"type\":\"teams\"},{\"id\":\"f4ae5b94-3985-490a-bdc0-e7f64890968c\",\"type\":\"schedules\"},{\"id\":\"0f6790f5-2727-11f0-a9cb-b6ff84ad8646\",\"type\":\"users\"}]},{\"assignment\":\"round-robin\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"0db9884c-62de-4b52-ae74-1d256d8ecb75\",\"type\":\"teams\"}]}]},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"0db9884c-62de-4b52-ae74-1d256d8ecb75\",\"type\":\"teams\"}]}},\"type\":\"policies\"}}" + "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Set_On_Call_team_routing_rules_returns_OK_response-1747825315\",\"resolve_page_on_policy_end\":true,\"retries\":2,\"steps\":[{\"assignment\":\"default\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"68a584b9-c8e4-414a-aedd-31f30ab44d27\",\"type\":\"teams\"},{\"id\":\"b1819128-6086-4eb2-b555-87f33398825d\",\"type\":\"schedules\"},{\"id\":\"022c3a60-3633-11f0-b7ed-ce2381807b05\",\"type\":\"users\"}]},{\"assignment\":\"round-robin\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"68a584b9-c8e4-414a-aedd-31f30ab44d27\",\"type\":\"teams\"}]}]},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"68a584b9-c8e4-414a-aedd-31f30ab44d27\",\"type\":\"teams\"}]}},\"type\":\"policies\"}}" }, "headers": {}, "method": "POST", @@ -102,7 +102,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"b79d430d-1e03-4840-a933-a1ee9baae339\",\"type\":\"policies\",\"attributes\":{\"description\":\"Test-Set_on_call_team_routing_rules_returns_OK_response-1746170915\",\"name\":\"Test-Set_on_call_team_routing_rules_returns_OK_response-1746170915\",\"resolve_page_on_policy_end\":true,\"retries\":2},\"relationships\":{\"steps\":{\"data\":[{\"id\":\"46b170a7-ad4a-4cc3-b933-386af8fbee11\",\"type\":\"steps\"},{\"id\":\"11c45a97-a232-4f34-a086-77005522ea7a\",\"type\":\"steps\"}]},\"teams\":{\"data\":[{\"id\":\"0db9884c-62de-4b52-ae74-1d256d8ecb75\",\"type\":\"teams\"}]}}}}", + "body": "{\"data\":{\"id\":\"4926e7bf-727c-4899-ab45-3cbf3bed0c23\",\"type\":\"policies\",\"attributes\":{\"name\":\"Test-Set_On_Call_team_routing_rules_returns_OK_response-1747825315\",\"resolve_page_on_policy_end\":true,\"retries\":2},\"relationships\":{\"steps\":{\"data\":[{\"id\":\"0b8001d8-17ab-46ab-979e-b426e69b6423\",\"type\":\"steps\"},{\"id\":\"b02f1fc4-3cdc-4b70-bcf2-fae24d5b09f9\",\"type\":\"steps\"}]},\"teams\":{\"data\":[{\"id\":\"68a584b9-c8e4-414a-aedd-31f30ab44d27\",\"type\":\"teams\"}]}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -117,22 +117,22 @@ "timeToLive": { "unlimited": true }, - "id": "79a0b5af-3ebe-bea7-d3bc-1884b0ba7126" + "id": "0e8615d7-aa9d-d674-a688-bdb9eaa5a229" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"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\"},\"urgency\":\"high\"},{\"policy_id\":\"b79d430d-1e03-4840-a933-a1ee9baae339\",\"query\":\"\",\"urgency\":\"low\"}]},\"id\":\"0db9884c-62de-4b52-ae74-1d256d8ecb75\",\"type\":\"team_routing_rules\"}}" + "json": "{\"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\"},\"urgency\":\"high\"},{\"policy_id\":\"4926e7bf-727c-4899-ab45-3cbf3bed0c23\",\"query\":\"\",\"urgency\":\"low\"}]},\"id\":\"68a584b9-c8e4-414a-aedd-31f30ab44d27\",\"type\":\"team_routing_rules\"}}" }, "headers": {}, "method": "PUT", - "path": "/api/v2/on-call/teams/0db9884c-62de-4b52-ae74-1d256d8ecb75/routing-rules", + "path": "/api/v2/on-call/teams/68a584b9-c8e4-414a-aedd-31f30ab44d27/routing-rules", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"0db9884c-62de-4b52-ae74-1d256d8ecb75\",\"type\":\"team_routing_rules\",\"relationships\":{\"rules\":{\"data\":[{\"id\":\"virtual-0db9884c-62de-4b52-ae74-1d256d8ecb75-rule-0\",\"type\":\"team_routing_rules\"},{\"id\":\"virtual-0db9884c-62de-4b52-ae74-1d256d8ecb75-rule-1\",\"type\":\"team_routing_rules\"}]}}}}", + "body": "{\"data\":{\"id\":\"68a584b9-c8e4-414a-aedd-31f30ab44d27\",\"type\":\"team_routing_rules\",\"relationships\":{\"rules\":{\"data\":[{\"id\":\"virtual-68a584b9-c8e4-414a-aedd-31f30ab44d27-rule-0\",\"type\":\"team_routing_rules\"},{\"id\":\"virtual-68a584b9-c8e4-414a-aedd-31f30ab44d27-rule-1\",\"type\":\"team_routing_rules\"}]}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -147,18 +147,18 @@ "timeToLive": { "unlimited": true }, - "id": "0f7f8494-a27f-fe61-5178-490a1b8f2cc2" + "id": "6be74749-ec19-730c-33b1-7e7ebfa1dfa2" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/on-call/escalation-policies/b79d430d-1e03-4840-a933-a1ee9baae339", + "path": "/api/v2/on-call/escalation-policies/4926e7bf-727c-4899-ab45-3cbf3bed0c23", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"policy[b79d430d-1e03-4840-a933-a1ee9baae339] is in use\"}]}", + "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"policy[4926e7bf-727c-4899-ab45-3cbf3bed0c23] is in use\"}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -173,18 +173,18 @@ "timeToLive": { "unlimited": true }, - "id": "cea83d75-20a0-0dfa-19c9-a9dfba210040" + "id": "08ef7235-9c22-ce01-3497-60a9c031b0bc" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/on-call/schedules/f4ae5b94-3985-490a-bdc0-e7f64890968c", + "path": "/api/v2/on-call/schedules/b1819128-6086-4eb2-b555-87f33398825d", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"schedule[f4ae5b94-3985-490a-bdc0-e7f64890968c] is in use\"}]}", + "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"schedule[b1819128-6086-4eb2-b555-87f33398825d] is in use\"}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -199,13 +199,13 @@ "timeToLive": { "unlimited": true }, - "id": "40c32609-22be-d1e4-aba8-b566c206bde9" + "id": "8e6ce1f8-dcde-105a-54e7-9a32259bcd42" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/team/0db9884c-62de-4b52-ae74-1d256d8ecb75", + "path": "/api/v2/team/68a584b9-c8e4-414a-aedd-31f30ab44d27", "keepAlive": false, "secure": true }, @@ -220,13 +220,13 @@ "timeToLive": { "unlimited": true }, - "id": "05baf522-3cba-8c8a-7bff-782ad9a935da" + "id": "4ef8df33-71e6-da6b-7e6f-ea4b3824b0e0" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/users/0f6790f5-2727-11f0-a9cb-b6ff84ad8646", + "path": "/api/v2/users/022c3a60-3633-11f0-b7ed-ce2381807b05", "keepAlive": false, "secure": true }, @@ -241,6 +241,6 @@ "timeToLive": { "unlimited": true }, - "id": "5bad801e-3790-88a0-a64e-b65eccbec716" + "id": "e14dfed5-ff4e-78eb-b1d1-b064af6fa05f" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Set_on_call_team_routing_rules_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Set_on_call_team_routing_rules_returns_OK_response.freeze deleted file mode 100644 index aa8d3dd92e8..00000000000 --- a/src/test/resources/cassettes/features/v2/Set_on_call_team_routing_rules_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-05-02T07:28:35.869Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_On_Call_escalation_policy_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_On_Call_escalation_policy_returns_OK_response.freeze new file mode 100644 index 00000000000..58d9762aacd --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_On_Call_escalation_policy_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-05-21T11:01:56.877Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_On_Call_escalation_policy_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_On_Call_escalation_policy_returns_OK_response.json new file mode 100644 index 00000000000..38be49e86eb --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_On_Call_escalation_policy_returns_OK_response.json @@ -0,0 +1,236 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"email\":\"Test-Update_On_Call_escalation_policy_returns_OK_response-1747825316@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/users", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"users\",\"id\":\"02f97155-3633-11f0-8139-36deebce65db\",\"attributes\":{\"name\":null,\"handle\":\"test-update_on_call_escalation_policy_returns_ok_response-1747825316@datadoghq.com\",\"created_at\":\"2025-05-21T11:01:56.961957+00:00\",\"modified_at\":\"2025-05-21T11:01:56.961957+00:00\",\"email\":\"test-update_on_call_escalation_policy_returns_ok_response-1747825316@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/58d047300afed96db7357b8216864a2b?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", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "45081304-9810-30dd-bced-45f6516d58dc" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-7e1038d48a039cbc\",\"name\":\"test-name-7e1038d48a039cbc\"},\"type\":\"team\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/team", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"team\",\"id\":\"593274dc-43a7-4281-930c-58cb572b5004\",\"attributes\":{\"name\":\"test-name-7e1038d48a039cbc\",\"handle\":\"test-handle-7e1038d48a039cbc\",\"summary\":null,\"description\":null,\"avatar\":null,\"banner\":2,\"visible_modules\":[],\"hidden_modules\":[],\"created_at\":\"2025-05-21T11:01:57.059563+00:00\",\"modified_at\":\"2025-05-21T11:01:57.059594+00:00\",\"user_count\":0,\"link_count\":0},\"relationships\":{\"team_links\":{\"links\":{\"related\":\"/api/v2/team/593274dc-43a7-4281-930c-58cb572b5004/links\"}},\"user_team_permissions\":{\"links\":{\"related\":\"/api/v2/team/593274dc-43a7-4281-930c-58cb572b5004/permission-settings\"}}}}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "9d8e3acd-e120-b4d7-af3d-c0ba5a62de06" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-05-11T11:01:56.877Z\",\"end_date\":\"2025-05-31T11:01:56.877Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-05-16T11:01:56.877Z\"}],\"name\":\"Test-Update_On_Call_escalation_policy_returns_OK_response-1747825316\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/on-call/schedules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"6c875bbd-947b-44bd-bad5-e0da7c69db5c\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Update_On_Call_escalation_policy_returns_OK_response-1747825316\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"0fa01fe6-c072-42ca-a7ed-5923dca7f0b8\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "ddea90b2-ccd7-9f2a-b31a-316b1a4353df" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Update_On_Call_escalation_policy_returns_OK_response-1747825316\",\"resolve_page_on_policy_end\":true,\"retries\":2,\"steps\":[{\"assignment\":\"default\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"593274dc-43a7-4281-930c-58cb572b5004\",\"type\":\"teams\"},{\"id\":\"6c875bbd-947b-44bd-bad5-e0da7c69db5c\",\"type\":\"schedules\"},{\"id\":\"02f97155-3633-11f0-8139-36deebce65db\",\"type\":\"users\"}]},{\"assignment\":\"round-robin\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"593274dc-43a7-4281-930c-58cb572b5004\",\"type\":\"teams\"}]}]},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"593274dc-43a7-4281-930c-58cb572b5004\",\"type\":\"teams\"}]}},\"type\":\"policies\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/on-call/escalation-policies", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"b41d541f-8f83-49f9-9661-0a5ee93bd3be\",\"type\":\"policies\",\"attributes\":{\"name\":\"Test-Update_On_Call_escalation_policy_returns_OK_response-1747825316\",\"resolve_page_on_policy_end\":true,\"retries\":2},\"relationships\":{\"steps\":{\"data\":[{\"id\":\"b84eeb10-55be-461c-8e0f-c60dfd0fbfd6\",\"type\":\"steps\"},{\"id\":\"7cbf9415-79ef-4ce3-acef-5fce960278b7\",\"type\":\"steps\"}]},\"teams\":{\"data\":[{\"id\":\"593274dc-43a7-4281-930c-58cb572b5004\",\"type\":\"teams\"}]}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "6453e26f-db66-0f31-dbc2-25f46ae67551" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Update_On_Call_escalation_policy_returns_OK_response-1747825316-updated\",\"resolve_page_on_policy_end\":false,\"retries\":0,\"steps\":[{\"assignment\":\"default\",\"escalate_after_seconds\":3600,\"id\":\"b84eeb10-55be-461c-8e0f-c60dfd0fbfd6\",\"targets\":[{\"id\":\"02f97155-3633-11f0-8139-36deebce65db\",\"type\":\"users\"}]}]},\"id\":\"b41d541f-8f83-49f9-9661-0a5ee93bd3be\",\"relationships\":{\"teams\":{\"data\":[{\"id\":\"593274dc-43a7-4281-930c-58cb572b5004\",\"type\":\"teams\"}]}},\"type\":\"policies\"}}" + }, + "headers": {}, + "method": "PUT", + "path": "/api/v2/on-call/escalation-policies/b41d541f-8f83-49f9-9661-0a5ee93bd3be", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"b41d541f-8f83-49f9-9661-0a5ee93bd3be\",\"type\":\"policies\",\"attributes\":{\"name\":\"Test-Update_On_Call_escalation_policy_returns_OK_response-1747825316-updated\",\"resolve_page_on_policy_end\":false,\"retries\":0},\"relationships\":{\"steps\":{\"data\":[{\"id\":\"b84eeb10-55be-461c-8e0f-c60dfd0fbfd6\",\"type\":\"steps\"}]},\"teams\":{\"data\":[{\"id\":\"593274dc-43a7-4281-930c-58cb572b5004\",\"type\":\"teams\"}]}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "4d58612d-b8c8-cd2b-662b-60735c998afa" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/on-call/escalation-policies/b41d541f-8f83-49f9-9661-0a5ee93bd3be", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "4f8e1845-4b01-acde-224b-f624c58f0e8f" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/on-call/schedules/6c875bbd-947b-44bd-bad5-e0da7c69db5c", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "c9a5d47a-4aff-7098-7eb1-4577b997a7b8" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/team/593274dc-43a7-4281-930c-58cb572b5004", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "5652b480-092a-7f84-aac3-e498493e9d0d" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/users/02f97155-3633-11f0-8139-36deebce65db", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "d2ccdbd4-f606-db51-4eaa-fb67f9718660" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_On_Call_schedule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_On_Call_schedule_returns_OK_response.freeze new file mode 100644 index 00000000000..20f2c228550 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_On_Call_schedule_returns_OK_response.freeze @@ -0,0 +1 @@ +2025-05-21T11:01:58.116Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_on_call_schedule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_On_Call_schedule_returns_OK_response.json similarity index 51% rename from src/test/resources/cassettes/features/v2/Update_on_call_schedule_returns_OK_response.json rename to src/test/resources/cassettes/features/v2/Update_On_Call_schedule_returns_OK_response.json index 8bbb0c6d89f..98af3ebd08f 100644 --- a/src/test/resources/cassettes/features/v2/Update_on_call_schedule_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_On_Call_schedule_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-04-14T02:49:56.699Z\",\"end_date\":\"2025-05-04T02:49:56.699Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-04-19T02:49:56.699Z\"}],\"name\":\"Test-Update_on_call_schedule_returns_OK_response-1745462996\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" + "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-05-11T11:01:58.116Z\",\"end_date\":\"2025-05-31T11:01:58.116Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-05-16T11:01:58.116Z\"}],\"name\":\"Test-Update_On_Call_schedule_returns_OK_response-1747825318\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"63b955bd-42ab-42a2-95be-64cdaf5fad05\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Update_on_call_schedule_returns_OK_response-1745462996\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"3342fc63-b752-4cb7-84af-acdd25170a72\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", + "body": "{\"data\":{\"id\":\"65e112fe-2c12-4a2b-8406-522b07cccd1c\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Update_On_Call_schedule_returns_OK_response-1747825318\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"7f8a6ed7-bc86-48ef-872b-f68b05b28f6b\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "edfa4672-9d30-3476-9da9-4e3203b03e6d" + "id": "4bbdc4b2-b26b-3006-ddc2-2fa0644c9b37" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"email\":\"Test-Update_on_call_schedule_returns_OK_response-1745462996@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" + "json": "{\"data\":{\"attributes\":{\"email\":\"Test-Update_On_Call_schedule_returns_OK_response-1747825318@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" }, "headers": {}, "method": "POST", @@ -42,7 +42,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"type\":\"users\",\"id\":\"cf1fc825-20b6-11f0-964a-9205f68d2dbc\",\"attributes\":{\"name\":null,\"handle\":\"test-update_on_call_schedule_returns_ok_response-1745462996@datadoghq.com\",\"created_at\":\"2025-04-24T02:49:57.958893+00:00\",\"modified_at\":\"2025-04-24T02:49:57.958893+00:00\",\"email\":\"test-update_on_call_schedule_returns_ok_response-1745462996@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/9745d12cfe2ad4741f4a01920dbaddbd?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", + "body": "{\"data\":{\"type\":\"users\",\"id\":\"03c4b5bd-3633-11f0-8139-36deebce65db\",\"attributes\":{\"name\":null,\"handle\":\"test-update_on_call_schedule_returns_ok_response-1747825318@datadoghq.com\",\"created_at\":\"2025-05-21T11:01:58.294092+00:00\",\"modified_at\":\"2025-05-21T11:01:58.294092+00:00\",\"email\":\"test-update_on_call_schedule_returns_ok_response-1747825318@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/e928709686b830ca3733b32dcf0e20e6?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", "headers": { "Content-Type": [ "application/json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "44230f3b-6f2f-d1da-d607-c6f201c87e84" + "id": "c87be681-aa6b-bf03-699b-4afc6b0a8c9e" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-6bd41aedce052a30\",\"name\":\"test-name-6bd41aedce052a30\"},\"type\":\"team\"}}" + "json": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-190dee1bd22c94a1\",\"name\":\"test-name-190dee1bd22c94a1\"},\"type\":\"team\"}}" }, "headers": {}, "method": "POST", @@ -72,7 +72,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"type\":\"team\",\"id\":\"45f3bb52-ff48-44f4-b7ec-e6ca4cc6e972\",\"attributes\":{\"name\":\"test-name-6bd41aedce052a30\",\"handle\":\"test-handle-6bd41aedce052a30\",\"summary\":null,\"description\":null,\"avatar\":null,\"banner\":2,\"visible_modules\":[],\"hidden_modules\":[],\"created_at\":\"2025-04-24T02:49:58.638187+00:00\",\"modified_at\":\"2025-04-24T02:49:58.638196+00:00\",\"user_count\":0,\"link_count\":0},\"relationships\":{\"team_links\":{\"links\":{\"related\":\"/api/v2/team/45f3bb52-ff48-44f4-b7ec-e6ca4cc6e972/links\"}},\"user_team_permissions\":{\"links\":{\"related\":\"/api/v2/team/45f3bb52-ff48-44f4-b7ec-e6ca4cc6e972/permission-settings\"}}}}}\n", + "body": "{\"data\":{\"type\":\"team\",\"id\":\"72687222-d9aa-4f6a-8af2-1f1811c66378\",\"attributes\":{\"name\":\"test-name-190dee1bd22c94a1\",\"handle\":\"test-handle-190dee1bd22c94a1\",\"summary\":null,\"description\":null,\"avatar\":null,\"banner\":7,\"visible_modules\":[],\"hidden_modules\":[],\"created_at\":\"2025-05-21T11:01:58.429935+00:00\",\"modified_at\":\"2025-05-21T11:01:58.429944+00:00\",\"user_count\":0,\"link_count\":0},\"relationships\":{\"team_links\":{\"links\":{\"related\":\"/api/v2/team/72687222-d9aa-4f6a-8af2-1f1811c66378/links\"}},\"user_team_permissions\":{\"links\":{\"related\":\"/api/v2/team/72687222-d9aa-4f6a-8af2-1f1811c66378/permission-settings\"}}}}}\n", "headers": { "Content-Type": [ "application/json" @@ -87,22 +87,22 @@ "timeToLive": { "unlimited": true }, - "id": "ed16b08f-4d03-d328-659d-29812f199bee" + "id": "5957d0f5-859b-a70c-9b95-76f56c3cd867" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-04-14T02:49:56.699Z\",\"end_date\":\"2025-05-04T02:49:56.699Z\",\"id\":\"3342fc63-b752-4cb7-84af-acdd25170a72\",\"interval\":{\"seconds\":300},\"members\":[{\"user\":{\"id\":\"cf1fc825-20b6-11f0-964a-9205f68d2dbc\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-04-19T02:49:56.699Z\"}],\"name\":\"Test-Update_on_call_schedule_returns_OK_response-1745462996\",\"tags\":[\"tag1\",\"tag2\",\"tag3\"],\"time_zone\":\"America/New_York\"},\"id\":\"63b955bd-42ab-42a2-95be-64cdaf5fad05\",\"relationships\":{\"teams\":{\"data\":[{\"id\":\"45f3bb52-ff48-44f4-b7ec-e6ca4cc6e972\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" + "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-05-11T11:01:58.116Z\",\"end_date\":\"2025-05-31T11:01:58.116Z\",\"id\":\"7f8a6ed7-bc86-48ef-872b-f68b05b28f6b\",\"interval\":{\"seconds\":300},\"members\":[{\"user\":{\"id\":\"03c4b5bd-3633-11f0-8139-36deebce65db\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-05-16T11:01:58.116Z\"}],\"name\":\"Test-Update_On_Call_schedule_returns_OK_response-1747825318\",\"time_zone\":\"America/New_York\"},\"id\":\"65e112fe-2c12-4a2b-8406-522b07cccd1c\",\"relationships\":{\"teams\":{\"data\":[{\"id\":\"72687222-d9aa-4f6a-8af2-1f1811c66378\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" }, "headers": {}, "method": "PUT", - "path": "/api/v2/on-call/schedules/63b955bd-42ab-42a2-95be-64cdaf5fad05", + "path": "/api/v2/on-call/schedules/65e112fe-2c12-4a2b-8406-522b07cccd1c", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"63b955bd-42ab-42a2-95be-64cdaf5fad05\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Update_on_call_schedule_returns_OK_response-1745462996\",\"tags\":[\"tag1\",\"tag2\",\"tag3\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"3342fc63-b752-4cb7-84af-acdd25170a72\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"45f3bb52-ff48-44f4-b7ec-e6ca4cc6e972\",\"type\":\"teams\"}]}}}}", + "body": "{\"data\":{\"id\":\"65e112fe-2c12-4a2b-8406-522b07cccd1c\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Update_On_Call_schedule_returns_OK_response-1747825318\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"7f8a6ed7-bc86-48ef-872b-f68b05b28f6b\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"72687222-d9aa-4f6a-8af2-1f1811c66378\",\"type\":\"teams\"}]}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -117,13 +117,13 @@ "timeToLive": { "unlimited": true }, - "id": "48f1dc9d-e79d-81d8-a8cc-101ce263c2f4" + "id": "a396a16a-4047-1816-9651-ec2c1f736658" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/team/45f3bb52-ff48-44f4-b7ec-e6ca4cc6e972", + "path": "/api/v2/team/72687222-d9aa-4f6a-8af2-1f1811c66378", "keepAlive": false, "secure": true }, @@ -138,13 +138,13 @@ "timeToLive": { "unlimited": true }, - "id": "64cc886f-5b00-26bb-5efb-a0b101b7b7e0" + "id": "0d4a8e39-56a5-dcfe-41be-f83eb53a9bae" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/users/cf1fc825-20b6-11f0-964a-9205f68d2dbc", + "path": "/api/v2/users/03c4b5bd-3633-11f0-8139-36deebce65db", "keepAlive": false, "secure": true }, @@ -159,13 +159,13 @@ "timeToLive": { "unlimited": true }, - "id": "fc95046e-d555-e681-4d20-32c3b49e147e" + "id": "c65430c9-e3a7-b60c-a8f4-dd3ca0165478" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/on-call/schedules/63b955bd-42ab-42a2-95be-64cdaf5fad05", + "path": "/api/v2/on-call/schedules/65e112fe-2c12-4a2b-8406-522b07cccd1c", "keepAlive": false, "secure": true }, @@ -180,6 +180,6 @@ "timeToLive": { "unlimited": true }, - "id": "734c76a2-5da7-71ac-4c94-9b63646e203d" + "id": "3325aba1-a2b7-5b2f-5aed-16a1bc5465c6" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_on_call_escalation_policy_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_on_call_escalation_policy_returns_OK_response.freeze deleted file mode 100644 index fa920124cab..00000000000 --- a/src/test/resources/cassettes/features/v2/Update_on_call_escalation_policy_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-04-24T03:17:12.320Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_on_call_escalation_policy_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_on_call_escalation_policy_returns_OK_response.json deleted file mode 100644 index c1083162a60..00000000000 --- a/src/test/resources/cassettes/features/v2/Update_on_call_escalation_policy_returns_OK_response.json +++ /dev/null @@ -1,236 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"email\":\"Test-Update_on_call_escalation_policy_returns_OK_response-1745464632@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/users", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"type\":\"users\",\"id\":\"9d64aed1-20ba-11f0-9fba-9e18c50abaf7\",\"attributes\":{\"name\":null,\"handle\":\"test-update_on_call_escalation_policy_returns_ok_response-1745464632@datadoghq.com\",\"created_at\":\"2025-04-24T03:17:12.511290+00:00\",\"modified_at\":\"2025-04-24T03:17:12.511290+00:00\",\"email\":\"test-update_on_call_escalation_policy_returns_ok_response-1745464632@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/5eab1952bf2bb1dd7e013fe5aff37205?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", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "c31c50fa-ba52-1129-9084-8fa08bcc2e3d" - }, - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-f9de9970024d1bd3\",\"name\":\"test-name-f9de9970024d1bd3\"},\"type\":\"team\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/team", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"type\":\"team\",\"id\":\"2265b16b-975f-494b-b6c7-d12774580f81\",\"attributes\":{\"name\":\"test-name-f9de9970024d1bd3\",\"handle\":\"test-handle-f9de9970024d1bd3\",\"summary\":null,\"description\":null,\"avatar\":null,\"banner\":10,\"visible_modules\":[],\"hidden_modules\":[],\"created_at\":\"2025-04-24T03:17:12.716884+00:00\",\"modified_at\":\"2025-04-24T03:17:12.716893+00:00\",\"user_count\":0,\"link_count\":0},\"relationships\":{\"team_links\":{\"links\":{\"related\":\"/api/v2/team/2265b16b-975f-494b-b6c7-d12774580f81/links\"}},\"user_team_permissions\":{\"links\":{\"related\":\"/api/v2/team/2265b16b-975f-494b-b6c7-d12774580f81/permission-settings\"}}}}}\n", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "bc7a306c-5903-bdfa-8eb7-a1c0bf38ce56" - }, - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-04-14T03:17:12.320Z\",\"end_date\":\"2025-05-04T03:17:12.320Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"890f29d4-0b7a-11f0-aeb2-760fcae4f596\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-04-19T03:17:12.320Z\"}],\"name\":\"Test-Update_on_call_escalation_policy_returns_OK_response-1745464632\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/on-call/schedules", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"75777407-04a6-4136-add3-514e5dfb2a75\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Update_on_call_escalation_policy_returns_OK_response-1745464632\",\"tags\":[\"tag1\",\"tag2\"],\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"9787ba9f-bdc0-4be1-80df-d51c12e5c0be\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "05b7f95d-ca37-ff7a-2529-add382710cc4" - }, - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"description\":\"Test-Update_on_call_escalation_policy_returns_OK_response-1745464632\",\"name\":\"Test-Update_on_call_escalation_policy_returns_OK_response-1745464632\",\"resolve_page_on_policy_end\":true,\"retries\":2,\"steps\":[{\"assignment\":\"default\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"2265b16b-975f-494b-b6c7-d12774580f81\",\"type\":\"teams\"},{\"id\":\"75777407-04a6-4136-add3-514e5dfb2a75\",\"type\":\"schedules\"},{\"id\":\"9d64aed1-20ba-11f0-9fba-9e18c50abaf7\",\"type\":\"users\"}]},{\"assignment\":\"round-robin\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"2265b16b-975f-494b-b6c7-d12774580f81\",\"type\":\"teams\"}]}]},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"2265b16b-975f-494b-b6c7-d12774580f81\",\"type\":\"teams\"}]}},\"type\":\"policies\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/on-call/escalation-policies", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"2c8f57da-076d-40ed-a23c-c96d147b95da\",\"type\":\"policies\",\"attributes\":{\"description\":\"Test-Update_on_call_escalation_policy_returns_OK_response-1745464632\",\"name\":\"Test-Update_on_call_escalation_policy_returns_OK_response-1745464632\",\"resolve_page_on_policy_end\":true,\"retries\":2},\"relationships\":{\"steps\":{\"data\":[{\"id\":\"c085d5a2-a692-4576-9585-4196e6106796\",\"type\":\"steps\"},{\"id\":\"d6e074c5-ef00-4bad-938b-3ef9a3f276d1\",\"type\":\"steps\"}]},\"teams\":{\"data\":[{\"id\":\"2265b16b-975f-494b-b6c7-d12774580f81\",\"type\":\"teams\"}]}}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "622e9d4b-5ebd-87ad-cf31-593833ab1be7" - }, - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"description\":\"Test-Update_on_call_escalation_policy_returns_OK_response-1745464632\",\"name\":\"Test-Update_on_call_escalation_policy_returns_OK_response-1745464632-updated\",\"resolve_page_on_policy_end\":false,\"retries\":0,\"steps\":[{\"assignment\":\"default\",\"escalate_after_seconds\":3600,\"id\":\"c085d5a2-a692-4576-9585-4196e6106796\",\"targets\":[{\"id\":\"9d64aed1-20ba-11f0-9fba-9e18c50abaf7\",\"type\":\"users\"}]}]},\"id\":\"2c8f57da-076d-40ed-a23c-c96d147b95da\",\"relationships\":{\"teams\":{\"data\":[{\"id\":\"2265b16b-975f-494b-b6c7-d12774580f81\",\"type\":\"teams\"}]}},\"type\":\"policies\"}}" - }, - "headers": {}, - "method": "PUT", - "path": "/api/v2/on-call/escalation-policies/2c8f57da-076d-40ed-a23c-c96d147b95da", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"id\":\"2c8f57da-076d-40ed-a23c-c96d147b95da\",\"type\":\"policies\",\"attributes\":{\"description\":\"Test-Update_on_call_escalation_policy_returns_OK_response-1745464632\",\"name\":\"Test-Update_on_call_escalation_policy_returns_OK_response-1745464632-updated\",\"resolve_page_on_policy_end\":false,\"retries\":0},\"relationships\":{\"steps\":{\"data\":[{\"id\":\"c085d5a2-a692-4576-9585-4196e6106796\",\"type\":\"steps\"}]},\"teams\":{\"data\":[{\"id\":\"2265b16b-975f-494b-b6c7-d12774580f81\",\"type\":\"teams\"}]}}}}", - "headers": { - "Content-Type": [ - "application/vnd.api+json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "31985aa2-ed5d-abb7-f682-77bbb9e42197" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/on-call/escalation-policies/2c8f57da-076d-40ed-a23c-c96d147b95da", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "505b06c0-7900-4ccf-32cd-128a782cd027" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/on-call/schedules/75777407-04a6-4136-add3-514e5dfb2a75", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "04d949ea-2d04-a47b-8ed0-1c3ac94d2c2d" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/team/2265b16b-975f-494b-b6c7-d12774580f81", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "88da2564-3cdb-d809-7717-8154b5e7894e" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/users/9d64aed1-20ba-11f0-9fba-9e18c50abaf7", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "0f896b70-4c91-d975-989d-cc330a41adc4" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_on_call_schedule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_on_call_schedule_returns_OK_response.freeze deleted file mode 100644 index 6edc2d04d4d..00000000000 --- a/src/test/resources/cassettes/features/v2/Update_on_call_schedule_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-04-24T02:49:56.699Z \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/given.json b/src/test/resources/com/datadog/api/client/v2/api/given.json index 696fef088cf..d2dfb4183ce 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/given.json +++ b/src/test/resources/com/datadog/api/client/v2/api/given.json @@ -476,7 +476,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"description\": \"{{ 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\": \"{{ 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", @@ -488,7 +488,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"data\": {\n \"attributes\": {\n \"layers\": [\n {\n \"effective_date\": \"{{ timeISO('now - 10d') }}\",\n \"end_date\": \"{{ timeISO('now + 10d') }}\",\n \"interval\": {\n \"days\": 1\n },\n \"members\": [\n {\n \"user\": {\n \"id\": \"890f29d4-0b7a-11f0-aeb2-760fcae4f596\"\n }\n }\n ],\n \"name\": \"Layer 1\",\n \"restrictions\": [\n {\n \"end_day\": \"friday\",\n \"end_time\": \"17:00:00\",\n \"start_day\": \"monday\",\n \"start_time\": \"09:00:00\"\n }\n ],\n \"rotation_start\": \"{{ timeISO('now - 5d') }}\"\n }\n ],\n \"name\": \"{{ unique }}\",\n \"tags\": [\n \"tag1\",\n \"tag2\"\n ],\n \"time_zone\": \"America/New_York\"\n },\n \"relationships\": {\n \"teams\": {\n \"data\": [\n {\n \"id\": \"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\n \"type\": \"teams\"\n }\n ]\n }\n },\n \"type\": \"schedules\"\n }\n}" + "value": "{\n \"data\": {\n \"attributes\": {\n \"layers\": [\n {\n \"effective_date\": \"{{ timeISO('now - 10d') }}\",\n \"end_date\": \"{{ timeISO('now + 10d') }}\",\n \"interval\": {\n \"days\": 1\n },\n \"members\": [\n {\n \"user\": {\n \"id\": \"890f29d4-0b7a-11f0-aeb2-760fcae4f596\"\n }\n }\n ],\n \"name\": \"Layer 1\",\n \"restrictions\": [\n {\n \"end_day\": \"friday\",\n \"end_time\": \"17:00:00\",\n \"start_day\": \"monday\",\n \"start_time\": \"09:00:00\"\n }\n ],\n \"rotation_start\": \"{{ timeISO('now - 5d') }}\"\n }\n ],\n \"name\": \"{{ unique }}\",\n \"time_zone\": \"America/New_York\"\n },\n \"relationships\": {\n \"teams\": {\n \"data\": [\n {\n \"id\": \"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\n \"type\": \"teams\"\n }\n ]\n }\n },\n \"type\": \"schedules\"\n }\n}" } ], "step": "there is a valid \"schedule\" in the system", diff --git a/src/test/resources/com/datadog/api/client/v2/api/on-call.feature b/src/test/resources/com/datadog/api/client/v2/api/on-call.feature index aef3e5f6a2a..6ce9161125a 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/on-call.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/on-call.feature @@ -10,40 +10,41 @@ Feature: On-Call And an instance of "On-Call" API @generated @skip @team:DataDog/bugle - Scenario: Create on-call escalation policy returns "Bad Request" response + Scenario: Create On-Call escalation policy returns "Bad Request" response Given new "CreateOnCallEscalationPolicy" request - And body with value {"data": {"attributes": {"description": "Escalation Policy 1 description", "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"}, {"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 @team:DataDog/bugle - Scenario: Create on-call escalation policy returns "Created" response + Scenario: Create On-Call escalation policy returns "Created" response Given new "CreateOnCallEscalationPolicy" request And there is a valid "schedule" in the system And there is a valid "dd_team" in the system And there is a valid "user" in the system - And body with value {"data": {"attributes": {"description": "Escalation Policy 1 description", "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"}, {"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 @generated @skip @team:DataDog/bugle - Scenario: Create on-call schedule returns "Bad Request" response + Scenario: Create On-Call schedule returns "Bad Request" response Given new "CreateOnCallSchedule" request - And body with value {"data": {"attributes": {"layers": [{"effective_date": "2025-02-03T05:00:00Z", "end_date": "2025-12-31T00:00:00Z", "interval": {"days": 1}, "members": [{"user": {"id": "00000000-aba1-0000-0000-000000000000"}}], "name": "Layer 1", "restrictions": [{"end_day": "friday", "end_time": "17:00:00", "start_day": "monday", "start_time": "09:00:00"}], "rotation_start": "2025-02-01T00:00:00Z"}], "name": "On-Call Schedule", "tags": ["tag1", "tag2"], "time_zone": "America/New_York"}, "relationships": {"teams": {"data": [{"id": "00000000-da3a-0000-0000-000000000000", "type": "teams"}]}}, "type": "schedules"}} + And body with value {"data": {"attributes": {"layers": [{"effective_date": "2025-02-03T05:00:00Z", "end_date": "2025-12-31T00:00:00Z", "interval": {"days": 1}, "members": [{"user": {"id": "00000000-aba1-0000-0000-000000000000"}}], "name": "Layer 1", "restrictions": [{"end_day": "friday", "end_time": "17:00:00", "start_day": "monday", "start_time": "09:00:00"}], "rotation_start": "2025-02-01T00:00:00Z"}], "name": "On-Call Schedule", "time_zone": "America/New_York"}, "relationships": {"teams": {"data": [{"id": "00000000-da3a-0000-0000-000000000000", "type": "teams"}]}}, "type": "schedules"}} When the request is sent Then the response status is 400 Bad Request @team:DataDog/bugle - Scenario: Create on-call schedule returns "Created" response + Scenario: Create On-Call schedule returns "Created" response Given new "CreateOnCallSchedule" request And there is a valid "user" in the system And there is a valid "dd_team" in the system - And body with value {"data": {"attributes": {"layers": [{"effective_date": "{{ timeISO('now - 10d') }}", "end_date": "{{ timeISO('now + 10d') }}", "interval": {"days": 1}, "members": [{"user": {"id": "{{user.data.id}}"}}], "name": "Layer 1", "restrictions": [{"end_day": "friday", "end_time": "17:00:00", "start_day": "monday", "start_time": "09:00:00"}], "rotation_start": "{{ timeISO('now - 5d') }}"}], "name": "{{ unique }}", "tags": ["tag1", "tag2"], "time_zone": "America/New_York"}, "relationships": {"teams": {"data": [{"id": "{{dd_team.data.id}}", "type": "teams"}]}}, "type": "schedules"}} + And body with value {"data": {"attributes": {"layers": [{"effective_date": "{{ timeISO('now - 10d') }}", "end_date": "{{ timeISO('now + 10d') }}", "interval": {"days": 1}, "members": [{"user": {"id": "{{user.data.id}}"}}], "name": "Layer 1", "restrictions": [{"end_day": "friday", "end_time": "17:00:00", "start_day": "monday", "start_time": "09:00:00"}], "rotation_start": "{{ timeISO('now - 5d') }}"}], "name": "{{ unique }}", "time_zone": "America/New_York"}, "relationships": {"teams": {"data": [{"id": "{{dd_team.data.id}}", "type": "teams"}]}}, "type": "schedules"}} When the request is sent Then the response status is 201 Created @team:DataDog/bugle - Scenario: Delete on-call escalation policy returns "No Content" response + Scenario: Delete On-Call escalation policy returns "No Content" response Given new "DeleteOnCallEscalationPolicy" request And there is a valid "user" in the system And there is a valid "dd_team" in the system @@ -54,14 +55,14 @@ Feature: On-Call Then the response status is 204 No Content @generated @skip @team:DataDog/bugle - Scenario: Delete on-call escalation policy returns "Not Found" response + Scenario: Delete On-Call escalation policy returns "Not Found" response Given new "DeleteOnCallEscalationPolicy" request And request contains "policy_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @team:DataDog/bugle - Scenario: Delete on-call schedule returns "No Content" response + Scenario: Delete On-Call schedule returns "No Content" response Given new "DeleteOnCallSchedule" request And there is a valid "schedule" in the system And request contains "schedule_id" parameter from "schedule.data.id" @@ -69,46 +70,47 @@ Feature: On-Call Then the response status is 204 No Content @generated @skip @team:DataDog/bugle - Scenario: Delete on-call schedule returns "Not Found" response + Scenario: Delete On-Call schedule returns "Not Found" response Given new "DeleteOnCallSchedule" request And request contains "schedule_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/bugle - Scenario: Get on-call escalation policy returns "Bad Request" response + Scenario: Get On-Call escalation policy returns "Bad Request" response Given new "GetOnCallEscalationPolicy" request And request contains "policy_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/bugle - Scenario: Get on-call escalation policy returns "Not Found" response + Scenario: Get On-Call escalation policy returns "Not Found" response Given new "GetOnCallEscalationPolicy" request And request contains "policy_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @team:DataDog/bugle - Scenario: Get on-call escalation policy returns "OK" response + Scenario: Get On-Call escalation policy returns "OK" response Given new "GetOnCallEscalationPolicy" request And there is a valid "user" in the system And there is a valid "dd_team" in the system And there is a valid "schedule" in the system And there is a valid "escalation_policy" in the system And request contains "policy_id" parameter from "escalation_policy.data.id" + And request contains "include" parameter with value "steps.targets" When the request is sent Then the response status is 200 OK @generated @skip @team:DataDog/bugle - Scenario: Get on-call schedule returns "Not Found" response + Scenario: Get On-Call schedule returns "Not Found" response Given new "GetOnCallSchedule" request And request contains "schedule_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @team:DataDog/bugle - Scenario: Get on-call schedule returns "OK" response + Scenario: Get On-Call schedule returns "OK" response Given new "GetOnCallSchedule" request And there is a valid "schedule" in the system And request contains "schedule_id" parameter from "schedule.data.id" @@ -116,7 +118,7 @@ Feature: On-Call Then the response status is 200 OK @generated @skip @team:DataDog/bugle - Scenario: Get on-call team routing rules returns "OK" response + Scenario: Get On-Call team routing rules returns "OK" response Given new "GetOnCallTeamRoutingRules" request And request contains "team_id" parameter from "REPLACE.ME" When the request is sent @@ -145,7 +147,7 @@ Feature: On-Call Then the response status is 200 OK @skip-python @team:DataDog/bugle - Scenario: Set on-call team routing rules returns "OK" response + Scenario: Set On-Call team routing rules returns "OK" response Given new "SetOnCallTeamRoutingRules" request And there is a valid "user" in the system And there is a valid "dd_team" in the system @@ -157,56 +159,56 @@ Feature: On-Call Then the response status is 200 OK @generated @skip @team:DataDog/bugle - Scenario: Update on-call escalation policy returns "Bad Request" response + Scenario: Update On-Call escalation policy returns "Bad Request" response Given new "UpdateOnCallEscalationPolicy" request And request contains "policy_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"description": "Escalation Policy 1 description", "name": "Escalation Policy 1", "resolve_page_on_policy_end": false, "retries": 2, "steps": [{"assignment": "default", "escalate_after_seconds": 3600, "id": "00000000-aba1-0000-0000-000000000000", "targets": [{"id": "00000000-aba1-0000-0000-000000000000", "type": "users"}, {"id": "00000000-aba2-0000-0000-000000000000", "type": "schedules"}]}]}, "id": "a3000000-0000-0000-0000-000000000000", "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": false, "retries": 2, "steps": [{"assignment": "default", "escalate_after_seconds": 3600, "id": "00000000-aba1-0000-0000-000000000000", "targets": [{"id": "00000000-aba1-0000-0000-000000000000", "type": "users"}, {"id": "00000000-aba2-0000-0000-000000000000", "type": "schedules"}]}]}, "id": "a3000000-0000-0000-0000-000000000000", "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 @generated @skip @team:DataDog/bugle - Scenario: Update on-call escalation policy returns "Not Found" response + Scenario: Update On-Call escalation policy returns "Not Found" response Given new "UpdateOnCallEscalationPolicy" request And request contains "policy_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"description": "Escalation Policy 1 description", "name": "Escalation Policy 1", "resolve_page_on_policy_end": false, "retries": 2, "steps": [{"assignment": "default", "escalate_after_seconds": 3600, "id": "00000000-aba1-0000-0000-000000000000", "targets": [{"id": "00000000-aba1-0000-0000-000000000000", "type": "users"}, {"id": "00000000-aba2-0000-0000-000000000000", "type": "schedules"}]}]}, "id": "a3000000-0000-0000-0000-000000000000", "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": false, "retries": 2, "steps": [{"assignment": "default", "escalate_after_seconds": 3600, "id": "00000000-aba1-0000-0000-000000000000", "targets": [{"id": "00000000-aba1-0000-0000-000000000000", "type": "users"}, {"id": "00000000-aba2-0000-0000-000000000000", "type": "schedules"}]}]}, "id": "a3000000-0000-0000-0000-000000000000", "relationships": {"teams": {"data": [{"id": "00000000-da3a-0000-0000-000000000000", "type": "teams"}]}}, "type": "policies"}} When the request is sent Then the response status is 404 Not Found @team:DataDog/bugle - Scenario: Update on-call escalation policy returns "OK" response + Scenario: Update On-Call escalation policy returns "OK" response Given new "UpdateOnCallEscalationPolicy" request And there is a valid "user" in the system And there is a valid "dd_team" in the system And there is a valid "schedule" in the system And there is a valid "escalation_policy" in the system And request contains "policy_id" parameter from "escalation_policy.data.id" - And body with value {"data": {"attributes": {"description": "{{ unique }}", "name": "{{ unique }}-updated", "resolve_page_on_policy_end": false, "retries": 0, "steps": [{"assignment": "default", "escalate_after_seconds": 3600, "id": "{{ escalation_policy.data.relationships.steps.data[0].id }}", "targets": [{"id": "{{ user.data.id }}", "type": "users"}]}]}, "id": "{{ escalation_policy.data.id }}", "relationships": {"teams": {"data": [{"id": "{{ dd_team.data.id }}", "type": "teams"}]}}, "type": "policies"}} + And body with value {"data": {"attributes": {"name": "{{ unique }}-updated", "resolve_page_on_policy_end": false, "retries": 0, "steps": [{"assignment": "default", "escalate_after_seconds": 3600, "id": "{{ escalation_policy.data.relationships.steps.data[0].id }}", "targets": [{"id": "{{ user.data.id }}", "type": "users"}]}]}, "id": "{{ escalation_policy.data.id }}", "relationships": {"teams": {"data": [{"id": "{{ dd_team.data.id }}", "type": "teams"}]}}, "type": "policies"}} When the request is sent Then the response status is 200 OK @generated @skip @team:DataDog/bugle - Scenario: Update on-call schedule returns "Bad Request" response + Scenario: Update On-Call schedule returns "Bad Request" response Given new "UpdateOnCallSchedule" request And request contains "schedule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"layers": [{"effective_date": "2025-02-03T05:00:00Z", "end_date": "2025-12-31T00:00:00Z", "interval": {"seconds": 300}, "members": [{"user": {"id": "00000000-aba1-0000-0000-000000000000"}}], "name": "Layer 1", "restrictions": [{"end_day": "friday", "end_time": "17:00:00", "start_day": "monday", "start_time": "09:00:00"}], "rotation_start": "2025-02-01T00:00:00Z"}], "name": "On-Call Schedule Updated", "tags": ["tag1", "tag2", "tag3"], "time_zone": "America/New_York"}, "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "relationships": {"teams": {"data": [{"id": "00000000-da3a-0000-0000-000000000000", "type": "teams"}]}}, "type": "schedules"}} + And body with value {"data": {"attributes": {"layers": [{"effective_date": "2025-02-03T05:00:00Z", "end_date": "2025-12-31T00:00:00Z", "interval": {"seconds": 300}, "members": [{"user": {"id": "00000000-aba1-0000-0000-000000000000"}}], "name": "Layer 1", "restrictions": [{"end_day": "friday", "end_time": "17:00:00", "start_day": "monday", "start_time": "09:00:00"}], "rotation_start": "2025-02-01T00:00:00Z"}], "name": "On-Call Schedule Updated", "time_zone": "America/New_York"}, "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "relationships": {"teams": {"data": [{"id": "00000000-da3a-0000-0000-000000000000", "type": "teams"}]}}, "type": "schedules"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/bugle - Scenario: Update on-call schedule returns "Not Found" response + Scenario: Update On-Call schedule returns "Not Found" response Given new "UpdateOnCallSchedule" request And request contains "schedule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"layers": [{"effective_date": "2025-02-03T05:00:00Z", "end_date": "2025-12-31T00:00:00Z", "interval": {"seconds": 300}, "members": [{"user": {"id": "00000000-aba1-0000-0000-000000000000"}}], "name": "Layer 1", "restrictions": [{"end_day": "friday", "end_time": "17:00:00", "start_day": "monday", "start_time": "09:00:00"}], "rotation_start": "2025-02-01T00:00:00Z"}], "name": "On-Call Schedule Updated", "tags": ["tag1", "tag2", "tag3"], "time_zone": "America/New_York"}, "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "relationships": {"teams": {"data": [{"id": "00000000-da3a-0000-0000-000000000000", "type": "teams"}]}}, "type": "schedules"}} + And body with value {"data": {"attributes": {"layers": [{"effective_date": "2025-02-03T05:00:00Z", "end_date": "2025-12-31T00:00:00Z", "interval": {"seconds": 300}, "members": [{"user": {"id": "00000000-aba1-0000-0000-000000000000"}}], "name": "Layer 1", "restrictions": [{"end_day": "friday", "end_time": "17:00:00", "start_day": "monday", "start_time": "09:00:00"}], "rotation_start": "2025-02-01T00:00:00Z"}], "name": "On-Call Schedule Updated", "time_zone": "America/New_York"}, "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "relationships": {"teams": {"data": [{"id": "00000000-da3a-0000-0000-000000000000", "type": "teams"}]}}, "type": "schedules"}} When the request is sent Then the response status is 404 Not Found @team:DataDog/bugle - Scenario: Update on-call schedule returns "OK" response + Scenario: Update On-Call schedule returns "OK" response Given new "UpdateOnCallSchedule" request And there is a valid "schedule" in the system And there is a valid "user" in the system And there is a valid "dd_team" in the system And request contains "schedule_id" parameter from "schedule.data.id" - And body with value {"data": { "id": "{{ schedule.data.id }}", "attributes": {"layers": [{"id": "{{ schedule.data.relationships.layers.data[0].id }}" , "effective_date": "{{ timeISO('now - 10d') }}", "end_date": "{{ timeISO('now + 10d') }}", "interval": {"seconds": 300}, "members": [{"user": {"id": "{{user.data.id}}"}}], "name": "Layer 1", "restrictions": [{"end_day": "friday", "end_time": "17:00:00", "start_day": "monday", "start_time": "09:00:00"}], "rotation_start": "{{ timeISO('now - 5d') }}"}], "name": "{{ unique }}", "tags": ["tag1", "tag2", "tag3"], "time_zone": "America/New_York"}, "relationships": {"teams": {"data": [{"id": "{{dd_team.data.id}}", "type": "teams"}]}}, "type": "schedules"}} + And body with value {"data": { "id": "{{ schedule.data.id }}", "attributes": {"layers": [{"id": "{{ schedule.data.relationships.layers.data[0].id }}" , "effective_date": "{{ timeISO('now - 10d') }}", "end_date": "{{ timeISO('now + 10d') }}", "interval": {"seconds": 300}, "members": [{"user": {"id": "{{user.data.id}}"}}], "name": "Layer 1", "restrictions": [{"end_day": "friday", "end_time": "17:00:00", "start_day": "monday", "start_time": "09:00:00"}], "rotation_start": "{{ timeISO('now - 5d') }}"}], "name": "{{ unique }}", "time_zone": "America/New_York"}, "relationships": {"teams": {"data": [{"id": "{{dd_team.data.id}}", "type": "teams"}]}}, "type": "schedules"}} When the request is sent Then the response status is 200 OK