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
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.2",
"regenerated": "2022-08-16 17:55:56.837263",
"spec_repo_commit": "56625080"
"regenerated": "2022-08-17 14:32:13.711845",
"spec_repo_commit": "a957cd49"
},
"v2": {
"apigentools_version": "1.6.2",
"regenerated": "2022-08-16 17:55:56.854866",
"spec_repo_commit": "56625080"
"regenerated": "2022-08-17 14:32:13.727125",
"spec_repo_commit": "a957cd49"
}
}
}
50 changes: 30 additions & 20 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17919,7 +17919,12 @@ paths:
/api/v1/daily_custom_reports:
get:
deprecated: true
description: Get daily custom reports.
description: 'Get daily custom reports.

**Note:** This endpoint will be fully deprecated on December 1, 2022.

Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/)
for the associated migration guide.'
operationId: GetDailyCustomReports
parameters:
- description: The number of files to return in the response. `[default=60]`.
Expand Down Expand Up @@ -17979,13 +17984,15 @@ paths:
x-menu-order: 41
x-undo:
type: safe
x-unstable: '**Note**: This endpoint is in public beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v1/daily_custom_reports/{report_id}:
get:
deprecated: true
description: Get specified daily custom reports.
description: 'Get specified daily custom reports.

**Note:** This endpoint will be fully deprecated on December 1, 2022.

Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/)
for the associated migration guide.'
operationId: GetSpecifiedDailyCustomReports
parameters:
- description: Date of the report in the format `YYYY-MM-DD`.
Expand Down Expand Up @@ -18030,9 +18037,6 @@ paths:
x-menu-order: 42
x-undo:
type: safe
x-unstable: '**Note**: This endpoint is in public beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v1/dashboard:
delete:
description: Delete dashboards using the specified IDs. If there are any failures,
Expand Down Expand Up @@ -23175,7 +23179,12 @@ paths:
/api/v1/monthly_custom_reports:
get:
deprecated: true
description: Get monthly custom reports.
description: 'Get monthly custom reports.

**Note:** This endpoint will be fully deprecated on December 1, 2022.

Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/)
for the associated migration guide.'
operationId: GetMonthlyCustomReports
parameters:
- description: The number of files to return in the response `[default=60].`
Expand Down Expand Up @@ -23235,13 +23244,15 @@ paths:
x-menu-order: 43
x-undo:
type: safe
x-unstable: '**Note**: This endpoint is in public beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v1/monthly_custom_reports/{report_id}:
get:
deprecated: true
description: Get specified monthly custom reports.
description: 'Get specified monthly custom reports.

**Note:** This endpoint will be fully deprecated on December 1, 2022.

Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/)
for the associated migration guide.'
operationId: GetSpecifiedMonthlyCustomReports
parameters:
- description: Date of the report in the format `YYYY-MM-DD`.
Expand Down Expand Up @@ -23292,9 +23303,6 @@ paths:
x-menu-order: 44
x-undo:
type: safe
x-unstable: '**Note**: This endpoint is in public beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v1/notebooks:
get:
description: 'Get all notebooks. This can also be used to search for notebooks
Expand Down Expand Up @@ -26820,7 +26828,12 @@ paths:
/api/v1/usage/attribution:
get:
deprecated: true
description: Get usage attribution.
description: 'Get usage attribution.

**Note:** This endpoint will be fully deprecated on December 1, 2022.

Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/)
for the associated migration guide.'
operationId: GetUsageAttribution
parameters:
- description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]`
Expand Down Expand Up @@ -26909,9 +26922,6 @@ paths:
x-menu-order: 40
x-undo:
type: safe
x-unstable: '**Note**: This endpoint is in public beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v1/usage/audit_logs:
get:
description: 'Get hourly usage for audit logs.
Expand Down
3 changes: 0 additions & 3 deletions examples/v1/usage-metering/GetDailyCustomReports.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Get the list of available daily custom reports returns "OK" response

require "datadog_api_client"
DatadogAPIClient::V2.configure do |config|
config.unstable_operations["v1.get_daily_custom_reports".to_sym] = true
end
api_instance = DatadogAPIClient::V1::UsageMeteringAPI.new
p api_instance.get_daily_custom_reports()
3 changes: 0 additions & 3 deletions examples/v1/usage-metering/GetMonthlyCustomReports.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Get the list of available monthly custom reports returns "OK" response

require "datadog_api_client"
DatadogAPIClient::V2.configure do |config|
config.unstable_operations["v1.get_monthly_custom_reports".to_sym] = true
end
api_instance = DatadogAPIClient::V1::UsageMeteringAPI.new
p api_instance.get_monthly_custom_reports()
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Get specified daily custom reports returns "OK" response

require "datadog_api_client"
DatadogAPIClient::V2.configure do |config|
config.unstable_operations["v1.get_specified_daily_custom_reports".to_sym] = true
end
api_instance = DatadogAPIClient::V1::UsageMeteringAPI.new
p api_instance.get_specified_daily_custom_reports("2022-03-20")
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Get specified monthly custom reports returns "OK" response

require "datadog_api_client"
DatadogAPIClient::V2.configure do |config|
config.unstable_operations["v1.get_specified_monthly_custom_reports".to_sym] = true
end
api_instance = DatadogAPIClient::V1::UsageMeteringAPI.new
p api_instance.get_specified_monthly_custom_reports("2021-05-01")
3 changes: 0 additions & 3 deletions examples/v1/usage-metering/GetUsageAttribution.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Get usage attribution returns "OK" response

require "datadog_api_client"
DatadogAPIClient::V2.configure do |config|
config.unstable_operations["v1.get_usage_attribution".to_sym] = true
end
api_instance = DatadogAPIClient::V1::UsageMeteringAPI.new
opts = {
offset: 0,
Expand Down
24 changes: 8 additions & 16 deletions features/v1/usage_metering.feature
Original file line number Diff line number Diff line change
Expand Up @@ -675,55 +675,48 @@ Feature: Usage Metering

@generated @skip @team:DataDog/red-zone-revenue-query
Scenario: Get specified daily custom reports returns "Not Found" response
Given operation "GetSpecifiedDailyCustomReports" enabled
And new "GetSpecifiedDailyCustomReports" request
Given new "GetSpecifiedDailyCustomReports" request
And request contains "report_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@replay-only @team:DataDog/red-zone-revenue-query
Scenario: Get specified daily custom reports returns "OK" response
Given operation "GetSpecifiedDailyCustomReports" enabled
And new "GetSpecifiedDailyCustomReports" request
Given new "GetSpecifiedDailyCustomReports" request
And request contains "report_id" parameter with value "2022-03-20"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/red-zone-revenue-query
Scenario: Get specified monthly custom reports returns "Bad Request" response
Given operation "GetSpecifiedMonthlyCustomReports" enabled
And new "GetSpecifiedMonthlyCustomReports" request
Given new "GetSpecifiedMonthlyCustomReports" request
And request contains "report_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/red-zone-revenue-query
Scenario: Get specified monthly custom reports returns "Not Found" response
Given operation "GetSpecifiedMonthlyCustomReports" enabled
And new "GetSpecifiedMonthlyCustomReports" request
Given new "GetSpecifiedMonthlyCustomReports" request
And request contains "report_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@replay-only @team:DataDog/red-zone-revenue-query
Scenario: Get specified monthly custom reports returns "OK" response
Given operation "GetSpecifiedMonthlyCustomReports" enabled
And new "GetSpecifiedMonthlyCustomReports" request
Given new "GetSpecifiedMonthlyCustomReports" request
And request contains "report_id" parameter with value "2021-05-01"
When the request is sent
Then the response status is 200 OK

@team:DataDog/red-zone-revenue-query
Scenario: Get the list of available daily custom reports returns "OK" response
Given operation "GetDailyCustomReports" enabled
And new "GetDailyCustomReports" request
Given new "GetDailyCustomReports" request
When the request is sent
Then the response status is 200 OK

@team:DataDog/red-zone-revenue-query
Scenario: Get the list of available monthly custom reports returns "OK" response
Given operation "GetMonthlyCustomReports" enabled
And new "GetMonthlyCustomReports" request
Given new "GetMonthlyCustomReports" request
When the request is sent
Then the response status is 200 OK

Expand All @@ -743,8 +736,7 @@ Feature: Usage Metering

@team:DataDog/red-zone-revenue-query
Scenario: Get usage attribution returns "OK" response
Given operation "GetUsageAttribution" enabled
And new "GetUsageAttribution" request
Given new "GetUsageAttribution" request
And request contains "start_month" parameter with value "{{ timeISO('now - 3d') }}"
And request contains "fields" parameter with value "*"
And request contains "offset" parameter with value 0
Expand Down
5 changes: 0 additions & 5 deletions lib/datadog_api_client/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,6 @@ def initialize
@compress = true
@logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
@unstable_operations = {
"v1.get_daily_custom_reports": false,
"v1.get_monthly_custom_reports": false,
"v1.get_specified_daily_custom_reports": false,
"v1.get_specified_monthly_custom_reports": false,
"v1.get_usage_attribution": false,
"v1.get_slo_history": false,
"v1.search_slo": false,
"v2.list_events": false,
Expand Down
40 changes: 10 additions & 30 deletions lib/datadog_api_client/v1/api/usage_metering_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def get_daily_custom_reports(opts = {})
# Get the list of available daily custom reports.
#
# Get daily custom reports.
# **Note:** This endpoint will be fully deprecated on December 1, 2022.
# Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) for the associated migration guide.
#
# @param opts [Hash] the optional parameters
# @option opts [Integer] :page_size The number of files to return in the response. `[default=60]`.
Expand All @@ -42,12 +44,6 @@ def get_daily_custom_reports(opts = {})
# @option opts [UsageSort] :sort The field to sort by: `[computed_on, size, start_date, end_date]`.
# @return [Array<(UsageCustomReportsResponse, Integer, Hash)>] UsageCustomReportsResponse data, response status code and response headers
def get_daily_custom_reports_with_http_info(opts = {})
unstable_enabled = @api_client.config.unstable_operations["v1.get_daily_custom_reports".to_sym]
if unstable_enabled
@api_client.config.logger.warn format("Using unstable operation '%s'", "v1.get_daily_custom_reports")
else
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v1.get_daily_custom_reports"))
end

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_daily_custom_reports ...'
Expand Down Expand Up @@ -353,6 +349,8 @@ def get_monthly_custom_reports(opts = {})
# Get the list of available monthly custom reports.
#
# Get monthly custom reports.
# **Note:** This endpoint will be fully deprecated on December 1, 2022.
# Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) for the associated migration guide.
#
# @param opts [Hash] the optional parameters
# @option opts [Integer] :page_size The number of files to return in the response `[default=60].`
Expand All @@ -361,12 +359,6 @@ def get_monthly_custom_reports(opts = {})
# @option opts [UsageSort] :sort The field to sort by: `[computed_on, size, start_date, end_date]`.
# @return [Array<(UsageCustomReportsResponse, Integer, Hash)>] UsageCustomReportsResponse data, response status code and response headers
def get_monthly_custom_reports_with_http_info(opts = {})
unstable_enabled = @api_client.config.unstable_operations["v1.get_monthly_custom_reports".to_sym]
if unstable_enabled
@api_client.config.logger.warn format("Using unstable operation '%s'", "v1.get_monthly_custom_reports")
else
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v1.get_monthly_custom_reports"))
end

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_monthly_custom_reports ...'
Expand Down Expand Up @@ -546,17 +538,13 @@ def get_specified_daily_custom_reports(report_id, opts = {})
# Get specified daily custom reports.
#
# Get specified daily custom reports.
# **Note:** This endpoint will be fully deprecated on December 1, 2022.
# Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) for the associated migration guide.
#
# @param report_id [String] Date of the report in the format `YYYY-MM-DD`.
# @param opts [Hash] the optional parameters
# @return [Array<(UsageSpecifiedCustomReportsResponse, Integer, Hash)>] UsageSpecifiedCustomReportsResponse data, response status code and response headers
def get_specified_daily_custom_reports_with_http_info(report_id, opts = {})
unstable_enabled = @api_client.config.unstable_operations["v1.get_specified_daily_custom_reports".to_sym]
if unstable_enabled
@api_client.config.logger.warn format("Using unstable operation '%s'", "v1.get_specified_daily_custom_reports")
else
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v1.get_specified_daily_custom_reports"))
end

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_specified_daily_custom_reports ...'
Expand Down Expand Up @@ -617,17 +605,13 @@ def get_specified_monthly_custom_reports(report_id, opts = {})
# Get specified monthly custom reports.
#
# Get specified monthly custom reports.
# **Note:** This endpoint will be fully deprecated on December 1, 2022.
# Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) for the associated migration guide.
#
# @param report_id [String] Date of the report in the format `YYYY-MM-DD`.
# @param opts [Hash] the optional parameters
# @return [Array<(UsageSpecifiedCustomReportsResponse, Integer, Hash)>] UsageSpecifiedCustomReportsResponse data, response status code and response headers
def get_specified_monthly_custom_reports_with_http_info(report_id, opts = {})
unstable_enabled = @api_client.config.unstable_operations["v1.get_specified_monthly_custom_reports".to_sym]
if unstable_enabled
@api_client.config.logger.warn format("Using unstable operation '%s'", "v1.get_specified_monthly_custom_reports")
else
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v1.get_specified_monthly_custom_reports"))
end

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_specified_monthly_custom_reports ...'
Expand Down Expand Up @@ -757,6 +741,8 @@ def get_usage_attribution(start_month, fields, opts = {})
# Get usage attribution.
#
# Get usage attribution.
# **Note:** This endpoint will be fully deprecated on December 1, 2022.
# Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) for the associated migration guide.
#
# @param start_month [Time] Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month. Maximum of 15 months ago.
# @param fields [UsageAttributionSupportedMetrics] Comma-separated list of usage types to return, or `*` for all usage types.
Expand All @@ -769,12 +755,6 @@ def get_usage_attribution(start_month, fields, opts = {})
# @option opts [Integer] :limit Maximum number of records to be returned.
# @return [Array<(UsageAttributionResponse, Integer, Hash)>] UsageAttributionResponse data, response status code and response headers
def get_usage_attribution_with_http_info(start_month, fields, opts = {})
unstable_enabled = @api_client.config.unstable_operations["v1.get_usage_attribution".to_sym]
if unstable_enabled
@api_client.config.logger.warn format("Using unstable operation '%s'", "v1.get_usage_attribution")
else
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v1.get_usage_attribution"))
end

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_attribution ...'
Expand Down