diff --git a/examples/v2/on-call/SetOnCallTeamRoutingRules.java b/examples/v2/on-call/SetOnCallTeamRoutingRules.java index 7d58d6cbb5f..4b66d723523 100644 --- a/examples/v2/on-call/SetOnCallTeamRoutingRules.java +++ b/examples/v2/on-call/SetOnCallTeamRoutingRules.java @@ -4,9 +4,6 @@ import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.OnCallApi; import com.datadog.api.client.v2.api.OnCallApi.SetOnCallTeamRoutingRulesOptionalParameters; -import com.datadog.api.client.v2.model.RoutingRuleAction; -import com.datadog.api.client.v2.model.SendSlackMessageAction; -import com.datadog.api.client.v2.model.SendSlackMessageActionType; import com.datadog.api.client.v2.model.TeamRoutingRules; import com.datadog.api.client.v2.model.TeamRoutingRulesRequest; import com.datadog.api.client.v2.model.TeamRoutingRulesRequestData; @@ -18,7 +15,6 @@ import com.datadog.api.client.v2.model.Urgency; import com.datadog.api.client.v2.model.Weekday; import java.util.Arrays; -import java.util.Collections; public class Example { public static void main(String[] args) { @@ -40,16 +36,9 @@ public static void main(String[] args) { .rules( Arrays.asList( new TeamRoutingRulesRequestRule() - .actions( - Collections.singletonList( - new RoutingRuleAction( - new SendSlackMessageAction() - .channel("channel") - .type( - SendSlackMessageActionType - .SEND_SLACK_MESSAGE) - .workspace("workspace")))) + .policyId(ESCALATION_POLICY_DATA_ID) .query("tags.service:test") + .urgency(Urgency.HIGH) .timeRestriction( new TimeRestrictions() .timeZone("Europe/Paris") 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 index 7a29240030e..19eab68a6be 100644 --- 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 @@ -1 +1 @@ -2025-11-27T14:11:49.966Z \ No newline at end of file +2026-05-11T20:29:00.457Z \ 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 index 42710446ed9..fe876f0923a 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-1764252709@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" + "json": "{\"data\":{\"attributes\":{\"email\":\"Test-Set_On_Call_team_routing_rules_returns_OK_response-1778531340@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"type\":\"users\",\"id\":\"0473ca92-cb9b-11f0-85f9-9a82ffe01443\",\"attributes\":{\"name\":null,\"handle\":\"test-set_on_call_team_routing_rules_returns_ok_response-1764252709@datadoghq.com\",\"created_at\":\"2025-11-27T14:11:50.355271+00:00\",\"modified_at\":\"2025-11-27T14:11:50.355271+00:00\",\"email\":\"test-set_on_call_team_routing_rules_returns_ok_response-1764252709@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/ad92f892fdf302962d879c0d02664d8e?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n", + "body": "{\"data\":{\"type\":\"users\",\"id\":\"142a39f5-ccbc-4644-9d1f-dec51ca11160\",\"attributes\":{\"uuid\":\"142a39f5-ccbc-4644-9d1f-dec51ca11160\",\"name\":null,\"handle\":\"test-set_on_call_team_routing_rules_returns_ok_response-1778531340@datadoghq.com\",\"created_at\":\"2026-05-11T20:29:01.703412+00:00\",\"modified_at\":\"2026-05-11T20:29:01.703412+00:00\",\"email\":\"test-set_on_call_team_routing_rules_returns_ok_response-1778531340@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/99c2f323bdfa79820e0e03370f5d8cdf?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n", "headers": { "Content-Type": [ "application/json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "07055f7d-82b7-f7c5-900f-ec8976ba7ab7" + "id": "e3f48cd7-d463-0ff1-94a7-8f1ff5937a93" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-a7692378c203a880\",\"name\":\"test-name-a7692378c203a880\"},\"type\":\"team\"}}" + "json": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-35cd746af947f9df\",\"name\":\"test-name-35cd746af947f9df\"},\"type\":\"team\"}}" }, "headers": {}, "method": "POST", @@ -42,7 +42,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"ba4fe917-0da4-4b40-96da-f9d7306d97d8\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":14,\"created_at\":\"2025-11-27T14:11:50.842947+00:00\",\"description\":null,\"handle\":\"test-handle-a7692378c203a880\",\"hidden_modules\":[],\"link_count\":0,\"modified_at\":\"2025-11-27T14:11:50.842947+00:00\",\"name\":\"test-name-a7692378c203a880\",\"summary\":null,\"user_count\":0,\"visible_modules\":[]},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/ba4fe917-0da4-4b40-96da-f9d7306d97d8/links\"}},\"user_team_permissions\":{\"links\":{\"related\":\"/api/v2/team/ba4fe917-0da4-4b40-96da-f9d7306d97d8/permission-settings\"}}}}}", + "body": "{\"data\":{\"id\":\"c51b6a85-d7a7-40d0-abf8-3e2e5c964596\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":8,\"created_at\":\"2026-05-11T20:29:02.025767+00:00\",\"description\":null,\"handle\":\"test-handle-35cd746af947f9df\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-05-11T20:29:02.025767+00:00\",\"name\":\"test-name-35cd746af947f9df\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/c51b6a85-d7a7-40d0-abf8-3e2e5c964596/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/c51b6a85-d7a7-40d0-abf8-3e2e5c964596/permission-settings\"}}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "b2cc8226-7752-de84-3639-fd21eea86f85" + "id": "714f5866-f9e3-4ff9-253e-7132fc7dda13" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2025-11-17T14:11:49.966Z\",\"end_date\":\"2025-12-07T14:11:49.966Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"0473ca92-cb9b-11f0-85f9-9a82ffe01443\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2025-11-22T14:11:49.966Z\"}],\"name\":\"Test-Set_On_Call_team_routing_rules_returns_OK_response-1764252709\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}},\"type\":\"schedules\"}}" + "json": "{\"data\":{\"attributes\":{\"layers\":[{\"effective_date\":\"2026-05-01T20:29:00.457Z\",\"end_date\":\"2026-05-21T20:29:00.457Z\",\"interval\":{\"days\":1},\"members\":[{\"user\":{\"id\":\"142a39f5-ccbc-4644-9d1f-dec51ca11160\"}}],\"name\":\"Layer 1\",\"restrictions\":[{\"end_day\":\"friday\",\"end_time\":\"17:00:00\",\"start_day\":\"monday\",\"start_time\":\"09:00:00\"}],\"rotation_start\":\"2026-05-06T20:29:00.457Z\"}],\"name\":\"Test-Set_On_Call_team_routing_rules_returns_OK_response-1778531340\",\"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\":\"1f9b0595-17a3-4d95-9b2e-edcea3b6e737\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Set_On_Call_team_routing_rules_returns_OK_response-1764252709\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"0eecb6fe-83c6-48c9-9e0e-82379498f733\",\"type\":\"layers\"}]},\"teams\":{\"data\":[{\"id\":\"65aea9d0-941c-4607-bf8a-14fc0dac2820\",\"type\":\"teams\"}]}}}}", + "body": "{\"data\":{\"id\":\"666f954b-6eca-4b04-8180-46d64b7ca916\",\"type\":\"schedules\",\"attributes\":{\"name\":\"Test-Set_On_Call_team_routing_rules_returns_OK_response-1778531340\",\"time_zone\":\"America/New_York\"},\"relationships\":{\"layers\":{\"data\":[{\"id\":\"9839b362-a016-4dd4-b8d2-9335a85e4592\",\"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": "44fc3233-5f8b-1f37-316c-d7a745aee094" + "id": "3eae6edb-e061-9ae7-5edc-c999821309fe" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Set_On_Call_team_routing_rules_returns_OK_response-1764252709\",\"resolve_page_on_policy_end\":true,\"retries\":2,\"steps\":[{\"assignment\":\"default\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"ba4fe917-0da4-4b40-96da-f9d7306d97d8\",\"type\":\"teams\"},{\"id\":\"1f9b0595-17a3-4d95-9b2e-edcea3b6e737\",\"type\":\"schedules\"},{\"config\":{\"schedule\":{\"position\":\"previous\"}},\"id\":\"1f9b0595-17a3-4d95-9b2e-edcea3b6e737\",\"type\":\"schedules\"},{\"id\":\"0473ca92-cb9b-11f0-85f9-9a82ffe01443\",\"type\":\"users\"}]},{\"assignment\":\"round-robin\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"ba4fe917-0da4-4b40-96da-f9d7306d97d8\",\"type\":\"teams\"}]}]},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"ba4fe917-0da4-4b40-96da-f9d7306d97d8\",\"type\":\"teams\"}]}},\"type\":\"policies\"}}" + "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Set_On_Call_team_routing_rules_returns_OK_response-1778531340\",\"resolve_page_on_policy_end\":true,\"retries\":2,\"steps\":[{\"assignment\":\"default\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"c51b6a85-d7a7-40d0-abf8-3e2e5c964596\",\"type\":\"teams\"},{\"id\":\"666f954b-6eca-4b04-8180-46d64b7ca916\",\"type\":\"schedules\"},{\"config\":{\"schedule\":{\"position\":\"previous\"}},\"id\":\"666f954b-6eca-4b04-8180-46d64b7ca916\",\"type\":\"schedules\"},{\"id\":\"142a39f5-ccbc-4644-9d1f-dec51ca11160\",\"type\":\"users\"}]},{\"assignment\":\"round-robin\",\"escalate_after_seconds\":3600,\"targets\":[{\"id\":\"c51b6a85-d7a7-40d0-abf8-3e2e5c964596\",\"type\":\"teams\"}]}]},\"relationships\":{\"teams\":{\"data\":[{\"id\":\"c51b6a85-d7a7-40d0-abf8-3e2e5c964596\",\"type\":\"teams\"}]}},\"type\":\"policies\"}}" }, "headers": {}, "method": "POST", @@ -102,7 +102,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"66f0e922-2834-4d68-aa0b-98cc81fc2a9d\",\"type\":\"policies\",\"attributes\":{\"name\":\"Test-Set_On_Call_team_routing_rules_returns_OK_response-1764252709\",\"resolve_page_on_policy_end\":true,\"retries\":2},\"relationships\":{\"steps\":{\"data\":[{\"id\":\"533f661e-6a1f-4327-8d3f-035add94cff8\",\"type\":\"steps\"},{\"id\":\"b8948730-6aec-4a51-8662-cce4026b94dc\",\"type\":\"steps\"}]},\"teams\":{\"data\":[{\"id\":\"ba4fe917-0da4-4b40-96da-f9d7306d97d8\",\"type\":\"teams\"}]}}}}", + "body": "{\"data\":{\"id\":\"ff7c2075-78d0-4bbd-b610-7adda6da7b60\",\"type\":\"policies\",\"attributes\":{\"name\":\"Test-Set_On_Call_team_routing_rules_returns_OK_response-1778531340\",\"resolve_page_on_policy_end\":true,\"retries\":2,\"tags\":[]},\"relationships\":{\"steps\":{\"data\":[{\"id\":\"864da886-33e0-4b62-9ed1-906253482480\",\"type\":\"steps\"},{\"id\":\"87bcfb40-3279-4aa9-b222-90684e2aa2e1\",\"type\":\"steps\"}]},\"teams\":{\"data\":[{\"id\":\"c51b6a85-d7a7-40d0-abf8-3e2e5c964596\",\"type\":\"teams\"}]}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -117,17 +117,17 @@ "timeToLive": { "unlimited": true }, - "id": "9b1f112e-ed9b-24a3-439d-609848b84864" + "id": "44739077-9e74-5224-a86f-bb2d42b243ca" }, { "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\"}},{\"policy_id\":\"66f0e922-2834-4d68-aa0b-98cc81fc2a9d\",\"query\":\"\",\"urgency\":\"low\"}]},\"id\":\"ba4fe917-0da4-4b40-96da-f9d7306d97d8\",\"type\":\"team_routing_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"rules\":[{\"policy_id\":\"ff7c2075-78d0-4bbd-b610-7adda6da7b60\",\"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\":\"ff7c2075-78d0-4bbd-b610-7adda6da7b60\",\"query\":\"\",\"urgency\":\"low\"}]},\"id\":\"c51b6a85-d7a7-40d0-abf8-3e2e5c964596\",\"type\":\"team_routing_rules\"}}" }, "headers": {}, "method": "PUT", - "path": "/api/v2/on-call/teams/ba4fe917-0da4-4b40-96da-f9d7306d97d8/routing-rules", + "path": "/api/v2/on-call/teams/c51b6a85-d7a7-40d0-abf8-3e2e5c964596/routing-rules", "queryStringParameters": { "include": [ "rules" @@ -137,7 +137,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"ba4fe917-0da4-4b40-96da-f9d7306d97d8\",\"type\":\"team_routing_rules\",\"relationships\":{\"rules\":{\"data\":[{\"id\":\"virtual-ba4fe917-0da4-4b40-96da-f9d7306d97d8-rule-0\",\"type\":\"team_routing_rules\"},{\"id\":\"virtual-ba4fe917-0da4-4b40-96da-f9d7306d97d8-rule-1\",\"type\":\"team_routing_rules\"}]}}},\"included\":[{\"id\":\"virtual-ba4fe917-0da4-4b40-96da-f9d7306d97d8-rule-0\",\"type\":\"team_routing_rules\",\"attributes\":{\"actions\":[{\"type\":\"send_slack_message\",\"channel\":\"channel\",\"workspace\":\"workspace\"}],\"query\":\"tags.service:test\",\"time_restriction\":{\"time_zone\":\"Europe/Paris\",\"restrictions\":[{\"start_time\":\"09:00:00\",\"start_day\":\"monday\",\"end_time\":\"17:00:00\",\"end_day\":\"monday\"},{\"start_time\":\"09:00:00\",\"start_day\":\"tuesday\",\"end_time\":\"17:00:00\",\"end_day\":\"tuesday\"}]}},\"relationships\":{\"policy\":{\"data\":null}}},{\"id\":\"virtual-ba4fe917-0da4-4b40-96da-f9d7306d97d8-rule-1\",\"type\":\"team_routing_rules\",\"attributes\":{\"actions\":[],\"query\":\"\",\"urgency\":\"low\"},\"relationships\":{\"policy\":{\"data\":{\"id\":\"66f0e922-2834-4d68-aa0b-98cc81fc2a9d\",\"type\":\"policies\"}}}}]}", + "body": "{\"data\":{\"id\":\"c51b6a85-d7a7-40d0-abf8-3e2e5c964596\",\"type\":\"team_routing_rules\",\"relationships\":{\"rules\":{\"data\":[{\"id\":\"5f90a626-c08e-49f8-a536-8e59fb589a69\",\"type\":\"team_routing_rules\"},{\"id\":\"6a35222a-a1cf-45e5-861b-7b0cc501b1a9\",\"type\":\"team_routing_rules\"}]}}},\"included\":[{\"id\":\"5f90a626-c08e-49f8-a536-8e59fb589a69\",\"type\":\"team_routing_rules\",\"attributes\":{\"actions\":[{\"type\":\"escalation_policy\",\"policy_id\":\"ff7c2075-78d0-4bbd-b610-7adda6da7b60\",\"urgency\":\"high\"}],\"query\":\"tags.service:test\",\"time_restriction\":{\"time_zone\":\"Europe/Paris\",\"restrictions\":[{\"start_time\":\"09:00:00\",\"start_day\":\"monday\",\"end_time\":\"17:00:00\",\"end_day\":\"monday\"},{\"start_time\":\"09:00:00\",\"start_day\":\"tuesday\",\"end_time\":\"17:00:00\",\"end_day\":\"tuesday\"}]},\"urgency\":\"high\"},\"relationships\":{\"policy\":{\"data\":{\"id\":\"ff7c2075-78d0-4bbd-b610-7adda6da7b60\",\"type\":\"policies\"}}}},{\"id\":\"6a35222a-a1cf-45e5-861b-7b0cc501b1a9\",\"type\":\"team_routing_rules\",\"attributes\":{\"actions\":[{\"type\":\"escalation_policy\",\"policy_id\":\"ff7c2075-78d0-4bbd-b610-7adda6da7b60\",\"urgency\":\"low\"}],\"query\":\"\",\"urgency\":\"low\"},\"relationships\":{\"policy\":{\"data\":{\"id\":\"ff7c2075-78d0-4bbd-b610-7adda6da7b60\",\"type\":\"policies\"}}}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -152,22 +152,22 @@ "timeToLive": { "unlimited": true }, - "id": "c9970e7e-9ed5-a660-7997-ac6316dafd27" + "id": "20ef5282-ddb9-68ed-bb22-ae015b07c157" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"rules\":[]},\"id\":\"ba4fe917-0da4-4b40-96da-f9d7306d97d8\",\"type\":\"team_routing_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"rules\":[]},\"id\":\"c51b6a85-d7a7-40d0-abf8-3e2e5c964596\",\"type\":\"team_routing_rules\"}}" }, "headers": {}, "method": "PUT", - "path": "/api/v2/on-call/teams/ba4fe917-0da4-4b40-96da-f9d7306d97d8/routing-rules", + "path": "/api/v2/on-call/teams/c51b6a85-d7a7-40d0-abf8-3e2e5c964596/routing-rules", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"ba4fe917-0da4-4b40-96da-f9d7306d97d8\",\"type\":\"team_routing_rules\",\"relationships\":{\"rules\":{\"data\":[]}}}}", + "body": "{\"data\":{\"id\":\"c51b6a85-d7a7-40d0-abf8-3e2e5c964596\",\"type\":\"team_routing_rules\",\"relationships\":{\"rules\":{\"data\":[]}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -182,13 +182,13 @@ "timeToLive": { "unlimited": true }, - "id": "8e16cbe7-4c6d-4214-44df-932c13079e00" + "id": "f33ef5e4-0767-75f5-07bc-1e85003b1c10" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/on-call/escalation-policies/66f0e922-2834-4d68-aa0b-98cc81fc2a9d", + "path": "/api/v2/on-call/escalation-policies/ff7c2075-78d0-4bbd-b610-7adda6da7b60", "keepAlive": false, "secure": true }, @@ -203,13 +203,13 @@ "timeToLive": { "unlimited": true }, - "id": "c26189d3-7508-89a7-a4fd-05c9a5d03ce7" + "id": "30ce9622-9e4c-f8fc-a144-2e9fdbfc529c" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/on-call/schedules/1f9b0595-17a3-4d95-9b2e-edcea3b6e737", + "path": "/api/v2/on-call/schedules/666f954b-6eca-4b04-8180-46d64b7ca916", "keepAlive": false, "secure": true }, @@ -224,13 +224,13 @@ "timeToLive": { "unlimited": true }, - "id": "13fd1a4c-6203-2e80-6486-f8eaa339c28b" + "id": "3b40d0df-b16c-12e0-0d28-57c239cf04b1" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/team/ba4fe917-0da4-4b40-96da-f9d7306d97d8", + "path": "/api/v2/team/c51b6a85-d7a7-40d0-abf8-3e2e5c964596", "keepAlive": false, "secure": true }, @@ -245,13 +245,13 @@ "timeToLive": { "unlimited": true }, - "id": "8c75ecab-4d74-a2b6-9dbc-dad49c49345c" + "id": "a4bca85c-98d1-2f9a-99c9-2c48259ccadd" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/users/0473ca92-cb9b-11f0-85f9-9a82ffe01443", + "path": "/api/v2/users/142a39f5-ccbc-4644-9d1f-dec51ca11160", "keepAlive": false, "secure": true }, @@ -266,6 +266,6 @@ "timeToLive": { "unlimited": true }, - "id": "96fcc628-0c00-501e-78b9-d3212c0190a8" + "id": "11247416-f7de-41e8-2fbf-42aa3f49980b" } ] \ No newline at end of file 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 0f4b2a0e340..59d90b54736 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 @@ -401,7 +401,7 @@ Feature: On-Call And there is a valid "schedule" in the system And there is a valid "escalation_policy" in the system And request contains "team_id" parameter from "dd_team.data.id" - And body with value {"data": {"attributes": {"rules": [{"actions": [{"channel": "channel", "type": "send_slack_message", "workspace": "workspace"}], "query": "tags.service:test", "time_restriction": {"time_zone": "Europe/Paris", "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"}]}}, {"policy_id": "{{ escalation_policy.data.id }}", "query": "", "urgency": "low"}]}, "id": "{{ dd_team.data.id }}", "type": "team_routing_rules"}} + And body with value {"data": {"attributes": {"rules": [{"policy_id": "{{ escalation_policy.data.id }}", "query": "tags.service:test", "urgency": "high", "time_restriction": {"time_zone": "Europe/Paris", "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"}]}}, {"policy_id": "{{ escalation_policy.data.id }}", "query": "", "urgency": "low"}]}, "id": "{{ dd_team.data.id }}", "type": "team_routing_rules"}} And request contains "include" parameter with value "rules" When the request is sent Then the response status is 200 OK