diff --git a/hugo/config/_default/menus/api.en.yaml b/hugo/config/_default/menus/api.en.yaml index d53cab62b8d..f673cd40585 100644 --- a/hugo/config/_default/menus/api.en.yaml +++ b/hugo/config/_default/menus/api.en.yaml @@ -6277,6 +6277,58 @@ menu: - GetUsageSummaryAvailableFields unstable: [] order: 13 + - name: Update a usage quota + url: /api/latest/usage-metering/update-a-usage-quota/ + identifier: usage-metering-update-a-usage-quota + parent: usage-metering + generated: true + params: + versions: + - v2 + operationids: + - UpdateQuota + unstable: + - v2 + order: 16 + - name: Delete a usage quota + url: /api/latest/usage-metering/delete-a-usage-quota/ + identifier: usage-metering-delete-a-usage-quota + parent: usage-metering + generated: true + params: + versions: + - v2 + operationids: + - DeleteQuota + unstable: + - v2 + order: 17 + - name: Create or update usage quotas + url: /api/latest/usage-metering/create-or-update-usage-quotas/ + identifier: usage-metering-create-or-update-usage-quotas + parent: usage-metering + generated: true + params: + versions: + - v2 + operationids: + - CreateQuotas + unstable: + - v2 + order: 15 + - name: List usage quotas + url: /api/latest/usage-metering/list-usage-quotas/ + identifier: usage-metering-list-usage-quotas + parent: usage-metering + generated: true + params: + versions: + - v2 + operationids: + - ListQuotas + unstable: + - v2 + order: 14 - name: Get projected cost across your account url: /api/latest/usage-metering/get-projected-cost-across-your-account/ identifier: usage-metering-get-projected-cost-across-your-account diff --git a/hugo/content/en/api/latest/usage-metering/create-or-update-usage-quotas/index.md b/hugo/content/en/api/latest/usage-metering/create-or-update-usage-quotas/index.md new file mode 100644 index 00000000000..beeba0f6762 --- /dev/null +++ b/hugo/content/en/api/latest/usage-metering/create-or-update-usage-quotas/index.md @@ -0,0 +1,3 @@ +--- +title: Create or update usage quotas +--- diff --git a/hugo/content/en/api/latest/usage-metering/delete-a-usage-quota/index.md b/hugo/content/en/api/latest/usage-metering/delete-a-usage-quota/index.md new file mode 100644 index 00000000000..dfc802b8c52 --- /dev/null +++ b/hugo/content/en/api/latest/usage-metering/delete-a-usage-quota/index.md @@ -0,0 +1,3 @@ +--- +title: Delete a usage quota +--- diff --git a/hugo/content/en/api/latest/usage-metering/list-usage-quotas/index.md b/hugo/content/en/api/latest/usage-metering/list-usage-quotas/index.md new file mode 100644 index 00000000000..a3c653f830e --- /dev/null +++ b/hugo/content/en/api/latest/usage-metering/list-usage-quotas/index.md @@ -0,0 +1,3 @@ +--- +title: List usage quotas +--- diff --git a/hugo/content/en/api/latest/usage-metering/update-a-usage-quota/index.md b/hugo/content/en/api/latest/usage-metering/update-a-usage-quota/index.md new file mode 100644 index 00000000000..da39bdfcadf --- /dev/null +++ b/hugo/content/en/api/latest/usage-metering/update-a-usage-quota/index.md @@ -0,0 +1,3 @@ +--- +title: Update a usage quota +--- diff --git a/hugo/content/en/api/v2/usage-metering/examples.json b/hugo/content/en/api/v2/usage-metering/examples.json index 914c20fa45c..c50bb913139 100644 --- a/hugo/content/en/api/v2/usage-metering/examples.json +++ b/hugo/content/en/api/v2/usage-metering/examples.json @@ -649,6 +649,353 @@ "html": "" } }, + "ListQuotas": { + "responses": { + "200": { + "json": { + "data": [ + { + "attributes": { + "enforced": true, + "org_public_id": "abcdef12345", + "scope": { + "": "jane@example.com" + }, + "usage_limit": 100000 + }, + "id": "MjAfYWlfY3JlZGl0c1911c2VyX2hhbmRsZTpfX0FMTF9f", + "type": "quotas" + } + ], + "meta": { + "page": { + "next_cursor": "eyJvZmZzZXQiOjEwMH0=" + } + } + }, + "html": "
\n
\n
\n
\n

data [required]

\n
\n

[object]

\n

A list of usage quota resources.

\n
\n
\n
\n
\n
\n

attributes [required]

\n
\n

object

\n

Attributes of a usage quota.

\n
\n
\n
\n
\n
\n

enforced [required]

\n
\n

boolean

\n

Whether usage above the limit is actively blocked instead of only tracked or alerted on.

\n
\n \n
\n
\n
\n
\n
\n

org_public_id [required]

\n
\n

string

\n

The public ID of the organization that owns the quota.

\n
\n \n
\n
\n
\n
\n
\n

scope

\n
\n

object

\n

A namespace-specific key and value identifying what the quota applies to within an organization. The object contains exactly one entry. A value of "*" identifies the default quota applied to entities without a specific quota. This field is omitted for an organization-wide quota.

\n
\n
\n
\n
\n
\n

<any-key>

\n
\n

string

\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n

usage_limit [required]

\n
\n

double

\n

The quota limit in the usage units defined by the quota namespace. May be fractional for quotas configured before public writes required whole units.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

id [required]

\n
\n

string

\n

An opaque usage quota identifier. Clients must pass this value back verbatim in update and delete requests and must not infer any structure from it.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

The JSON:API resource type for a usage quota. \nAllowed enum values: quotas

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

meta [required]

\n
\n

object

\n

Pagination metadata for a usage quota list response.

\n
\n
\n
\n
\n
\n

page [required]

\n
\n

object

\n

Cursor pagination fields for a usage quota list response.

\n
\n
\n
\n
\n
\n

next_cursor

\n
\n

string

\n

An opaque cursor for retrieving the next page. Omitted when there are no more results.

\n
\n \n
\n
\n
\n
\n
\n
" + }, + "400": { + "json": { + "errors": [ + { + "detail": "Missing required attribute in body", + "meta": {}, + "source": { + "header": "Authorization", + "parameter": "limit", + "pointer": "/data/attributes/title" + }, + "status": "400", + "title": "Bad Request" + } + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[object]

\n

A list of errors.

\n
\n
\n
\n
\n
\n

detail

\n
\n

string

\n

A human-readable explanation specific to this occurrence of the error.

\n
\n \n
\n
\n
\n
\n
\n

meta

\n
\n

object

\n

Non-standard meta-information about the error

\n
\n \n
\n
\n
\n
\n
\n

source

\n
\n

object

\n

References to the source of the error.

\n
\n
\n
\n
\n
\n

header

\n
\n

string

\n

A string indicating the name of a single request header which caused the error.

\n
\n \n
\n
\n
\n
\n
\n

parameter

\n
\n

string

\n

A string indicating which URI query parameter caused the error.

\n
\n \n
\n
\n
\n
\n
\n

pointer

\n
\n

string

\n

A JSON pointer to the value in the request document that caused the error.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

status

\n
\n

string

\n

Status code of the response.

\n
\n \n
\n
\n
\n
\n
\n

title

\n
\n

string

\n

Short human-readable summary of the error.

\n
\n \n
\n
\n
\n
" + }, + "403": { + "json": { + "errors": [ + { + "detail": "Missing required attribute in body", + "meta": {}, + "source": { + "header": "Authorization", + "parameter": "limit", + "pointer": "/data/attributes/title" + }, + "status": "400", + "title": "Bad Request" + } + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[object]

\n

A list of errors.

\n
\n
\n
\n
\n
\n

detail

\n
\n

string

\n

A human-readable explanation specific to this occurrence of the error.

\n
\n \n
\n
\n
\n
\n
\n

meta

\n
\n

object

\n

Non-standard meta-information about the error

\n
\n \n
\n
\n
\n
\n
\n

source

\n
\n

object

\n

References to the source of the error.

\n
\n
\n
\n
\n
\n

header

\n
\n

string

\n

A string indicating the name of a single request header which caused the error.

\n
\n \n
\n
\n
\n
\n
\n

parameter

\n
\n

string

\n

A string indicating which URI query parameter caused the error.

\n
\n \n
\n
\n
\n
\n
\n

pointer

\n
\n

string

\n

A JSON pointer to the value in the request document that caused the error.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

status

\n
\n

string

\n

Status code of the response.

\n
\n \n
\n
\n
\n
\n
\n

title

\n
\n

string

\n

Short human-readable summary of the error.

\n
\n \n
\n
\n
\n
" + }, + "429": { + "json": { + "errors": [ + "Bad Request" + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[string]

\n

A list of errors.

\n
\n \n
\n
" + } + }, + "request": { + "json_curl": {}, + "json": {}, + "html": "" + } + }, + "CreateQuotas": { + "responses": { + "200": { + "json": { + "data": [ + { + "attributes": { + "enforced": true, + "error": "usage_limit is out of range", + "org_public_id": "abcdef12345", + "scope": { + "": "jane@example.com" + }, + "usage_limit": 100000 + }, + "id": "MjAfYWlfY3JlZGl0c1911c2VyX2hhbmRsZTpfX0FMTF9f", + "type": "quotas" + } + ] + }, + "html": "
\n
\n
\n
\n

data [required]

\n
\n

[object]

\n

The results of writing each usage quota in a bulk create-or-update request, in the same order as the request.

\n
\n
\n
\n
\n
\n

attributes [required]

\n
\n

object

\n

Attributes of a usage quota bulk write result. On success, all fields except error are present. On failure, only error is present and the other fields are omitted.

\n
\n
\n
\n
\n
\n

enforced

\n
\n

boolean

\n

Whether usage above the limit is actively blocked instead of only tracked or alerted on. Omitted if this item failed to write.

\n
\n \n
\n
\n
\n
\n
\n

error

\n
\n

string

\n

An error message describing why this item failed to write. Omitted if this item was written successfully.

\n
\n \n
\n
\n
\n
\n
\n

org_public_id

\n
\n

string

\n

The public ID of the organization that owns the quota. Omitted if this item failed to write.

\n
\n \n
\n
\n
\n
\n
\n

scope

\n
\n

object

\n

A namespace-specific key and value identifying what the quota applies to within an organization. The object contains exactly one entry. A value of "*" identifies the default quota applied to entities without a specific quota. This field is omitted for an organization-wide quota.

\n
\n
\n
\n
\n
\n

<any-key>

\n
\n

string

\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n

usage_limit

\n
\n

double

\n

The quota limit in the usage units defined by the quota namespace. May be fractional for quotas configured before public writes required whole units. Omitted if this item failed to write.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

id [required]

\n
\n

string

\n

An opaque usage quota identifier. Clients must pass this value back verbatim in update and delete requests and must not infer any structure from it.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

The JSON:API resource type for a usage quota. \nAllowed enum values: quotas

\n
\n \n
\n
\n
\n
" + }, + "400": { + "json": { + "errors": [ + { + "detail": "Missing required attribute in body", + "meta": {}, + "source": { + "header": "Authorization", + "parameter": "limit", + "pointer": "/data/attributes/title" + }, + "status": "400", + "title": "Bad Request" + } + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[object]

\n

A list of errors.

\n
\n
\n
\n
\n
\n

detail

\n
\n

string

\n

A human-readable explanation specific to this occurrence of the error.

\n
\n \n
\n
\n
\n
\n
\n

meta

\n
\n

object

\n

Non-standard meta-information about the error

\n
\n \n
\n
\n
\n
\n
\n

source

\n
\n

object

\n

References to the source of the error.

\n
\n
\n
\n
\n
\n

header

\n
\n

string

\n

A string indicating the name of a single request header which caused the error.

\n
\n \n
\n
\n
\n
\n
\n

parameter

\n
\n

string

\n

A string indicating which URI query parameter caused the error.

\n
\n \n
\n
\n
\n
\n
\n

pointer

\n
\n

string

\n

A JSON pointer to the value in the request document that caused the error.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

status

\n
\n

string

\n

Status code of the response.

\n
\n \n
\n
\n
\n
\n
\n

title

\n
\n

string

\n

Short human-readable summary of the error.

\n
\n \n
\n
\n
\n
" + }, + "403": { + "json": { + "errors": [ + { + "detail": "Missing required attribute in body", + "meta": {}, + "source": { + "header": "Authorization", + "parameter": "limit", + "pointer": "/data/attributes/title" + }, + "status": "400", + "title": "Bad Request" + } + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[object]

\n

A list of errors.

\n
\n
\n
\n
\n
\n

detail

\n
\n

string

\n

A human-readable explanation specific to this occurrence of the error.

\n
\n \n
\n
\n
\n
\n
\n

meta

\n
\n

object

\n

Non-standard meta-information about the error

\n
\n \n
\n
\n
\n
\n
\n

source

\n
\n

object

\n

References to the source of the error.

\n
\n
\n
\n
\n
\n

header

\n
\n

string

\n

A string indicating the name of a single request header which caused the error.

\n
\n \n
\n
\n
\n
\n
\n

parameter

\n
\n

string

\n

A string indicating which URI query parameter caused the error.

\n
\n \n
\n
\n
\n
\n
\n

pointer

\n
\n

string

\n

A JSON pointer to the value in the request document that caused the error.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

status

\n
\n

string

\n

Status code of the response.

\n
\n \n
\n
\n
\n
\n
\n

title

\n
\n

string

\n

Short human-readable summary of the error.

\n
\n \n
\n
\n
\n
" + }, + "429": { + "json": { + "errors": [ + "Bad Request" + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[string]

\n

A list of errors.

\n
\n \n
\n
" + }, + "500": { + "json": { + "errors": [ + { + "detail": "Missing required attribute in body", + "meta": {}, + "source": { + "header": "Authorization", + "parameter": "limit", + "pointer": "/data/attributes/title" + }, + "status": "400", + "title": "Bad Request" + } + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[object]

\n

A list of errors.

\n
\n
\n
\n
\n
\n

detail

\n
\n

string

\n

A human-readable explanation specific to this occurrence of the error.

\n
\n \n
\n
\n
\n
\n
\n

meta

\n
\n

object

\n

Non-standard meta-information about the error

\n
\n \n
\n
\n
\n
\n
\n

source

\n
\n

object

\n

References to the source of the error.

\n
\n
\n
\n
\n
\n

header

\n
\n

string

\n

A string indicating the name of a single request header which caused the error.

\n
\n \n
\n
\n
\n
\n
\n

parameter

\n
\n

string

\n

A string indicating which URI query parameter caused the error.

\n
\n \n
\n
\n
\n
\n
\n

pointer

\n
\n

string

\n

A JSON pointer to the value in the request document that caused the error.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

status

\n
\n

string

\n

Status code of the response.

\n
\n \n
\n
\n
\n
\n
\n

title

\n
\n

string

\n

Short human-readable summary of the error.

\n
\n \n
\n
\n
\n
" + } + }, + "request": { + "json_curl": { + "data": [ + { + "attributes": { + "enforced": true, + "usage_limit": 100000 + }, + "type": "quotas" + } + ] + }, + "json": { + "data": [ + { + "attributes": { + "enforced": true, + "scope": { + "": "jane@example.com" + }, + "usage_limit": 100000 + }, + "type": "quotas" + } + ] + }, + "html": "
\n
\n
\n
\n

data [required]

\n
\n

[object]

\n

A bulk list of usage quota resources to create or update by scope.

\n
\n
\n
\n
\n
\n

attributes [required]

\n
\n

object

\n

Attributes for creating or updating a usage quota by scope.

\n
\n
\n
\n
\n
\n

enforced [required]

\n
\n

boolean

\n

Whether to actively block usage above the limit instead of only tracking or alerting on it.

\n
\n \n
\n
\n
\n
\n
\n

scope

\n
\n

object

\n

A namespace-specific key and value identifying what the quota applies to within an organization. The object must contain exactly one entry. Use "*" as the value for the default quota applied to entities without a specific quota, or omit the scope for an organization-wide quota. A specific value must identify an existing user handle in the caller's organization when include_descendants is false. When include_descendants is true, the handle must exist in the caller's organization or in at least one targeted descendant organization; the quota is then applied only to the organizations where that handle exists, and the request fails only if the handle exists in none of them.

\n
\n
\n
\n
\n
\n

<any-key>

\n
\n

string

\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n

usage_limit [required]

\n
\n

int64

\n

The quota limit to set in the usage units defined by the quota namespace. For an organization-wide quota (scope omitted), the limit must be greater than the usage already recorded in the current period.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

The JSON:API resource type for a usage quota. \nAllowed enum values: quotas

\n
\n \n
\n
\n
\n
" + } + }, + "DeleteQuota": { + "responses": { + "403": { + "json": { + "errors": [ + { + "detail": "Missing required attribute in body", + "meta": {}, + "source": { + "header": "Authorization", + "parameter": "limit", + "pointer": "/data/attributes/title" + }, + "status": "400", + "title": "Bad Request" + } + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[object]

\n

A list of errors.

\n
\n
\n
\n
\n
\n

detail

\n
\n

string

\n

A human-readable explanation specific to this occurrence of the error.

\n
\n \n
\n
\n
\n
\n
\n

meta

\n
\n

object

\n

Non-standard meta-information about the error

\n
\n \n
\n
\n
\n
\n
\n

source

\n
\n

object

\n

References to the source of the error.

\n
\n
\n
\n
\n
\n

header

\n
\n

string

\n

A string indicating the name of a single request header which caused the error.

\n
\n \n
\n
\n
\n
\n
\n

parameter

\n
\n

string

\n

A string indicating which URI query parameter caused the error.

\n
\n \n
\n
\n
\n
\n
\n

pointer

\n
\n

string

\n

A JSON pointer to the value in the request document that caused the error.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

status

\n
\n

string

\n

Status code of the response.

\n
\n \n
\n
\n
\n
\n
\n

title

\n
\n

string

\n

Short human-readable summary of the error.

\n
\n \n
\n
\n
\n
" + }, + "404": { + "json": { + "errors": [ + { + "detail": "Missing required attribute in body", + "meta": {}, + "source": { + "header": "Authorization", + "parameter": "limit", + "pointer": "/data/attributes/title" + }, + "status": "400", + "title": "Bad Request" + } + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[object]

\n

A list of errors.

\n
\n
\n
\n
\n
\n

detail

\n
\n

string

\n

A human-readable explanation specific to this occurrence of the error.

\n
\n \n
\n
\n
\n
\n
\n

meta

\n
\n

object

\n

Non-standard meta-information about the error

\n
\n \n
\n
\n
\n
\n
\n

source

\n
\n

object

\n

References to the source of the error.

\n
\n
\n
\n
\n
\n

header

\n
\n

string

\n

A string indicating the name of a single request header which caused the error.

\n
\n \n
\n
\n
\n
\n
\n

parameter

\n
\n

string

\n

A string indicating which URI query parameter caused the error.

\n
\n \n
\n
\n
\n
\n
\n

pointer

\n
\n

string

\n

A JSON pointer to the value in the request document that caused the error.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

status

\n
\n

string

\n

Status code of the response.

\n
\n \n
\n
\n
\n
\n
\n

title

\n
\n

string

\n

Short human-readable summary of the error.

\n
\n \n
\n
\n
\n
" + }, + "429": { + "json": { + "errors": [ + "Bad Request" + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[string]

\n

A list of errors.

\n
\n \n
\n
" + } + }, + "request": { + "json_curl": {}, + "json": {}, + "html": "" + } + }, + "UpdateQuota": { + "responses": { + "200": { + "json": { + "data": { + "attributes": { + "enforced": true, + "org_public_id": "abcdef12345", + "scope": { + "": "jane@example.com" + }, + "usage_limit": 100000 + }, + "id": "MjAfYWlfY3JlZGl0c1911c2VyX2hhbmRsZTpfX0FMTF9f", + "type": "quotas" + } + }, + "html": "
\n
\n
\n
\n

data [required]

\n
\n

object

\n

A usage quota resource.

\n
\n
\n
\n
\n
\n

attributes [required]

\n
\n

object

\n

Attributes of a usage quota.

\n
\n
\n
\n
\n
\n

enforced [required]

\n
\n

boolean

\n

Whether usage above the limit is actively blocked instead of only tracked or alerted on.

\n
\n \n
\n
\n
\n
\n
\n

org_public_id [required]

\n
\n

string

\n

The public ID of the organization that owns the quota.

\n
\n \n
\n
\n
\n
\n
\n

scope

\n
\n

object

\n

A namespace-specific key and value identifying what the quota applies to within an organization. The object contains exactly one entry. A value of "*" identifies the default quota applied to entities without a specific quota. This field is omitted for an organization-wide quota.

\n
\n
\n
\n
\n
\n

<any-key>

\n
\n

string

\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n

usage_limit [required]

\n
\n

double

\n

The quota limit in the usage units defined by the quota namespace. May be fractional for quotas configured before public writes required whole units.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

id [required]

\n
\n

string

\n

An opaque usage quota identifier. Clients must pass this value back verbatim in update and delete requests and must not infer any structure from it.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

The JSON:API resource type for a usage quota. \nAllowed enum values: quotas

\n
\n \n
\n
\n
\n
" + }, + "400": { + "json": { + "errors": [ + { + "detail": "Missing required attribute in body", + "meta": {}, + "source": { + "header": "Authorization", + "parameter": "limit", + "pointer": "/data/attributes/title" + }, + "status": "400", + "title": "Bad Request" + } + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[object]

\n

A list of errors.

\n
\n
\n
\n
\n
\n

detail

\n
\n

string

\n

A human-readable explanation specific to this occurrence of the error.

\n
\n \n
\n
\n
\n
\n
\n

meta

\n
\n

object

\n

Non-standard meta-information about the error

\n
\n \n
\n
\n
\n
\n
\n

source

\n
\n

object

\n

References to the source of the error.

\n
\n
\n
\n
\n
\n

header

\n
\n

string

\n

A string indicating the name of a single request header which caused the error.

\n
\n \n
\n
\n
\n
\n
\n

parameter

\n
\n

string

\n

A string indicating which URI query parameter caused the error.

\n
\n \n
\n
\n
\n
\n
\n

pointer

\n
\n

string

\n

A JSON pointer to the value in the request document that caused the error.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

status

\n
\n

string

\n

Status code of the response.

\n
\n \n
\n
\n
\n
\n
\n

title

\n
\n

string

\n

Short human-readable summary of the error.

\n
\n \n
\n
\n
\n
" + }, + "403": { + "json": { + "errors": [ + { + "detail": "Missing required attribute in body", + "meta": {}, + "source": { + "header": "Authorization", + "parameter": "limit", + "pointer": "/data/attributes/title" + }, + "status": "400", + "title": "Bad Request" + } + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[object]

\n

A list of errors.

\n
\n
\n
\n
\n
\n

detail

\n
\n

string

\n

A human-readable explanation specific to this occurrence of the error.

\n
\n \n
\n
\n
\n
\n
\n

meta

\n
\n

object

\n

Non-standard meta-information about the error

\n
\n \n
\n
\n
\n
\n
\n

source

\n
\n

object

\n

References to the source of the error.

\n
\n
\n
\n
\n
\n

header

\n
\n

string

\n

A string indicating the name of a single request header which caused the error.

\n
\n \n
\n
\n
\n
\n
\n

parameter

\n
\n

string

\n

A string indicating which URI query parameter caused the error.

\n
\n \n
\n
\n
\n
\n
\n

pointer

\n
\n

string

\n

A JSON pointer to the value in the request document that caused the error.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

status

\n
\n

string

\n

Status code of the response.

\n
\n \n
\n
\n
\n
\n
\n

title

\n
\n

string

\n

Short human-readable summary of the error.

\n
\n \n
\n
\n
\n
" + }, + "404": { + "json": { + "errors": [ + { + "detail": "Missing required attribute in body", + "meta": {}, + "source": { + "header": "Authorization", + "parameter": "limit", + "pointer": "/data/attributes/title" + }, + "status": "400", + "title": "Bad Request" + } + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[object]

\n

A list of errors.

\n
\n
\n
\n
\n
\n

detail

\n
\n

string

\n

A human-readable explanation specific to this occurrence of the error.

\n
\n \n
\n
\n
\n
\n
\n

meta

\n
\n

object

\n

Non-standard meta-information about the error

\n
\n \n
\n
\n
\n
\n
\n

source

\n
\n

object

\n

References to the source of the error.

\n
\n
\n
\n
\n
\n

header

\n
\n

string

\n

A string indicating the name of a single request header which caused the error.

\n
\n \n
\n
\n
\n
\n
\n

parameter

\n
\n

string

\n

A string indicating which URI query parameter caused the error.

\n
\n \n
\n
\n
\n
\n
\n

pointer

\n
\n

string

\n

A JSON pointer to the value in the request document that caused the error.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

status

\n
\n

string

\n

Status code of the response.

\n
\n \n
\n
\n
\n
\n
\n

title

\n
\n

string

\n

Short human-readable summary of the error.

\n
\n \n
\n
\n
\n
" + }, + "429": { + "json": { + "errors": [ + "Bad Request" + ] + }, + "html": "
\n
\n
\n
\n

errors [required]

\n
\n

[string]

\n

A list of errors.

\n
\n \n
\n
" + } + }, + "request": { + "json_curl": { + "data": { + "attributes": {}, + "id": "MjAfYWlfY3JlZGl0c1911c2VyX2hhbmRsZTpfX0FMTF9f", + "type": "quotas" + } + }, + "json": { + "data": { + "attributes": { + "enforced": false, + "usage_limit": 120000 + }, + "id": "MjAfYWlfY3JlZGl0c1911c2VyX2hhbmRsZTpfX0FMTF9f", + "type": "quotas" + } + }, + "html": "
\n
\n
\n
\n

data [required]

\n
\n

object

\n

A usage quota resource to update.

\n
\n
\n
\n
\n
\n

attributes [required]

\n
\n

object

\n

Attributes to update on a usage quota. Omitting a property leaves its current value unchanged.

\n
\n
\n
\n
\n
\n

enforced

\n
\n

boolean

\n

Whether to actively block usage above the limit. Omit this field to leave the current enforcement setting unchanged.

\n
\n \n
\n
\n
\n
\n
\n

usage_limit

\n
\n

int64

\n

The new quota limit in the usage units defined by the quota namespace. For an organization-wide quota (empty scope), the limit must be greater than the usage already recorded in the current period. Omit this field to leave the current limit unchanged.

\n
\n \n
\n
\n
\n
\n
\n
\n
\n

id [required]

\n
\n

string

\n

The opaque usage quota identifier, which must match the identifier in the request path.

\n
\n \n
\n
\n
\n
\n
\n

type [required]

\n
\n

enum

\n

The JSON:API resource type for a usage quota. \nAllowed enum values: quotas

\n
\n \n
\n
\n
\n
" + } + }, "GetUsageSummaryAvailableFields": { "responses": { "200": { diff --git a/hugo/data/api/v2/full_spec.yaml b/hugo/data/api/v2/full_spec.yaml index cbdbba0788a..47b6eb5fc15 100644 --- a/hugo/data/api/v2/full_spec.yaml +++ b/hugo/data/api/v2/full_spec.yaml @@ -123228,6 +123228,249 @@ components: $ref: "#/components/schemas/UsageDataObject" type: array type: object + UsageQuotaBulkResultAttributes: + description: Attributes of a usage quota bulk write result. On success, all fields except `error` are present. On failure, only `error` is present and the other fields are omitted. + properties: + enforced: + description: Whether usage above the limit is actively blocked instead of only tracked or alerted on. Omitted if this item failed to write. + example: true + type: boolean + error: + description: An error message describing why this item failed to write. Omitted if this item was written successfully. + example: usage_limit is out of range + type: string + org_public_id: + description: The public ID of the organization that owns the quota. Omitted if this item failed to write. + example: abcdef12345 + type: string + scope: + $ref: "#/components/schemas/UsageQuotaResponseScope" + usage_limit: + description: The quota limit in the usage units defined by the quota namespace. May be fractional for quotas configured before public writes required whole units. Omitted if this item failed to write. + example: 100000 + format: double + type: number + type: object + UsageQuotaBulkResultData: + description: The result of writing one usage quota in a bulk create-or-update request. + properties: + attributes: + $ref: "#/components/schemas/UsageQuotaBulkResultAttributes" + id: + description: An opaque usage quota identifier. Clients must pass this value back verbatim in update and delete requests and must not infer any structure from it. + example: "MjAfYWlfY3JlZGl0c1911c2VyX2hhbmRsZTpfX0FMTF9f" + type: string + type: + $ref: "#/components/schemas/UsageQuotaType" + required: + - id + - type + - attributes + type: object + UsageQuotaBulkResultDataList: + description: The results of writing each usage quota in a bulk create-or-update request, in the same order as the request. + items: + $ref: "#/components/schemas/UsageQuotaBulkResultData" + type: array + UsageQuotaCreateAttributes: + description: Attributes for creating or updating a usage quota by scope. + properties: + enforced: + description: Whether to actively block usage above the limit instead of only tracking or alerting on it. + example: true + type: boolean + scope: + $ref: "#/components/schemas/UsageQuotaRequestScope" + usage_limit: + description: The quota limit to set in the usage units defined by the quota namespace. For an organization-wide quota (scope omitted), the limit must be greater than the usage already recorded in the current period. + example: 100000 + format: int64 + minimum: 0 + type: integer + required: + - usage_limit + - enforced + type: object + UsageQuotaCreateData: + description: A usage quota resource to create or update by scope. + properties: + attributes: + $ref: "#/components/schemas/UsageQuotaCreateAttributes" + type: + $ref: "#/components/schemas/UsageQuotaType" + required: + - type + - attributes + type: object + UsageQuotaCreateDataList: + description: A bulk list of usage quota resources to create or update by scope. + items: + $ref: "#/components/schemas/UsageQuotaCreateData" + minItems: 1 + type: array + UsageQuotaRequestScope: + additionalProperties: + example: jane@example.com + type: string + description: A namespace-specific key and value identifying what the quota applies to within an organization. The object must contain exactly one entry. Use `"*"` as the value for the default quota applied to entities without a specific quota, or omit the scope for an organization-wide quota. A specific value must identify an existing user handle in the caller's organization when `include_descendants` is false. When `include_descendants` is true, the handle must exist in the caller's organization or in at least one targeted descendant organization; the quota is then applied only to the organizations where that handle exists, and the request fails only if the handle exists in none of them. + example: + user_handle: jane@example.com + maxProperties: 1 + minProperties: 1 + type: object + UsageQuotaResponse: + description: Response containing a usage quota. + properties: + data: + $ref: "#/components/schemas/UsageQuotaResponseData" + required: + - data + type: object + UsageQuotaResponseAttributes: + description: Attributes of a usage quota. + properties: + enforced: + description: Whether usage above the limit is actively blocked instead of only tracked or alerted on. + example: true + type: boolean + org_public_id: + description: The public ID of the organization that owns the quota. + example: abcdef12345 + type: string + scope: + $ref: "#/components/schemas/UsageQuotaResponseScope" + usage_limit: + description: The quota limit in the usage units defined by the quota namespace. May be fractional for quotas configured before public writes required whole units. + example: 100000 + format: double + type: number + required: + - org_public_id + - usage_limit + - enforced + type: object + UsageQuotaResponseData: + description: A usage quota resource. + properties: + attributes: + $ref: "#/components/schemas/UsageQuotaResponseAttributes" + id: + description: An opaque usage quota identifier. Clients must pass this value back verbatim in update and delete requests and must not infer any structure from it. + example: "MjAfYWlfY3JlZGl0c1911c2VyX2hhbmRsZTpfX0FMTF9f" + type: string + type: + $ref: "#/components/schemas/UsageQuotaType" + required: + - id + - type + - attributes + type: object + UsageQuotaResponseDataList: + description: A list of usage quota resources. + items: + $ref: "#/components/schemas/UsageQuotaResponseData" + type: array + UsageQuotaResponseScope: + additionalProperties: + example: jane@example.com + type: string + description: A namespace-specific key and value identifying what the quota applies to within an organization. The object contains exactly one entry. A value of `"*"` identifies the default quota applied to entities without a specific quota. This field is omitted for an organization-wide quota. + example: + user_handle: jane@example.com + maxProperties: 1 + minProperties: 1 + type: object + UsageQuotaType: + description: The JSON:API resource type for a usage quota. + enum: + - quotas + example: quotas + type: string + x-enum-varnames: + - QUOTAS + UsageQuotaUpdateAttributes: + description: Attributes to update on a usage quota. Omitting a property leaves its current value unchanged. + properties: + enforced: + description: Whether to actively block usage above the limit. Omit this field to leave the current enforcement setting unchanged. + example: false + nullable: true + type: boolean + usage_limit: + description: The new quota limit in the usage units defined by the quota namespace. For an organization-wide quota (empty scope), the limit must be greater than the usage already recorded in the current period. Omit this field to leave the current limit unchanged. + example: 120000 + format: int64 + minimum: 0 + nullable: true + type: integer + type: object + UsageQuotaUpdateData: + description: A usage quota resource to update. + properties: + attributes: + $ref: "#/components/schemas/UsageQuotaUpdateAttributes" + id: + description: The opaque usage quota identifier, which must match the identifier in the request path. + example: "MjAfYWlfY3JlZGl0c1911c2VyX2hhbmRsZTpfX0FMTF9f" + type: string + type: + $ref: "#/components/schemas/UsageQuotaType" + required: + - id + - type + - attributes + type: object + UsageQuotaUpdateRequest: + description: Request containing the usage quota resource to update. + properties: + data: + $ref: "#/components/schemas/UsageQuotaUpdateData" + required: + - data + type: object + UsageQuotasBulkResponse: + description: Response containing the result of a bulk usage quota create-or-update request. Returned with a `200` status regardless of whether individual items succeeded or failed; check each item's `error` attribute to determine its outcome. + properties: + data: + $ref: "#/components/schemas/UsageQuotaBulkResultDataList" + required: + - data + type: object + UsageQuotasCreateRequest: + description: A JSON:API bulk request containing an array of usage quota resources rather than a single resource. + properties: + data: + $ref: "#/components/schemas/UsageQuotaCreateDataList" + required: + - data + type: object + UsageQuotasListResponse: + description: Response containing a paginated list of usage quotas. + properties: + data: + $ref: "#/components/schemas/UsageQuotaResponseDataList" + meta: + $ref: "#/components/schemas/UsageQuotasResponseMeta" + required: + - data + - meta + type: object + UsageQuotasResponseMeta: + description: Pagination metadata for a usage quota list response. + properties: + page: + $ref: "#/components/schemas/UsageQuotasResponseMetaPage" + required: + - page + type: object + UsageQuotasResponseMetaPage: + description: Cursor pagination fields for a usage quota list response. + properties: + next_cursor: + description: An opaque cursor for retrieving the next page. Omitted when there are no more results. + example: eyJvZmZzZXQiOjEwMH0= + type: string + type: object UsageSummaryAvailableFieldsAttributes: description: |- The lists of field names returned by `GET /api/v1/usage/summary` at each @@ -222935,6 +223178,360 @@ paths: permissions: - usage_read - billing_read + /api/v2/usage/quotas/{quota_namespace}: + get: + description: |- + Lists usage quotas for the caller's organization in a quota namespace. You can optionally include descendant organizations in the same datacenter as the caller. Requires the `user_access_manage`, `billing_edit`, and `org_management` permissions. + operationId: ListQuotas + parameters: + - description: The product-specific namespace whose usage quotas are being managed. + in: path + name: quota_namespace + required: true + schema: + example: ai_credits + type: string + - description: Whether to include quotas configured on descendant organizations in the caller's organization hierarchy. Only descendants in the same datacenter are supported. + in: query + name: include_descendants + required: false + schema: + default: false + type: boolean + - description: An opaque cursor from a previous response's `meta.page.next_cursor` used to retrieve the next page. + in: query + name: page[cursor] + required: false + schema: + type: string + - description: The number of usage quotas to return per page. + in: query + name: page[limit] + required: false + schema: + default: 100 + format: int64 + maximum: 1000 + minimum: 1 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + enforced: true + org_public_id: abcdef12345 + scope: + user_handle: jane@example.com + usage_limit: 100000 + id: "MjAfYWlfY3JlZGl0c1911c2VyX2hhbmRsZTpfX0FMTF9f" + type: quotas + meta: + page: + next_cursor: eyJvZmZzZXQiOjEwMH0= + schema: + $ref: "#/components/schemas/UsageQuotasListResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_manage + - billing_edit + - org_management + summary: List usage quotas + tags: + - Usage Metering + x-menu-order: 14 + x-pagination: + cursorParam: page[cursor] + cursorPath: meta.page.next_cursor + limitParam: page[limit] + resultsPath: data + "x-permission": + operator: AND + permissions: + - user_access_manage + - billing_edit + - org_management + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: |- + Creates or updates one or more usage quotas by scope. If a quota already exists for a supplied scope, it is updated; otherwise, a new quota is created. Requires the `user_access_manage`, `billing_edit`, and `org_management` permissions. + operationId: CreateQuotas + parameters: + - description: The product-specific namespace whose usage quotas are being managed. + in: path + name: quota_namespace + required: true + schema: + example: ai_credits + type: string + - description: Whether to write every item in the request to the caller's organization and all of its descendant organizations, instead of only the caller's organization. Only descendants in the same datacenter are supported. For a user-handle scope, the quota is applied only to the caller's organization and to descendant organizations where that user handle exists; the item fails only if the handle exists in none of them. + in: query + name: include_descendants + required: false + schema: + default: false + type: boolean + requestBody: + content: + application/json: + examples: + default: + summary: Create or update quotas for the caller's organization. + value: + data: + - attributes: + enforced: true + scope: + user_handle: jane@example.com + usage_limit: 100000 + type: quotas + - attributes: + enforced: false + scope: + user_handle: "*" + usage_limit: 250000 + type: quotas + schema: + $ref: "#/components/schemas/UsageQuotasCreateRequest" + description: The usage quotas to create or update. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + enforced: true + org_public_id: abcdef12345 + scope: + user_handle: jane@example.com + usage_limit: 100000 + id: "MjAfYWlfY3JlZGl0c1911c2VyX2hhbmRsZTpfX0FMTF9f" + type: quotas + - attributes: + error: usage_limit is out of range + id: "MjAfYWlfY3JlZGl0c1911c2VyX2hhbmRsZTp1c2VyQGV4YW1wbGUuY29t" + type: quotas + schema: + $ref: "#/components/schemas/UsageQuotasBulkResponse" + description: OK. The response includes each item's result; see each item's `error` attribute for any that failed to write. + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error. Every item in the batch failed to write. + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_manage + - billing_edit + - org_management + summary: Create or update usage quotas + tags: + - Usage Metering + x-menu-order: 15 + "x-permission": + operator: AND + permissions: + - user_access_manage + - billing_edit + - org_management + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/usage/quotas/{quota_namespace}/{id}: + delete: + description: |- + Deletes a usage quota by its opaque identifier. The quota must belong to the caller's organization or one of its descendants, and its opaque identifier must belong to the requested quota namespace. Requires the `user_access_manage`, `billing_edit`, and `org_management` permissions. + operationId: DeleteQuota + parameters: + - description: The product-specific namespace whose usage quotas are being managed. + in: path + name: quota_namespace + required: true + schema: + example: ai_credits + type: string + - description: The opaque quota identifier returned by a previous list or create request. Clients must pass this value verbatim. + in: path + name: id + required: true + schema: + example: "MjAfYWlfY3JlZGl0c1911c2VyX2hhbmRsZTpfX0FMTF9f" + type: string + responses: + "204": + description: No Content + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_manage + - billing_edit + - org_management + summary: Delete a usage quota + tags: + - Usage Metering + x-menu-order: 17 + "x-permission": + operator: AND + permissions: + - user_access_manage + - billing_edit + - org_management + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: |- + Updates the supplied fields on a usage quota and leaves omitted fields unchanged. The quota must belong to the caller's organization or one of its descendants, and its opaque identifier must belong to the requested quota namespace. Requires the `user_access_manage`, `billing_edit`, and `org_management` permissions. + operationId: UpdateQuota + parameters: + - description: The product-specific namespace whose usage quotas are being managed. + in: path + name: quota_namespace + required: true + schema: + example: ai_credits + type: string + - description: The opaque quota identifier returned by a previous list or create request. Clients must pass this value verbatim. + in: path + name: id + required: true + schema: + example: "MjAfYWlfY3JlZGl0c1911c2VyX2hhbmRsZTpfX0FMTF9f" + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + enforced: false + usage_limit: 120000 + id: "MjAfYWlfY3JlZGl0c1911c2VyX2hhbmRsZTpfX0FMTF9f" + type: quotas + schema: + $ref: "#/components/schemas/UsageQuotaUpdateRequest" + description: The usage quota fields to update. Omitting an attribute leaves its current value unchanged. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + enforced: false + org_public_id: abcdef12345 + scope: + user_handle: jane@example.com + usage_limit: 120000 + id: "MjAfYWlfY3JlZGl0c1911c2VyX2hhbmRsZTpfX0FMTF9f" + type: quotas + schema: + $ref: "#/components/schemas/UsageQuotaResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request. Returned if the request is malformed, or if the `id` in the request body does not match the `id` in the request path. + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_manage + - billing_edit + - org_management + summary: Update a usage quota + tags: + - Usage Metering + x-menu-order: 16 + "x-permission": + operator: AND + permissions: + - user_access_manage + - billing_edit + - org_management + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/usage/summary/available_fields: get: description: |- diff --git a/hugo/data/api/v2/translate_actions.json b/hugo/data/api/v2/translate_actions.json index 6bc201161f7..c9dcb4e3907 100644 --- a/hugo/data/api/v2/translate_actions.json +++ b/hugo/data/api/v2/translate_actions.json @@ -7358,6 +7358,26 @@ "description": "Get projected cost across multi-org and single root-org accounts.\nProjected cost data is only available for the current month and becomes available around the 12th of the month.\n\nThis endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).", "summary": "Get projected cost across your account" }, + "ListQuotas": { + "description": "Lists usage quotas for the caller's organization in a quota namespace. You can optionally include descendant organizations in the same datacenter as the caller. Requires the `user_access_manage`, `billing_edit`, and `org_management` permissions.", + "summary": "List usage quotas" + }, + "CreateQuotas": { + "description": "Creates or updates one or more usage quotas by scope. If a quota already exists for a supplied scope, it is updated; otherwise, a new quota is created. Requires the `user_access_manage`, `billing_edit`, and `org_management` permissions.", + "summary": "Create or update usage quotas", + "request_description": "The usage quotas to create or update.", + "request_schema_description": "A JSON:API bulk request containing an array of usage quota resources rather than a single resource." + }, + "DeleteQuota": { + "description": "Deletes a usage quota by its opaque identifier. The quota must belong to the caller's organization or one of its descendants, and its opaque identifier must belong to the requested quota namespace. Requires the `user_access_manage`, `billing_edit`, and `org_management` permissions.", + "summary": "Delete a usage quota" + }, + "UpdateQuota": { + "description": "Updates the supplied fields on a usage quota and leaves omitted fields unchanged. The quota must belong to the caller's organization or one of its descendants, and its opaque identifier must belong to the requested quota namespace. Requires the `user_access_manage`, `billing_edit`, and `org_management` permissions.", + "summary": "Update a usage quota", + "request_description": "The usage quota fields to update. Omitting an attribute leaves its current value unchanged.", + "request_schema_description": "Request containing the usage quota resource to update." + }, "GetUsageSummaryAvailableFields": { "description": "List the field names returned by `GET /api/v1/usage/summary` at each of its\nthree response levels. Each list contains every key the data endpoint\nemits—both typed fields declared in the OpenAPI spec and untyped keys\nexposed through `additionalProperties` (the latter used for billing\ndimensions and usage types added after the v1 schema freeze).\n\nThis endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).\n\nGo example:\n\n```go\nfields, _, err := api.GetUsageSummaryAvailableFields(ctx)\nattr := fields.Data.GetAttributes()\n\n// resp is the *UsageSummaryResponse returned by api.GetUsageSummary(ctx, ...)\n// Layer 1: UsageSummaryResponse\nfor _, key := range attr.GetResponseFields() {\n if val, ok := resp.AdditionalProperties[key]; ok {\n fmt.Println(key, val.(json.Number))\n }\n}\n// Layer 2: UsageSummaryDate (per month)\nfor _, date := range resp.GetUsage() {\n for _, key := range attr.GetDateFields() {\n if val, ok := date.AdditionalProperties[key]; ok {\n fmt.Println(key, val.(json.Number))\n }\n }\n // Layer 3: UsageSummaryDateOrg (per org per month)\n for _, org := range date.GetOrgs() {\n for _, key := range attr.GetDateOrgFields() {\n if val, ok := org.AdditionalProperties[key]; ok {\n fmt.Println(key, val.(json.Number))\n }\n }\n }\n}\n```", "summary": "Get available fields for usage summary"