From dd431b1defa22a94b30d17e77060e99e1864a879 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 4 Dec 2025 16:25:50 +0000 Subject: [PATCH] Regenerate client from commit e05e083 of spec repo --- .generator/schemas/v1/openapi.yaml | 16 +++++++------- .../usage-metering/GetIncidentManagement.ts | 5 ++--- .../GetIncidentManagement_3579451115.ts | 22 +++++++++++++++++++ features/v1/usage_metering.feature | 14 ++++++++++++ .../apis/UsageMeteringApi.ts | 2 +- .../models/UsageIncidentManagementHour.ts | 2 +- .../models/UsageIncidentManagementResponse.ts | 4 ++-- .../models/UsageSummaryDate.ts | 2 +- .../models/UsageSummaryDateOrg.ts | 2 +- .../models/UsageSummaryResponse.ts | 2 +- 10 files changed, 53 insertions(+), 18 deletions(-) create mode 100644 examples/v1/usage-metering/GetIncidentManagement_3579451115.ts diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index e4c949659000..5f3344a3f4eb 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -19961,7 +19961,7 @@ components: type: array type: object UsageIncidentManagementHour: - description: Incident management usage for a given organization for a given + description: Incident Management usage for a given organization for a given hour. properties: hour: @@ -19982,11 +19982,11 @@ components: type: string type: object UsageIncidentManagementResponse: - description: Response containing the incident management usage for each hour + description: Response containing the Incident Management usage for each hour for a given organization. properties: usage: - description: Get hourly usage for incident management. + description: Get hourly usage for Incident Management. items: $ref: '#/components/schemas/UsageIncidentManagementHour' type: array @@ -21192,7 +21192,7 @@ components: format: int64 type: integer incident_management_monthly_active_users_hwm: - description: Shows the high-water mark of incident management monthly active + description: Shows the high-water mark of Incident Management monthly active users over all hours in the current date for all organizations. format: int64 type: integer @@ -22313,7 +22313,7 @@ components: description: The organization id. type: string incident_management_monthly_active_users_hwm: - description: Shows the high-water mark of incident management monthly active + description: Shows the high-water mark of Incident Management monthly active users over all hours in the current date for the given org. format: int64 type: integer @@ -23435,7 +23435,7 @@ components: format: int64 type: integer incident_management_monthly_active_users_hwm_sum: - description: Shows sum of the high-water marks of incident management monthly + description: Shows sum of the high-water marks of Incident Management monthly active users in the current month for all organizations. format: int64 type: integer @@ -36523,7 +36523,7 @@ paths: /api/v1/usage/incident-management: get: deprecated: true - description: 'Get hourly usage for incident management. + description: 'Get hourly usage for Incident Management. **Note:** This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). @@ -36579,7 +36579,7 @@ paths: appKeyAuth: [] - AuthZ: - usage_read - summary: Get hourly usage for incident management + summary: Get hourly usage for Incident Management tags: - Usage Metering x-permission: diff --git a/examples/v1/usage-metering/GetIncidentManagement.ts b/examples/v1/usage-metering/GetIncidentManagement.ts index 0efca1c74569..2adbfba60573 100644 --- a/examples/v1/usage-metering/GetIncidentManagement.ts +++ b/examples/v1/usage-metering/GetIncidentManagement.ts @@ -1,5 +1,5 @@ /** - * Get hourly usage for incident management returns "OK" response + * Get hourly usage for Incident Management returns "OK" response */ import { client, v1 } from "@datadog/datadog-api-client"; @@ -8,8 +8,7 @@ const configuration = client.createConfiguration(); const apiInstance = new v1.UsageMeteringApi(configuration); const params: v1.UsageMeteringApiGetIncidentManagementRequest = { - startHr: new Date(new Date().getTime() + -5 * 86400 * 1000), - endHr: new Date(new Date().getTime() + -3 * 86400 * 1000), + startHr: new Date(2021, 11, 11, 11, 11, 11, 111000), }; apiInstance diff --git a/examples/v1/usage-metering/GetIncidentManagement_3579451115.ts b/examples/v1/usage-metering/GetIncidentManagement_3579451115.ts new file mode 100644 index 000000000000..0efca1c74569 --- /dev/null +++ b/examples/v1/usage-metering/GetIncidentManagement_3579451115.ts @@ -0,0 +1,22 @@ +/** + * Get hourly usage for incident management returns "OK" response + */ + +import { client, v1 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v1.UsageMeteringApi(configuration); + +const params: v1.UsageMeteringApiGetIncidentManagementRequest = { + startHr: new Date(new Date().getTime() + -5 * 86400 * 1000), + endHr: new Date(new Date().getTime() + -3 * 86400 * 1000), +}; + +apiInstance + .getIncidentManagement(params) + .then((data: v1.UsageIncidentManagementResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/v1/usage_metering.feature b/features/v1/usage_metering.feature index ea9e1ca4b449..db1d3a70be30 100644 --- a/features/v1/usage_metering.feature +++ b/features/v1/usage_metering.feature @@ -125,6 +125,20 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/revenue-query + Scenario: Get hourly usage for Incident Management returns "Bad Request" response + Given new "GetIncidentManagement" request + And request contains "start_hr" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/revenue-query + Scenario: Get hourly usage for Incident Management returns "OK" response + Given new "GetIncidentManagement" request + And request contains "start_hr" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @skip @team:DataDog/revenue-query Scenario: Get hourly usage for IoT returns "Bad Request" response Given new "GetUsageInternetOfThings" request diff --git a/packages/datadog-api-client-v1/apis/UsageMeteringApi.ts b/packages/datadog-api-client-v1/apis/UsageMeteringApi.ts index 1dee51d28528..9c6a8ef33284 100644 --- a/packages/datadog-api-client-v1/apis/UsageMeteringApi.ts +++ b/packages/datadog-api-client-v1/apis/UsageMeteringApi.ts @@ -5067,7 +5067,7 @@ export class UsageMeteringApi { } /** - * Get hourly usage for incident management. + * Get hourly usage for Incident Management. * **Note:** This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family). Refer to [Migrating from the V1 Hourly Usage APIs to V2](https://docs.datadoghq.com/account_management/guide/hourly-usage-migration/) for the associated migration guide. * @param param The request object */ diff --git a/packages/datadog-api-client-v1/models/UsageIncidentManagementHour.ts b/packages/datadog-api-client-v1/models/UsageIncidentManagementHour.ts index db900dffe289..ef2e9f0fe5bf 100644 --- a/packages/datadog-api-client-v1/models/UsageIncidentManagementHour.ts +++ b/packages/datadog-api-client-v1/models/UsageIncidentManagementHour.ts @@ -7,7 +7,7 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * Incident management usage for a given organization for a given hour. + * Incident Management usage for a given organization for a given hour. */ export class UsageIncidentManagementHour { /** diff --git a/packages/datadog-api-client-v1/models/UsageIncidentManagementResponse.ts b/packages/datadog-api-client-v1/models/UsageIncidentManagementResponse.ts index 78f1a823b756..779fffc629a2 100644 --- a/packages/datadog-api-client-v1/models/UsageIncidentManagementResponse.ts +++ b/packages/datadog-api-client-v1/models/UsageIncidentManagementResponse.ts @@ -8,11 +8,11 @@ import { UsageIncidentManagementHour } from "./UsageIncidentManagementHour"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * Response containing the incident management usage for each hour for a given organization. + * Response containing the Incident Management usage for each hour for a given organization. */ export class UsageIncidentManagementResponse { /** - * Get hourly usage for incident management. + * Get hourly usage for Incident Management. */ "usage"?: Array; diff --git a/packages/datadog-api-client-v1/models/UsageSummaryDate.ts b/packages/datadog-api-client-v1/models/UsageSummaryDate.ts index 4daeb2999a86..90dca75fcd54 100644 --- a/packages/datadog-api-client-v1/models/UsageSummaryDate.ts +++ b/packages/datadog-api-client-v1/models/UsageSummaryDate.ts @@ -404,7 +404,7 @@ export class UsageSummaryDate { */ "herokuHostTop99P"?: number; /** - * Shows the high-water mark of incident management monthly active users over all hours in the current date for all organizations. + * Shows the high-water mark of Incident Management monthly active users over all hours in the current date for all organizations. */ "incidentManagementMonthlyActiveUsersHwm"?: number; /** diff --git a/packages/datadog-api-client-v1/models/UsageSummaryDateOrg.ts b/packages/datadog-api-client-v1/models/UsageSummaryDateOrg.ts index ed6a08a6ee8e..bd9a26ceae86 100644 --- a/packages/datadog-api-client-v1/models/UsageSummaryDateOrg.ts +++ b/packages/datadog-api-client-v1/models/UsageSummaryDateOrg.ts @@ -419,7 +419,7 @@ export class UsageSummaryDateOrg { */ "id"?: string; /** - * Shows the high-water mark of incident management monthly active users over all hours in the current date for the given org. + * Shows the high-water mark of Incident Management monthly active users over all hours in the current date for the given org. */ "incidentManagementMonthlyActiveUsersHwm"?: number; /** diff --git a/packages/datadog-api-client-v1/models/UsageSummaryResponse.ts b/packages/datadog-api-client-v1/models/UsageSummaryResponse.ts index 090840d13ae5..7ca804ecba28 100644 --- a/packages/datadog-api-client-v1/models/UsageSummaryResponse.ts +++ b/packages/datadog-api-client-v1/models/UsageSummaryResponse.ts @@ -417,7 +417,7 @@ export class UsageSummaryResponse { */ "herokuHostTop99PSum"?: number; /** - * Shows sum of the high-water marks of incident management monthly active users in the current month for all organizations. + * Shows sum of the high-water marks of Incident Management monthly active users in the current month for all organizations. */ "incidentManagementMonthlyActiveUsersHwmSum"?: number; /**