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
184 changes: 184 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105453,6 +105453,54 @@ components:
type: string
x-enum-varnames:
- SCHEDULE
RerouteOnCallPageRequest:
description: Full request to reroute an On-Call Page to a different team or user.
example:
data:
attributes:
comment: Rerouting to the database team.
target:
identifier: my-team
type: team_handle
type: reroute
properties:
data:
$ref: "#/components/schemas/RerouteOnCallPageRequestData"
required:
- data
type: object
RerouteOnCallPageRequestData:
description: The data for rerouting an On-Call Page, including attributes and resource type.
properties:
attributes:
$ref: "#/components/schemas/RerouteOnCallPageRequestDataAttributes"
type:
$ref: "#/components/schemas/RerouteOnCallPageRequestDataType"
required:
- attributes
- type
type: object
RerouteOnCallPageRequestDataAttributes:
description: Details about where to reroute the On-Call Page.
properties:
comment:
description: An optional comment explaining why the page is being rerouted.
example: Rerouting to the database team.
type: string
target:
$ref: "#/components/schemas/CreatePageRequestDataAttributesTarget"
required:
- target
type: object
RerouteOnCallPageRequestDataType:
default: reroute
description: The type of resource used when rerouting an On-Call Page.
enum:
- reroute
example: reroute
type: string
x-enum-varnames:
- REROUTE
ResolveVulnerableSymbolsRequest:
description: The top-level request object for resolving vulnerable symbols in a set of packages.
properties:
Expand Down Expand Up @@ -208728,6 +208776,142 @@ paths:
summary: Escalate On-Call Page
tags:
- On-Call Paging
/api/v2/on-call/pages/{page_id}/reroute:
post:
description: |-
Reroutes an On-Call Page.
operationId: RerouteOnCallPage
parameters:
- description: The page ID.
in: path
name: page_id
required: true
schema:
example: 15e74b8b-f865-48d0-bcc5-453323ed2c8f
format: uuid
type: string
requestBody:
content:
application/json:
examples:
default:
value:
data:
attributes:
comment: Rerouting to the database team.
target:
identifier: my-team
type: team_handle
type: reroute
schema:
$ref: "#/components/schemas/RerouteOnCallPageRequest"
required: true
responses:
"204":
description: No Content.
"400":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Bad Request
"401":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Unauthorized
"403":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Forbidden
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ: []
servers:
- url: https://{site}
variables:
site:
default: navy.oncall.datadoghq.com
description: The globally available endpoint for On-Call.
enum:
- lava.oncall.datadoghq.com
- saffron.oncall.datadoghq.com
- navy.oncall.datadoghq.com
- coral.oncall.datadoghq.com
- teal.oncall.datadoghq.com
- beige.oncall.datadoghq.eu
- scarlet.oncall.datadoghq.com
x-enum-varnames:
- LAVA
- SAFFRON
- NAVY
- CORAL
- TEAL
- BEIGE
- SCARLET
- url: "{protocol}://{name}"
variables:
name:
default: navy.oncall.datadoghq.com
description: The full DNS name of the On-Call paging endpoint.
enum:
- lava.oncall.datadoghq.com
- saffron.oncall.datadoghq.com
- navy.oncall.datadoghq.com
- coral.oncall.datadoghq.com
- teal.oncall.datadoghq.com
- beige.oncall.datadoghq.eu
- scarlet.oncall.datadoghq.com
x-enum-varnames:
- LAVA
- SAFFRON
- NAVY
- CORAL
- TEAL
- BEIGE
- SCARLET
protocol:
default: https
description: The protocol for accessing the API.
- url: https://{subdomain}.{site}
variables:
site:
default: datadoghq.com
description: The Datadog site where the On-Call paging endpoint is deployed.
enum:
- datadoghq.com
- datadoghq.eu
x-enum-varnames:
- DATADOGHQ_COM
- DATADOGHQ_EU
subdomain:
default: navy.oncall
description: The On-Call paging subdomain.
enum:
- lava.oncall
- saffron.oncall
- navy.oncall
- coral.oncall
- teal.oncall
- beige.oncall
- scarlet.oncall
x-enum-varnames:
- LAVA
- SAFFRON
- NAVY
- CORAL
- TEAL
- BEIGE
- SCARLET
summary: Reroute On-Call Page
tags:
- On-Call Paging
/api/v2/on-call/pages/{page_id}/resolve:
post:
description: |-
Expand Down
43 changes: 43 additions & 0 deletions examples/v2/on-call-paging/RerouteOnCallPage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Reroute On-Call Page returns "No Content." response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.OnCallPagingApi;
import com.datadog.api.client.v2.model.CreatePageRequestDataAttributesTarget;
import com.datadog.api.client.v2.model.OnCallPageTargetType;
import com.datadog.api.client.v2.model.RerouteOnCallPageRequest;
import com.datadog.api.client.v2.model.RerouteOnCallPageRequestData;
import com.datadog.api.client.v2.model.RerouteOnCallPageRequestDataAttributes;
import com.datadog.api.client.v2.model.RerouteOnCallPageRequestDataType;
import java.util.UUID;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
OnCallPagingApi apiInstance = new OnCallPagingApi(defaultClient);

RerouteOnCallPageRequest body =
new RerouteOnCallPageRequest()
.data(
new RerouteOnCallPageRequestData()
.attributes(
new RerouteOnCallPageRequestDataAttributes()
.comment("Rerouting to the database team.")
.target(
new CreatePageRequestDataAttributesTarget()
.identifier("my-team")
.type(OnCallPageTargetType.TEAM_HANDLE)))
.type(RerouteOnCallPageRequestDataType.REROUTE));

try {
apiInstance.rerouteOnCallPage(UUID.fromString("15e74b8b-f865-48d0-bcc5-453323ed2c8f"), body);
} catch (ApiException e) {
System.err.println("Exception when calling OnCallPagingApi#rerouteOnCallPage");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
81 changes: 81 additions & 0 deletions src/main/java/com/datadog/api/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,87 @@ public class ApiClient {
"scarlet.oncall"))));
}
}))));
put(
"v2.OnCallPagingApi.rerouteOnCallPage",
new ArrayList<ServerConfiguration>(
Arrays.asList(
new ServerConfiguration(
"https://{site}",
"No description provided",
new HashMap<String, ServerVariable>() {
{
put(
"site",
new ServerVariable(
"The globally available endpoint for On-Call.",
"navy.oncall.datadoghq.com",
new HashSet<String>(
Arrays.asList(
"lava.oncall.datadoghq.com",
"saffron.oncall.datadoghq.com",
"navy.oncall.datadoghq.com",
"coral.oncall.datadoghq.com",
"teal.oncall.datadoghq.com",
"beige.oncall.datadoghq.eu",
"scarlet.oncall.datadoghq.com"))));
}
}),
new ServerConfiguration(
"{protocol}://{name}",
"No description provided",
new HashMap<String, ServerVariable>() {
{
put(
"name",
new ServerVariable(
"The full DNS name of the On-Call paging endpoint.",
"navy.oncall.datadoghq.com",
new HashSet<String>(
Arrays.asList(
"lava.oncall.datadoghq.com",
"saffron.oncall.datadoghq.com",
"navy.oncall.datadoghq.com",
"coral.oncall.datadoghq.com",
"teal.oncall.datadoghq.com",
"beige.oncall.datadoghq.eu",
"scarlet.oncall.datadoghq.com"))));
put(
"protocol",
new ServerVariable(
"The protocol for accessing the API.",
"https",
new HashSet<String>()));
}
}),
new ServerConfiguration(
"https://{subdomain}.{site}",
"No description provided",
new HashMap<String, ServerVariable>() {
{
put(
"site",
new ServerVariable(
"The Datadog site where the On-Call paging endpoint is"
+ " deployed.",
"datadoghq.com",
new HashSet<String>(
Arrays.asList("datadoghq.com", "datadoghq.eu"))));
put(
"subdomain",
new ServerVariable(
"The On-Call paging subdomain.",
"navy.oncall",
new HashSet<String>(
Arrays.asList(
"lava.oncall",
"saffron.oncall",
"navy.oncall",
"coral.oncall",
"teal.oncall",
"beige.oncall",
"scarlet.oncall"))));
}
}))));
put(
"v2.OnCallPagingApi.resolveOnCallPage",
new ArrayList<ServerConfiguration>(
Expand Down
Loading
Loading