Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
901 changes: 882 additions & 19 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions examples/v2/on-call/GetOnCallPage.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Get On-Call Page returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.access_token = ENV["DD_BEARER_TOKEN"]
end
api_instance = DatadogAPIClient::V2::OnCallAPI.new
p api_instance.get_on_call_page("f63eb677-07ce-46ab-b2e0-80ca1ffe91bf")
11 changes: 11 additions & 0 deletions examples/v2/on-call/ListOnCallPages.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# List On-Call Pages returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.access_token = ENV["DD_BEARER_TOKEN"]
end
api_instance = DatadogAPIClient::V2::OnCallAPI.new
opts = {
filter_query: "key:1",
}
p api_instance.list_on_call_pages(opts)
8 changes: 8 additions & 0 deletions examples/v2/on-call/ListOnCallPages_695800857.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# List On-Call Pages returns "OK" response with pagination

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.access_token = ENV["DD_BEARER_TOKEN"]
end
api_instance = DatadogAPIClient::V2::OnCallAPI.new
api_instance.list_on_call_pages_with_pagination() { |item| puts item }
9 changes: 9 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5367,6 +5367,15 @@
"include" => "String",
"body" => "EscalationPolicyUpdateRequest",
},
"v2.ListOnCallPages" => {
"page_size" => "Integer",
"page_number" => "Integer",
"filter_query" => "String",
"sort" => "OnCallPagesSort",
},
"v2.GetOnCallPage" => {
"page_id" => "String",
},
"v2.ListOnCallSchedules" => {
"page_size" => "Integer",
"page_number" => "Integer",
Expand Down
43 changes: 43 additions & 0 deletions features/v2/on-call.feature
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,22 @@ Feature: On-Call
When the request is sent
Then the response status is 404 Not Found

@team:ddoghq/on-call
Scenario: Get On-Call Page returns "Not Found" response
Given new "GetOnCallPage" request
And request contains "page_id" parameter with value "00000000-0000-0000-0000-000000000000"
When the request is sent
Then the response status is 404 Not Found

@replay-only @team:ddoghq/on-call
Scenario: Get On-Call Page returns "OK" response
Given new "GetOnCallPage" request
And request contains "page_id" parameter with value "f63eb677-07ce-46ab-b2e0-80ca1ffe91bf"
When the request is sent
Then the response status is 200 OK
And the response "data.id" is equal to "f63eb677-07ce-46ab-b2e0-80ca1ffe91bf"
And the response "data.type" is equal to "pages"

@generated @skip @team:ddoghq/on-call
Scenario: Get On-Call escalation policy returns "Bad Request" response
Given new "GetOnCallEscalationPolicy" request
Expand Down Expand Up @@ -426,6 +442,33 @@ Feature: On-Call
When the request is sent
Then the response status is 200 OK

@generated @skip @team:ddoghq/on-call
Scenario: List On-Call Pages returns "Bad Request" response
Given new "ListOnCallPages" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:ddoghq/on-call
Scenario: List On-Call Pages returns "Not Found" response
Given new "ListOnCallPages" request
When the request is sent
Then the response status is 404 Not Found

@replay-only @team:ddoghq/on-call
Scenario: List On-Call Pages returns "OK" response
Given new "ListOnCallPages" request
And request contains "filter[query]" parameter with value "key:1"
When the request is sent
Then the response status is 200 OK
And the response "data" has length 1
And the response "data[0].id" is equal to "f63eb677-07ce-46ab-b2e0-80ca1ffe91bf"

@generated @skip @team:ddoghq/on-call @with-pagination
Scenario: List On-Call Pages returns "OK" response with pagination
Given new "ListOnCallPages" request
When the request with pagination is sent
Then the response status is 200 OK

@generated @skip @team:ddoghq/on-call
Scenario: List On-Call escalation policies returns "Bad Request" response
Given new "ListOnCallEscalationPolicies" request
Expand Down
12 changes: 12 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -6686,13 +6686,25 @@
"type": "idempotent"
}
},
"ListOnCallPages": {
"tag": "On-Call",
"undo": {
"type": "safe"
}
},
"CreateOnCallPage": {
"tag": "On-Call Paging",
"undo": {
"parameters": [],
"type": "unsafe"
}
},
"GetOnCallPage": {
"tag": "On-Call",
"undo": {
"type": "safe"
}
},
"AcknowledgeOnCallPage": {
"tag": "On-Call Paging",
"undo": {
Expand Down
21 changes: 21 additions & 0 deletions generated-test/test-runner-data/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9072,6 +9072,20 @@
"scenario": "Delete an On-Call notification rule for a user returns \"No Content\" response",
"version": "v2"
},
{
"feature": "On-Call",
"feature_file": "../../features/v2/on-call.feature",
"file": "v2/on-call/get-on-call-page-returns-not-found-response.json",
"scenario": "Get On-Call Page returns \"Not Found\" response",
"version": "v2"
},
{
"feature": "On-Call",
"feature_file": "../../features/v2/on-call.feature",
"file": "v2/on-call/get-on-call-page-returns-ok-response.json",
"scenario": "Get On-Call Page returns \"OK\" response",
"version": "v2"
},
{
"feature": "On-Call",
"feature_file": "../../features/v2/on-call.feature",
Expand Down Expand Up @@ -9121,6 +9135,13 @@
"scenario": "Get team on-call users returns \"OK\" response",
"version": "v2"
},
{
"feature": "On-Call",
"feature_file": "../../features/v2/on-call.feature",
"file": "v2/on-call/list-on-call-pages-returns-ok-response.json",
"scenario": "List On-Call Pages returns \"OK\" response",
"version": "v2"
},
{
"feature": "On-Call",
"feature_file": "../../features/v2/on-call.feature",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"api": "On-Call",
"expected_status": 404,
"feature": "On-Call",
"id": "v2/On-Call/Get On-Call Page returns \"Not Found\" response",
"operation_id": "GetOnCallPage",
"request": {
"body": null,
"content_type": null,
"method": "GET",
"pagination": false,
"parameters": [
{
"explode": null,
"in": "path",
"name": "page_id",
"required": true,
"schema": {
"format": null,
"ref": null,
"type": "string"
},
"source": {
"type": "literal",
"value": "00000000-0000-0000-0000-000000000000"
},
"style": null
}
],
"path": "/api/v2/on-call/pages/{page_id}"
},
"scenario": "Get On-Call Page returns \"Not Found\" response",
"schema_version": 1,
"version": "v2"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"api": "On-Call",
"expected_status": 200,
"feature": "On-Call",
"id": "v2/On-Call/Get On-Call Page returns \"OK\" response",
"operation_id": "GetOnCallPage",
"request": {
"body": null,
"content_type": null,
"method": "GET",
"pagination": false,
"parameters": [
{
"explode": null,
"in": "path",
"name": "page_id",
"required": true,
"schema": {
"format": null,
"ref": null,
"type": "string"
},
"source": {
"type": "literal",
"value": "f63eb677-07ce-46ab-b2e0-80ca1ffe91bf"
},
"style": null
}
],
"path": "/api/v2/on-call/pages/{page_id}"
},
"scenario": "Get On-Call Page returns \"OK\" response",
"schema_version": 1,
"version": "v2"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"api": "On-Call",
"expected_status": 200,
"feature": "On-Call",
"id": "v2/On-Call/List On-Call Pages returns \"OK\" response",
"operation_id": "ListOnCallPages",
"request": {
"body": null,
"content_type": null,
"method": "GET",
"pagination": false,
"parameters": [
{
"explode": null,
"in": "query",
"name": "filter[query]",
"required": false,
"schema": {
"format": null,
"ref": null,
"type": "string"
},
"source": {
"type": "literal",
"value": "key:1"
},
"style": null
}
],
"path": "/api/v2/on-call/pages"
},
"scenario": "List On-Call Pages returns \"OK\" response",
"schema_version": 1,
"version": "v2"
}
98 changes: 98 additions & 0 deletions generated-test/test-server-data/v2/on-call.json
Original file line number Diff line number Diff line change
Expand Up @@ -2150,6 +2150,68 @@
"scenario": "Delete an On-Call notification rule for a user returns \"No Content\" response",
"version": "v2"
},
{
"feature": "On-Call",
"frozen_at": "2026-10-19T12:37:39.340Z",
"interactions": [
{
"request": {
"body": {
"type": "empty",
"value": null
},
"content_type": "",
"method": "GET",
"path": "/api/v2/on-call/pages/00000000-0000-0000-0000-000000000000",
"query": []
},
"response": {
"body": {
"encoding": "text",
"value": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}"
},
"headers": {
"content-type": "application/vnd.api+json"
},
"reason": "Not Found",
"status": 404
}
}
],
"scenario": "Get On-Call Page returns \"Not Found\" response",
"version": "v2"
},
{
"feature": "On-Call",
"frozen_at": "2026-10-19T14:39:38.375Z",
"interactions": [
{
"request": {
"body": {
"type": "empty",
"value": null
},
"content_type": "",
"method": "GET",
"path": "/api/v2/on-call/pages/f63eb677-07ce-46ab-b2e0-80ca1ffe91bf",
"query": []
},
"response": {
"body": {
"encoding": "text",
"value": "{\"data\":{\"id\":\"f63eb677-07ce-46ab-b2e0-80ca1ffe91bf\",\"type\":\"pages\",\"attributes\":{\"acknowledged_at\":\"2026-09-11T10:13:30.188151252Z\",\"created_at\":\"2026-09-11T10:13:30.043027Z\",\"description\":\"\",\"escalation_policy_uuid\":\"b3a7d0b9-536b-4949-be2b-dc6ec6bbb776\",\"key\":\"1\",\"modified_at\":\"2026-09-11T10:13:30.188151Z\",\"services\":[\"test\"],\"status\":\"acknowledged\",\"tags\":[\"service:test\"],\"title\":\"Test-Acknowledge_On_Call_Page_returns_Accepted_response-1789121607\",\"urgency\":\"low\"},\"relationships\":{\"author\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"closed_by\":{\"data\":null},\"links\":{\"data\":[]},\"responders\":{\"data\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}]},\"scheduled_action\":{\"data\":{\"id\":\"f63eb677-07ce-46ab-b2e0-80ca1ffe91bf\",\"type\":\"scheduled_actions\"}},\"target\":{\"data\":{\"id\":\"8678409c-3645-48d3-b330-a9ab6d70c6ff\",\"type\":\"teams\"}},\"team_routing_rule\":{\"data\":{\"id\":\"b2a6c72b-fdb3-4ce7-b07b-dd84af0303e9\",\"type\":\"team_routing_rules\"}}}},\"included\":[{\"id\":\"f63eb677-07ce-46ab-b2e0-80ca1ffe91bf\",\"type\":\"scheduled_actions\",\"attributes\":{\"type\":\"escalate\"},\"relationships\":{\"schedules\":{\"data\":[]},\"users\":{\"data\":[]}}},{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"status\":\"active\"}}]}"
},
"headers": {
"content-type": "application/vnd.api+json"
},
"reason": "OK",
"status": 200
}
}
],
"scenario": "Get On-Call Page returns \"OK\" response",
"version": "v2"
},
{
"feature": "On-Call",
"frozen_at": "2025-11-27T14:11:33.368Z",
Expand Down Expand Up @@ -3674,6 +3736,42 @@
"scenario": "Get team on-call users returns \"OK\" response",
"version": "v2"
},
{
"feature": "On-Call",
"frozen_at": "2026-10-19T14:46:40.993Z",
"interactions": [
{
"request": {
"body": {
"type": "empty",
"value": null
},
"content_type": "",
"method": "GET",
"path": "/api/v2/on-call/pages",
"query": [
[
"filter[query]",
"key:1"
]
]
},
"response": {
"body": {
"encoding": "text",
"value": "{\"data\":[{\"id\":\"f63eb677-07ce-46ab-b2e0-80ca1ffe91bf\",\"type\":\"pages\",\"attributes\":{\"acknowledged_at\":\"2026-09-11T10:13:30.188151252Z\",\"created_at\":\"2026-09-11T10:13:30.043027Z\",\"description\":\"\",\"escalation_policy_uuid\":\"b3a7d0b9-536b-4949-be2b-dc6ec6bbb776\",\"key\":\"1\",\"modified_at\":\"2026-09-11T10:13:30.188151252Z\",\"services\":[\"test\"],\"status\":\"acknowledged\",\"tags\":[\"service:test\"],\"title\":\"Test-Acknowledge_On_Call_Page_returns_Accepted_response-1789121607\",\"urgency\":\"low\"},\"relationships\":{\"author\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"closed_by\":{\"data\":null},\"links\":{\"data\":[]},\"responders\":{\"data\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}]},\"scheduled_action\":{\"data\":{\"id\":\"f63eb677-07ce-46ab-b2e0-80ca1ffe91bf\",\"type\":\"scheduled_actions\"}},\"target\":{\"data\":{\"id\":\"8678409c-3645-48d3-b330-a9ab6d70c6ff\",\"type\":\"teams\"}},\"team_routing_rule\":{\"data\":{\"id\":\"b2a6c72b-fdb3-4ce7-b07b-dd84af0303e9\",\"type\":\"team_routing_rules\"}}}}],\"meta\":{\"page\":{\"type\":\"number_size\",\"number\":0,\"size\":100,\"total\":1,\"first_number\":0,\"prev_number\":null,\"next_number\":null,\"last_number\":0}},\"included\":[{\"id\":\"f63eb677-07ce-46ab-b2e0-80ca1ffe91bf\",\"type\":\"scheduled_actions\",\"attributes\":{\"type\":\"escalate\"},\"relationships\":{\"schedules\":{\"data\":[]},\"users\":{\"data\":[]}}},{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"status\":\"active\"}}]}"
},
"headers": {
"content-type": "application/vnd.api+json"
},
"reason": "OK",
"status": 200
}
}
],
"scenario": "List On-Call Pages returns \"OK\" response",
"version": "v2"
},
{
"feature": "On-Call",
"frozen_at": "2026-10-21T07:56:00.111Z",
Expand Down
Loading
Loading