diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c680cd9d1d49..d5dff5c717ee 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -135317,6 +135317,10 @@ components: properties: attributes: $ref: "#/components/schemas/TimeseriesResponseAttributes" + id: + description: The identifier of the timeseries response resource. + example: "0" + type: string type: $ref: "#/components/schemas/TimeseriesFormulaResponseType" type: object @@ -136175,24 +136179,29 @@ components: properties: family: description: Unit family, allows for conversion between units of the same family, for scaling. - example: time + example: percentage type: string + id: + description: The identifier of the unit. + example: 17 + format: int64 + type: integer name: - description: Unit name - example: minute + description: Unit name. + example: percent type: string plural: description: Plural form of the unit name. - example: minutes + example: percent type: string scale_factor: description: Factor for scaling between units of the same family. - example: 60.0 + example: 1.0 format: double type: number short_name: description: Abbreviation of the unit. - example: min + example: "%" type: string type: object UnitCostCreateRequest: diff --git a/features/v2/metrics.feature b/features/v2/metrics.feature index f4078974f84e..59973467f40f 100644 --- a/features/v2/metrics.feature +++ b/features/v2/metrics.feature @@ -980,6 +980,7 @@ Feature: Metrics And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "metrics", "query": "avg:datadog.estimated_usage.metrics.custom{*}", "name": "a"}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}} When the request is sent Then the response status is 200 OK + And the response "data.id" is equal to "0" And the response "data.type" is equal to "timeseries_response" @skip-validation @team:ddoghq/timeseries-query diff --git a/packages/datadog-api-client-v2/models/TimeseriesResponse.ts b/packages/datadog-api-client-v2/models/TimeseriesResponse.ts index 83e5baac198f..55abfc5f6996 100644 --- a/packages/datadog-api-client-v2/models/TimeseriesResponse.ts +++ b/packages/datadog-api-client-v2/models/TimeseriesResponse.ts @@ -16,6 +16,10 @@ export class TimeseriesResponse { * The object describing a timeseries response. */ "attributes"?: TimeseriesResponseAttributes; + /** + * The identifier of the timeseries response resource. + */ + "id"?: string; /** * The type of the resource. The value should always be timeseries_response. */ @@ -41,6 +45,10 @@ export class TimeseriesResponse { baseName: "attributes", type: "TimeseriesResponseAttributes", }, + id: { + baseName: "id", + type: "string", + }, type: { baseName: "type", type: "TimeseriesFormulaResponseType", diff --git a/packages/datadog-api-client-v2/models/Unit.ts b/packages/datadog-api-client-v2/models/Unit.ts index 298aa0a74d5a..3251da86110e 100644 --- a/packages/datadog-api-client-v2/models/Unit.ts +++ b/packages/datadog-api-client-v2/models/Unit.ts @@ -15,7 +15,11 @@ export class Unit { */ "family"?: string; /** - * Unit name + * The identifier of the unit. + */ + "id"?: number; + /** + * Unit name. */ "name"?: string; /** @@ -51,6 +55,11 @@ export class Unit { baseName: "family", type: "string", }, + id: { + baseName: "id", + type: "number", + format: "int64", + }, name: { baseName: "name", type: "string",