Get available fields for usage summary

GET https://api.ap1.datadoghq.com/api/v2/usage/summary/available_fieldshttps://api.ap2.datadoghq.com/api/v2/usage/summary/available_fieldshttps://api.datadoghq.eu/api/v2/usage/summary/available_fieldshttps://api.ddog-gov.com/api/v2/usage/summary/available_fieldshttps://api.us2.ddog-gov.com/api/v2/usage/summary/available_fieldshttps://api.datadoghq.com/api/v2/usage/summary/available_fieldshttps://api.us3.datadoghq.com/api/v2/usage/summary/available_fieldshttps://api.us5.datadoghq.com/api/v2/usage/summary/available_fields

Overview

List the field names returned by GET /api/v1/usage/summary at each of its three response levels. Each list contains every key the data endpoint emits—both typed fields declared in the OpenAPI spec and untyped keys exposed through additionalProperties (the latter used for billing dimensions and usage types added after the v1 schema freeze).

This endpoint is only accessible for parent-level organizations.

This endpoint requires the usage_read permission.

OAuth apps require the usage_read authorization scope to access this endpoint.

Response

OK.

Response listing every field name returned by GET /api/v1/usage/summary at each of its three response levels. Includes both typed fields and untyped additionalProperties keys.

Expand All

Field

Type

Description

data

object

Available-fields data.

attributes

object

The lists of field names returned by GET /api/v1/usage/summary at each of its three response levels. Each list contains every key the data endpoint emits—both typed fields declared in the OpenAPI spec and untyped keys exposed through additionalProperties.

date_fields

[string]

Sorted list of every key returned inside each UsageSummaryDate entry of usage[] (typed fields and additionalProperties keys combined).

date_org_fields

[string]

Sorted list of every key returned inside each UsageSummaryDateOrg entry of usage[].orgs[] (typed fields and additionalProperties keys combined).

response_fields

[string]

Sorted list of every key returned as a direct property of UsageSummaryResponse (typed fields and additionalProperties keys combined).

id

string

The identifier for the discovery scope. Always "all".

type

enum

Type of available-fields data. Allowed enum values: usage_summary_available_fields

default: usage_summary_available_fields

{
  "data": {
    "attributes": {
      "date_fields": [],
      "date_org_fields": [],
      "response_fields": []
    },
    "id": "all",
    "type": "string"
  }
}

Forbidden - User is not authorized.

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Too many requests.

API error response.

Expand All

Field

Type

Description

errors [required]

[string]

A list of errors.

{
  "errors": [
    "Bad Request"
  ]
}

Code Example

                  # Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/usage/summary/available_fields" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"