From f3090fb8112e987d6ee3a5a45c5ac763c1e81f2f Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 3 Dec 2025 17:32:08 +0000 Subject: [PATCH 1/2] Documentation: merged 'Team Connections' into 'Teams' section (#2800) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 9 +- .../CreateTeamConnections.rb | 2 +- .../DeleteTeamConnections.rb | 2 +- .../ListTeamConnections.rb | 2 +- .../ListTeamConnections_1473516764.rb | 2 +- .../ListTeamConnections_2418873869.rb | 2 +- features/scenarios_model_mapping.rb | 28 +- features/v2/given.json | 2 +- features/v2/team_connections.feature | 93 ------ features/v2/teams.feature | 84 ++++++ features/v2/undo.json | 6 +- lib/datadog_api_client/configuration.rb | 6 +- lib/datadog_api_client/inflector.rb | 1 - .../v2/api/team_connections_api.rb | 272 ------------------ lib/datadog_api_client/v2/api/teams_api.rb | 246 ++++++++++++++++ 15 files changed, 359 insertions(+), 398 deletions(-) rename examples/v2/{team-connections => teams}/CreateTeamConnections.rb (95%) rename examples/v2/{team-connections => teams}/DeleteTeamConnections.rb (89%) rename examples/v2/{team-connections => teams}/ListTeamConnections.rb (79%) rename examples/v2/{team-connections => teams}/ListTeamConnections_1473516764.rb (83%) rename examples/v2/{team-connections => teams}/ListTeamConnections_2418873869.rb (82%) delete mode 100644 features/v2/team_connections.feature delete mode 100644 lib/datadog_api_client/v2/api/team_connections_api.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 05ce562f5e2..5f8d776278f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -83879,7 +83879,7 @@ paths: - teams_read summary: Delete team connections tags: - - Team Connections + - Teams x-permission: operator: OR permissions: @@ -83958,7 +83958,7 @@ paths: - teams_read summary: List team connections tags: - - Team Connections + - Teams x-pagination: limitParam: page[size] pageParam: page[number] @@ -84002,7 +84002,7 @@ paths: - teams_read summary: Create team connections tags: - - Team Connections + - Teams x-permission: operator: OR permissions: @@ -87323,9 +87323,6 @@ tags: use Datadog\u2019s API to\nmanage both test types programmatically.\n\nFor more information about Synthetics, see the [Synthetics overview](https://docs.datadoghq.com/synthetics/)." name: Synthetics -- description: View and manage relationships between Datadog teams and teams from - external sources, such as GitHub. - name: Team Connections - description: View and manage teams within Datadog. See the [Teams page](https://docs.datadoghq.com/account_management/teams/) for more information. name: Teams diff --git a/examples/v2/team-connections/CreateTeamConnections.rb b/examples/v2/teams/CreateTeamConnections.rb similarity index 95% rename from examples/v2/team-connections/CreateTeamConnections.rb rename to examples/v2/teams/CreateTeamConnections.rb index 6eeeb6b36ed..1a498252fd7 100644 --- a/examples/v2/team-connections/CreateTeamConnections.rb +++ b/examples/v2/teams/CreateTeamConnections.rb @@ -4,7 +4,7 @@ DatadogAPIClient.configure do |config| config.unstable_operations["v2.create_team_connections".to_sym] = true end -api_instance = DatadogAPIClient::V2::TeamConnectionsAPI.new +api_instance = DatadogAPIClient::V2::TeamsAPI.new # there is a valid "dd_team" in the system DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"] diff --git a/examples/v2/team-connections/DeleteTeamConnections.rb b/examples/v2/teams/DeleteTeamConnections.rb similarity index 89% rename from examples/v2/team-connections/DeleteTeamConnections.rb rename to examples/v2/teams/DeleteTeamConnections.rb index 3f2f68055bc..779bb69a3e6 100644 --- a/examples/v2/team-connections/DeleteTeamConnections.rb +++ b/examples/v2/teams/DeleteTeamConnections.rb @@ -4,7 +4,7 @@ DatadogAPIClient.configure do |config| config.unstable_operations["v2.delete_team_connections".to_sym] = true end -api_instance = DatadogAPIClient::V2::TeamConnectionsAPI.new +api_instance = DatadogAPIClient::V2::TeamsAPI.new body = DatadogAPIClient::V2::TeamConnectionDeleteRequest.new({ data: [ diff --git a/examples/v2/team-connections/ListTeamConnections.rb b/examples/v2/teams/ListTeamConnections.rb similarity index 79% rename from examples/v2/team-connections/ListTeamConnections.rb rename to examples/v2/teams/ListTeamConnections.rb index 6833cc55565..811ff077fb6 100644 --- a/examples/v2/team-connections/ListTeamConnections.rb +++ b/examples/v2/teams/ListTeamConnections.rb @@ -4,5 +4,5 @@ DatadogAPIClient.configure do |config| config.unstable_operations["v2.list_team_connections".to_sym] = true end -api_instance = DatadogAPIClient::V2::TeamConnectionsAPI.new +api_instance = DatadogAPIClient::V2::TeamsAPI.new p api_instance.list_team_connections() diff --git a/examples/v2/team-connections/ListTeamConnections_1473516764.rb b/examples/v2/teams/ListTeamConnections_1473516764.rb similarity index 83% rename from examples/v2/team-connections/ListTeamConnections_1473516764.rb rename to examples/v2/teams/ListTeamConnections_1473516764.rb index cc3c645387c..94ca072c4bb 100644 --- a/examples/v2/team-connections/ListTeamConnections_1473516764.rb +++ b/examples/v2/teams/ListTeamConnections_1473516764.rb @@ -4,7 +4,7 @@ DatadogAPIClient.configure do |config| config.unstable_operations["v2.list_team_connections".to_sym] = true end -api_instance = DatadogAPIClient::V2::TeamConnectionsAPI.new +api_instance = DatadogAPIClient::V2::TeamsAPI.new opts = { filter_sources: [ "github", diff --git a/examples/v2/team-connections/ListTeamConnections_2418873869.rb b/examples/v2/teams/ListTeamConnections_2418873869.rb similarity index 82% rename from examples/v2/team-connections/ListTeamConnections_2418873869.rb rename to examples/v2/teams/ListTeamConnections_2418873869.rb index 31168ec1146..9cc7601b19e 100644 --- a/examples/v2/team-connections/ListTeamConnections_2418873869.rb +++ b/examples/v2/teams/ListTeamConnections_2418873869.rb @@ -4,5 +4,5 @@ DatadogAPIClient.configure do |config| config.unstable_operations["v2.list_team_connections".to_sym] = true end -api_instance = DatadogAPIClient::V2::TeamConnectionsAPI.new +api_instance = DatadogAPIClient::V2::TeamsAPI.new api_instance.list_team_connections_with_pagination() { |item| puts item } diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 6c5abf05961..93133790205 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -3173,6 +3173,20 @@ "v2.GetTeamHierarchyLink" => { "link_id" => "String", }, + "v2.DeleteTeamConnections" => { + "body" => "TeamConnectionDeleteRequest", + }, + "v2.ListTeamConnections" => { + "page_size" => "Integer", + "page_number" => "Integer", + "filter_sources" => "Array", + "filter_team_ids" => "Array", + "filter_connected_team_ids" => "Array", + "filter_connection_ids" => "Array", + }, + "v2.CreateTeamConnections" => { + "body" => "TeamConnectionCreateRequest", + }, "v2.GetTeamSync" => { "filter_source" => "TeamSyncAttributesSource", }, @@ -3254,20 +3268,6 @@ "v2.GetUserMemberships" => { "user_uuid" => "String", }, - "v2.DeleteTeamConnections" => { - "body" => "TeamConnectionDeleteRequest", - }, - "v2.ListTeamConnections" => { - "page_size" => "Integer", - "page_number" => "Integer", - "filter_sources" => "Array", - "filter_team_ids" => "Array", - "filter_connected_team_ids" => "Array", - "filter_connection_ids" => "Array", - }, - "v2.CreateTeamConnections" => { - "body" => "TeamConnectionCreateRequest", - }, "v2.ListIncidentTeams" => { "include" => "IncidentRelatedObject", "page_size" => "Integer", diff --git a/features/v2/given.json b/features/v2/given.json index 6c6d3bf98f4..d919b983487 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -1209,7 +1209,7 @@ "source": "data.data[0]", "step": "there is a valid \"team_connection\" in the system", "key": "team_connection", - "tag": "Team Connections", + "tag": "Teams", "operationId": "CreateTeamConnections" }, { diff --git a/features/v2/team_connections.feature b/features/v2/team_connections.feature deleted file mode 100644 index 7bbce889e1e..00000000000 --- a/features/v2/team_connections.feature +++ /dev/null @@ -1,93 +0,0 @@ -@endpoint(team-connections) @endpoint(team-connections-v2) -Feature: Team Connections - View and manage relationships between Datadog teams and teams from - external sources, such as GitHub. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "TeamConnections" API - - @skip @team:DataDog/aaa-omg - Scenario: Create team connections returns "Bad Request" response - Given operation "CreateTeamConnections" enabled - And new "CreateTeamConnections" request - And body with value {"data": [{"attributes": {"source": "github"}, "relationships": {"connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}, "team": {"data": {"type": "team"}}}, "type": "team_connection"}]} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/aaa-omg - Scenario: Create team connections returns "Conflict" response - Given operation "CreateTeamConnections" enabled - And new "CreateTeamConnections" request - And body with value {"data": [{"attributes": {"managed_by": "github_sync", "source": "github"}, "relationships": {"connected_team": {"data": {"id": "@GitHubOrg/team-handle", "type": "github_team"}}, "team": {"data": {"id": "87654321-4321-8765-dcba-210987654321", "type": "team"}}}, "type": "team_connection"}]} - When the request is sent - Then the response status is 409 Conflict - - @skip @team:DataDog/aaa-omg - Scenario: Create team connections returns "Created" response - Given operation "CreateTeamConnections" enabled - And new "CreateTeamConnections" request - And there is a valid "dd_team" in the system - And body with value {"data": [{"type": "team_connection", "attributes": {"source": "github", "managed_by": "datadog"}, "relationships": {"team": {"data": {"id": "{{ dd_team.data.id }}", "type": "team"}}, "connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}}}]} - When the request is sent - Then the response status is 201 Created - And the response "data.data[0].attributes.source" is equal to "github" - And the response "data.data[0].attributes.managed_by" is equal to "datadog" - And the response "data.data[0].relationships.team.data.id" is equal to "{{ dd_team.data.id }}" - And the response "data.data[0].relationships.connected_team.data.id" is equal to "@MyGitHubAccount/my-team-name" - And the response "data.data[0].type" is equal to "team_connection" - - @skip @team:DataDog/aaa-omg - Scenario: Delete team connections returns "Bad Request" response - Given operation "DeleteTeamConnections" enabled - And new "DeleteTeamConnections" request - And body with value {"data": [{"type": "team_connection"}]} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/aaa-omg - Scenario: Delete team connections returns "No Content" response - Given operation "DeleteTeamConnections" enabled - And new "DeleteTeamConnections" request - And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]} - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/aaa-omg - Scenario: Delete team connections returns "Not Found" response - Given operation "DeleteTeamConnections" enabled - And new "DeleteTeamConnections" request - And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/aaa-omg - Scenario: List team connections returns "Bad Request" response - Given operation "ListTeamConnections" enabled - And new "ListTeamConnections" request - When the request is sent - Then the response status is 400 Bad Request - - @skip @team:DataDog/aaa-omg - Scenario: List team connections returns "OK" response - Given operation "ListTeamConnections" enabled - And new "ListTeamConnections" request - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/aaa-omg @with-pagination - Scenario: List team connections returns "OK" response with pagination - Given operation "ListTeamConnections" enabled - And new "ListTeamConnections" request - When the request with pagination is sent - Then the response status is 200 OK - - @skip @team:DataDog/aaa-omg - Scenario: List team connections with filters returns "OK" response - Given operation "ListTeamConnections" enabled - And new "ListTeamConnections" request - And request contains "filter[sources]" parameter with value ["github"] - And request contains "page[size]" parameter with value 10 - When the request is sent - Then the response status is 200 OK diff --git a/features/v2/teams.feature b/features/v2/teams.feature index faa1ca0889d..c2f52d0d96e 100644 --- a/features/v2/teams.feature +++ b/features/v2/teams.feature @@ -115,6 +115,60 @@ Feature: Teams And the response "data.attributes.visible_modules" is equal to ["m1","m2"] And the response "data.attributes.hidden_modules" is equal to ["m3"] + @skip @team:DataDog/aaa-omg + Scenario: Create team connections returns "Bad Request" response + Given operation "CreateTeamConnections" enabled + And new "CreateTeamConnections" request + And body with value {"data": [{"attributes": {"source": "github"}, "relationships": {"connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}, "team": {"data": {"type": "team"}}}, "type": "team_connection"}]} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/aaa-omg + Scenario: Create team connections returns "Conflict" response + Given operation "CreateTeamConnections" enabled + And new "CreateTeamConnections" request + And body with value {"data": [{"attributes": {"managed_by": "github_sync", "source": "github"}, "relationships": {"connected_team": {"data": {"id": "@GitHubOrg/team-handle", "type": "github_team"}}, "team": {"data": {"id": "87654321-4321-8765-dcba-210987654321", "type": "team"}}}, "type": "team_connection"}]} + When the request is sent + Then the response status is 409 Conflict + + @skip @team:DataDog/aaa-omg + Scenario: Create team connections returns "Created" response + Given operation "CreateTeamConnections" enabled + And new "CreateTeamConnections" request + And there is a valid "dd_team" in the system + And body with value {"data": [{"type": "team_connection", "attributes": {"source": "github", "managed_by": "datadog"}, "relationships": {"team": {"data": {"id": "{{ dd_team.data.id }}", "type": "team"}}, "connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}}}]} + When the request is sent + Then the response status is 201 Created + And the response "data.data[0].attributes.source" is equal to "github" + And the response "data.data[0].attributes.managed_by" is equal to "datadog" + And the response "data.data[0].relationships.team.data.id" is equal to "{{ dd_team.data.id }}" + And the response "data.data[0].relationships.connected_team.data.id" is equal to "@MyGitHubAccount/my-team-name" + And the response "data.data[0].type" is equal to "team_connection" + + @skip @team:DataDog/aaa-omg + Scenario: Delete team connections returns "Bad Request" response + Given operation "DeleteTeamConnections" enabled + And new "DeleteTeamConnections" request + And body with value {"data": [{"type": "team_connection"}]} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/aaa-omg + Scenario: Delete team connections returns "No Content" response + Given operation "DeleteTeamConnections" enabled + And new "DeleteTeamConnections" request + And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]} + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/aaa-omg + Scenario: Delete team connections returns "Not Found" response + Given operation "DeleteTeamConnections" enabled + And new "DeleteTeamConnections" request + And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]} + When the request is sent + Then the response status is 404 Not Found + @team:DataDog/aaa-omg Scenario: Get a team hierarchy link returns "API error response." response Given new "GetTeamHierarchyLink" request @@ -341,6 +395,36 @@ Feature: Teams When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/aaa-omg + Scenario: List team connections returns "Bad Request" response + Given operation "ListTeamConnections" enabled + And new "ListTeamConnections" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/aaa-omg + Scenario: List team connections returns "OK" response + Given operation "ListTeamConnections" enabled + And new "ListTeamConnections" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/aaa-omg @with-pagination + Scenario: List team connections returns "OK" response with pagination + Given operation "ListTeamConnections" enabled + And new "ListTeamConnections" request + When the request with pagination is sent + Then the response status is 200 OK + + @skip @team:DataDog/aaa-omg + Scenario: List team connections with filters returns "OK" response + Given operation "ListTeamConnections" enabled + And new "ListTeamConnections" request + And request contains "filter[sources]" parameter with value ["github"] + And request contains "page[size]" parameter with value 10 + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/aaa-omg Scenario: Remove a member team returns "API error response." response Given operation "RemoveMemberTeam" enabled diff --git a/features/v2/undo.json b/features/v2/undo.json index 2e54bbe0afb..2231f8c9613 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -4494,19 +4494,19 @@ } }, "DeleteTeamConnections": { - "tag": "Team Connections", + "tag": "Teams", "undo": { "type": "idempotent" } }, "ListTeamConnections": { - "tag": "Team Connections", + "tag": "Teams", "undo": { "type": "safe" } }, "CreateTeamConnections": { - "tag": "Team Connections", + "tag": "Teams", "undo": { "operationId": "DeleteTeamConnections", "type": "unsafe" diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index e650d69e517..364a3d497dd 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -333,13 +333,13 @@ def initialize "v2.create_sca_resolve_vulnerable_symbols": false, "v2.create_sca_result": false, "v2.add_member_team": false, + "v2.create_team_connections": false, + "v2.delete_team_connections": false, "v2.get_team_sync": false, "v2.list_member_teams": false, + "v2.list_team_connections": false, "v2.remove_member_team": false, "v2.sync_teams": false, - "v2.create_team_connections": false, - "v2.delete_team_connections": false, - "v2.list_team_connections": false, "v2.create_incident_team": false, "v2.delete_incident_team": false, "v2.get_incident_team": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 2c5af2ef4ed..0c48bcbcae1 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -4684,7 +4684,6 @@ def overrides "v2.spans_metrics_api" => "SpansMetricsAPI", "v2.static_analysis_api" => "StaticAnalysisAPI", "v2.synthetics_api" => "SyntheticsAPI", - "v2.team_connections_api" => "TeamConnectionsAPI", "v2.teams_api" => "TeamsAPI", "v2.test_optimization_api" => "TestOptimizationAPI", "v2.usage_metering_api" => "UsageMeteringAPI", diff --git a/lib/datadog_api_client/v2/api/team_connections_api.rb b/lib/datadog_api_client/v2/api/team_connections_api.rb deleted file mode 100644 index 2a8e2d2b6cb..00000000000 --- a/lib/datadog_api_client/v2/api/team_connections_api.rb +++ /dev/null @@ -1,272 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'cgi' - -module DatadogAPIClient::V2 - class TeamConnectionsAPI - attr_accessor :api_client - - def initialize(api_client = DatadogAPIClient::APIClient.default) - @api_client = api_client - end - - # Create team connections. - # - # @see #create_team_connections_with_http_info - def create_team_connections(body, opts = {}) - data, _status_code, _headers = create_team_connections_with_http_info(body, opts) - data - end - - # Create team connections. - # - # Create multiple team connections. - # - # @param body [TeamConnectionCreateRequest] - # @param opts [Hash] the optional parameters - # @return [Array<(TeamConnectionsResponse, Integer, Hash)>] TeamConnectionsResponse data, response status code and response headers - def create_team_connections_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_team_connections".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_team_connections") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_team_connections")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: TeamConnectionsAPI.create_team_connections ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling TeamConnectionsAPI.create_team_connections" - end - # resource path - local_var_path = '/api/v2/team/connections' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'TeamConnectionsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :create_team_connections, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: TeamConnectionsAPI#create_team_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete team connections. - # - # @see #delete_team_connections_with_http_info - def delete_team_connections(body, opts = {}) - delete_team_connections_with_http_info(body, opts) - nil - end - - # Delete team connections. - # - # Delete multiple team connections. - # - # @param body [TeamConnectionDeleteRequest] - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_team_connections_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_team_connections".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_team_connections") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_team_connections")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: TeamConnectionsAPI.delete_team_connections ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling TeamConnectionsAPI.delete_team_connections" - end - # resource path - local_var_path = '/api/v2/team/connections' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_team_connections, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: TeamConnectionsAPI#delete_team_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # List team connections. - # - # @see #list_team_connections_with_http_info - def list_team_connections(opts = {}) - data, _status_code, _headers = list_team_connections_with_http_info(opts) - data - end - - # List team connections. - # - # Returns all team connections. - # - # @param opts [Hash] the optional parameters - # @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100. - # @option opts [Integer] :page_number Specific page number to return. - # @option opts [Array] :filter_sources Filter team connections by external source systems. - # @option opts [Array] :filter_team_ids Filter team connections by Datadog team IDs. - # @option opts [Array] :filter_connected_team_ids Filter team connections by connected team IDs from external systems. - # @option opts [Array] :filter_connection_ids Filter team connections by connection IDs. - # @return [Array<(TeamConnectionsResponse, Integer, Hash)>] TeamConnectionsResponse data, response status code and response headers - def list_team_connections_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_team_connections".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_team_connections") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_team_connections")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: TeamConnectionsAPI.list_team_connections ...' - end - # resource path - local_var_path = '/api/v2/team/connections' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? - query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? - query_params[:'filter[sources]'] = @api_client.build_collection_param(opts[:'filter_sources'], :csv) if !opts[:'filter_sources'].nil? - query_params[:'filter[team_ids]'] = @api_client.build_collection_param(opts[:'filter_team_ids'], :csv) if !opts[:'filter_team_ids'].nil? - query_params[:'filter[connected_team_ids]'] = @api_client.build_collection_param(opts[:'filter_connected_team_ids'], :csv) if !opts[:'filter_connected_team_ids'].nil? - query_params[:'filter[connection_ids]'] = @api_client.build_collection_param(opts[:'filter_connection_ids'], :csv) if !opts[:'filter_connection_ids'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'TeamConnectionsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :list_team_connections, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: TeamConnectionsAPI#list_team_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # List team connections. - # - # Provide a paginated version of {#list_team_connections}, returning all items. - # - # To use it you need to use a block: list_team_connections_with_pagination { |item| p item } - # - # @yield [TeamConnection] Paginated items - def list_team_connections_with_pagination(opts = {}) - api_version = "V2" - page_size = @api_client.get_attribute_from_path(opts, "page_size", 10) - @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size) - @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 0) - while true do - response = list_team_connections(opts) - @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } - if @api_client.get_attribute_from_path(response, "data").length < page_size - break - end - @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) + 1) - end - end - end -end diff --git a/lib/datadog_api_client/v2/api/teams_api.rb b/lib/datadog_api_client/v2/api/teams_api.rb index f33f44e1775..d4cc6e99b74 100644 --- a/lib/datadog_api_client/v2/api/teams_api.rb +++ b/lib/datadog_api_client/v2/api/teams_api.rb @@ -242,6 +242,79 @@ def create_team_with_http_info(body, opts = {}) return data, status_code, headers end + # Create team connections. + # + # @see #create_team_connections_with_http_info + def create_team_connections(body, opts = {}) + data, _status_code, _headers = create_team_connections_with_http_info(body, opts) + data + end + + # Create team connections. + # + # Create multiple team connections. + # + # @param body [TeamConnectionCreateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(TeamConnectionsResponse, Integer, Hash)>] TeamConnectionsResponse data, response status code and response headers + def create_team_connections_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_team_connections".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_team_connections") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_team_connections")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TeamsAPI.create_team_connections ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.create_team_connections" + end + # resource path + local_var_path = '/api/v2/team/connections' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'TeamConnectionsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :create_team_connections, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TeamsAPI#create_team_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create a team link. # # @see #create_team_link_with_http_info @@ -451,6 +524,79 @@ def delete_team_with_http_info(team_id, opts = {}) return data, status_code, headers end + # Delete team connections. + # + # @see #delete_team_connections_with_http_info + def delete_team_connections(body, opts = {}) + delete_team_connections_with_http_info(body, opts) + nil + end + + # Delete team connections. + # + # Delete multiple team connections. + # + # @param body [TeamConnectionDeleteRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_team_connections_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_team_connections".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_team_connections") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_team_connections")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TeamsAPI.delete_team_connections ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.delete_team_connections" + end + # resource path + local_var_path = '/api/v2/team/connections' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :delete_team_connections, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TeamsAPI#delete_team_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Remove a team link. # # @see #delete_team_link_with_http_info @@ -1268,6 +1414,106 @@ def list_member_teams_with_pagination(super_team_id, opts = {}) end end + # List team connections. + # + # @see #list_team_connections_with_http_info + def list_team_connections(opts = {}) + data, _status_code, _headers = list_team_connections_with_http_info(opts) + data + end + + # List team connections. + # + # Returns all team connections. + # + # @param opts [Hash] the optional parameters + # @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100. + # @option opts [Integer] :page_number Specific page number to return. + # @option opts [Array] :filter_sources Filter team connections by external source systems. + # @option opts [Array] :filter_team_ids Filter team connections by Datadog team IDs. + # @option opts [Array] :filter_connected_team_ids Filter team connections by connected team IDs from external systems. + # @option opts [Array] :filter_connection_ids Filter team connections by connection IDs. + # @return [Array<(TeamConnectionsResponse, Integer, Hash)>] TeamConnectionsResponse data, response status code and response headers + def list_team_connections_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_team_connections".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_team_connections") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_team_connections")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TeamsAPI.list_team_connections ...' + end + # resource path + local_var_path = '/api/v2/team/connections' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? + query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? + query_params[:'filter[sources]'] = @api_client.build_collection_param(opts[:'filter_sources'], :csv) if !opts[:'filter_sources'].nil? + query_params[:'filter[team_ids]'] = @api_client.build_collection_param(opts[:'filter_team_ids'], :csv) if !opts[:'filter_team_ids'].nil? + query_params[:'filter[connected_team_ids]'] = @api_client.build_collection_param(opts[:'filter_connected_team_ids'], :csv) if !opts[:'filter_connected_team_ids'].nil? + query_params[:'filter[connection_ids]'] = @api_client.build_collection_param(opts[:'filter_connection_ids'], :csv) if !opts[:'filter_connection_ids'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'TeamConnectionsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_team_connections, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TeamsAPI#list_team_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List team connections. + # + # Provide a paginated version of {#list_team_connections}, returning all items. + # + # To use it you need to use a block: list_team_connections_with_pagination { |item| p item } + # + # @yield [TeamConnection] Paginated items + def list_team_connections_with_pagination(opts = {}) + api_version = "V2" + page_size = @api_client.get_attribute_from_path(opts, "page_size", 10) + @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size) + @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 0) + while true do + response = list_team_connections(opts) + @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } + if @api_client.get_attribute_from_path(response, "data").length < page_size + break + end + @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) + 1) + end + end + # Get team hierarchy links. # # @see #list_team_hierarchy_links_with_http_info From 0b062109d193876f335e7ee934136d0f0ae2173e Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 3 Dec 2025 18:59:16 +0000 Subject: [PATCH 2/2] On-Call Add positioned schedule policy target (#2802) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 143 +++++++++++++- ...ion-policy-returns-Created-response.frozen | 2 +- ...lation-policy-returns-Created-response.yml | 48 +++-- ...l-schedule-returns-Created-response.frozen | 2 +- ...Call-schedule-returns-Created-response.yml | 38 ++-- ...-policy-returns-No-Content-response.frozen | 2 +- ...ion-policy-returns-No-Content-response.yml | 54 +++-- ...chedule-returns-No-Content-response.frozen | 2 +- ...l-schedule-returns-No-Content-response.yml | 30 +-- ...calation-policy-returns-OK-response.frozen | 2 +- ...-escalation-policy-returns-OK-response.yml | 54 +++-- ...n-Call-schedule-returns-OK-response.frozen | 2 +- ...t-On-Call-schedule-returns-OK-response.yml | 30 +-- ...m-on-call-users-returns-OK-response.frozen | 2 +- ...team-on-call-users-returns-OK-response.yml | 64 +++--- ...le-on-call-user-returns-OK-response.frozen | 2 +- ...edule-on-call-user-returns-OK-response.yml | 30 +-- ...m-routing-rules-returns-OK-response.frozen | 2 +- ...team-routing-rules-returns-OK-response.yml | 58 +++--- ...calation-policy-returns-OK-response.frozen | 2 +- ...-escalation-policy-returns-OK-response.yml | 56 +++--- ...n-Call-schedule-returns-OK-response.frozen | 2 +- ...e-On-Call-schedule-returns-OK-response.yml | 48 +++-- .../on-call/CreateOnCallEscalationPolicy.rb | 9 + features/v2/given.json | 2 +- features/v2/on-call.feature | 4 +- lib/datadog_api_client/inflector.rb | 9 + .../v2/models/configured_schedule.rb | 186 ++++++++++++++++++ .../v2/models/configured_schedule_target.rb | 144 ++++++++++++++ .../configured_schedule_target_attributes.rb | 123 ++++++++++++ ...onfigured_schedule_target_relationships.rb | 123 ++++++++++++ ..._schedule_target_relationships_schedule.rb | 123 ++++++++++++ .../models/configured_schedule_target_type.rb | 26 +++ ...n_policy_create_request_data_attributes.rb | 29 ++- ...ate_request_data_attributes_steps_items.rb | 17 +- .../escalation_policy_data_attributes.rb | 21 +- .../v2/models/escalation_policy_included.rb | 5 +- .../models/escalation_policy_step_target.rb | 14 +- .../escalation_policy_step_target_config.rb | 105 ++++++++++ ...tion_policy_step_target_config_schedule.rb | 105 ++++++++++ ...n_policy_update_request_data_attributes.rb | 29 ++- ...ate_request_data_attributes_steps_items.rb | 17 +- .../v2/models/escalation_target.rb | 5 +- .../v2/models/schedule_target.rb | 2 +- .../v2/models/schedule_target_position.rb | 28 +++ 45 files changed, 1508 insertions(+), 293 deletions(-) create mode 100644 lib/datadog_api_client/v2/models/configured_schedule.rb create mode 100644 lib/datadog_api_client/v2/models/configured_schedule_target.rb create mode 100644 lib/datadog_api_client/v2/models/configured_schedule_target_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/configured_schedule_target_relationships.rb create mode 100644 lib/datadog_api_client/v2/models/configured_schedule_target_relationships_schedule.rb create mode 100644 lib/datadog_api_client/v2/models/configured_schedule_target_type.rb create mode 100644 lib/datadog_api_client/v2/models/escalation_policy_step_target_config.rb create mode 100644 lib/datadog_api_client/v2/models/escalation_policy_step_target_config_schedule.rb create mode 100644 lib/datadog_api_client/v2/models/schedule_target_position.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5f8d776278f..9bdfd074316 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -11377,6 +11377,76 @@ components: required: - type type: object + ConfiguredSchedule: + description: Full resource representation of a configured schedule target with + position (previous, current, or next). + properties: + attributes: + $ref: '#/components/schemas/ConfiguredScheduleTargetAttributes' + id: + description: Specifies the unique identifier of the configured schedule + target. + example: 00000000-aba1-0000-0000-000000000000_previous + type: string + relationships: + $ref: '#/components/schemas/ConfiguredScheduleTargetRelationships' + type: + $ref: '#/components/schemas/ConfiguredScheduleTargetType' + required: + - type + - id + - attributes + - relationships + type: object + ConfiguredScheduleTarget: + description: Relationship reference to a configured schedule target. + properties: + id: + description: Specifies the unique identifier of the configured schedule + target. + example: 00000000-aba1-0000-0000-000000000000_previous + type: string + type: + $ref: '#/components/schemas/ConfiguredScheduleTargetType' + required: + - type + - id + type: object + ConfiguredScheduleTargetAttributes: + description: Attributes for a configured schedule target, including position. + example: + position: previous + properties: + position: + $ref: '#/components/schemas/ScheduleTargetPosition' + required: + - position + type: object + ConfiguredScheduleTargetRelationships: + description: Represents the relationships of a configured schedule target. + properties: + schedule: + $ref: '#/components/schemas/ConfiguredScheduleTargetRelationshipsSchedule' + required: + - schedule + type: object + ConfiguredScheduleTargetRelationshipsSchedule: + description: Holds the schedule reference for a configured schedule target. + properties: + data: + $ref: '#/components/schemas/ScheduleTarget' + required: + - data + type: object + ConfiguredScheduleTargetType: + default: schedule_target + description: Indicates that the resource is of type `schedule_target`. + enum: + - schedule_target + example: schedule_target + type: string + x-enum-varnames: + - SCHEDULE_TARGET ConfluentAccountCreateRequest: description: Payload schema when adding a Confluent account. properties: @@ -19260,6 +19330,8 @@ components: type: users - id: 00000000-aba2-0000-0000-000000000000 type: schedules + - id: 00000000-aba2-0000-0000-000000000000_previous + type: schedule_target - id: 00000000-aba3-0000-0000-000000000000 type: teams type: steps @@ -19267,6 +19339,15 @@ components: type: users - id: 00000000-aba2-0000-0000-000000000000 type: schedules + - attributes: + position: previous + id: 00000000-aba2-0000-0000-000000000000_previous + relationships: + schedule: + data: + id: 00000000-aba2-0000-0000-000000000000 + type: schedules + type: schedule_target - id: 00000000-aba3-0000-0000-000000000000 type: teams properties: @@ -19294,7 +19375,10 @@ components: targets: - id: 00000000-aba1-0000-0000-000000000000 type: users - - id: 00000000-aba2-0000-0000-000000000000 + - config: + schedule: + position: previous + id: 00000000-aba2-0000-0000-000000000000 type: schedules - id: 00000000-aba3-0000-0000-000000000000 type: teams @@ -19338,6 +19422,7 @@ components: name: description: Specifies the name for the new escalation policy. example: On-Call Escalation Policy + minLength: 1 type: string resolve_page_on_policy_end: description: Indicates whether the page is automatically resolved when the @@ -19347,12 +19432,16 @@ components: description: Specifies how many times the escalation sequence is retried if there is no response. format: int64 + maximum: 10 + minimum: 0 type: integer steps: description: A list of escalation steps, each defining assignment, escalation timeout, and targets for the new policy. items: $ref: '#/components/schemas/EscalationPolicyCreateRequestDataAttributesStepsItems' + maxItems: 10 + minItems: 1 type: array required: - name @@ -19369,6 +19458,8 @@ components: step. example: 3600 format: int64 + maximum: 36000 + minimum: 60 type: integer targets: description: Specifies the collection of escalation targets for this step. @@ -19420,6 +19511,7 @@ components: name: description: Specifies the name of the escalation policy. example: On-Call Escalation Policy + minLength: 1 type: string resolve_page_on_policy_end: description: Indicates whether the page is automatically resolved when the @@ -19429,6 +19521,8 @@ components: description: Specifies how many times the escalation sequence is retried if there is no response. format: int64 + maximum: 10 + minimum: 0 type: integer required: - name @@ -19491,10 +19585,11 @@ components: description: Represents included related resources when retrieving an escalation policy, such as teams, steps, or targets. oneOf: - - $ref: '#/components/schemas/TeamReference' - $ref: '#/components/schemas/EscalationPolicyStep' - $ref: '#/components/schemas/EscalationPolicyUser' - $ref: '#/components/schemas/ScheduleData' + - $ref: '#/components/schemas/ConfiguredSchedule' + - $ref: '#/components/schemas/TeamReference' EscalationPolicyStep: description: Represents a single step in an escalation policy, including its attributes, relationships, and resource type. @@ -19542,8 +19637,10 @@ components: type: object EscalationPolicyStepTarget: description: Defines a single escalation target within a step for an escalation - policy creation request. Contains `id` and `type`. + policy creation request. Contains `id`, `type`, and optional `config`. properties: + config: + $ref: '#/components/schemas/EscalationPolicyStepTargetConfig' id: description: Specifies the unique identifier for this target. example: 00000000-aba1-0000-0000-000000000000 @@ -19551,6 +19648,18 @@ components: type: $ref: '#/components/schemas/EscalationPolicyStepTargetType' type: object + EscalationPolicyStepTargetConfig: + description: Configuration for an escalation target, such as schedule position. + properties: + schedule: + $ref: '#/components/schemas/EscalationPolicyStepTargetConfigSchedule' + type: object + EscalationPolicyStepTargetConfigSchedule: + description: Schedule-specific configuration for an escalation target. + properties: + position: + $ref: '#/components/schemas/ScheduleTargetPosition' + type: object EscalationPolicyStepTargetType: description: Specifies the type of escalation target (example `users`, `schedules`, or `teams`). @@ -19631,6 +19740,7 @@ components: name: description: Specifies the name of the escalation policy. example: On-Call Escalation Policy + minLength: 1 type: string resolve_page_on_policy_end: description: Indicates whether the page is automatically resolved when the @@ -19640,12 +19750,16 @@ components: description: Specifies how many times the escalation sequence is retried if there is no response. format: int64 + maximum: 10 + minimum: 0 type: integer steps: description: A list of escalation steps, each defining assignment, escalation timeout, and targets. items: $ref: '#/components/schemas/EscalationPolicyUpdateRequestDataAttributesStepsItems' + maxItems: 10 + minItems: 1 type: array required: - name @@ -19663,6 +19777,8 @@ components: step. example: 3600 format: int64 + maximum: 36000 + minimum: 60 type: integer id: description: Specifies the unique identifier of this step. @@ -19771,12 +19887,13 @@ components: x-enum-varnames: - USERS EscalationTarget: - description: Represents an escalation target, which can be a team, user, or - schedule. + description: Represents an escalation target, which can be a team, user, schedule, + or configured schedule target. oneOf: - $ref: '#/components/schemas/TeamTarget' - $ref: '#/components/schemas/UserTarget' - $ref: '#/components/schemas/ScheduleTarget' + - $ref: '#/components/schemas/ConfiguredScheduleTarget' EscalationTargets: description: A list of escalation targets for a step properties: @@ -45636,7 +45753,8 @@ components: type: object ScheduleTarget: description: Represents a schedule target for an escalation policy step, including - its ID and resource type. + its ID and resource type. This is a shortcut for a configured schedule target + with position set to 'current'. properties: id: description: Specifies the unique identifier of the schedule resource. @@ -45648,6 +45766,19 @@ components: - type - id type: object + ScheduleTargetPosition: + description: Specifies the position of a schedule target (example `previous`, + `current`, or `next`). + enum: + - previous + - current + - next + example: previous + type: string + x-enum-varnames: + - PREVIOUS + - CURRENT + - NEXT ScheduleTargetType: default: schedules description: Indicates that the resource is of type `schedules`. diff --git a/cassettes/features/v2/on-call/Create-On-Call-escalation-policy-returns-Created-response.frozen b/cassettes/features/v2/on-call/Create-On-Call-escalation-policy-returns-Created-response.frozen index b8ab6c2926a..d47e0da1fab 100644 --- a/cassettes/features/v2/on-call/Create-On-Call-escalation-policy-returns-Created-response.frozen +++ b/cassettes/features/v2/on-call/Create-On-Call-escalation-policy-returns-Created-response.frozen @@ -1 +1 @@ -2025-05-29T04:53:30.847Z \ No newline at end of file +2025-11-28T12:58:56.434Z \ No newline at end of file diff --git a/cassettes/features/v2/on-call/Create-On-Call-escalation-policy-returns-Created-response.yml b/cassettes/features/v2/on-call/Create-On-Call-escalation-policy-returns-Created-response.yml index ff2c74b8d54..1bcb16f6272 100644 --- a/cassettes/features/v2/on-call/Create-On-Call-escalation-policy-returns-Created-response.yml +++ b/cassettes/features/v2/on-call/Create-On-Call-escalation-policy-returns-Created-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Thu, 29 May 2025 04:53:30 GMT +- recorded_at: Fri, 28 Nov 2025 12:58:56 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Create_On_Call_escalation_policy_returns_Created_response-1748494410@datadoghq.com","title":"user + string: '{"data":{"attributes":{"email":"Test-Create_On_Call_escalation_policy_returns_Created_response-1764334736@datadoghq.com","title":"user title"},"type":"users"}}' headers: Accept: @@ -15,8 +15,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"users","id":"de86b01f-3c48-11f0-927d-aedf77869272","attributes":{"name":null,"handle":"test-create_on_call_escalation_policy_returns_created_response-1748494410@datadoghq.com","created_at":"2025-05-29T04:53:31.716641+00:00","modified_at":"2025-05-29T04:53:31.716641+00:00","email":"test-create_on_call_escalation_policy_returns_created_response-1748494410@datadoghq.com","icon":"https://secure.gravatar.com/avatar/bd817280fe52b9652bd2877bf9041f78?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + string: '{"data":{"type":"users","id":"005f5c53-cc5a-11f0-84fc-d6e063989c3f","attributes":{"name":null,"handle":"test-create_on_call_escalation_policy_returns_created_response-1764334736@datadoghq.com","created_at":"2025-11-28T12:58:57.385841+00:00","modified_at":"2025-11-28T12:58:57.385841+00:00","email":"test-create_on_call_escalation_policy_returns_created_response-1764334736@datadoghq.com","icon":"https://secure.gravatar.com/avatar/990f6066d8c3647475a637255f95cc7f?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' headers: @@ -25,12 +25,12 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:53:30 GMT +- recorded_at: Fri, 28 Nov 2025 12:58:56 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T04:53:30.847Z","end_date":"2025-06-08T04:53:30.847Z","interval":{"days":1},"members":[{"user":{"id":"de86b01f-3c48-11f0-927d-aedf77869272"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T04:53:30.847Z"}],"name":"Test-Create_On_Call_escalation_policy_returns_Created_response-1748494410","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-18T12:58:56.434Z","end_date":"2025-12-08T12:58:56.434Z","interval":{"days":1},"members":[{"user":{"id":"005f5c53-cc5a-11f0-84fc-d6e063989c3f"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-23T12:58:56.434Z"}],"name":"Test-Create_On_Call_escalation_policy_returns_Created_response-1764334736","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: Accept: - application/json @@ -41,18 +41,18 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"2e70ff45-cb63-4609-900b-cc9fe95e063b","type":"schedules","attributes":{"name":"Test-Create_On_Call_escalation_policy_returns_Created_response-1748494410","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"f1949bc4-1f01-4081-8002-d6029ace0bc9","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"c6a8f167-908f-4ca5-ba30-a33a00adfe11","type":"schedules","attributes":{"name":"Test-Create_On_Call_escalation_policy_returns_Created_response-1764334736","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"928407db-da13-4516-bd6a-3b92e3095b56","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:53:30 GMT +- recorded_at: Fri, 28 Nov 2025 12:58:56 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"handle":"test-handle-cfbc9f18713005c6","name":"test-name-cfbc9f18713005c6"},"type":"team"}}' + string: '{"data":{"attributes":{"handle":"test-handle-24ceda96b794cbdd","name":"test-name-24ceda96b794cbdd"},"type":"team"}}' headers: Accept: - application/json @@ -63,20 +63,18 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"team","id":"fa4d082c-6733-4bd0-9083-f7bf2f8d4259","attributes":{"name":"test-name-cfbc9f18713005c6","handle":"test-handle-cfbc9f18713005c6","summary":null,"description":null,"avatar":null,"banner":14,"visible_modules":[],"hidden_modules":[],"created_at":"2025-05-29T04:53:32.646359+00:00","modified_at":"2025-05-29T04:53:32.646369+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/fa4d082c-6733-4bd0-9083-f7bf2f8d4259/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/fa4d082c-6733-4bd0-9083-f7bf2f8d4259/permission-settings"}}}}} - - ' + string: '{"data":{"id":"e5057194-b5fd-4ff5-b9d3-6977d8bbd774","type":"team","attributes":{"avatar":null,"banner":1,"created_at":"2025-11-28T12:58:58.058854+00:00","description":null,"handle":"test-handle-24ceda96b794cbdd","hidden_modules":[],"link_count":0,"modified_at":"2025-11-28T12:58:58.058854+00:00","name":"test-name-24ceda96b794cbdd","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/e5057194-b5fd-4ff5-b9d3-6977d8bbd774/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/e5057194-b5fd-4ff5-b9d3-6977d8bbd774/permission-settings"}}}}}' headers: Content-Type: - - application/json + - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:53:30 GMT +- recorded_at: Fri, 28 Nov 2025 12:58:56 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Create_On_Call_escalation_policy_returns_Created_response-1748494410","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"de86b01f-3c48-11f0-927d-aedf77869272","type":"users"},{"id":"2e70ff45-cb63-4609-900b-cc9fe95e063b","type":"schedules"},{"id":"fa4d082c-6733-4bd0-9083-f7bf2f8d4259","type":"teams"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"fa4d082c-6733-4bd0-9083-f7bf2f8d4259","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"fa4d082c-6733-4bd0-9083-f7bf2f8d4259","type":"teams"}]}},"type":"policies"}}' + string: '{"data":{"attributes":{"name":"Test-Create_On_Call_escalation_policy_returns_Created_response-1764334736","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"005f5c53-cc5a-11f0-84fc-d6e063989c3f","type":"users"},{"id":"c6a8f167-908f-4ca5-ba30-a33a00adfe11","type":"schedules"},{"config":{"schedule":{"position":"previous"}},"id":"c6a8f167-908f-4ca5-ba30-a33a00adfe11","type":"schedules"},{"id":"e5057194-b5fd-4ff5-b9d3-6977d8bbd774","type":"teams"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"e5057194-b5fd-4ff5-b9d3-6977d8bbd774","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"e5057194-b5fd-4ff5-b9d3-6977d8bbd774","type":"teams"}]}},"type":"policies"}}' headers: Accept: - application/json @@ -87,21 +85,21 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"cf3a523c-3ca3-4ac4-aee2-7afaac13c6f7","type":"policies","attributes":{"name":"Test-Create_On_Call_escalation_policy_returns_Created_response-1748494410","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"ba22e9ae-1740-4522-b95c-26f601a37484","type":"steps"},{"id":"335dc81f-929a-47e1-a8f8-cc7830c2d272","type":"steps"}]},"teams":{"data":[{"id":"fa4d082c-6733-4bd0-9083-f7bf2f8d4259","type":"teams"}]}}},"included":[{"id":"ba22e9ae-1740-4522-b95c-26f601a37484","type":"steps","attributes":{"assignment":"default","escalate_after_seconds":3600},"relationships":{"targets":{"data":[{"id":"de86b01f-3c48-11f0-927d-aedf77869272","type":"users"},{"id":"2e70ff45-cb63-4609-900b-cc9fe95e063b","type":"schedules"},{"id":"fa4d082c-6733-4bd0-9083-f7bf2f8d4259","type":"teams"}]}}},{"id":"335dc81f-929a-47e1-a8f8-cc7830c2d272","type":"steps","attributes":{"assignment":"round-robin","escalate_after_seconds":3600},"relationships":{"targets":{"data":[{"id":"fa4d082c-6733-4bd0-9083-f7bf2f8d4259","type":"teams"}]}}},{"id":"de86b01f-3c48-11f0-927d-aedf77869272","type":"users","attributes":{"email":"test-create_on_call_escalation_policy_returns_created_response-1748494410@datadoghq.com","name":"","status":"pending"}},{"id":"2e70ff45-cb63-4609-900b-cc9fe95e063b","type":"schedules","attributes":{"name":"Test-Create_On_Call_escalation_policy_returns_Created_response-1748494410","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"f1949bc4-1f01-4081-8002-d6029ace0bc9","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}},{"id":"fa4d082c-6733-4bd0-9083-f7bf2f8d4259","type":"teams","attributes":{"avatar":"","description":"","handle":"test-handle-cfbc9f18713005c6","name":"test-name-cfbc9f18713005c6"}}]}' + string: '{"data":{"id":"84f3ac2b-77da-42f2-a2bb-cb9a5ea9cf55","type":"policies","attributes":{"name":"Test-Create_On_Call_escalation_policy_returns_Created_response-1764334736","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"055817d0-41cb-402f-bb93-0d5989083cd1","type":"steps"},{"id":"ddab41bb-c15d-4ad8-bf29-8d0ddcbb2df1","type":"steps"}]},"teams":{"data":[{"id":"e5057194-b5fd-4ff5-b9d3-6977d8bbd774","type":"teams"}]}}},"included":[{"id":"055817d0-41cb-402f-bb93-0d5989083cd1","type":"steps","attributes":{"assignment":"default","escalate_after_seconds":3600},"relationships":{"targets":{"data":[{"id":"005f5c53-cc5a-11f0-84fc-d6e063989c3f","type":"users"},{"id":"c6a8f167-908f-4ca5-ba30-a33a00adfe11","type":"schedules"},{"id":"c6a8f167-908f-4ca5-ba30-a33a00adfe11_previous","type":"schedule_target"},{"id":"e5057194-b5fd-4ff5-b9d3-6977d8bbd774","type":"teams"}]}}},{"id":"c6a8f167-908f-4ca5-ba30-a33a00adfe11_previous","type":"schedule_target","attributes":{"position":"previous"},"relationships":{"schedule":{"data":{"id":"c6a8f167-908f-4ca5-ba30-a33a00adfe11","type":"schedules"}}}},{"id":"ddab41bb-c15d-4ad8-bf29-8d0ddcbb2df1","type":"steps","attributes":{"assignment":"round-robin","escalate_after_seconds":3600},"relationships":{"targets":{"data":[{"id":"e5057194-b5fd-4ff5-b9d3-6977d8bbd774","type":"teams"}]}}},{"id":"005f5c53-cc5a-11f0-84fc-d6e063989c3f","type":"users","attributes":{"email":"test-create_on_call_escalation_policy_returns_created_response-1764334736@datadoghq.com","name":"","status":"pending"}},{"id":"c6a8f167-908f-4ca5-ba30-a33a00adfe11","type":"schedules","attributes":{"name":"Test-Create_On_Call_escalation_policy_returns_Created_response-1764334736","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"928407db-da13-4516-bd6a-3b92e3095b56","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}},{"id":"e5057194-b5fd-4ff5-b9d3-6977d8bbd774","type":"teams","attributes":{"avatar":"","description":"","handle":"test-handle-24ceda96b794cbdd","name":"test-name-24ceda96b794cbdd"}}]}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:53:30 GMT +- recorded_at: Fri, 28 Nov 2025 12:58:56 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/cf3a523c-3ca3-4ac4-aee2-7afaac13c6f7 + uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/84f3ac2b-77da-42f2-a2bb-cb9a5ea9cf55 response: body: encoding: UTF-8 @@ -110,14 +108,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 29 May 2025 04:53:30 GMT +- recorded_at: Fri, 28 Nov 2025 12:58:56 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/fa4d082c-6733-4bd0-9083-f7bf2f8d4259 + uri: https://api.datadoghq.com/api/v2/team/e5057194-b5fd-4ff5-b9d3-6977d8bbd774 response: body: encoding: UTF-8 @@ -126,14 +124,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 29 May 2025 04:53:30 GMT +- recorded_at: Fri, 28 Nov 2025 12:58:56 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/2e70ff45-cb63-4609-900b-cc9fe95e063b + uri: https://api.datadoghq.com/api/v2/on-call/schedules/c6a8f167-908f-4ca5-ba30-a33a00adfe11 response: body: encoding: UTF-8 @@ -142,14 +140,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 29 May 2025 04:53:30 GMT +- recorded_at: Fri, 28 Nov 2025 12:58:56 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/de86b01f-3c48-11f0-927d-aedf77869272 + uri: https://api.datadoghq.com/api/v2/users/005f5c53-cc5a-11f0-84fc-d6e063989c3f response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/on-call/Create-On-Call-schedule-returns-Created-response.frozen b/cassettes/features/v2/on-call/Create-On-Call-schedule-returns-Created-response.frozen index 47ee6d1da6f..59b299377cf 100644 --- a/cassettes/features/v2/on-call/Create-On-Call-schedule-returns-Created-response.frozen +++ b/cassettes/features/v2/on-call/Create-On-Call-schedule-returns-Created-response.frozen @@ -1 +1 @@ -2025-05-29T04:53:37.175Z \ No newline at end of file +2025-11-27T14:11:22.484Z \ No newline at end of file diff --git a/cassettes/features/v2/on-call/Create-On-Call-schedule-returns-Created-response.yml b/cassettes/features/v2/on-call/Create-On-Call-schedule-returns-Created-response.yml index 6eed760bf90..9a6b2ce3e49 100644 --- a/cassettes/features/v2/on-call/Create-On-Call-schedule-returns-Created-response.yml +++ b/cassettes/features/v2/on-call/Create-On-Call-schedule-returns-Created-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Thu, 29 May 2025 04:53:37 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:22 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Create_On_Call_schedule_returns_Created_response-1748494417@datadoghq.com","title":"user + string: '{"data":{"attributes":{"email":"Test-Create_On_Call_schedule_returns_Created_response-1764252682@datadoghq.com","title":"user title"},"type":"users"}}' headers: Accept: @@ -15,8 +15,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"users","id":"e2438320-3c48-11f0-b6eb-6e406f40657f","attributes":{"name":null,"handle":"test-create_on_call_schedule_returns_created_response-1748494417@datadoghq.com","created_at":"2025-05-29T04:53:37.987288+00:00","modified_at":"2025-05-29T04:53:37.987288+00:00","email":"test-create_on_call_schedule_returns_created_response-1748494417@datadoghq.com","icon":"https://secure.gravatar.com/avatar/61f85c2f88e7f4fa078405eae231fb73?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + string: '{"data":{"type":"users","id":"f4106d12-cb9a-11f0-a56e-4e680b759023","attributes":{"name":null,"handle":"test-create_on_call_schedule_returns_created_response-1764252682@datadoghq.com","created_at":"2025-11-27T14:11:22.860522+00:00","modified_at":"2025-11-27T14:11:22.860522+00:00","email":"test-create_on_call_schedule_returns_created_response-1764252682@datadoghq.com","icon":"https://secure.gravatar.com/avatar/97f54253d0353bf6811320274d5cf8eb?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' headers: @@ -25,11 +25,11 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:53:37 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:22 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"handle":"test-handle-0ed4255faa1a4de8","name":"test-name-0ed4255faa1a4de8"},"type":"team"}}' + string: '{"data":{"attributes":{"handle":"test-handle-a115b862e893678b","name":"test-name-a115b862e893678b"},"type":"team"}}' headers: Accept: - application/json @@ -40,21 +40,19 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"team","id":"8c44e5e8-f1f0-4e12-ada2-f91c9aeab153","attributes":{"name":"test-name-0ed4255faa1a4de8","handle":"test-handle-0ed4255faa1a4de8","summary":null,"description":null,"avatar":null,"banner":5,"visible_modules":[],"hidden_modules":[],"created_at":"2025-05-29T04:53:38.641602+00:00","modified_at":"2025-05-29T04:53:38.641612+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/8c44e5e8-f1f0-4e12-ada2-f91c9aeab153/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/8c44e5e8-f1f0-4e12-ada2-f91c9aeab153/permission-settings"}}}}} - - ' + string: '{"data":{"id":"8802359f-5663-4ed4-b3c8-06d5618def25","type":"team","attributes":{"avatar":null,"banner":2,"created_at":"2025-11-27T14:11:23.389409+00:00","description":null,"handle":"test-handle-a115b862e893678b","hidden_modules":[],"link_count":0,"modified_at":"2025-11-27T14:11:23.389409+00:00","name":"test-name-a115b862e893678b","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/8802359f-5663-4ed4-b3c8-06d5618def25/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/8802359f-5663-4ed4-b3c8-06d5618def25/permission-settings"}}}}}' headers: Content-Type: - - application/json + - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:53:37 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:22 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T04:53:37.175Z","end_date":"2025-06-08T04:53:37.175Z","interval":{"days":1},"members":[{"user":{"id":"e2438320-3c48-11f0-b6eb-6e406f40657f"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T04:53:37.175Z"}],"name":"Test-Create_On_Call_schedule_returns_Created_response-1748494417","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"8c44e5e8-f1f0-4e12-ada2-f91c9aeab153","type":"teams"}]}},"type":"schedules"}}' + string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:22.484Z","end_date":"2025-12-07T14:11:22.484Z","interval":{"days":1},"members":[{"user":{"id":"f4106d12-cb9a-11f0-a56e-4e680b759023"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:22.484Z"}],"name":"Test-Create_On_Call_schedule_returns_Created_response-1764252682","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"8802359f-5663-4ed4-b3c8-06d5618def25","type":"teams"}]}},"type":"schedules"}}' headers: Accept: - application/json @@ -65,21 +63,21 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"e57f69cc-5f56-41bf-abd2-69196d0b4b41","type":"schedules","attributes":{"name":"Test-Create_On_Call_schedule_returns_Created_response-1748494417","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"7cb8837f-5ebd-46c7-914d-d017eae7f3fc","type":"layers"}]},"teams":{"data":[{"id":"8c44e5e8-f1f0-4e12-ada2-f91c9aeab153","type":"teams"}]}}}}' + string: '{"data":{"id":"f56173aa-b72e-4a29-a9dd-e8a4fe57f47a","type":"schedules","attributes":{"name":"Test-Create_On_Call_schedule_returns_Created_response-1764252682","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"886b9854-9487-4b13-a4a1-955922ced1cf","type":"layers"}]},"teams":{"data":[{"id":"8802359f-5663-4ed4-b3c8-06d5618def25","type":"teams"}]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:53:37 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:22 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/e57f69cc-5f56-41bf-abd2-69196d0b4b41 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/f56173aa-b72e-4a29-a9dd-e8a4fe57f47a response: body: encoding: UTF-8 @@ -88,14 +86,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 29 May 2025 04:53:37 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:22 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/8c44e5e8-f1f0-4e12-ada2-f91c9aeab153 + uri: https://api.datadoghq.com/api/v2/team/8802359f-5663-4ed4-b3c8-06d5618def25 response: body: encoding: UTF-8 @@ -104,14 +102,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 29 May 2025 04:53:37 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:22 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/e2438320-3c48-11f0-b6eb-6e406f40657f + uri: https://api.datadoghq.com/api/v2/users/f4106d12-cb9a-11f0-a56e-4e680b759023 response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/on-call/Delete-On-Call-escalation-policy-returns-No-Content-response.frozen b/cassettes/features/v2/on-call/Delete-On-Call-escalation-policy-returns-No-Content-response.frozen index c28891b940d..214a0e6a9b0 100644 --- a/cassettes/features/v2/on-call/Delete-On-Call-escalation-policy-returns-No-Content-response.frozen +++ b/cassettes/features/v2/on-call/Delete-On-Call-escalation-policy-returns-No-Content-response.frozen @@ -1 +1 @@ -2025-05-29T04:53:42.215Z \ No newline at end of file +2025-11-27T14:11:25.538Z \ No newline at end of file diff --git a/cassettes/features/v2/on-call/Delete-On-Call-escalation-policy-returns-No-Content-response.yml b/cassettes/features/v2/on-call/Delete-On-Call-escalation-policy-returns-No-Content-response.yml index b75316fc9ae..7f47373e81a 100644 --- a/cassettes/features/v2/on-call/Delete-On-Call-escalation-policy-returns-No-Content-response.yml +++ b/cassettes/features/v2/on-call/Delete-On-Call-escalation-policy-returns-No-Content-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Thu, 29 May 2025 04:53:42 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:25 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1748494422@datadoghq.com","title":"user + string: '{"data":{"attributes":{"email":"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1764252685@datadoghq.com","title":"user title"},"type":"users"}}' headers: Accept: @@ -15,8 +15,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"users","id":"e524a559-3c48-11f0-b6eb-6e406f40657f","attributes":{"name":null,"handle":"test-delete_on_call_escalation_policy_returns_no_content_response-1748494422@datadoghq.com","created_at":"2025-05-29T04:53:42.818165+00:00","modified_at":"2025-05-29T04:53:42.818165+00:00","email":"test-delete_on_call_escalation_policy_returns_no_content_response-1748494422@datadoghq.com","icon":"https://secure.gravatar.com/avatar/89925b9919d7e93a599c4d49d51b35ee?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + string: '{"data":{"type":"users","id":"f5e7c666-cb9a-11f0-ae87-2a5e5028fcef","attributes":{"name":null,"handle":"test-delete_on_call_escalation_policy_returns_no_content_response-1764252685@datadoghq.com","created_at":"2025-11-27T14:11:25.949558+00:00","modified_at":"2025-11-27T14:11:25.949558+00:00","email":"test-delete_on_call_escalation_policy_returns_no_content_response-1764252685@datadoghq.com","icon":"https://secure.gravatar.com/avatar/92ce6e94a63e99ed9306c4b09eb69918?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' headers: @@ -25,11 +25,11 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:53:42 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:25 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"handle":"test-handle-7311534a0fd625d8","name":"test-name-7311534a0fd625d8"},"type":"team"}}' + string: '{"data":{"attributes":{"handle":"test-handle-5d85b5aacd02cab9","name":"test-name-5d85b5aacd02cab9"},"type":"team"}}' headers: Accept: - application/json @@ -40,21 +40,19 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"team","id":"5007e30b-5736-4abe-be9c-51cf508c9554","attributes":{"name":"test-name-7311534a0fd625d8","handle":"test-handle-7311534a0fd625d8","summary":null,"description":null,"avatar":null,"banner":10,"visible_modules":[],"hidden_modules":[],"created_at":"2025-05-29T04:53:43.705893+00:00","modified_at":"2025-05-29T04:53:43.705903+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/5007e30b-5736-4abe-be9c-51cf508c9554/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/5007e30b-5736-4abe-be9c-51cf508c9554/permission-settings"}}}}} - - ' + string: '{"data":{"id":"a42481db-6918-45ef-a923-5548004f044a","type":"team","attributes":{"avatar":null,"banner":9,"created_at":"2025-11-27T14:11:26.456007+00:00","description":null,"handle":"test-handle-5d85b5aacd02cab9","hidden_modules":[],"link_count":0,"modified_at":"2025-11-27T14:11:26.456008+00:00","name":"test-name-5d85b5aacd02cab9","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/a42481db-6918-45ef-a923-5548004f044a/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/a42481db-6918-45ef-a923-5548004f044a/permission-settings"}}}}}' headers: Content-Type: - - application/json + - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:53:42 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:25 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T04:53:42.215Z","end_date":"2025-06-08T04:53:42.215Z","interval":{"days":1},"members":[{"user":{"id":"e524a559-3c48-11f0-b6eb-6e406f40657f"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T04:53:42.215Z"}],"name":"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1748494422","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:25.538Z","end_date":"2025-12-07T14:11:25.538Z","interval":{"days":1},"members":[{"user":{"id":"f5e7c666-cb9a-11f0-ae87-2a5e5028fcef"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:25.538Z"}],"name":"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1764252685","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: Accept: - application/json @@ -65,18 +63,18 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"5bedf04a-b064-4748-861d-2f32970de31e","type":"schedules","attributes":{"name":"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1748494422","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"242425ed-6c98-4bda-b0eb-8eb0d66fc40f","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"cf196f34-3ce0-4cff-a27e-ed5035db9442","type":"schedules","attributes":{"name":"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1764252685","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"2f2ea0a9-a33e-4d2f-9a0b-5cbfb0bed071","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:53:42 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:25 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1748494422","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"5007e30b-5736-4abe-be9c-51cf508c9554","type":"teams"},{"id":"5bedf04a-b064-4748-861d-2f32970de31e","type":"schedules"},{"id":"e524a559-3c48-11f0-b6eb-6e406f40657f","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"5007e30b-5736-4abe-be9c-51cf508c9554","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"5007e30b-5736-4abe-be9c-51cf508c9554","type":"teams"}]}},"type":"policies"}}' + string: '{"data":{"attributes":{"name":"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1764252685","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"a42481db-6918-45ef-a923-5548004f044a","type":"teams"},{"id":"cf196f34-3ce0-4cff-a27e-ed5035db9442","type":"schedules"},{"config":{"schedule":{"position":"previous"}},"id":"cf196f34-3ce0-4cff-a27e-ed5035db9442","type":"schedules"},{"id":"f5e7c666-cb9a-11f0-ae87-2a5e5028fcef","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"a42481db-6918-45ef-a923-5548004f044a","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"a42481db-6918-45ef-a923-5548004f044a","type":"teams"}]}},"type":"policies"}}' headers: Accept: - application/json @@ -87,21 +85,21 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"897cc698-80ee-47cf-b59a-130323f2d483","type":"policies","attributes":{"name":"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1748494422","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"70f924ad-d57b-4b37-92b1-adc275a37923","type":"steps"},{"id":"06639547-3fbf-431c-9719-c7211a3d34aa","type":"steps"}]},"teams":{"data":[{"id":"5007e30b-5736-4abe-be9c-51cf508c9554","type":"teams"}]}}}}' + string: '{"data":{"id":"c25d7cd6-d2bc-4d84-801b-3a09d62e29bc","type":"policies","attributes":{"name":"Test-Delete_On_Call_escalation_policy_returns_No_Content_response-1764252685","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"b445f325-7fca-44d5-a7e2-2a16e8bc2837","type":"steps"},{"id":"b9c6527e-9c8d-4c93-92cf-100b5c180a1e","type":"steps"}]},"teams":{"data":[{"id":"a42481db-6918-45ef-a923-5548004f044a","type":"teams"}]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:53:42 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:25 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/897cc698-80ee-47cf-b59a-130323f2d483 + uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/c25d7cd6-d2bc-4d84-801b-3a09d62e29bc response: body: encoding: UTF-8 @@ -110,18 +108,18 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 29 May 2025 04:53:42 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:25 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/897cc698-80ee-47cf-b59a-130323f2d483 + uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/c25d7cd6-d2bc-4d84-801b-3a09d62e29bc response: body: encoding: UTF-8 - string: '{"errors":[{"title":"Generic Error","detail":"escalation_policy[897cc698-80ee-47cf-b59a-130323f2d483] + string: '{"errors":[{"title":"Generic Error","detail":"escalation_policy[c25d7cd6-d2bc-4d84-801b-3a09d62e29bc] not found"}]}' headers: Content-Type: @@ -129,14 +127,14 @@ http_interactions: status: code: 404 message: Not Found -- recorded_at: Thu, 29 May 2025 04:53:42 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:25 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/5bedf04a-b064-4748-861d-2f32970de31e + uri: https://api.datadoghq.com/api/v2/on-call/schedules/cf196f34-3ce0-4cff-a27e-ed5035db9442 response: body: encoding: UTF-8 @@ -145,14 +143,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 29 May 2025 04:53:42 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:25 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/5007e30b-5736-4abe-be9c-51cf508c9554 + uri: https://api.datadoghq.com/api/v2/team/a42481db-6918-45ef-a923-5548004f044a response: body: encoding: UTF-8 @@ -161,14 +159,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 29 May 2025 04:53:42 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:25 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/e524a559-3c48-11f0-b6eb-6e406f40657f + uri: https://api.datadoghq.com/api/v2/users/f5e7c666-cb9a-11f0-ae87-2a5e5028fcef response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/on-call/Delete-On-Call-schedule-returns-No-Content-response.frozen b/cassettes/features/v2/on-call/Delete-On-Call-schedule-returns-No-Content-response.frozen index faf03500664..41f78537845 100644 --- a/cassettes/features/v2/on-call/Delete-On-Call-schedule-returns-No-Content-response.frozen +++ b/cassettes/features/v2/on-call/Delete-On-Call-schedule-returns-No-Content-response.frozen @@ -1 +1 @@ -2025-05-29T04:53:48.818Z \ No newline at end of file +2025-11-27T14:11:30.983Z \ No newline at end of file diff --git a/cassettes/features/v2/on-call/Delete-On-Call-schedule-returns-No-Content-response.yml b/cassettes/features/v2/on-call/Delete-On-Call-schedule-returns-No-Content-response.yml index dcdbe70517b..cc1a3b34b5c 100644 --- a/cassettes/features/v2/on-call/Delete-On-Call-schedule-returns-No-Content-response.yml +++ b/cassettes/features/v2/on-call/Delete-On-Call-schedule-returns-No-Content-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Thu, 29 May 2025 04:53:48 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:30 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Delete_On_Call_schedule_returns_No_Content_response-1748494428@datadoghq.com","title":"user + string: '{"data":{"attributes":{"email":"Test-Delete_On_Call_schedule_returns_No_Content_response-1764252690@datadoghq.com","title":"user title"},"type":"users"}}' headers: Accept: @@ -15,8 +15,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"users","id":"e913c34d-3c48-11f0-b10e-2e2b611e1022","attributes":{"name":null,"handle":"test-delete_on_call_schedule_returns_no_content_response-1748494428@datadoghq.com","created_at":"2025-05-29T04:53:49.418406+00:00","modified_at":"2025-05-29T04:53:49.418406+00:00","email":"test-delete_on_call_schedule_returns_no_content_response-1748494428@datadoghq.com","icon":"https://secure.gravatar.com/avatar/97e38917640a0eb3c61f6e1219165929?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + string: '{"data":{"type":"users","id":"f9249a49-cb9a-11f0-a56e-4e680b759023","attributes":{"name":null,"handle":"test-delete_on_call_schedule_returns_no_content_response-1764252690@datadoghq.com","created_at":"2025-11-27T14:11:31.381378+00:00","modified_at":"2025-11-27T14:11:31.381378+00:00","email":"test-delete_on_call_schedule_returns_no_content_response-1764252690@datadoghq.com","icon":"https://secure.gravatar.com/avatar/4d40d1e80a1a87fede5c7a11db2bf7f2?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' headers: @@ -25,12 +25,12 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:53:48 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:30 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T04:53:48.818Z","end_date":"2025-06-08T04:53:48.818Z","interval":{"days":1},"members":[{"user":{"id":"e913c34d-3c48-11f0-b10e-2e2b611e1022"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T04:53:48.818Z"}],"name":"Test-Delete_On_Call_schedule_returns_No_Content_response-1748494428","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:30.983Z","end_date":"2025-12-07T14:11:30.983Z","interval":{"days":1},"members":[{"user":{"id":"f9249a49-cb9a-11f0-a56e-4e680b759023"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:30.983Z"}],"name":"Test-Delete_On_Call_schedule_returns_No_Content_response-1764252690","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: Accept: - application/json @@ -41,21 +41,21 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"4068aec3-24f3-41c6-8778-72f8754684c3","type":"schedules","attributes":{"name":"Test-Delete_On_Call_schedule_returns_No_Content_response-1748494428","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"671b7e9e-1bcf-4e7a-817e-3b825b7dd3e6","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"10acf747-60a0-4bdf-a0df-196e9f9291e2","type":"schedules","attributes":{"name":"Test-Delete_On_Call_schedule_returns_No_Content_response-1764252690","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"806b7079-20af-41d1-9f50-badf49b324f5","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:53:48 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:30 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/4068aec3-24f3-41c6-8778-72f8754684c3 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/10acf747-60a0-4bdf-a0df-196e9f9291e2 response: body: encoding: UTF-8 @@ -64,18 +64,18 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 29 May 2025 04:53:48 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:30 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/4068aec3-24f3-41c6-8778-72f8754684c3 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/10acf747-60a0-4bdf-a0df-196e9f9291e2 response: body: encoding: UTF-8 - string: '{"errors":[{"title":"Generic Error","detail":"schedule[4068aec3-24f3-41c6-8778-72f8754684c3] + string: '{"errors":[{"title":"Generic Error","detail":"schedule[10acf747-60a0-4bdf-a0df-196e9f9291e2] not found"}]}' headers: Content-Type: @@ -83,14 +83,14 @@ http_interactions: status: code: 404 message: Not Found -- recorded_at: Thu, 29 May 2025 04:53:48 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:30 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/e913c34d-3c48-11f0-b10e-2e2b611e1022 + uri: https://api.datadoghq.com/api/v2/users/f9249a49-cb9a-11f0-a56e-4e680b759023 response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/on-call/Get-On-Call-escalation-policy-returns-OK-response.frozen b/cassettes/features/v2/on-call/Get-On-Call-escalation-policy-returns-OK-response.frozen index b08c0417dca..e08e7183ed1 100644 --- a/cassettes/features/v2/on-call/Get-On-Call-escalation-policy-returns-OK-response.frozen +++ b/cassettes/features/v2/on-call/Get-On-Call-escalation-policy-returns-OK-response.frozen @@ -1 +1 @@ -2025-05-29T04:53:52.267Z \ No newline at end of file +2025-11-27T14:11:33.368Z \ No newline at end of file diff --git a/cassettes/features/v2/on-call/Get-On-Call-escalation-policy-returns-OK-response.yml b/cassettes/features/v2/on-call/Get-On-Call-escalation-policy-returns-OK-response.yml index 93e8baee52d..e5c4d772fc0 100644 --- a/cassettes/features/v2/on-call/Get-On-Call-escalation-policy-returns-OK-response.yml +++ b/cassettes/features/v2/on-call/Get-On-Call-escalation-policy-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Thu, 29 May 2025 04:53:52 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:33 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Get_On_Call_escalation_policy_returns_OK_response-1748494432@datadoghq.com","title":"user + string: '{"data":{"attributes":{"email":"Test-Get_On_Call_escalation_policy_returns_OK_response-1764252693@datadoghq.com","title":"user title"},"type":"users"}}' headers: Accept: @@ -15,8 +15,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"users","id":"eb22c300-3c48-11f0-b6eb-6e406f40657f","attributes":{"name":null,"handle":"test-get_on_call_escalation_policy_returns_ok_response-1748494432@datadoghq.com","created_at":"2025-05-29T04:53:52.872150+00:00","modified_at":"2025-05-29T04:53:52.872150+00:00","email":"test-get_on_call_escalation_policy_returns_ok_response-1748494432@datadoghq.com","icon":"https://secure.gravatar.com/avatar/28954a95ef3e23c51599bc32b67118de?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + string: '{"data":{"type":"users","id":"fa8dbd27-cb9a-11f0-84fc-d6e063989c3f","attributes":{"name":null,"handle":"test-get_on_call_escalation_policy_returns_ok_response-1764252693@datadoghq.com","created_at":"2025-11-27T14:11:33.748105+00:00","modified_at":"2025-11-27T14:11:33.748105+00:00","email":"test-get_on_call_escalation_policy_returns_ok_response-1764252693@datadoghq.com","icon":"https://secure.gravatar.com/avatar/3b312cc1a86be5f85aab5fada68c24c4?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' headers: @@ -25,11 +25,11 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:53:52 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:33 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"handle":"test-handle-bbce2cc58d5af798","name":"test-name-bbce2cc58d5af798"},"type":"team"}}' + string: '{"data":{"attributes":{"handle":"test-handle-9b417dea223136e8","name":"test-name-9b417dea223136e8"},"type":"team"}}' headers: Accept: - application/json @@ -40,21 +40,19 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"team","id":"dba59993-2c99-46f0-b91b-9e7936a4a78e","attributes":{"name":"test-name-bbce2cc58d5af798","handle":"test-handle-bbce2cc58d5af798","summary":null,"description":null,"avatar":null,"banner":9,"visible_modules":[],"hidden_modules":[],"created_at":"2025-05-29T04:53:53.543425+00:00","modified_at":"2025-05-29T04:53:53.543434+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/dba59993-2c99-46f0-b91b-9e7936a4a78e/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/dba59993-2c99-46f0-b91b-9e7936a4a78e/permission-settings"}}}}} - - ' + string: '{"data":{"id":"bf2fad34-c495-4de0-b1ec-c5727a2ae216","type":"team","attributes":{"avatar":null,"banner":8,"created_at":"2025-11-27T14:11:34.252521+00:00","description":null,"handle":"test-handle-9b417dea223136e8","hidden_modules":[],"link_count":0,"modified_at":"2025-11-27T14:11:34.252521+00:00","name":"test-name-9b417dea223136e8","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/bf2fad34-c495-4de0-b1ec-c5727a2ae216/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/bf2fad34-c495-4de0-b1ec-c5727a2ae216/permission-settings"}}}}}' headers: Content-Type: - - application/json + - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:53:52 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:33 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T04:53:52.267Z","end_date":"2025-06-08T04:53:52.267Z","interval":{"days":1},"members":[{"user":{"id":"eb22c300-3c48-11f0-b6eb-6e406f40657f"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T04:53:52.267Z"}],"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1748494432","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:33.368Z","end_date":"2025-12-07T14:11:33.368Z","interval":{"days":1},"members":[{"user":{"id":"fa8dbd27-cb9a-11f0-84fc-d6e063989c3f"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:33.368Z"}],"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1764252693","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: Accept: - application/json @@ -65,18 +63,18 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"996bb88f-ddaf-491b-84df-b8c60c9c358a","type":"schedules","attributes":{"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1748494432","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"016cfd54-38ec-4d23-938b-f07e8643a3f7","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"d8834350-ae3c-45eb-ad84-9f9a3cef46f3","type":"schedules","attributes":{"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1764252693","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"8d44f496-4fe0-4cc9-b3d7-81bbc3e68464","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:53:52 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:33 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1748494432","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"dba59993-2c99-46f0-b91b-9e7936a4a78e","type":"teams"},{"id":"996bb88f-ddaf-491b-84df-b8c60c9c358a","type":"schedules"},{"id":"eb22c300-3c48-11f0-b6eb-6e406f40657f","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"dba59993-2c99-46f0-b91b-9e7936a4a78e","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"dba59993-2c99-46f0-b91b-9e7936a4a78e","type":"teams"}]}},"type":"policies"}}' + string: '{"data":{"attributes":{"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1764252693","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"bf2fad34-c495-4de0-b1ec-c5727a2ae216","type":"teams"},{"id":"d8834350-ae3c-45eb-ad84-9f9a3cef46f3","type":"schedules"},{"config":{"schedule":{"position":"previous"}},"id":"d8834350-ae3c-45eb-ad84-9f9a3cef46f3","type":"schedules"},{"id":"fa8dbd27-cb9a-11f0-84fc-d6e063989c3f","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"bf2fad34-c495-4de0-b1ec-c5727a2ae216","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"bf2fad34-c495-4de0-b1ec-c5727a2ae216","type":"teams"}]}},"type":"policies"}}' headers: Accept: - application/json @@ -87,39 +85,39 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"e75b436d-cbb7-44d6-bf87-4f53073a5bb5","type":"policies","attributes":{"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1748494432","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"c4cd74b1-1eb4-48a7-9fc0-a66f4e12919b","type":"steps"},{"id":"f11818e3-db9e-4601-b1e1-391fa54b6087","type":"steps"}]},"teams":{"data":[{"id":"dba59993-2c99-46f0-b91b-9e7936a4a78e","type":"teams"}]}}}}' + string: '{"data":{"id":"7e36daf1-25ef-46af-ba33-23aac9271dc5","type":"policies","attributes":{"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1764252693","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"e4f3f753-15bd-4649-bdeb-70011094d294","type":"steps"},{"id":"984250f3-e780-4aae-80c1-143859d0f14b","type":"steps"}]},"teams":{"data":[{"id":"bf2fad34-c495-4de0-b1ec-c5727a2ae216","type":"teams"}]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:53:52 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:33 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/e75b436d-cbb7-44d6-bf87-4f53073a5bb5?include=steps.targets + uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/7e36daf1-25ef-46af-ba33-23aac9271dc5?include=steps.targets response: body: encoding: UTF-8 - string: '{"data":{"id":"e75b436d-cbb7-44d6-bf87-4f53073a5bb5","type":"policies","attributes":{"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1748494432","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"c4cd74b1-1eb4-48a7-9fc0-a66f4e12919b","type":"steps"},{"id":"f11818e3-db9e-4601-b1e1-391fa54b6087","type":"steps"}]},"teams":{"data":[{"id":"dba59993-2c99-46f0-b91b-9e7936a4a78e","type":"teams"}]}}},"included":[{"id":"c4cd74b1-1eb4-48a7-9fc0-a66f4e12919b","type":"steps","attributes":{"assignment":"default","escalate_after_seconds":3600},"relationships":{"targets":{"data":[{"id":"dba59993-2c99-46f0-b91b-9e7936a4a78e","type":"teams"},{"id":"996bb88f-ddaf-491b-84df-b8c60c9c358a","type":"schedules"},{"id":"eb22c300-3c48-11f0-b6eb-6e406f40657f","type":"users"}]}}},{"id":"f11818e3-db9e-4601-b1e1-391fa54b6087","type":"steps","attributes":{"assignment":"round-robin","escalate_after_seconds":3600},"relationships":{"targets":{"data":[{"id":"dba59993-2c99-46f0-b91b-9e7936a4a78e","type":"teams"}]}}},{"id":"996bb88f-ddaf-491b-84df-b8c60c9c358a","type":"schedules","attributes":{"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1748494432","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"016cfd54-38ec-4d23-938b-f07e8643a3f7","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}},{"id":"eb22c300-3c48-11f0-b6eb-6e406f40657f","type":"users","attributes":{"email":"test-get_on_call_escalation_policy_returns_ok_response-1748494432@datadoghq.com","name":"","status":"pending"}},{"id":"dba59993-2c99-46f0-b91b-9e7936a4a78e","type":"teams","attributes":{"avatar":"","description":"","handle":"test-handle-bbce2cc58d5af798","name":"test-name-bbce2cc58d5af798"}}]}' + string: '{"data":{"id":"7e36daf1-25ef-46af-ba33-23aac9271dc5","type":"policies","attributes":{"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1764252693","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"e4f3f753-15bd-4649-bdeb-70011094d294","type":"steps"},{"id":"984250f3-e780-4aae-80c1-143859d0f14b","type":"steps"}]},"teams":{"data":[{"id":"bf2fad34-c495-4de0-b1ec-c5727a2ae216","type":"teams"}]}}},"included":[{"id":"e4f3f753-15bd-4649-bdeb-70011094d294","type":"steps","attributes":{"assignment":"default","escalate_after_seconds":3600},"relationships":{"targets":{"data":[{"id":"bf2fad34-c495-4de0-b1ec-c5727a2ae216","type":"teams"},{"id":"d8834350-ae3c-45eb-ad84-9f9a3cef46f3","type":"schedules"},{"id":"d8834350-ae3c-45eb-ad84-9f9a3cef46f3_previous","type":"schedule_target"},{"id":"fa8dbd27-cb9a-11f0-84fc-d6e063989c3f","type":"users"}]}}},{"id":"d8834350-ae3c-45eb-ad84-9f9a3cef46f3_previous","type":"schedule_target","attributes":{"position":"previous"},"relationships":{"schedule":{"data":{"id":"d8834350-ae3c-45eb-ad84-9f9a3cef46f3","type":"schedules"}}}},{"id":"984250f3-e780-4aae-80c1-143859d0f14b","type":"steps","attributes":{"assignment":"round-robin","escalate_after_seconds":3600},"relationships":{"targets":{"data":[{"id":"bf2fad34-c495-4de0-b1ec-c5727a2ae216","type":"teams"}]}}},{"id":"bf2fad34-c495-4de0-b1ec-c5727a2ae216","type":"teams","attributes":{"avatar":"","description":"","handle":"test-handle-9b417dea223136e8","name":"test-name-9b417dea223136e8"}},{"id":"d8834350-ae3c-45eb-ad84-9f9a3cef46f3","type":"schedules","attributes":{"name":"Test-Get_On_Call_escalation_policy_returns_OK_response-1764252693","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"8d44f496-4fe0-4cc9-b3d7-81bbc3e68464","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}},{"id":"fa8dbd27-cb9a-11f0-84fc-d6e063989c3f","type":"users","attributes":{"email":"test-get_on_call_escalation_policy_returns_ok_response-1764252693@datadoghq.com","name":"","status":"pending"}}]}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Thu, 29 May 2025 04:53:52 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:33 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/e75b436d-cbb7-44d6-bf87-4f53073a5bb5 + uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/7e36daf1-25ef-46af-ba33-23aac9271dc5 response: body: encoding: UTF-8 @@ -128,14 +126,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 29 May 2025 04:53:52 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:33 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/996bb88f-ddaf-491b-84df-b8c60c9c358a + uri: https://api.datadoghq.com/api/v2/on-call/schedules/d8834350-ae3c-45eb-ad84-9f9a3cef46f3 response: body: encoding: UTF-8 @@ -144,14 +142,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 29 May 2025 04:53:52 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:33 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/dba59993-2c99-46f0-b91b-9e7936a4a78e + uri: https://api.datadoghq.com/api/v2/team/bf2fad34-c495-4de0-b1ec-c5727a2ae216 response: body: encoding: UTF-8 @@ -160,14 +158,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 29 May 2025 04:53:52 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:33 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/eb22c300-3c48-11f0-b6eb-6e406f40657f + uri: https://api.datadoghq.com/api/v2/users/fa8dbd27-cb9a-11f0-84fc-d6e063989c3f response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/on-call/Get-On-Call-schedule-returns-OK-response.frozen b/cassettes/features/v2/on-call/Get-On-Call-schedule-returns-OK-response.frozen index 0279e1e8caf..e4e809a1e35 100644 --- a/cassettes/features/v2/on-call/Get-On-Call-schedule-returns-OK-response.frozen +++ b/cassettes/features/v2/on-call/Get-On-Call-schedule-returns-OK-response.frozen @@ -1 +1 @@ -2025-05-29T04:53:58.508Z \ No newline at end of file +2025-11-27T14:11:37.612Z \ No newline at end of file diff --git a/cassettes/features/v2/on-call/Get-On-Call-schedule-returns-OK-response.yml b/cassettes/features/v2/on-call/Get-On-Call-schedule-returns-OK-response.yml index 6b9bd3cb6ea..a7af15423a9 100644 --- a/cassettes/features/v2/on-call/Get-On-Call-schedule-returns-OK-response.yml +++ b/cassettes/features/v2/on-call/Get-On-Call-schedule-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Thu, 29 May 2025 04:53:58 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:37 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Get_On_Call_schedule_returns_OK_response-1748494438@datadoghq.com","title":"user + string: '{"data":{"attributes":{"email":"Test-Get_On_Call_schedule_returns_OK_response-1764252697@datadoghq.com","title":"user title"},"type":"users"}}' headers: Accept: @@ -15,8 +15,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"users","id":"eedd114a-3c48-11f0-927d-aedf77869272","attributes":{"name":null,"handle":"test-get_on_call_schedule_returns_ok_response-1748494438@datadoghq.com","created_at":"2025-05-29T04:53:59.126285+00:00","modified_at":"2025-05-29T04:53:59.126285+00:00","email":"test-get_on_call_schedule_returns_ok_response-1748494438@datadoghq.com","icon":"https://secure.gravatar.com/avatar/0accc7b5a2e934dd438cd3b30841dcad?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + string: '{"data":{"type":"users","id":"fd12eb55-cb9a-11f0-8fcd-5ac0b02adf59","attributes":{"name":null,"handle":"test-get_on_call_schedule_returns_ok_response-1764252697@datadoghq.com","created_at":"2025-11-27T14:11:37.976362+00:00","modified_at":"2025-11-27T14:11:37.976362+00:00","email":"test-get_on_call_schedule_returns_ok_response-1764252697@datadoghq.com","icon":"https://secure.gravatar.com/avatar/56aea300d0912ed694b8ff04cfcc86aa?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' headers: @@ -25,12 +25,12 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:53:58 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:37 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T04:53:58.508Z","end_date":"2025-06-08T04:53:58.508Z","interval":{"days":1},"members":[{"user":{"id":"eedd114a-3c48-11f0-927d-aedf77869272"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T04:53:58.508Z"}],"name":"Test-Get_On_Call_schedule_returns_OK_response-1748494438","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:37.612Z","end_date":"2025-12-07T14:11:37.612Z","interval":{"days":1},"members":[{"user":{"id":"fd12eb55-cb9a-11f0-8fcd-5ac0b02adf59"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:37.612Z"}],"name":"Test-Get_On_Call_schedule_returns_OK_response-1764252697","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: Accept: - application/json @@ -41,39 +41,39 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"cec4edfd-3f99-4da9-bd71-75c80c5629f8","type":"schedules","attributes":{"name":"Test-Get_On_Call_schedule_returns_OK_response-1748494438","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"9f5d591e-e81b-4262-b0cd-145b52b9f23f","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"ba513209-ef94-4826-8511-1c5ccb912070","type":"schedules","attributes":{"name":"Test-Get_On_Call_schedule_returns_OK_response-1764252697","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"9bb587a7-8302-49f3-8130-cb417de4ecd5","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:53:58 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:37 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/on-call/schedules/cec4edfd-3f99-4da9-bd71-75c80c5629f8 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/ba513209-ef94-4826-8511-1c5ccb912070 response: body: encoding: UTF-8 - string: '{"data":{"id":"cec4edfd-3f99-4da9-bd71-75c80c5629f8","type":"schedules","attributes":{"name":"Test-Get_On_Call_schedule_returns_OK_response-1748494438","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"9f5d591e-e81b-4262-b0cd-145b52b9f23f","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"ba513209-ef94-4826-8511-1c5ccb912070","type":"schedules","attributes":{"name":"Test-Get_On_Call_schedule_returns_OK_response-1764252697","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"9bb587a7-8302-49f3-8130-cb417de4ecd5","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Thu, 29 May 2025 04:53:58 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:37 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/cec4edfd-3f99-4da9-bd71-75c80c5629f8 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/ba513209-ef94-4826-8511-1c5ccb912070 response: body: encoding: UTF-8 @@ -82,14 +82,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 29 May 2025 04:53:58 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:37 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/eedd114a-3c48-11f0-927d-aedf77869272 + uri: https://api.datadoghq.com/api/v2/users/fd12eb55-cb9a-11f0-8fcd-5ac0b02adf59 response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/on-call/Get-team-on-call-users-returns-OK-response.frozen b/cassettes/features/v2/on-call/Get-team-on-call-users-returns-OK-response.frozen index a02b74ff966..899352609f4 100644 --- a/cassettes/features/v2/on-call/Get-team-on-call-users-returns-OK-response.frozen +++ b/cassettes/features/v2/on-call/Get-team-on-call-users-returns-OK-response.frozen @@ -1 +1 @@ -2025-11-18T12:44:29.751Z \ No newline at end of file +2025-11-27T14:11:42.299Z \ No newline at end of file diff --git a/cassettes/features/v2/on-call/Get-team-on-call-users-returns-OK-response.yml b/cassettes/features/v2/on-call/Get-team-on-call-users-returns-OK-response.yml index 8aea398b4eb..b35c5be32fe 100644 --- a/cassettes/features/v2/on-call/Get-team-on-call-users-returns-OK-response.yml +++ b/cassettes/features/v2/on-call/Get-team-on-call-users-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Tue, 18 Nov 2025 12:44:29 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:42 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Get_team_on_call_users_returns_OK_response-1763469869@datadoghq.com","title":"user + string: '{"data":{"attributes":{"email":"Test-Get_team_on_call_users_returns_OK_response-1764252702@datadoghq.com","title":"user title"},"type":"users"}}' headers: Accept: @@ -15,7 +15,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"users","id":"537c2919-c47c-11f0-9b08-ce88c9776d95","attributes":{"name":null,"handle":"test-get_team_on_call_users_returns_ok_response-1763469869@datadoghq.com","created_at":"2025-11-18T12:44:30.412060+00:00","modified_at":"2025-11-18T12:44:30.412060+00:00","email":"test-get_team_on_call_users_returns_ok_response-1763469869@datadoghq.com","icon":"https://secure.gravatar.com/avatar/e1a08271c5b3a54aaa074185b1550add?s=48&d=retro","title":"user + string: '{"data":{"type":"users","id":"ffde914a-cb9a-11f0-ae87-2a5e5028fcef","attributes":{"name":null,"handle":"test-get_team_on_call_users_returns_ok_response-1764252702@datadoghq.com","created_at":"2025-11-27T14:11:42.666467+00:00","modified_at":"2025-11-27T14:11:42.666467+00:00","email":"test-get_team_on_call_users_returns_ok_response-1764252702@datadoghq.com","icon":"https://secure.gravatar.com/avatar/0bc277f36ed2ab487375205fafaaebc7?s=48&d=retro","title":"user title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' @@ -25,11 +25,11 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Tue, 18 Nov 2025 12:44:29 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:42 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"handle":"test-handle-b0479fe6a2cd9873","name":"test-name-b0479fe6a2cd9873"},"type":"team"}}' + string: '{"data":{"attributes":{"handle":"test-handle-ecfc4ff61997ed40","name":"test-name-ecfc4ff61997ed40"},"type":"team"}}' headers: Accept: - application/json @@ -40,19 +40,19 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"team","attributes":{"avatar":null,"banner":15,"created_at":"2025-11-18T12:44:31.250613+00:00","description":null,"handle":"test-handle-b0479fe6a2cd9873","hidden_modules":[],"link_count":0,"modified_at":"2025-11-18T12:44:31.250613+00:00","name":"test-name-b0479fe6a2cd9873","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/11ba6480-761b-4dbd-b4a0-c77a9df6740c/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/11ba6480-761b-4dbd-b4a0-c77a9df6740c/permission-settings"}}}}}' + string: '{"data":{"id":"fc8f8844-54c3-4898-aabc-68d6fccbe20e","type":"team","attributes":{"avatar":null,"banner":11,"created_at":"2025-11-27T14:11:43.090563+00:00","description":null,"handle":"test-handle-ecfc4ff61997ed40","hidden_modules":[],"link_count":0,"modified_at":"2025-11-27T14:11:43.090563+00:00","name":"test-name-ecfc4ff61997ed40","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/fc8f8844-54c3-4898-aabc-68d6fccbe20e/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/fc8f8844-54c3-4898-aabc-68d6fccbe20e/permission-settings"}}}}}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Tue, 18 Nov 2025 12:44:29 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:42 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-08T12:44:29.751Z","end_date":"2025-11-28T12:44:29.751Z","interval":{"days":1},"members":[{"user":{"id":"537c2919-c47c-11f0-9b08-ce88c9776d95"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-13T12:44:29.751Z"}],"name":"Test-Get_team_on_call_users_returns_OK_response-1763469869","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:42.299Z","end_date":"2025-12-07T14:11:42.299Z","interval":{"days":1},"members":[{"user":{"id":"ffde914a-cb9a-11f0-ae87-2a5e5028fcef"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:42.299Z"}],"name":"Test-Get_team_on_call_users_returns_OK_response-1764252702","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: Accept: - application/json @@ -63,18 +63,18 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"3be141a8-848d-4af1-86de-e5d76cd6e4fc","type":"schedules","attributes":{"name":"Test-Get_team_on_call_users_returns_OK_response-1763469869","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"0c2a552f-a2e0-47ca-ad8b-4407608b3f67","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"4325ddef-dc72-4609-90c2-01167759f277","type":"schedules","attributes":{"name":"Test-Get_team_on_call_users_returns_OK_response-1764252702","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"86d3719a-7516-46f0-bfc4-2bd40ad1b855","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Tue, 18 Nov 2025 12:44:29 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:42 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Get_team_on_call_users_returns_OK_response-1763469869","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"teams"},{"id":"3be141a8-848d-4af1-86de-e5d76cd6e4fc","type":"schedules"},{"id":"537c2919-c47c-11f0-9b08-ce88c9776d95","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"teams"}]}},"type":"policies"}}' + string: '{"data":{"attributes":{"name":"Test-Get_team_on_call_users_returns_OK_response-1764252702","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"fc8f8844-54c3-4898-aabc-68d6fccbe20e","type":"teams"},{"id":"4325ddef-dc72-4609-90c2-01167759f277","type":"schedules"},{"config":{"schedule":{"position":"previous"}},"id":"4325ddef-dc72-4609-90c2-01167759f277","type":"schedules"},{"id":"ffde914a-cb9a-11f0-ae87-2a5e5028fcef","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"fc8f8844-54c3-4898-aabc-68d6fccbe20e","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"fc8f8844-54c3-4898-aabc-68d6fccbe20e","type":"teams"}]}},"type":"policies"}}' headers: Accept: - application/json @@ -85,83 +85,83 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"5fe7a7c8-a2c1-4f07-9510-a5d483df5ae7","type":"policies","attributes":{"name":"Test-Get_team_on_call_users_returns_OK_response-1763469869","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"11f436b4-85bf-47c8-ab21-e851974ccf60","type":"steps"},{"id":"6f0da5a9-4b7d-4d12-a859-4799599f074d","type":"steps"}]},"teams":{"data":[{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"teams"}]}}}}' + string: '{"data":{"id":"5a7ecb26-4ebe-4496-bcfb-ff30c655a1a9","type":"policies","attributes":{"name":"Test-Get_team_on_call_users_returns_OK_response-1764252702","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"2694ac87-8900-4b0f-a108-fb8961c7ef89","type":"steps"},{"id":"e41057da-895e-4a23-81f2-617f61c53a84","type":"steps"}]},"teams":{"data":[{"id":"fc8f8844-54c3-4898-aabc-68d6fccbe20e","type":"teams"}]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Tue, 18 Nov 2025 12:44:29 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:42 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"rules":[{"actions":[],"policy_id":"5fe7a7c8-a2c1-4f07-9510-a5d483df5ae7","query":"","urgency":"low"}]},"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"team_routing_rules"}}' + string: '{"data":{"attributes":{"rules":[{"actions":[],"policy_id":"5a7ecb26-4ebe-4496-bcfb-ff30c655a1a9","query":"","urgency":"low"}]},"id":"fc8f8844-54c3-4898-aabc-68d6fccbe20e","type":"team_routing_rules"}}' headers: Accept: - application/json Content-Type: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/on-call/teams/11ba6480-761b-4dbd-b4a0-c77a9df6740c/routing-rules + uri: https://api.datadoghq.com/api/v2/on-call/teams/fc8f8844-54c3-4898-aabc-68d6fccbe20e/routing-rules response: body: encoding: UTF-8 - string: '{"data":{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"team_routing_rules","relationships":{"rules":{"data":[{"id":"virtual-11ba6480-761b-4dbd-b4a0-c77a9df6740c-rule-0","type":"team_routing_rules"}]}}}}' + string: '{"data":{"id":"fc8f8844-54c3-4898-aabc-68d6fccbe20e","type":"team_routing_rules","relationships":{"rules":{"data":[{"id":"virtual-fc8f8844-54c3-4898-aabc-68d6fccbe20e-rule-0","type":"team_routing_rules"}]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Tue, 18 Nov 2025 12:44:29 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:42 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/on-call/teams/11ba6480-761b-4dbd-b4a0-c77a9df6740c/on-call?include=responders%2Cescalations.responders + uri: https://api.datadoghq.com/api/v2/on-call/teams/fc8f8844-54c3-4898-aabc-68d6fccbe20e/on-call?include=responders%2Cescalations.responders response: body: encoding: UTF-8 - string: '{"data":{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c-1763469873","type":"team_oncall_responders","relationships":{"escalations":{"data":[]},"responders":{"data":[{"id":"537c2919-c47c-11f0-9b08-ce88c9776d95","type":"users"}]}}},"included":[{"id":"537c2919-c47c-11f0-9b08-ce88c9776d95","type":"users","attributes":{"email":"test-get_team_on_call_users_returns_ok_response-1763469869@datadoghq.com","name":"","status":"pending"}}]}' + string: '{"data":{"id":"fc8f8844-54c3-4898-aabc-68d6fccbe20e-1764252704","type":"team_oncall_responders","relationships":{"escalations":{"data":[]},"responders":{"data":[{"id":"ffde914a-cb9a-11f0-ae87-2a5e5028fcef","type":"users"}]}}},"included":[{"id":"ffde914a-cb9a-11f0-ae87-2a5e5028fcef","type":"users","attributes":{"email":"test-get_team_on_call_users_returns_ok_response-1764252702@datadoghq.com","name":"","status":"pending"}}]}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Tue, 18 Nov 2025 12:44:29 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:42 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"rules":[]},"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"team_routing_rules"}}' + string: '{"data":{"attributes":{"rules":[]},"id":"fc8f8844-54c3-4898-aabc-68d6fccbe20e","type":"team_routing_rules"}}' headers: Accept: - application/json Content-Type: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/on-call/teams/11ba6480-761b-4dbd-b4a0-c77a9df6740c/routing-rules + uri: https://api.datadoghq.com/api/v2/on-call/teams/fc8f8844-54c3-4898-aabc-68d6fccbe20e/routing-rules response: body: encoding: UTF-8 - string: '{"data":{"id":"11ba6480-761b-4dbd-b4a0-c77a9df6740c","type":"team_routing_rules","relationships":{"rules":{"data":[]}}}}' + string: '{"data":{"id":"fc8f8844-54c3-4898-aabc-68d6fccbe20e","type":"team_routing_rules","relationships":{"rules":{"data":[]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Tue, 18 Nov 2025 12:44:29 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:42 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/5fe7a7c8-a2c1-4f07-9510-a5d483df5ae7 + uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/5a7ecb26-4ebe-4496-bcfb-ff30c655a1a9 response: body: encoding: UTF-8 @@ -170,14 +170,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Tue, 18 Nov 2025 12:44:29 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:42 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/3be141a8-848d-4af1-86de-e5d76cd6e4fc + uri: https://api.datadoghq.com/api/v2/on-call/schedules/4325ddef-dc72-4609-90c2-01167759f277 response: body: encoding: UTF-8 @@ -186,14 +186,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Tue, 18 Nov 2025 12:44:29 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:42 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/11ba6480-761b-4dbd-b4a0-c77a9df6740c + uri: https://api.datadoghq.com/api/v2/team/fc8f8844-54c3-4898-aabc-68d6fccbe20e response: body: encoding: UTF-8 @@ -202,14 +202,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Tue, 18 Nov 2025 12:44:29 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:42 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/537c2919-c47c-11f0-9b08-ce88c9776d95 + uri: https://api.datadoghq.com/api/v2/users/ffde914a-cb9a-11f0-ae87-2a5e5028fcef response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/on-call/Get-the-schedule-on-call-user-returns-OK-response.frozen b/cassettes/features/v2/on-call/Get-the-schedule-on-call-user-returns-OK-response.frozen index 1a1c3b8e706..baa8f4a5897 100644 --- a/cassettes/features/v2/on-call/Get-the-schedule-on-call-user-returns-OK-response.frozen +++ b/cassettes/features/v2/on-call/Get-the-schedule-on-call-user-returns-OK-response.frozen @@ -1 +1 @@ -2025-05-29T04:54:08.864Z \ No newline at end of file +2025-11-27T14:11:47.631Z \ No newline at end of file diff --git a/cassettes/features/v2/on-call/Get-the-schedule-on-call-user-returns-OK-response.yml b/cassettes/features/v2/on-call/Get-the-schedule-on-call-user-returns-OK-response.yml index c76768516de..f84799dd309 100644 --- a/cassettes/features/v2/on-call/Get-the-schedule-on-call-user-returns-OK-response.yml +++ b/cassettes/features/v2/on-call/Get-the-schedule-on-call-user-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Thu, 29 May 2025 04:54:08 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:47 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Get_the_schedule_on_call_user_returns_OK_response-1748494448@datadoghq.com","title":"user + string: '{"data":{"attributes":{"email":"Test-Get_the_schedule_on_call_user_returns_OK_response-1764252707@datadoghq.com","title":"user title"},"type":"users"}}' headers: Accept: @@ -15,8 +15,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"users","id":"f506d945-3c48-11f0-b6eb-6e406f40657f","attributes":{"name":null,"handle":"test-get_the_schedule_on_call_user_returns_ok_response-1748494448@datadoghq.com","created_at":"2025-05-29T04:54:09.466437+00:00","modified_at":"2025-05-29T04:54:09.466437+00:00","email":"test-get_the_schedule_on_call_user_returns_ok_response-1748494448@datadoghq.com","icon":"https://secure.gravatar.com/avatar/6c6e9988bfb6ab3c5c5ae2111d47fc54?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + string: '{"data":{"type":"users","id":"030e767a-cb9b-11f0-8fcd-5ac0b02adf59","attributes":{"name":null,"handle":"test-get_the_schedule_on_call_user_returns_ok_response-1764252707@datadoghq.com","created_at":"2025-11-27T14:11:48.013486+00:00","modified_at":"2025-11-27T14:11:48.013486+00:00","email":"test-get_the_schedule_on_call_user_returns_ok_response-1764252707@datadoghq.com","icon":"https://secure.gravatar.com/avatar/a9e8940d153698e24c0b29024875d46f?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' headers: @@ -25,12 +25,12 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:54:08 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:47 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T04:54:08.864Z","end_date":"2025-06-08T04:54:08.864Z","interval":{"days":1},"members":[{"user":{"id":"f506d945-3c48-11f0-b6eb-6e406f40657f"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T04:54:08.864Z"}],"name":"Test-Get_the_schedule_on_call_user_returns_OK_response-1748494448","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:47.631Z","end_date":"2025-12-07T14:11:47.631Z","interval":{"days":1},"members":[{"user":{"id":"030e767a-cb9b-11f0-8fcd-5ac0b02adf59"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:47.631Z"}],"name":"Test-Get_the_schedule_on_call_user_returns_OK_response-1764252707","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: Accept: - application/json @@ -41,39 +41,39 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"3e8644f0-f579-4459-8cb3-e585cd817db1","type":"schedules","attributes":{"name":"Test-Get_the_schedule_on_call_user_returns_OK_response-1748494448","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"00847dac-89e7-4a60-8e72-9a5897a3a1e5","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"93a33505-71dc-4be4-a55d-95eb23b6b400","type":"schedules","attributes":{"name":"Test-Get_the_schedule_on_call_user_returns_OK_response-1764252707","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"c9addf6a-059c-4b07-aced-a2c287fd969f","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:54:08 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:47 GMT request: body: null headers: Accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/on-call/schedules/3e8644f0-f579-4459-8cb3-e585cd817db1/on-call + uri: https://api.datadoghq.com/api/v2/on-call/schedules/93a33505-71dc-4be4-a55d-95eb23b6b400/on-call response: body: encoding: UTF-8 - string: '{"data":{"id":"f506d945-3c48-11f0-b6eb-6e406f40657f-2025-05-29T00:54:10-04:00-2025-05-30T00:54:08-04:00","type":"shifts","attributes":{"end":"2025-05-30T00:54:08-04:00","start":"2025-05-29T00:54:10.138754-04:00"},"relationships":{"user":{"data":{"id":"f506d945-3c48-11f0-b6eb-6e406f40657f","type":"users"}}}}}' + string: '{"data":{"id":"030e767a-cb9b-11f0-8fcd-5ac0b02adf59-2025-11-27T09:11:48-05:00-2025-11-28T09:11:47-05:00","type":"shifts","attributes":{"end":"2025-11-28T09:11:47-05:00","start":"2025-11-27T09:11:48.47496-05:00"},"relationships":{"user":{"data":{"id":"030e767a-cb9b-11f0-8fcd-5ac0b02adf59","type":"users"}}}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Thu, 29 May 2025 04:54:08 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:47 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/3e8644f0-f579-4459-8cb3-e585cd817db1 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/93a33505-71dc-4be4-a55d-95eb23b6b400 response: body: encoding: UTF-8 @@ -82,14 +82,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 29 May 2025 04:54:08 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:47 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/f506d945-3c48-11f0-b6eb-6e406f40657f + uri: https://api.datadoghq.com/api/v2/users/030e767a-cb9b-11f0-8fcd-5ac0b02adf59 response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/on-call/Set-On-Call-team-routing-rules-returns-OK-response.frozen b/cassettes/features/v2/on-call/Set-On-Call-team-routing-rules-returns-OK-response.frozen index 2cf614d8066..7a29240030e 100644 --- a/cassettes/features/v2/on-call/Set-On-Call-team-routing-rules-returns-OK-response.frozen +++ b/cassettes/features/v2/on-call/Set-On-Call-team-routing-rules-returns-OK-response.frozen @@ -1 +1 @@ -2025-11-18T13:04:14.085Z \ No newline at end of file +2025-11-27T14:11:49.966Z \ No newline at end of file diff --git a/cassettes/features/v2/on-call/Set-On-Call-team-routing-rules-returns-OK-response.yml b/cassettes/features/v2/on-call/Set-On-Call-team-routing-rules-returns-OK-response.yml index a637f6d6e83..1b0da60b4aa 100644 --- a/cassettes/features/v2/on-call/Set-On-Call-team-routing-rules-returns-OK-response.yml +++ b/cassettes/features/v2/on-call/Set-On-Call-team-routing-rules-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Tue, 18 Nov 2025 13:04:14 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:49 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Set_On_Call_team_routing_rules_returns_OK_response-1763471054@datadoghq.com","title":"user + string: '{"data":{"attributes":{"email":"Test-Set_On_Call_team_routing_rules_returns_OK_response-1764252709@datadoghq.com","title":"user title"},"type":"users"}}' headers: Accept: @@ -15,7 +15,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"users","id":"15c47aed-c47f-11f0-9f0b-be6d33dcd787","attributes":{"name":null,"handle":"test-set_on_call_team_routing_rules_returns_ok_response-1763471054@datadoghq.com","created_at":"2025-11-18T13:04:15.357470+00:00","modified_at":"2025-11-18T13:04:15.357470+00:00","email":"test-set_on_call_team_routing_rules_returns_ok_response-1763471054@datadoghq.com","icon":"https://secure.gravatar.com/avatar/958eeb5c5b80b7b5b4ec2f1794031763?s=48&d=retro","title":"user + string: '{"data":{"type":"users","id":"0473ca92-cb9b-11f0-85f9-9a82ffe01443","attributes":{"name":null,"handle":"test-set_on_call_team_routing_rules_returns_ok_response-1764252709@datadoghq.com","created_at":"2025-11-27T14:11:50.355271+00:00","modified_at":"2025-11-27T14:11:50.355271+00:00","email":"test-set_on_call_team_routing_rules_returns_ok_response-1764252709@datadoghq.com","icon":"https://secure.gravatar.com/avatar/ad92f892fdf302962d879c0d02664d8e?s=48&d=retro","title":"user title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' @@ -25,11 +25,11 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Tue, 18 Nov 2025 13:04:14 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:49 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"handle":"test-handle-f77a37b001e848f1","name":"test-name-f77a37b001e848f1"},"type":"team"}}' + string: '{"data":{"attributes":{"handle":"test-handle-a7692378c203a880","name":"test-name-a7692378c203a880"},"type":"team"}}' headers: Accept: - application/json @@ -40,19 +40,19 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"8ab3f777-435e-42b6-8511-0c9020365b8d","type":"team","attributes":{"avatar":null,"banner":6,"created_at":"2025-11-18T13:04:15.712638+00:00","description":null,"handle":"test-handle-f77a37b001e848f1","hidden_modules":[],"link_count":0,"modified_at":"2025-11-18T13:04:15.712638+00:00","name":"test-name-f77a37b001e848f1","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/8ab3f777-435e-42b6-8511-0c9020365b8d/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/8ab3f777-435e-42b6-8511-0c9020365b8d/permission-settings"}}}}}' + string: '{"data":{"id":"ba4fe917-0da4-4b40-96da-f9d7306d97d8","type":"team","attributes":{"avatar":null,"banner":14,"created_at":"2025-11-27T14:11:50.842947+00:00","description":null,"handle":"test-handle-a7692378c203a880","hidden_modules":[],"link_count":0,"modified_at":"2025-11-27T14:11:50.842947+00:00","name":"test-name-a7692378c203a880","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/ba4fe917-0da4-4b40-96da-f9d7306d97d8/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/ba4fe917-0da4-4b40-96da-f9d7306d97d8/permission-settings"}}}}}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Tue, 18 Nov 2025 13:04:14 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:49 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-08T13:04:14.085Z","end_date":"2025-11-28T13:04:14.085Z","interval":{"days":1},"members":[{"user":{"id":"15c47aed-c47f-11f0-9f0b-be6d33dcd787"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-13T13:04:14.085Z"}],"name":"Test-Set_On_Call_team_routing_rules_returns_OK_response-1763471054","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:49.966Z","end_date":"2025-12-07T14:11:49.966Z","interval":{"days":1},"members":[{"user":{"id":"0473ca92-cb9b-11f0-85f9-9a82ffe01443"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:49.966Z"}],"name":"Test-Set_On_Call_team_routing_rules_returns_OK_response-1764252709","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: Accept: - application/json @@ -63,18 +63,18 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"10ab1649-e333-41ac-9271-3484b87939a7","type":"schedules","attributes":{"name":"Test-Set_On_Call_team_routing_rules_returns_OK_response-1763471054","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"f0e28d78-8563-4d83-8d67-0b079bd7fab7","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"1f9b0595-17a3-4d95-9b2e-edcea3b6e737","type":"schedules","attributes":{"name":"Test-Set_On_Call_team_routing_rules_returns_OK_response-1764252709","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"0eecb6fe-83c6-48c9-9e0e-82379498f733","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Tue, 18 Nov 2025 13:04:14 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:49 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Set_On_Call_team_routing_rules_returns_OK_response-1763471054","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"8ab3f777-435e-42b6-8511-0c9020365b8d","type":"teams"},{"id":"10ab1649-e333-41ac-9271-3484b87939a7","type":"schedules"},{"id":"15c47aed-c47f-11f0-9f0b-be6d33dcd787","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"8ab3f777-435e-42b6-8511-0c9020365b8d","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"8ab3f777-435e-42b6-8511-0c9020365b8d","type":"teams"}]}},"type":"policies"}}' + string: '{"data":{"attributes":{"name":"Test-Set_On_Call_team_routing_rules_returns_OK_response-1764252709","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"ba4fe917-0da4-4b40-96da-f9d7306d97d8","type":"teams"},{"id":"1f9b0595-17a3-4d95-9b2e-edcea3b6e737","type":"schedules"},{"config":{"schedule":{"position":"previous"}},"id":"1f9b0595-17a3-4d95-9b2e-edcea3b6e737","type":"schedules"},{"id":"0473ca92-cb9b-11f0-85f9-9a82ffe01443","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"ba4fe917-0da4-4b40-96da-f9d7306d97d8","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"ba4fe917-0da4-4b40-96da-f9d7306d97d8","type":"teams"}]}},"type":"policies"}}' headers: Accept: - application/json @@ -85,65 +85,65 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"ad66e3aa-4df4-4ab0-b928-03abd68cc44e","type":"policies","attributes":{"name":"Test-Set_On_Call_team_routing_rules_returns_OK_response-1763471054","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"975ba331-0aaa-4878-9660-c1f580b01711","type":"steps"},{"id":"4b342992-de9c-4163-9360-ee63a115519a","type":"steps"}]},"teams":{"data":[{"id":"8ab3f777-435e-42b6-8511-0c9020365b8d","type":"teams"}]}}}}' + string: '{"data":{"id":"66f0e922-2834-4d68-aa0b-98cc81fc2a9d","type":"policies","attributes":{"name":"Test-Set_On_Call_team_routing_rules_returns_OK_response-1764252709","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"533f661e-6a1f-4327-8d3f-035add94cff8","type":"steps"},{"id":"b8948730-6aec-4a51-8662-cce4026b94dc","type":"steps"}]},"teams":{"data":[{"id":"ba4fe917-0da4-4b40-96da-f9d7306d97d8","type":"teams"}]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Tue, 18 Nov 2025 13:04:14 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:49 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"rules":[{"actions":[{"channel":"channel","type":"send_slack_message","workspace":"workspace"}],"query":"tags.service:test","time_restriction":{"restrictions":[{"end_day":"monday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"},{"end_day":"tuesday","end_time":"17:00:00","start_day":"tuesday","start_time":"09:00:00"}],"time_zone":"Europe/Paris"}},{"policy_id":"ad66e3aa-4df4-4ab0-b928-03abd68cc44e","query":"","urgency":"low"}]},"id":"8ab3f777-435e-42b6-8511-0c9020365b8d","type":"team_routing_rules"}}' + string: '{"data":{"attributes":{"rules":[{"actions":[{"channel":"channel","type":"send_slack_message","workspace":"workspace"}],"query":"tags.service:test","time_restriction":{"restrictions":[{"end_day":"monday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"},{"end_day":"tuesday","end_time":"17:00:00","start_day":"tuesday","start_time":"09:00:00"}],"time_zone":"Europe/Paris"}},{"policy_id":"66f0e922-2834-4d68-aa0b-98cc81fc2a9d","query":"","urgency":"low"}]},"id":"ba4fe917-0da4-4b40-96da-f9d7306d97d8","type":"team_routing_rules"}}' headers: Accept: - application/json Content-Type: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/on-call/teams/8ab3f777-435e-42b6-8511-0c9020365b8d/routing-rules?include=rules + uri: https://api.datadoghq.com/api/v2/on-call/teams/ba4fe917-0da4-4b40-96da-f9d7306d97d8/routing-rules?include=rules response: body: encoding: UTF-8 - string: '{"data":{"id":"8ab3f777-435e-42b6-8511-0c9020365b8d","type":"team_routing_rules","relationships":{"rules":{"data":[{"id":"virtual-8ab3f777-435e-42b6-8511-0c9020365b8d-rule-0","type":"team_routing_rules"},{"id":"virtual-8ab3f777-435e-42b6-8511-0c9020365b8d-rule-1","type":"team_routing_rules"}]}}},"included":[{"id":"virtual-8ab3f777-435e-42b6-8511-0c9020365b8d-rule-0","type":"team_routing_rules","attributes":{"actions":[{"type":"send_slack_message","channel":"channel","workspace":"workspace"}],"query":"tags.service:test","time_restriction":{"time_zone":"Europe/Paris","restrictions":[{"start_time":"09:00:00","start_day":"monday","end_time":"17:00:00","end_day":"monday"},{"start_time":"09:00:00","start_day":"tuesday","end_time":"17:00:00","end_day":"tuesday"}]}},"relationships":{"policy":{"data":null}}},{"id":"virtual-8ab3f777-435e-42b6-8511-0c9020365b8d-rule-1","type":"team_routing_rules","attributes":{"actions":[],"query":"","urgency":"low"},"relationships":{"policy":{"data":{"id":"ad66e3aa-4df4-4ab0-b928-03abd68cc44e","type":"policies"}}}}]}' + string: '{"data":{"id":"ba4fe917-0da4-4b40-96da-f9d7306d97d8","type":"team_routing_rules","relationships":{"rules":{"data":[{"id":"virtual-ba4fe917-0da4-4b40-96da-f9d7306d97d8-rule-0","type":"team_routing_rules"},{"id":"virtual-ba4fe917-0da4-4b40-96da-f9d7306d97d8-rule-1","type":"team_routing_rules"}]}}},"included":[{"id":"virtual-ba4fe917-0da4-4b40-96da-f9d7306d97d8-rule-0","type":"team_routing_rules","attributes":{"actions":[{"type":"send_slack_message","channel":"channel","workspace":"workspace"}],"query":"tags.service:test","time_restriction":{"time_zone":"Europe/Paris","restrictions":[{"start_time":"09:00:00","start_day":"monday","end_time":"17:00:00","end_day":"monday"},{"start_time":"09:00:00","start_day":"tuesday","end_time":"17:00:00","end_day":"tuesday"}]}},"relationships":{"policy":{"data":null}}},{"id":"virtual-ba4fe917-0da4-4b40-96da-f9d7306d97d8-rule-1","type":"team_routing_rules","attributes":{"actions":[],"query":"","urgency":"low"},"relationships":{"policy":{"data":{"id":"66f0e922-2834-4d68-aa0b-98cc81fc2a9d","type":"policies"}}}}]}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Tue, 18 Nov 2025 13:04:14 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:49 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"rules":[]},"id":"8ab3f777-435e-42b6-8511-0c9020365b8d","type":"team_routing_rules"}}' + string: '{"data":{"attributes":{"rules":[]},"id":"ba4fe917-0da4-4b40-96da-f9d7306d97d8","type":"team_routing_rules"}}' headers: Accept: - application/json Content-Type: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/on-call/teams/8ab3f777-435e-42b6-8511-0c9020365b8d/routing-rules + uri: https://api.datadoghq.com/api/v2/on-call/teams/ba4fe917-0da4-4b40-96da-f9d7306d97d8/routing-rules response: body: encoding: UTF-8 - string: '{"data":{"id":"8ab3f777-435e-42b6-8511-0c9020365b8d","type":"team_routing_rules","relationships":{"rules":{"data":[]}}}}' + string: '{"data":{"id":"ba4fe917-0da4-4b40-96da-f9d7306d97d8","type":"team_routing_rules","relationships":{"rules":{"data":[]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Tue, 18 Nov 2025 13:04:14 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:49 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/ad66e3aa-4df4-4ab0-b928-03abd68cc44e + uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/66f0e922-2834-4d68-aa0b-98cc81fc2a9d response: body: encoding: UTF-8 @@ -152,14 +152,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Tue, 18 Nov 2025 13:04:14 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:49 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/10ab1649-e333-41ac-9271-3484b87939a7 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/1f9b0595-17a3-4d95-9b2e-edcea3b6e737 response: body: encoding: UTF-8 @@ -168,14 +168,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Tue, 18 Nov 2025 13:04:14 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:49 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/8ab3f777-435e-42b6-8511-0c9020365b8d + uri: https://api.datadoghq.com/api/v2/team/ba4fe917-0da4-4b40-96da-f9d7306d97d8 response: body: encoding: UTF-8 @@ -184,14 +184,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Tue, 18 Nov 2025 13:04:14 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:49 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/15c47aed-c47f-11f0-9f0b-be6d33dcd787 + uri: https://api.datadoghq.com/api/v2/users/0473ca92-cb9b-11f0-85f9-9a82ffe01443 response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/on-call/Update-On-Call-escalation-policy-returns-OK-response.frozen b/cassettes/features/v2/on-call/Update-On-Call-escalation-policy-returns-OK-response.frozen index dcfe9e95351..d64fddeda72 100644 --- a/cassettes/features/v2/on-call/Update-On-Call-escalation-policy-returns-OK-response.frozen +++ b/cassettes/features/v2/on-call/Update-On-Call-escalation-policy-returns-OK-response.frozen @@ -1 +1 @@ -2025-05-29T04:54:18.437Z \ No newline at end of file +2025-11-27T14:11:54.763Z \ No newline at end of file diff --git a/cassettes/features/v2/on-call/Update-On-Call-escalation-policy-returns-OK-response.yml b/cassettes/features/v2/on-call/Update-On-Call-escalation-policy-returns-OK-response.yml index 723dd5b670b..37bd4af9a8b 100644 --- a/cassettes/features/v2/on-call/Update-On-Call-escalation-policy-returns-OK-response.yml +++ b/cassettes/features/v2/on-call/Update-On-Call-escalation-policy-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Thu, 29 May 2025 04:54:18 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:54 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Update_On_Call_escalation_policy_returns_OK_response-1748494458@datadoghq.com","title":"user + string: '{"data":{"attributes":{"email":"Test-Update_On_Call_escalation_policy_returns_OK_response-1764252714@datadoghq.com","title":"user title"},"type":"users"}}' headers: Accept: @@ -15,8 +15,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"users","id":"fabd9ae0-3c48-11f0-b407-16d8dc894a02","attributes":{"name":null,"handle":"test-update_on_call_escalation_policy_returns_ok_response-1748494458@datadoghq.com","created_at":"2025-05-29T04:54:19.052756+00:00","modified_at":"2025-05-29T04:54:19.052756+00:00","email":"test-update_on_call_escalation_policy_returns_ok_response-1748494458@datadoghq.com","icon":"https://secure.gravatar.com/avatar/cf87c53bf68b572610145962e6965e0c?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + string: '{"data":{"type":"users","id":"074d412b-cb9b-11f0-85f9-9a82ffe01443","attributes":{"name":null,"handle":"test-update_on_call_escalation_policy_returns_ok_response-1764252714@datadoghq.com","created_at":"2025-11-27T14:11:55.135880+00:00","modified_at":"2025-11-27T14:11:55.135880+00:00","email":"test-update_on_call_escalation_policy_returns_ok_response-1764252714@datadoghq.com","icon":"https://secure.gravatar.com/avatar/56710b9d4c6476f7e9cb32cf32f2d8fa?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' headers: @@ -25,11 +25,11 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:54:18 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:54 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"handle":"test-handle-e987bfc60cf27d84","name":"test-name-e987bfc60cf27d84"},"type":"team"}}' + string: '{"data":{"attributes":{"handle":"test-handle-87ae65b051bd37ef","name":"test-name-87ae65b051bd37ef"},"type":"team"}}' headers: Accept: - application/json @@ -40,21 +40,19 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"team","id":"37ea8c60-77bd-4154-ba2e-ac59d25541c6","attributes":{"name":"test-name-e987bfc60cf27d84","handle":"test-handle-e987bfc60cf27d84","summary":null,"description":null,"avatar":null,"banner":3,"visible_modules":[],"hidden_modules":[],"created_at":"2025-05-29T04:54:19.729870+00:00","modified_at":"2025-05-29T04:54:19.729879+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/37ea8c60-77bd-4154-ba2e-ac59d25541c6/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/37ea8c60-77bd-4154-ba2e-ac59d25541c6/permission-settings"}}}}} - - ' + string: '{"data":{"id":"f38d82f9-3de9-4a4a-8a48-650c0b19151f","type":"team","attributes":{"avatar":null,"banner":11,"created_at":"2025-11-27T14:11:55.632151+00:00","description":null,"handle":"test-handle-87ae65b051bd37ef","hidden_modules":[],"link_count":0,"modified_at":"2025-11-27T14:11:55.632152+00:00","name":"test-name-87ae65b051bd37ef","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/f38d82f9-3de9-4a4a-8a48-650c0b19151f/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/f38d82f9-3de9-4a4a-8a48-650c0b19151f/permission-settings"}}}}}' headers: Content-Type: - - application/json + - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:54:18 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:54 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T04:54:18.437Z","end_date":"2025-06-08T04:54:18.437Z","interval":{"days":1},"members":[{"user":{"id":"fabd9ae0-3c48-11f0-b407-16d8dc894a02"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T04:54:18.437Z"}],"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1748494458","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:54.763Z","end_date":"2025-12-07T14:11:54.763Z","interval":{"days":1},"members":[{"user":{"id":"074d412b-cb9b-11f0-85f9-9a82ffe01443"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:54.763Z"}],"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1764252714","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: Accept: - application/json @@ -65,18 +63,18 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"f8a9543a-dc0f-4d81-bb16-7054201fa099","type":"schedules","attributes":{"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1748494458","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"f2cc2a31-c4f9-40bf-9820-93af15c77625","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"1ab20921-4556-4f30-80df-e1ce748c3fc1","type":"schedules","attributes":{"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1764252714","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"94644551-c1bd-4b16-8774-ddbf0b6ce12c","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:54:18 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:54 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1748494458","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"37ea8c60-77bd-4154-ba2e-ac59d25541c6","type":"teams"},{"id":"f8a9543a-dc0f-4d81-bb16-7054201fa099","type":"schedules"},{"id":"fabd9ae0-3c48-11f0-b407-16d8dc894a02","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"37ea8c60-77bd-4154-ba2e-ac59d25541c6","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"37ea8c60-77bd-4154-ba2e-ac59d25541c6","type":"teams"}]}},"type":"policies"}}' + string: '{"data":{"attributes":{"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1764252714","resolve_page_on_policy_end":true,"retries":2,"steps":[{"assignment":"default","escalate_after_seconds":3600,"targets":[{"id":"f38d82f9-3de9-4a4a-8a48-650c0b19151f","type":"teams"},{"id":"1ab20921-4556-4f30-80df-e1ce748c3fc1","type":"schedules"},{"config":{"schedule":{"position":"previous"}},"id":"1ab20921-4556-4f30-80df-e1ce748c3fc1","type":"schedules"},{"id":"074d412b-cb9b-11f0-85f9-9a82ffe01443","type":"users"}]},{"assignment":"round-robin","escalate_after_seconds":3600,"targets":[{"id":"f38d82f9-3de9-4a4a-8a48-650c0b19151f","type":"teams"}]}]},"relationships":{"teams":{"data":[{"id":"f38d82f9-3de9-4a4a-8a48-650c0b19151f","type":"teams"}]}},"type":"policies"}}' headers: Accept: - application/json @@ -87,43 +85,43 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"05ee91ac-c049-4e7c-b43b-3f673a7ce96d","type":"policies","attributes":{"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1748494458","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"6a0d2106-0430-4211-af70-54ea18031d0d","type":"steps"},{"id":"f4c4d70e-72e5-4f5c-89fb-bf7aea612c1b","type":"steps"}]},"teams":{"data":[{"id":"37ea8c60-77bd-4154-ba2e-ac59d25541c6","type":"teams"}]}}}}' + string: '{"data":{"id":"b20fdf89-f87f-4237-8f19-ed8c9c57cf5c","type":"policies","attributes":{"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1764252714","resolve_page_on_policy_end":true,"retries":2},"relationships":{"steps":{"data":[{"id":"6d4b5398-50bf-425d-93b8-3eae379ff8a0","type":"steps"},{"id":"b3f4a0dd-337f-42b7-9fda-b2f4486e700f","type":"steps"}]},"teams":{"data":[{"id":"f38d82f9-3de9-4a4a-8a48-650c0b19151f","type":"teams"}]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Thu, 29 May 2025 04:54:18 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:54 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1748494458-updated","resolve_page_on_policy_end":false,"retries":0,"steps":[{"assignment":"default","escalate_after_seconds":3600,"id":"6a0d2106-0430-4211-af70-54ea18031d0d","targets":[{"id":"fabd9ae0-3c48-11f0-b407-16d8dc894a02","type":"users"}]}]},"id":"05ee91ac-c049-4e7c-b43b-3f673a7ce96d","relationships":{"teams":{"data":[{"id":"37ea8c60-77bd-4154-ba2e-ac59d25541c6","type":"teams"}]}},"type":"policies"}}' + string: '{"data":{"attributes":{"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1764252714-updated","resolve_page_on_policy_end":false,"retries":0,"steps":[{"assignment":"default","escalate_after_seconds":3600,"id":"6d4b5398-50bf-425d-93b8-3eae379ff8a0","targets":[{"id":"074d412b-cb9b-11f0-85f9-9a82ffe01443","type":"users"}]}]},"id":"b20fdf89-f87f-4237-8f19-ed8c9c57cf5c","relationships":{"teams":{"data":[{"id":"f38d82f9-3de9-4a4a-8a48-650c0b19151f","type":"teams"}]}},"type":"policies"}}' headers: Accept: - application/json Content-Type: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/05ee91ac-c049-4e7c-b43b-3f673a7ce96d + uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/b20fdf89-f87f-4237-8f19-ed8c9c57cf5c response: body: encoding: UTF-8 - string: '{"data":{"id":"05ee91ac-c049-4e7c-b43b-3f673a7ce96d","type":"policies","attributes":{"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1748494458-updated","resolve_page_on_policy_end":false,"retries":0},"relationships":{"steps":{"data":[{"id":"6a0d2106-0430-4211-af70-54ea18031d0d","type":"steps"}]},"teams":{"data":[{"id":"37ea8c60-77bd-4154-ba2e-ac59d25541c6","type":"teams"}]}}}}' + string: '{"data":{"id":"b20fdf89-f87f-4237-8f19-ed8c9c57cf5c","type":"policies","attributes":{"name":"Test-Update_On_Call_escalation_policy_returns_OK_response-1764252714-updated","resolve_page_on_policy_end":false,"retries":0},"relationships":{"steps":{"data":[{"id":"6d4b5398-50bf-425d-93b8-3eae379ff8a0","type":"steps"}]},"teams":{"data":[{"id":"f38d82f9-3de9-4a4a-8a48-650c0b19151f","type":"teams"}]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Thu, 29 May 2025 04:54:18 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:54 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/05ee91ac-c049-4e7c-b43b-3f673a7ce96d + uri: https://api.datadoghq.com/api/v2/on-call/escalation-policies/b20fdf89-f87f-4237-8f19-ed8c9c57cf5c response: body: encoding: UTF-8 @@ -132,14 +130,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 29 May 2025 04:54:18 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:54 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/f8a9543a-dc0f-4d81-bb16-7054201fa099 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/1ab20921-4556-4f30-80df-e1ce748c3fc1 response: body: encoding: UTF-8 @@ -148,14 +146,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 29 May 2025 04:54:18 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:54 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/37ea8c60-77bd-4154-ba2e-ac59d25541c6 + uri: https://api.datadoghq.com/api/v2/team/f38d82f9-3de9-4a4a-8a48-650c0b19151f response: body: encoding: UTF-8 @@ -164,14 +162,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 29 May 2025 04:54:18 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:54 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/fabd9ae0-3c48-11f0-b407-16d8dc894a02 + uri: https://api.datadoghq.com/api/v2/users/074d412b-cb9b-11f0-85f9-9a82ffe01443 response: body: encoding: UTF-8 diff --git a/cassettes/features/v2/on-call/Update-On-Call-schedule-returns-OK-response.frozen b/cassettes/features/v2/on-call/Update-On-Call-schedule-returns-OK-response.frozen index 2f290d18c09..9c277407503 100644 --- a/cassettes/features/v2/on-call/Update-On-Call-schedule-returns-OK-response.frozen +++ b/cassettes/features/v2/on-call/Update-On-Call-schedule-returns-OK-response.frozen @@ -1 +1 @@ -2025-07-03T14:30:45.232Z \ No newline at end of file +2025-11-27T14:11:59.069Z \ No newline at end of file diff --git a/cassettes/features/v2/on-call/Update-On-Call-schedule-returns-OK-response.yml b/cassettes/features/v2/on-call/Update-On-Call-schedule-returns-OK-response.yml index 0a333dcb2a8..84bda1e0e2b 100644 --- a/cassettes/features/v2/on-call/Update-On-Call-schedule-returns-OK-response.yml +++ b/cassettes/features/v2/on-call/Update-On-Call-schedule-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Thu, 03 Jul 2025 14:30:45 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:59 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Update_On_Call_schedule_returns_OK_response-1751553045@datadoghq.com","title":"user + string: '{"data":{"attributes":{"email":"Test-Update_On_Call_schedule_returns_OK_response-1764252719@datadoghq.com","title":"user title"},"type":"users"}}' headers: Accept: @@ -15,8 +15,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"users","id":"4ea279a2-581a-11f0-bb4d-bed6e06a25e4","attributes":{"name":null,"handle":"test-update_on_call_schedule_returns_ok_response-1751553045@datadoghq.com","created_at":"2025-07-03T14:30:46.015046+00:00","modified_at":"2025-07-03T14:30:46.015046+00:00","email":"test-update_on_call_schedule_returns_ok_response-1751553045@datadoghq.com","icon":"https://secure.gravatar.com/avatar/8c4a38455f71bb12d82add5157f105a0?s=48&d=retro","title":"user - title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + string: '{"data":{"type":"users","id":"09e2b0f4-cb9b-11f0-a56e-4e680b759023","attributes":{"name":null,"handle":"test-update_on_call_schedule_returns_ok_response-1764252719@datadoghq.com","created_at":"2025-11-27T14:11:59.470672+00:00","modified_at":"2025-11-27T14:11:59.470672+00:00","email":"test-update_on_call_schedule_returns_ok_response-1764252719@datadoghq.com","icon":"https://secure.gravatar.com/avatar/62638e49f4a83e63caabec2a6ab50bba?s=48&d=retro","title":"user + title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' headers: @@ -25,12 +25,12 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Thu, 03 Jul 2025 14:30:45 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:59 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-06-23T14:30:45.232Z","end_date":"2025-07-13T14:30:45.232Z","interval":{"days":1},"members":[{"user":{"id":"4ea279a2-581a-11f0-bb4d-bed6e06a25e4"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-06-28T14:30:45.232Z"}],"name":"Test-Update_On_Call_schedule_returns_OK_response-1751553045","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' + string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:59.069Z","end_date":"2025-12-07T14:11:59.069Z","interval":{"days":1},"members":[{"user":{"id":"09e2b0f4-cb9b-11f0-a56e-4e680b759023"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:59.069Z"}],"name":"Test-Update_On_Call_schedule_returns_OK_response-1764252719","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}' headers: Accept: - application/json @@ -41,18 +41,18 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"id":"3cb80fa4-f506-4b2f-9187-2af6c2253698","type":"schedules","attributes":{"name":"Test-Update_On_Call_schedule_returns_OK_response-1751553045","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"70f75d0e-19d0-46a1-9c1c-19d2de171744","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' + string: '{"data":{"id":"0e2c2b38-3f21-4216-aeb7-49eb8b371c09","type":"schedules","attributes":{"name":"Test-Update_On_Call_schedule_returns_OK_response-1764252719","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"140f452a-0ecf-48ab-b7e9-e358a2cf925b","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Thu, 03 Jul 2025 14:30:45 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:59 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"handle":"test-handle-001d7ca9284aa632","name":"test-name-001d7ca9284aa632"},"type":"team"}}' + string: '{"data":{"attributes":{"handle":"test-handle-0db1ad1d49052f19","name":"test-name-0db1ad1d49052f19"},"type":"team"}}' headers: Accept: - application/json @@ -63,46 +63,44 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"team","id":"9ca20f11-ede5-4147-addb-25b7f91ce508","attributes":{"name":"test-name-001d7ca9284aa632","handle":"test-handle-001d7ca9284aa632","summary":null,"description":null,"avatar":null,"banner":13,"visible_modules":[],"hidden_modules":[],"created_at":"2025-07-03T14:30:46.275583+00:00","modified_at":"2025-07-03T14:30:46.275594+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/9ca20f11-ede5-4147-addb-25b7f91ce508/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/9ca20f11-ede5-4147-addb-25b7f91ce508/permission-settings"}}}}} - - ' + string: '{"data":{"id":"500acba0-bf4f-4f5c-83be-d0de24c5739c","type":"team","attributes":{"avatar":null,"banner":8,"created_at":"2025-11-27T14:12:00.429799+00:00","description":null,"handle":"test-handle-0db1ad1d49052f19","hidden_modules":[],"link_count":0,"modified_at":"2025-11-27T14:12:00.429799+00:00","name":"test-name-0db1ad1d49052f19","summary":null,"user_count":0,"visible_modules":[]},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/500acba0-bf4f-4f5c-83be-d0de24c5739c/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/500acba0-bf4f-4f5c-83be-d0de24c5739c/permission-settings"}}}}}' headers: Content-Type: - - application/json + - application/vnd.api+json status: code: 201 message: Created -- recorded_at: Thu, 03 Jul 2025 14:30:45 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:59 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-06-23T14:30:45.232Z","end_date":"2025-07-13T14:30:45.232Z","id":"70f75d0e-19d0-46a1-9c1c-19d2de171744","interval":{"seconds":3600},"members":[{"user":{"id":"4ea279a2-581a-11f0-bb4d-bed6e06a25e4"}}],"name":"Layer - 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-06-28T14:30:45.232Z"}],"name":"Test-Update_On_Call_schedule_returns_OK_response-1751553045","time_zone":"America/New_York"},"id":"3cb80fa4-f506-4b2f-9187-2af6c2253698","relationships":{"teams":{"data":[{"id":"9ca20f11-ede5-4147-addb-25b7f91ce508","type":"teams"}]}},"type":"schedules"}}' + string: '{"data":{"attributes":{"layers":[{"effective_date":"2025-11-17T14:11:59.069Z","end_date":"2025-12-07T14:11:59.069Z","id":"140f452a-0ecf-48ab-b7e9-e358a2cf925b","interval":{"seconds":3600},"members":[{"user":{"id":"09e2b0f4-cb9b-11f0-a56e-4e680b759023"}}],"name":"Layer + 1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-11-22T14:11:59.069Z"}],"name":"Test-Update_On_Call_schedule_returns_OK_response-1764252719","time_zone":"America/New_York"},"id":"0e2c2b38-3f21-4216-aeb7-49eb8b371c09","relationships":{"teams":{"data":[{"id":"500acba0-bf4f-4f5c-83be-d0de24c5739c","type":"teams"}]}},"type":"schedules"}}' headers: Accept: - application/json Content-Type: - application/json method: PUT - uri: https://api.datadoghq.com/api/v2/on-call/schedules/3cb80fa4-f506-4b2f-9187-2af6c2253698 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/0e2c2b38-3f21-4216-aeb7-49eb8b371c09 response: body: encoding: UTF-8 - string: '{"data":{"id":"3cb80fa4-f506-4b2f-9187-2af6c2253698","type":"schedules","attributes":{"name":"Test-Update_On_Call_schedule_returns_OK_response-1751553045","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"70f75d0e-19d0-46a1-9c1c-19d2de171744","type":"layers"}]},"teams":{"data":[{"id":"9ca20f11-ede5-4147-addb-25b7f91ce508","type":"teams"}]}}}}' + string: '{"data":{"id":"0e2c2b38-3f21-4216-aeb7-49eb8b371c09","type":"schedules","attributes":{"name":"Test-Update_On_Call_schedule_returns_OK_response-1764252719","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"140f452a-0ecf-48ab-b7e9-e358a2cf925b","type":"layers"}]},"teams":{"data":[{"id":"500acba0-bf4f-4f5c-83be-d0de24c5739c","type":"teams"}]}}}}' headers: Content-Type: - application/vnd.api+json status: code: 200 message: OK -- recorded_at: Thu, 03 Jul 2025 14:30:45 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:59 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/team/9ca20f11-ede5-4147-addb-25b7f91ce508 + uri: https://api.datadoghq.com/api/v2/team/500acba0-bf4f-4f5c-83be-d0de24c5739c response: body: encoding: UTF-8 @@ -111,14 +109,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 03 Jul 2025 14:30:45 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:59 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/on-call/schedules/3cb80fa4-f506-4b2f-9187-2af6c2253698 + uri: https://api.datadoghq.com/api/v2/on-call/schedules/0e2c2b38-3f21-4216-aeb7-49eb8b371c09 response: body: encoding: UTF-8 @@ -127,14 +125,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 03 Jul 2025 14:30:45 GMT +- recorded_at: Thu, 27 Nov 2025 14:11:59 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/4ea279a2-581a-11f0-bb4d-bed6e06a25e4 + uri: https://api.datadoghq.com/api/v2/users/09e2b0f4-cb9b-11f0-a56e-4e680b759023 response: body: encoding: UTF-8 diff --git a/examples/v2/on-call/CreateOnCallEscalationPolicy.rb b/examples/v2/on-call/CreateOnCallEscalationPolicy.rb index a4412b57ddf..324a603ec4a 100644 --- a/examples/v2/on-call/CreateOnCallEscalationPolicy.rb +++ b/examples/v2/on-call/CreateOnCallEscalationPolicy.rb @@ -31,6 +31,15 @@ id: SCHEDULE_DATA_ID, type: DatadogAPIClient::V2::EscalationPolicyStepTargetType::SCHEDULES, }), + DatadogAPIClient::V2::EscalationPolicyStepTarget.new({ + config: DatadogAPIClient::V2::EscalationPolicyStepTargetConfig.new({ + schedule: DatadogAPIClient::V2::EscalationPolicyStepTargetConfigSchedule.new({ + position: DatadogAPIClient::V2::ScheduleTargetPosition::PREVIOUS, + }), + }), + id: SCHEDULE_DATA_ID, + type: DatadogAPIClient::V2::EscalationPolicyStepTargetType::SCHEDULES, + }), DatadogAPIClient::V2::EscalationPolicyStepTarget.new({ id: DD_TEAM_DATA_ID, type: DatadogAPIClient::V2::EscalationPolicyStepTargetType::TEAMS, diff --git a/features/v2/given.json b/features/v2/given.json index d919b983487..ad563ffc789 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -747,7 +747,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"resolve_page_on_policy_end\": true,\n \"retries\": 2,\n \"steps\": [\n {\n \"assignment\": \"default\",\n \"escalate_after_seconds\": 3600,\n \"targets\": [\n {\n \"id\": \"{{ dd_team.data.id }}\",\n \"type\": \"teams\"\n },\n {\n \"id\": \"{{ schedule.data.id }}\",\n \"type\": \"schedules\"\n },\n {\n \"id\": \"{{ user.data.id }}\",\n \"type\": \"users\"\n }\n ]\n },\n {\n \"assignment\": \"round-robin\",\n \"escalate_after_seconds\": 3600,\n \"targets\": [\n {\n \"id\": \"{{ dd_team.data.id }}\",\n \"type\": \"teams\"\n }\n ]\n }\n ]\n },\n \"relationships\": {\n \"teams\": {\n \"data\": [\n {\n \"id\": \"{{ dd_team.data.id }}\",\n \"type\": \"teams\"\n }\n ]\n }\n },\n \"type\": \"policies\"\n }\n}" + "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"resolve_page_on_policy_end\": true,\n \"retries\": 2,\n \"steps\": [\n {\n \"assignment\": \"default\",\n \"escalate_after_seconds\": 3600,\n \"targets\": [\n {\n \"id\": \"{{ dd_team.data.id }}\",\n \"type\": \"teams\"\n },\n {\n \"id\": \"{{ schedule.data.id }}\",\n \"type\": \"schedules\"\n },\n {\n \"id\": \"{{ schedule.data.id }}\",\n \"type\": \"schedules\",\n \"config\": {\n \"schedule\": {\n \"position\": \"previous\"\n }\n }\n },\n {\n \"id\": \"{{ user.data.id }}\",\n \"type\": \"users\"\n }\n ]\n },\n {\n \"assignment\": \"round-robin\",\n \"escalate_after_seconds\": 3600,\n \"targets\": [\n {\n \"id\": \"{{ dd_team.data.id }}\",\n \"type\": \"teams\"\n }\n ]\n }\n ]\n },\n \"relationships\": {\n \"teams\": {\n \"data\": [\n {\n \"id\": \"{{ dd_team.data.id }}\",\n \"type\": \"teams\"\n }\n ]\n }\n },\n \"type\": \"policies\"\n }\n}" } ], "step": "there is a valid \"escalation_policy\" in the system", diff --git a/features/v2/on-call.feature b/features/v2/on-call.feature index 39640938e4a..7bcd1d00e1b 100644 --- a/features/v2/on-call.feature +++ b/features/v2/on-call.feature @@ -12,7 +12,7 @@ Feature: On-Call @generated @skip @team:DataDog/on-call Scenario: Create On-Call escalation policy returns "Bad Request" response Given new "CreateOnCallEscalationPolicy" request - And body with value {"data": {"attributes": {"name": "Escalation Policy 1", "resolve_page_on_policy_end": true, "retries": 2, "steps": [{"assignment": "default", "escalate_after_seconds": 3600, "targets": [{"id": "00000000-aba1-0000-0000-000000000000", "type": "users"}, {"id": "00000000-aba2-0000-0000-000000000000", "type": "schedules"}, {"id": "00000000-aba3-0000-0000-000000000000", "type": "teams"}]}, {"assignment": "round-robin", "escalate_after_seconds": 3600, "targets": [{"id": "00000000-aba1-0000-0000-000000000000", "type": "users"}, {"id": "00000000-abb1-0000-0000-000000000000", "type": "users"}]}]}, "relationships": {"teams": {"data": [{"id": "00000000-da3a-0000-0000-000000000000", "type": "teams"}]}}, "type": "policies"}} + And body with value {"data": {"attributes": {"name": "Escalation Policy 1", "resolve_page_on_policy_end": true, "retries": 2, "steps": [{"assignment": "default", "escalate_after_seconds": 3600, "targets": [{"id": "00000000-aba1-0000-0000-000000000000", "type": "users"}, {"config": {"schedule": {"position": "previous"}}, "id": "00000000-aba2-0000-0000-000000000000", "type": "schedules"}, {"id": "00000000-aba3-0000-0000-000000000000", "type": "teams"}]}, {"assignment": "round-robin", "escalate_after_seconds": 3600, "targets": [{"id": "00000000-aba1-0000-0000-000000000000", "type": "users"}, {"id": "00000000-abb1-0000-0000-000000000000", "type": "users"}]}]}, "relationships": {"teams": {"data": [{"id": "00000000-da3a-0000-0000-000000000000", "type": "teams"}]}}, "type": "policies"}} When the request is sent Then the response status is 400 Bad Request @@ -22,7 +22,7 @@ Feature: On-Call And there is a valid "user" in the system And there is a valid "schedule" in the system And there is a valid "dd_team" in the system - And body with value {"data": {"attributes": {"name": "{{ unique }}", "resolve_page_on_policy_end": true, "retries": 2, "steps": [{"assignment": "default", "escalate_after_seconds": 3600, "targets": [{"id": "{{ user.data.id }}", "type": "users"}, {"id": "{{ schedule.data.id }}", "type": "schedules"}, {"id": "{{ dd_team.data.id }}", "type": "teams"}]}, {"assignment": "round-robin", "escalate_after_seconds": 3600, "targets": [{"id": "{{ dd_team.data.id }}", "type": "teams"}]}]}, "relationships": {"teams": {"data": [{"id": "{{ dd_team.data.id }}", "type": "teams"}]}}, "type": "policies"}} + And body with value {"data": {"attributes": {"name": "{{ unique }}", "resolve_page_on_policy_end": true, "retries": 2, "steps": [{"assignment": "default", "escalate_after_seconds": 3600, "targets": [{"id": "{{ user.data.id }}", "type": "users"}, {"id": "{{ schedule.data.id }}", "type": "schedules"}, {"config": {"schedule": {"position": "previous"}}, "id": "{{ schedule.data.id }}", "type": "schedules"}, {"id": "{{ dd_team.data.id }}", "type": "teams"}]}, {"assignment": "round-robin", "escalate_after_seconds": 3600, "targets": [{"id": "{{ dd_team.data.id }}", "type": "teams"}]}]}, "relationships": {"teams": {"data": [{"id": "{{ dd_team.data.id }}", "type": "teams"}]}}, "type": "policies"}} And request contains "include" parameter with value "steps.targets" When the request is sent Then the response status is 201 Created diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 0c48bcbcae1..a149587893a 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1582,6 +1582,12 @@ def overrides "v2.config_cat_sdk_key" => "ConfigCatSDKKey", "v2.config_cat_sdk_key_type" => "ConfigCatSDKKeyType", "v2.config_cat_sdk_key_update" => "ConfigCatSDKKeyUpdate", + "v2.configured_schedule" => "ConfiguredSchedule", + "v2.configured_schedule_target" => "ConfiguredScheduleTarget", + "v2.configured_schedule_target_attributes" => "ConfiguredScheduleTargetAttributes", + "v2.configured_schedule_target_relationships" => "ConfiguredScheduleTargetRelationships", + "v2.configured_schedule_target_relationships_schedule" => "ConfiguredScheduleTargetRelationshipsSchedule", + "v2.configured_schedule_target_type" => "ConfiguredScheduleTargetType", "v2.confluent_account_create_request" => "ConfluentAccountCreateRequest", "v2.confluent_account_create_request_attributes" => "ConfluentAccountCreateRequestAttributes", "v2.confluent_account_create_request_data" => "ConfluentAccountCreateRequestData", @@ -2113,6 +2119,8 @@ def overrides "v2.escalation_policy_step_attributes_assignment" => "EscalationPolicyStepAttributesAssignment", "v2.escalation_policy_step_relationships" => "EscalationPolicyStepRelationships", "v2.escalation_policy_step_target" => "EscalationPolicyStepTarget", + "v2.escalation_policy_step_target_config" => "EscalationPolicyStepTargetConfig", + "v2.escalation_policy_step_target_config_schedule" => "EscalationPolicyStepTargetConfigSchedule", "v2.escalation_policy_step_target_type" => "EscalationPolicyStepTargetType", "v2.escalation_policy_step_type" => "EscalationPolicyStepType", "v2.escalation_policy_update_request" => "EscalationPolicyUpdateRequest", @@ -3846,6 +3854,7 @@ def overrides "v2.schedule_request_data_attributes_layers_items_members_items" => "ScheduleRequestDataAttributesLayersItemsMembersItems", "v2.schedule_request_data_attributes_layers_items_members_items_user" => "ScheduleRequestDataAttributesLayersItemsMembersItemsUser", "v2.schedule_target" => "ScheduleTarget", + "v2.schedule_target_position" => "ScheduleTargetPosition", "v2.schedule_target_type" => "ScheduleTargetType", "v2.schedule_trigger" => "ScheduleTrigger", "v2.schedule_trigger_wrapper" => "ScheduleTriggerWrapper", diff --git a/lib/datadog_api_client/v2/models/configured_schedule.rb b/lib/datadog_api_client/v2/models/configured_schedule.rb new file mode 100644 index 00000000000..e4d18849aa5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/configured_schedule.rb @@ -0,0 +1,186 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Full resource representation of a configured schedule target with position (previous, current, or next). + class ConfiguredSchedule + include BaseGenericModel + + # Attributes for a configured schedule target, including position. + attr_reader :attributes + + # Specifies the unique identifier of the configured schedule target. + attr_reader :id + + # Represents the relationships of a configured schedule target. + attr_reader :relationships + + # Indicates that the resource is of type `schedule_target`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ConfiguredScheduleTargetAttributes', + :'id' => :'String', + :'relationships' => :'ConfiguredScheduleTargetRelationships', + :'type' => :'ConfiguredScheduleTargetType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfiguredSchedule` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @relationships.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param relationships [Object] Object to be assigned + # @!visibility private + def relationships=(relationships) + if relationships.nil? + fail ArgumentError, 'invalid value for "relationships", relationships cannot be nil.' + end + @relationships = relationships + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, relationships, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/configured_schedule_target.rb b/lib/datadog_api_client/v2/models/configured_schedule_target.rb new file mode 100644 index 00000000000..21eb225ce78 --- /dev/null +++ b/lib/datadog_api_client/v2/models/configured_schedule_target.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Relationship reference to a configured schedule target. + class ConfiguredScheduleTarget + include BaseGenericModel + + # Specifies the unique identifier of the configured schedule target. + attr_reader :id + + # Indicates that the resource is of type `schedule_target`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'ConfiguredScheduleTargetType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfiguredScheduleTarget` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/configured_schedule_target_attributes.rb b/lib/datadog_api_client/v2/models/configured_schedule_target_attributes.rb new file mode 100644 index 00000000000..a0a7f5defa0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/configured_schedule_target_attributes.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for a configured schedule target, including position. + class ConfiguredScheduleTargetAttributes + include BaseGenericModel + + # Specifies the position of a schedule target (example `previous`, `current`, or `next`). + attr_reader :position + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'position' => :'position' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'position' => :'ScheduleTargetPosition' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfiguredScheduleTargetAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @position.nil? + true + end + + # Custom attribute writer method with validation + # @param position [Object] Object to be assigned + # @!visibility private + def position=(position) + if position.nil? + fail ArgumentError, 'invalid value for "position", position cannot be nil.' + end + @position = position + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + position == o.position && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [position, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/configured_schedule_target_relationships.rb b/lib/datadog_api_client/v2/models/configured_schedule_target_relationships.rb new file mode 100644 index 00000000000..ba43478a532 --- /dev/null +++ b/lib/datadog_api_client/v2/models/configured_schedule_target_relationships.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Represents the relationships of a configured schedule target. + class ConfiguredScheduleTargetRelationships + include BaseGenericModel + + # Holds the schedule reference for a configured schedule target. + attr_reader :schedule + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'schedule' => :'schedule' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'schedule' => :'ConfiguredScheduleTargetRelationshipsSchedule' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfiguredScheduleTargetRelationships` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'schedule') + self.schedule = attributes[:'schedule'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @schedule.nil? + true + end + + # Custom attribute writer method with validation + # @param schedule [Object] Object to be assigned + # @!visibility private + def schedule=(schedule) + if schedule.nil? + fail ArgumentError, 'invalid value for "schedule", schedule cannot be nil.' + end + @schedule = schedule + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + schedule == o.schedule && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [schedule, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/configured_schedule_target_relationships_schedule.rb b/lib/datadog_api_client/v2/models/configured_schedule_target_relationships_schedule.rb new file mode 100644 index 00000000000..eb231da8130 --- /dev/null +++ b/lib/datadog_api_client/v2/models/configured_schedule_target_relationships_schedule.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Holds the schedule reference for a configured schedule target. + class ConfiguredScheduleTargetRelationshipsSchedule + include BaseGenericModel + + # Represents a schedule target for an escalation policy step, including its ID and resource type. This is a shortcut for a configured schedule target with position set to 'current'. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ScheduleTarget' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ConfiguredScheduleTargetRelationshipsSchedule` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/configured_schedule_target_type.rb b/lib/datadog_api_client/v2/models/configured_schedule_target_type.rb new file mode 100644 index 00000000000..37534afc987 --- /dev/null +++ b/lib/datadog_api_client/v2/models/configured_schedule_target_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Indicates that the resource is of type `schedule_target`. + class ConfiguredScheduleTargetType + include BaseEnumModel + + SCHEDULE_TARGET = "schedule_target".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_attributes.rb b/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_attributes.rb index 13deed30974..96f29b7ccf2 100644 --- a/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_attributes.rb @@ -28,7 +28,7 @@ class EscalationPolicyCreateRequestDataAttributes attr_accessor :resolve_page_on_policy_end # Specifies how many times the escalation sequence is retried if there is no response. - attr_accessor :retries + attr_reader :retries # A list of escalation steps, each defining assignment, escalation timeout, and targets for the new policy. attr_reader :steps @@ -99,7 +99,12 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if @name.nil? + return false if @name.to_s.length < 1 + return false if !@retries.nil? && @retries > 10 + return false if !@retries.nil? && @retries < 0 return false if @steps.nil? + return false if @steps.length > 10 + return false if @steps.length < 1 true end @@ -110,9 +115,25 @@ def name=(name) if name.nil? fail ArgumentError, 'invalid value for "name", name cannot be nil.' end + if name.to_s.length < 1 + fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' + end @name = name end + # Custom attribute writer method with validation + # @param retries [Object] Object to be assigned + # @!visibility private + def retries=(retries) + if !retries.nil? && retries > 10 + fail ArgumentError, 'invalid value for "retries", must be smaller than or equal to 10.' + end + if !retries.nil? && retries < 0 + fail ArgumentError, 'invalid value for "retries", must be greater than or equal to 0.' + end + @retries = retries + end + # Custom attribute writer method with validation # @param steps [Object] Object to be assigned # @!visibility private @@ -120,6 +141,12 @@ def steps=(steps) if steps.nil? fail ArgumentError, 'invalid value for "steps", steps cannot be nil.' end + if steps.length > 10 + fail ArgumentError, 'invalid value for "steps", number of items must be less than or equal to 10.' + end + if steps.length < 1 + fail ArgumentError, 'invalid value for "steps", number of items must be greater than or equal to 1.' + end @steps = steps end diff --git a/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_attributes_steps_items.rb b/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_attributes_steps_items.rb index 858aa5b0ea8..3794874872e 100644 --- a/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_attributes_steps_items.rb +++ b/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_attributes_steps_items.rb @@ -25,7 +25,7 @@ class EscalationPolicyCreateRequestDataAttributesStepsItems attr_accessor :assignment # Defines how many seconds to wait before escalating to the next step. - attr_accessor :escalate_after_seconds + attr_reader :escalate_after_seconds # Specifies the collection of escalation targets for this step. attr_reader :targets @@ -89,10 +89,25 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if !@escalate_after_seconds.nil? && @escalate_after_seconds > 36000 + return false if !@escalate_after_seconds.nil? && @escalate_after_seconds < 60 return false if @targets.nil? true end + # Custom attribute writer method with validation + # @param escalate_after_seconds [Object] Object to be assigned + # @!visibility private + def escalate_after_seconds=(escalate_after_seconds) + if !escalate_after_seconds.nil? && escalate_after_seconds > 36000 + fail ArgumentError, 'invalid value for "escalate_after_seconds", must be smaller than or equal to 36000.' + end + if !escalate_after_seconds.nil? && escalate_after_seconds < 60 + fail ArgumentError, 'invalid value for "escalate_after_seconds", must be greater than or equal to 60.' + end + @escalate_after_seconds = escalate_after_seconds + end + # Custom attribute writer method with validation # @param targets [Object] Object to be assigned # @!visibility private diff --git a/lib/datadog_api_client/v2/models/escalation_policy_data_attributes.rb b/lib/datadog_api_client/v2/models/escalation_policy_data_attributes.rb index dd6faafa051..2f9fd1a1c9b 100644 --- a/lib/datadog_api_client/v2/models/escalation_policy_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/escalation_policy_data_attributes.rb @@ -28,7 +28,7 @@ class EscalationPolicyDataAttributes attr_accessor :resolve_page_on_policy_end # Specifies how many times the escalation sequence is retried if there is no response. - attr_accessor :retries + attr_reader :retries attr_accessor :additional_properties @@ -88,6 +88,9 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if @name.nil? + return false if @name.to_s.length < 1 + return false if !@retries.nil? && @retries > 10 + return false if !@retries.nil? && @retries < 0 true end @@ -98,9 +101,25 @@ def name=(name) if name.nil? fail ArgumentError, 'invalid value for "name", name cannot be nil.' end + if name.to_s.length < 1 + fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' + end @name = name end + # Custom attribute writer method with validation + # @param retries [Object] Object to be assigned + # @!visibility private + def retries=(retries) + if !retries.nil? && retries > 10 + fail ArgumentError, 'invalid value for "retries", must be smaller than or equal to 10.' + end + if !retries.nil? && retries < 0 + fail ArgumentError, 'invalid value for "retries", must be greater than or equal to 0.' + end + @retries = retries + end + # Returns the object in the form of hash, with additionalProperties support. # @return [Hash] Returns the object in the form of hash # @!visibility private diff --git a/lib/datadog_api_client/v2/models/escalation_policy_included.rb b/lib/datadog_api_client/v2/models/escalation_policy_included.rb index d34ba393c8e..8fdbbab8559 100644 --- a/lib/datadog_api_client/v2/models/escalation_policy_included.rb +++ b/lib/datadog_api_client/v2/models/escalation_policy_included.rb @@ -26,10 +26,11 @@ class << self # List of class defined in oneOf (OpenAPI v3) def openapi_one_of [ - :'TeamReference', :'EscalationPolicyStep', :'EscalationPolicyUser', - :'ScheduleData' + :'ScheduleData', + :'ConfiguredSchedule', + :'TeamReference' ] end # Builds the object diff --git a/lib/datadog_api_client/v2/models/escalation_policy_step_target.rb b/lib/datadog_api_client/v2/models/escalation_policy_step_target.rb index bc617a3b047..0071d30d309 100644 --- a/lib/datadog_api_client/v2/models/escalation_policy_step_target.rb +++ b/lib/datadog_api_client/v2/models/escalation_policy_step_target.rb @@ -17,10 +17,13 @@ require 'time' module DatadogAPIClient::V2 - # Defines a single escalation target within a step for an escalation policy creation request. Contains `id` and `type`. + # Defines a single escalation target within a step for an escalation policy creation request. Contains `id`, `type`, and optional `config`. class EscalationPolicyStepTarget include BaseGenericModel + # Configuration for an escalation target, such as schedule position. + attr_accessor :config + # Specifies the unique identifier for this target. attr_accessor :id @@ -33,6 +36,7 @@ class EscalationPolicyStepTarget # @!visibility private def self.attribute_map { + :'config' => :'config', :'id' => :'id', :'type' => :'type' } @@ -42,6 +46,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'config' => :'EscalationPolicyStepTargetConfig', :'id' => :'String', :'type' => :'EscalationPolicyStepTargetType' } @@ -65,6 +70,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'config') + self.config = attributes[:'config'] + end + if attributes.key?(:'id') self.id = attributes[:'id'] end @@ -100,6 +109,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + config == o.config && id == o.id && type == o.type && additional_properties == o.additional_properties @@ -109,7 +119,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [id, type, additional_properties].hash + [config, id, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/escalation_policy_step_target_config.rb b/lib/datadog_api_client/v2/models/escalation_policy_step_target_config.rb new file mode 100644 index 00000000000..4401b0565cb --- /dev/null +++ b/lib/datadog_api_client/v2/models/escalation_policy_step_target_config.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Configuration for an escalation target, such as schedule position. + class EscalationPolicyStepTargetConfig + include BaseGenericModel + + # Schedule-specific configuration for an escalation target. + attr_accessor :schedule + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'schedule' => :'schedule' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'schedule' => :'EscalationPolicyStepTargetConfigSchedule' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EscalationPolicyStepTargetConfig` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'schedule') + self.schedule = attributes[:'schedule'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + schedule == o.schedule && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [schedule, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/escalation_policy_step_target_config_schedule.rb b/lib/datadog_api_client/v2/models/escalation_policy_step_target_config_schedule.rb new file mode 100644 index 00000000000..cfec9fe163a --- /dev/null +++ b/lib/datadog_api_client/v2/models/escalation_policy_step_target_config_schedule.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Schedule-specific configuration for an escalation target. + class EscalationPolicyStepTargetConfigSchedule + include BaseGenericModel + + # Specifies the position of a schedule target (example `previous`, `current`, or `next`). + attr_accessor :position + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'position' => :'position' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'position' => :'ScheduleTargetPosition' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::EscalationPolicyStepTargetConfigSchedule` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'position') + self.position = attributes[:'position'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + position == o.position && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [position, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes.rb b/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes.rb index 52664835ae1..bfacc9aedc7 100644 --- a/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes.rb @@ -28,7 +28,7 @@ class EscalationPolicyUpdateRequestDataAttributes attr_accessor :resolve_page_on_policy_end # Specifies how many times the escalation sequence is retried if there is no response. - attr_accessor :retries + attr_reader :retries # A list of escalation steps, each defining assignment, escalation timeout, and targets. attr_reader :steps @@ -99,7 +99,12 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if @name.nil? + return false if @name.to_s.length < 1 + return false if !@retries.nil? && @retries > 10 + return false if !@retries.nil? && @retries < 0 return false if @steps.nil? + return false if @steps.length > 10 + return false if @steps.length < 1 true end @@ -110,9 +115,25 @@ def name=(name) if name.nil? fail ArgumentError, 'invalid value for "name", name cannot be nil.' end + if name.to_s.length < 1 + fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.' + end @name = name end + # Custom attribute writer method with validation + # @param retries [Object] Object to be assigned + # @!visibility private + def retries=(retries) + if !retries.nil? && retries > 10 + fail ArgumentError, 'invalid value for "retries", must be smaller than or equal to 10.' + end + if !retries.nil? && retries < 0 + fail ArgumentError, 'invalid value for "retries", must be greater than or equal to 0.' + end + @retries = retries + end + # Custom attribute writer method with validation # @param steps [Object] Object to be assigned # @!visibility private @@ -120,6 +141,12 @@ def steps=(steps) if steps.nil? fail ArgumentError, 'invalid value for "steps", steps cannot be nil.' end + if steps.length > 10 + fail ArgumentError, 'invalid value for "steps", number of items must be less than or equal to 10.' + end + if steps.length < 1 + fail ArgumentError, 'invalid value for "steps", number of items must be greater than or equal to 1.' + end @steps = steps end diff --git a/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes_steps_items.rb b/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes_steps_items.rb index 7af367f7b8d..c4651fd9582 100644 --- a/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes_steps_items.rb +++ b/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes_steps_items.rb @@ -25,7 +25,7 @@ class EscalationPolicyUpdateRequestDataAttributesStepsItems attr_accessor :assignment # Defines how many seconds to wait before escalating to the next step. - attr_accessor :escalate_after_seconds + attr_reader :escalate_after_seconds # Specifies the unique identifier of this step. attr_accessor :id @@ -98,10 +98,25 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if !@escalate_after_seconds.nil? && @escalate_after_seconds > 36000 + return false if !@escalate_after_seconds.nil? && @escalate_after_seconds < 60 return false if @targets.nil? true end + # Custom attribute writer method with validation + # @param escalate_after_seconds [Object] Object to be assigned + # @!visibility private + def escalate_after_seconds=(escalate_after_seconds) + if !escalate_after_seconds.nil? && escalate_after_seconds > 36000 + fail ArgumentError, 'invalid value for "escalate_after_seconds", must be smaller than or equal to 36000.' + end + if !escalate_after_seconds.nil? && escalate_after_seconds < 60 + fail ArgumentError, 'invalid value for "escalate_after_seconds", must be greater than or equal to 60.' + end + @escalate_after_seconds = escalate_after_seconds + end + # Custom attribute writer method with validation # @param targets [Object] Object to be assigned # @!visibility private diff --git a/lib/datadog_api_client/v2/models/escalation_target.rb b/lib/datadog_api_client/v2/models/escalation_target.rb index 1062479ec88..fcb280f3ea9 100644 --- a/lib/datadog_api_client/v2/models/escalation_target.rb +++ b/lib/datadog_api_client/v2/models/escalation_target.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Represents an escalation target, which can be a team, user, or schedule. + # Represents an escalation target, which can be a team, user, schedule, or configured schedule target. module EscalationTarget class << self include BaseOneOfModel @@ -28,7 +28,8 @@ def openapi_one_of [ :'TeamTarget', :'UserTarget', - :'ScheduleTarget' + :'ScheduleTarget', + :'ConfiguredScheduleTarget' ] end # Builds the object diff --git a/lib/datadog_api_client/v2/models/schedule_target.rb b/lib/datadog_api_client/v2/models/schedule_target.rb index 866ca091e24..5b05a696a05 100644 --- a/lib/datadog_api_client/v2/models/schedule_target.rb +++ b/lib/datadog_api_client/v2/models/schedule_target.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Represents a schedule target for an escalation policy step, including its ID and resource type. + # Represents a schedule target for an escalation policy step, including its ID and resource type. This is a shortcut for a configured schedule target with position set to 'current'. class ScheduleTarget include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/schedule_target_position.rb b/lib/datadog_api_client/v2/models/schedule_target_position.rb new file mode 100644 index 00000000000..e259ac83ec6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/schedule_target_position.rb @@ -0,0 +1,28 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Specifies the position of a schedule target (example `previous`, `current`, or `next`). + class ScheduleTargetPosition + include BaseEnumModel + + PREVIOUS = "previous".freeze + CURRENT = "current".freeze + NEXT = "next".freeze + end +end