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.rb b/examples/v1/usage-metering/GetIncidentManagement.rb index 31560e09ac3e..3c458ff6615f 100644 --- a/examples/v1/usage-metering/GetIncidentManagement.rb +++ b/examples/v1/usage-metering/GetIncidentManagement.rb @@ -1,8 +1,5 @@ -# Get hourly usage for incident management returns "OK" response +# Get hourly usage for Incident Management returns "OK" response require "datadog_api_client" api_instance = DatadogAPIClient::V1::UsageMeteringAPI.new -opts = { - end_hr: (Time.now + -3 * 86400), -} -p api_instance.get_incident_management((Time.now + -5 * 86400), opts) +p api_instance.get_incident_management("2021-11-11T11:11:11.111+00:00") diff --git a/examples/v1/usage-metering/GetIncidentManagement_3579451115.rb b/examples/v1/usage-metering/GetIncidentManagement_3579451115.rb new file mode 100644 index 000000000000..31560e09ac3e --- /dev/null +++ b/examples/v1/usage-metering/GetIncidentManagement_3579451115.rb @@ -0,0 +1,8 @@ +# Get hourly usage for incident management returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V1::UsageMeteringAPI.new +opts = { + end_hr: (Time.now + -3 * 86400), +} +p api_instance.get_incident_management((Time.now + -5 * 86400), opts) 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/lib/datadog_api_client/v1/api/usage_metering_api.rb b/lib/datadog_api_client/v1/api/usage_metering_api.rb index 0d72b2c5bebf..1a6aec4b8d10 100644 --- a/lib/datadog_api_client/v1/api/usage_metering_api.rb +++ b/lib/datadog_api_client/v1/api/usage_metering_api.rb @@ -203,7 +203,7 @@ def get_hourly_usage_attribution_with_http_info(start_hr, usage_type, opts = {}) return data, status_code, headers end - # Get hourly usage for incident management. + # Get hourly usage for Incident Management. # # @see #get_incident_management_with_http_info def get_incident_management(start_hr, opts = {}) @@ -211,9 +211,9 @@ def get_incident_management(start_hr, opts = {}) data end - # Get hourly usage for incident management. + # Get hourly usage for Incident Management. # - # 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. # # @deprecated This API is deprecated. diff --git a/lib/datadog_api_client/v1/models/usage_incident_management_hour.rb b/lib/datadog_api_client/v1/models/usage_incident_management_hour.rb index 7f9b619c6a06..c07fa06a1b77 100644 --- a/lib/datadog_api_client/v1/models/usage_incident_management_hour.rb +++ b/lib/datadog_api_client/v1/models/usage_incident_management_hour.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V1 - # Incident management usage for a given organization for a given hour. + # Incident Management usage for a given organization for a given hour. class UsageIncidentManagementHour include BaseGenericModel diff --git a/lib/datadog_api_client/v1/models/usage_incident_management_response.rb b/lib/datadog_api_client/v1/models/usage_incident_management_response.rb index 36de3ebf9e3c..ad3ae87f2f56 100644 --- a/lib/datadog_api_client/v1/models/usage_incident_management_response.rb +++ b/lib/datadog_api_client/v1/models/usage_incident_management_response.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V1 - # 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. class UsageIncidentManagementResponse include BaseGenericModel - # Get hourly usage for incident management. + # Get hourly usage for Incident Management. attr_accessor :usage attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v1/models/usage_summary_date.rb b/lib/datadog_api_client/v1/models/usage_summary_date.rb index 44a2049215b9..694b14402b46 100644 --- a/lib/datadog_api_client/v1/models/usage_summary_date.rb +++ b/lib/datadog_api_client/v1/models/usage_summary_date.rb @@ -315,7 +315,7 @@ class UsageSummaryDate # Shows the 99th percentile of all Heroku dynos over all hours in the current date for all organizations. attr_accessor :heroku_host_top99p - # 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. attr_accessor :incident_management_monthly_active_users_hwm # Shows the high-water mark of Incident Management seats over all hours on the current date for all organizations. diff --git a/lib/datadog_api_client/v1/models/usage_summary_date_org.rb b/lib/datadog_api_client/v1/models/usage_summary_date_org.rb index c51b8ecd705d..54652b6ceace 100644 --- a/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +++ b/lib/datadog_api_client/v1/models/usage_summary_date_org.rb @@ -327,7 +327,7 @@ class UsageSummaryDateOrg # The organization id. attr_accessor :id - # 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. attr_accessor :incident_management_monthly_active_users_hwm # Shows the high-water mark of Incident Management seats over all hours on the current date for the given organization. diff --git a/lib/datadog_api_client/v1/models/usage_summary_response.rb b/lib/datadog_api_client/v1/models/usage_summary_response.rb index d0b9648dca4b..5ffcebc75c7f 100644 --- a/lib/datadog_api_client/v1/models/usage_summary_response.rb +++ b/lib/datadog_api_client/v1/models/usage_summary_response.rb @@ -324,7 +324,7 @@ class UsageSummaryResponse # Shows the 99th percentile of all Heroku dynos over all hours in the current month for all organizations. attr_accessor :heroku_host_top99p_sum - # 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. attr_accessor :incident_management_monthly_active_users_hwm_sum # Shows the sum of the high-water marks of Incident Management seats over all hours in the current month for all organizations.