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
797 changes: 794 additions & 3 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/v2/report-schedules/CreateReportSchedule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const params: v2.ReportSchedulesApiCreateReportScheduleRequest = {
values: ["prod"],
},
],
timeframe: "calendar_month",
timeframe: "1w",
timezone: "America/New_York",
title: "Weekly Infrastructure Report",
},
Expand Down
21 changes: 21 additions & 0 deletions examples/v2/report-schedules/DeleteReportSchedule.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Delete a report schedule returns "OK" response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.ReportSchedulesApi(configuration);

const params: v2.ReportSchedulesApiDeleteReportScheduleRequest = {
scheduleUuid: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
};

apiInstance
.deleteReportSchedule(params)
.then((data: v2.ReportScheduleResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
21 changes: 21 additions & 0 deletions examples/v2/report-schedules/GetReportSchedule.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Get a report schedule returns "OK" response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.ReportSchedulesApi(configuration);

const params: v2.ReportSchedulesApiGetReportScheduleRequest = {
scheduleUuid: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
};

apiInstance
.getReportSchedule(params)
.then((data: v2.ReportScheduleResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
22 changes: 22 additions & 0 deletions examples/v2/report-schedules/GetReportSchedulesForResource.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Get report schedules for a resource returns "OK" response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.ReportSchedulesApi(configuration);

const params: v2.ReportSchedulesApiGetReportSchedulesForResourceRequest = {
resourceType: "dashboard",
resourceId: "resource_id",
};

apiInstance
.getReportSchedulesForResource(params)
.then((data: v2.ReportScheduleListResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
17 changes: 17 additions & 0 deletions examples/v2/report-schedules/ListReportSchedules.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* List report schedules returns "OK" response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.ReportSchedulesApi(configuration);

apiInstance
.listReportSchedules()
.then((data: v2.ReportScheduleListResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
2 changes: 1 addition & 1 deletion examples/v2/report-schedules/PatchReportSchedule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const params: v2.ReportSchedulesApiPatchReportScheduleRequest = {
values: ["prod"],
},
],
timeframe: "calendar_month",
timeframe: "1w",
timezone: "America/New_York",
title: "Weekly Infrastructure Report",
},
Expand Down
29 changes: 29 additions & 0 deletions examples/v2/report-schedules/ToggleReportSchedule.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* Toggle a report schedule returns "OK" response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.ReportSchedulesApi(configuration);

const params: v2.ReportSchedulesApiToggleReportScheduleRequest = {
body: {
data: {
attributes: {
status: "active",
},
type: "schedule",
},
},
scheduleUuid: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
};

apiInstance
.toggleReportSchedule(params)
.then((data: v2.ReportScheduleResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
59 changes: 59 additions & 0 deletions features/support/scenarios_model_mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13775,6 +13775,54 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
},
"operationResponseType": "ReportScheduleResponse",
},
"v2.ListReportSchedules": {
"pageLimit": {
"type": "number",
"format": "int64",
},
"pageOffset": {
"type": "number",
"format": "int64",
},
"filterTitle": {
"type": "string",
"format": "",
},
"filterAuthorUuid": {
"type": "string",
"format": "uuid",
},
"filterRecipients": {
"type": "string",
"format": "",
},
"operationResponseType": "ReportScheduleListResponse",
},
"v2.GetReportSchedulesForResource": {
"resourceType": {
"type": "ReportScheduleResourceType",
"format": "",
},
"resourceId": {
"type": "string",
"format": "",
},
"operationResponseType": "ReportScheduleListResponse",
},
"v2.GetReportSchedule": {
"scheduleUuid": {
"type": "string",
"format": "uuid",
},
"operationResponseType": "ReportScheduleResponse",
},
"v2.DeleteReportSchedule": {
"scheduleUuid": {
"type": "string",
"format": "uuid",
},
"operationResponseType": "ReportScheduleResponse",
},
"v2.PatchReportSchedule": {
"scheduleUuid": {
"type": "string",
Expand All @@ -13786,6 +13834,17 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
},
"operationResponseType": "ReportScheduleResponse",
},
"v2.ToggleReportSchedule": {
"scheduleUuid": {
"type": "string",
"format": "uuid",
},
"body": {
"type": "ReportScheduleToggleRequest",
"format": "",
},
"operationResponseType": "ReportScheduleResponse",
},
"v2.GetRestrictionPolicy": {
"resourceId": {
"type": "string",
Expand Down
Loading
Loading