Skip to content

Fix for on-call escalation policies endpoint #2813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-17 13:26:18.289754",
"spec_repo_commit": "12ab5180"
"regenerated": "2025-04-18 07:31:52.394104",
"spec_repo_commit": "2b7612d8"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-17 13:26:18.308287",
"spec_repo_commit": "12ab5180"
"regenerated": "2025-04-18 07:31:52.414261",
"spec_repo_commit": "2b7612d8"
}
}
}
41 changes: 14 additions & 27 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12889,13 +12889,6 @@ components:
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:
Expand Down Expand Up @@ -12932,7 +12925,7 @@ components:
type: string
name:
description: Specifies the name for the new escalation policy.
example: On-call Escalation Policy
example: On-Call Escalation Policy
type: string
resolve_page_on_policy_end:
description: Indicates whether the page is automatically resolved when the
Expand Down Expand Up @@ -12975,15 +12968,13 @@ components:
type: object
EscalationPolicyCreateRequestDataAttributesStepsItemsAssignment:
description: Specifies how this escalation step will assign targets (example
`default` or `round-robin`).
`default`).
enum:
- default
- round-robin
example: default
type: string
x-enum-varnames:
- DEFAULT
- ROUND_ROBIN
EscalationPolicyCreateRequestDataAttributesStepsItemsTargetsItems:
description: Defines a single escalation target within a step for an escalation
policy creation request. Contains `id` and `type`.
Expand Down Expand Up @@ -13065,24 +13056,24 @@ components:
$ref: '#/components/schemas/EscalationPolicyDataAttributes'
id:
description: Specifies the unique identifier of the escalation policy.
example: ab000000-0000-0000-0000-000000000000
type: string
relationships:
$ref: '#/components/schemas/EscalationPolicyDataRelationships'
type:
$ref: '#/components/schemas/EscalationPolicyDataType'
required:
- type
type: object
EscalationPolicyDataAttributes:
description: Defines the main attributes of an escalation policy, such as its
description, name, and behavior on policy end.
properties:
description:
description: Provides a detailed text description of the escalation policy.
example: This is an escalation policy for on-call support.
type: string
name:
description: Specifies the name of the escalation policy.
example: On-call Escalation Policy
example: On-Call Escalation Policy
type: string
resolve_page_on_policy_end:
description: Indicates whether the page is automatically resolved when the
Expand All @@ -13091,10 +13082,9 @@ components:
retries:
description: Specifies how many times the escalation sequence is retried
if there is no response.
example: 2
format: int64
type: integer
required:
- name
type: object
EscalationPolicyDataRelationships:
description: Represents the relationships for an escalation policy, including
Expand Down Expand Up @@ -13223,14 +13213,12 @@ components:
type: object
EscalationPolicyStepAttributesAssignment:
description: Specifies how this escalation step will assign targets (example
`default` or `round-robin`).
`default`).
enum:
- default
- round-robin
type: string
x-enum-varnames:
- DEFAULT
- ROUND_ROBIN
EscalationPolicyStepRelationships:
description: Represents the relationship of an escalation policy step to its
targets.
Expand Down Expand Up @@ -13308,7 +13296,7 @@ components:
type: string
name:
description: Specifies the name of the escalation policy.
example: On-call Escalation Policy
example: On-Call Escalation Policy
type: string
resolve_page_on_policy_end:
description: Indicates whether the page is automatically resolved when the
Expand Down Expand Up @@ -13356,15 +13344,13 @@ components:
type: object
EscalationPolicyUpdateRequestDataAttributesStepsItemsAssignment:
description: Specifies how this escalation step will assign targets (example
`default` or `round-robin`).
`default`).
enum:
- default
- round-robin
example: default
type: string
x-enum-varnames:
- DEFAULT
- ROUND_ROBIN
EscalationPolicyUpdateRequestDataAttributesStepsItemsTargetsItems:
description: Defines a single escalation target within a step for an escalation
policy update request. Contains `id` and `type`.
Expand Down Expand Up @@ -27999,6 +27985,7 @@ components:
$ref: '#/components/schemas/ScheduleCreateRequestDataType'
required:
- type
- attributes
type: object
ScheduleCreateRequestDataAttributes:
description: Describes the main attributes for creating a new schedule, including
Expand Down Expand Up @@ -47474,7 +47461,7 @@ paths:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ: []
summary: Create on call escalation policy
summary: Create on-call escalation policy
tags:
- On-Call
/api/v2/on-call/escalation-policies/{policy_id}:
Expand Down Expand Up @@ -47504,7 +47491,7 @@ paths:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ: []
summary: Delete on call escalation policy
summary: Delete on-call escalation policy
tags:
- On-Call
get:
Expand Down Expand Up @@ -47545,7 +47532,7 @@ paths:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ: []
summary: Get on call escalation policy
summary: Get on-call escalation policy
tags:
- On-Call
put:
Expand Down Expand Up @@ -47592,7 +47579,7 @@ paths:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ: []
summary: Update on call escalation policy
summary: Update on-call escalation policy
tags:
- On-Call
/api/v2/on-call/schedules:
Expand Down
16 changes: 2 additions & 14 deletions examples/v2/on-call/CreateOnCallEscalationPolicy.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Create on call escalation policy returns "Created" response
// Create on-call escalation policy returns "Created" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
Expand Down Expand Up @@ -44,7 +44,7 @@ public static void main(String[] args) {
.resolvePageOnPolicyEnd(true)
.retries(2L)
.steps(
Arrays.asList(
Collections.singletonList(
new EscalationPolicyCreateRequestDataAttributesStepsItems()
.assignment(
EscalationPolicyCreateRequestDataAttributesStepsItemsAssignment
Expand All @@ -62,18 +62,6 @@ public static void main(String[] args) {
.type(
EscalationPolicyCreateRequestDataAttributesStepsItemsTargetsItemsType
.SCHEDULES),
new EscalationPolicyCreateRequestDataAttributesStepsItemsTargetsItems()
.id(DD_TEAM_DATA_ID)
.type(
EscalationPolicyCreateRequestDataAttributesStepsItemsTargetsItemsType
.TEAMS))),
new EscalationPolicyCreateRequestDataAttributesStepsItems()
.assignment(
EscalationPolicyCreateRequestDataAttributesStepsItemsAssignment
.ROUND_ROBIN)
.escalateAfterSeconds(3600L)
.targets(
Collections.singletonList(
new EscalationPolicyCreateRequestDataAttributesStepsItemsTargetsItems()
.id(DD_TEAM_DATA_ID)
.type(
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/on-call/DeleteOnCallEscalationPolicy.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Delete on call escalation policy returns "No Content" response
// Delete on-call escalation policy returns "No Content" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/on-call/GetOnCallEscalationPolicy.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Get on call escalation policy returns "OK" response
// Get on-call escalation policy returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/on-call/UpdateOnCallEscalationPolicy.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Update on call escalation policy returns "OK" response
// Update on-call escalation policy returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
Expand Down
36 changes: 18 additions & 18 deletions src/main/java/com/datadog/api/client/v2/api/OnCallApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public CreateOnCallEscalationPolicyOptionalParameters include(String include) {
}

/**
* Create on call escalation policy.
* Create on-call escalation policy.
*
* <p>See {@link #createOnCallEscalationPolicyWithHttpInfo}.
*
Expand All @@ -83,7 +83,7 @@ body, new CreateOnCallEscalationPolicyOptionalParameters())
}

/**
* Create on call escalation policy.
* Create on-call escalation policy.
*
* <p>See {@link #createOnCallEscalationPolicyWithHttpInfoAsync}.
*
Expand All @@ -101,7 +101,7 @@ body, new CreateOnCallEscalationPolicyOptionalParameters())
}

/**
* Create on call escalation policy.
* Create on-call escalation policy.
*
* <p>See {@link #createOnCallEscalationPolicyWithHttpInfo}.
*
Expand All @@ -117,7 +117,7 @@ public EscalationPolicy createOnCallEscalationPolicy(
}

/**
* Create on call escalation policy.
* Create on-call escalation policy.
*
* <p>See {@link #createOnCallEscalationPolicyWithHttpInfoAsync}.
*
Expand Down Expand Up @@ -193,7 +193,7 @@ public ApiResponse<EscalationPolicy> createOnCallEscalationPolicyWithHttpInfo(
}

/**
* Create on call escalation policy.
* Create on-call escalation policy.
*
* <p>See {@link #createOnCallEscalationPolicyWithHttpInfo}.
*
Expand Down Expand Up @@ -449,7 +449,7 @@ public CompletableFuture<ApiResponse<Schedule>> createOnCallScheduleWithHttpInfo
}

/**
* Delete on call escalation policy.
* Delete on-call escalation policy.
*
* <p>See {@link #deleteOnCallEscalationPolicyWithHttpInfo}.
*
Expand All @@ -461,7 +461,7 @@ public void deleteOnCallEscalationPolicy(String policyId) throws ApiException {
}

/**
* Delete on call escalation policy.
* Delete on-call escalation policy.
*
* <p>See {@link #deleteOnCallEscalationPolicyWithHttpInfoAsync}.
*
Expand Down Expand Up @@ -531,7 +531,7 @@ public ApiResponse<Void> deleteOnCallEscalationPolicyWithHttpInfo(String policyI
}

/**
* Delete on call escalation policy.
* Delete on-call escalation policy.
*
* <p>See {@link #deleteOnCallEscalationPolicyWithHttpInfo}.
*
Expand Down Expand Up @@ -741,7 +741,7 @@ public GetOnCallEscalationPolicyOptionalParameters include(String include) {
}

/**
* Get on call escalation policy.
* Get on-call escalation policy.
*
* <p>See {@link #getOnCallEscalationPolicyWithHttpInfo}.
*
Expand All @@ -756,7 +756,7 @@ policyId, new GetOnCallEscalationPolicyOptionalParameters())
}

/**
* Get on call escalation policy.
* Get on-call escalation policy.
*
* <p>See {@link #getOnCallEscalationPolicyWithHttpInfoAsync}.
*
Expand All @@ -773,7 +773,7 @@ policyId, new GetOnCallEscalationPolicyOptionalParameters())
}

/**
* Get on call escalation policy.
* Get on-call escalation policy.
*
* <p>See {@link #getOnCallEscalationPolicyWithHttpInfo}.
*
Expand All @@ -788,7 +788,7 @@ public EscalationPolicy getOnCallEscalationPolicy(
}

/**
* Get on call escalation policy.
* Get on-call escalation policy.
*
* <p>See {@link #getOnCallEscalationPolicyWithHttpInfoAsync}.
*
Expand Down Expand Up @@ -865,7 +865,7 @@ public ApiResponse<EscalationPolicy> getOnCallEscalationPolicyWithHttpInfo(
}

/**
* Get on call escalation policy.
* Get on-call escalation policy.
*
* <p>See {@link #getOnCallEscalationPolicyWithHttpInfo}.
*
Expand Down Expand Up @@ -1143,7 +1143,7 @@ public UpdateOnCallEscalationPolicyOptionalParameters include(String include) {
}

/**
* Update on call escalation policy.
* Update on-call escalation policy.
*
* <p>See {@link #updateOnCallEscalationPolicyWithHttpInfo}.
*
Expand All @@ -1160,7 +1160,7 @@ policyId, body, new UpdateOnCallEscalationPolicyOptionalParameters())
}

/**
* Update on call escalation policy.
* Update on-call escalation policy.
*
* <p>See {@link #updateOnCallEscalationPolicyWithHttpInfoAsync}.
*
Expand All @@ -1179,7 +1179,7 @@ policyId, body, new UpdateOnCallEscalationPolicyOptionalParameters())
}

/**
* Update on call escalation policy.
* Update on-call escalation policy.
*
* <p>See {@link #updateOnCallEscalationPolicyWithHttpInfo}.
*
Expand All @@ -1198,7 +1198,7 @@ public EscalationPolicy updateOnCallEscalationPolicy(
}

/**
* Update on call escalation policy.
* Update on-call escalation policy.
*
* <p>See {@link #updateOnCallEscalationPolicyWithHttpInfoAsync}.
*
Expand Down Expand Up @@ -1289,7 +1289,7 @@ public ApiResponse<EscalationPolicy> updateOnCallEscalationPolicyWithHttpInfo(
}

/**
* Update on call escalation policy.
* Update on-call escalation policy.
*
* <p>See {@link #updateOnCallEscalationPolicyWithHttpInfo}.
*
Expand Down
Loading
Loading