Decide a temporary grant request
https://api.datadoghq.com/api/v2/usage/admin/temporary-grant-requests/{request_id}/decisionhttps://api.us3.datadoghq.com/api/v2/usage/admin/temporary-grant-requests/{request_id}/decisionhttps://api.us5.datadoghq.com/api/v2/usage/admin/temporary-grant-requests/{request_id}/decisionhttps://api.datadoghq.eu/api/v2/usage/admin/temporary-grant-requests/{request_id}/decisionhttps://api.ap1.datadoghq.com/api/v2/usage/admin/temporary-grant-requests/{request_id}/decisionhttps://api.ap2.datadoghq.com/api/v2/usage/admin/temporary-grant-requests/{request_id}/decisionhttps://api.uk1.datadoghq.com/api/v2/usage/admin/temporary-grant-requests/{request_id}/decisionhttps://api.ddog-gov.com/api/v2/usage/admin/temporary-grant-requests/{request_id}/decisionhttps://api.us2.ddog-gov.com/api/v2/usage/admin/temporary-grant-requests/{request_id}/decisionOverview
Approve or deny the submitted terms, which are immutable. Approval atomically writes the grant, audit record, and request decision. An expired request can't be approved. Requires the Billing Edit permission. Requires an authenticated human user. Service-account credentials aren't supported. Request status remains approved after the grant's expiry, revocation, or replacement.
OAuth apps require the billing_edit authorization scope to access this endpoint.
Arguments
Path Parameters
request_id [required]The temporary grant request UUID.
Request
Body Data (required)
data [required]A decision on a pending request.
attributes [required]Binary decision. Overrides, reason fields, and unknown attributes are rejected, including null values.
decision [required]Approve the exact submitted total and expiry, or deny the request.
approved, deniedid [required]Request UUID. Must match request_id in the path. Missing or mismatched IDs return 400 Bad Request.
type [required]The temporary grant request resource type.
temporary_grant_requeststemporary_grant_requests{
"data": {
"attributes": {
"decision": "denied"
},
"id": "12345678-1234-1234-1234-123456789012",
"type": "temporary_grant_requests"
}
}Response
OK
A single temporary grant request.
data [required]A temporary grant request resource.
attributes [required]Request history and the linked grant state. List and detail reads include grant_state for approved requests. Decision responses record the decision. Read the request for current grant state.
created_at [required]When the request was submitted.
decided_atWhen the decision or cancellation was recorded.
decided_by_user_idUUID of the reviewer, or of the requester if the request was canceled.
entity_key [required]The requester identity resolved by the server.
expires_at [required]Immutable exclusive expiry, normalized to UTC microsecond precision.
grant_stateCurrent state of the grant associated with an approved request. Replaced means a newer grant superseded this grant. The newer grant might no longer be active. This field is absent for requests that weren't approved.
active, expired, revoked, replacedjustification [required]Reason for requesting temporary credits. Trimmed and limited to 4096 UTF-8 bytes.
quota_namespace [required]The quota namespace. Only AI credits are supported.
requested_by_user_id [required]UUID of the authenticated requester.
status [required]The durable request decision, independent of whether its grant is still active.
pending, approved, denied, cancelledtotal [required]Target monthly AI credit limit in positive whole credits, not additional credits. Fractional credits are not accepted.
id [required]Server-generated request UUID.
type [required]The temporary grant request resource type.
temporary_grant_requeststemporary_grant_requests{
"data": {
"attributes": {
"created_at": "2028-02-16T00:00:00Z",
"decided_at": "2028-02-16T00:00:00Z",
"decided_by_user_id": "12345678-1234-1234-1234-123456789012",
"entity_key": "user_handle:jane@example.com",
"expires_at": "2028-02-16T00:00:00Z",
"grant_state": "active",
"justification": "Credits needed to finish the incident investigation.",
"quota_namespace": "ai_credits",
"requested_by_user_id": "12345678-1234-1234-1234-123456789012",
"status": "pending",
"total": 200
},
"id": "12345678-1234-1234-1234-123456789012",
"type": "temporary_grant_requests"
}
}Bad Request
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}Unauthorized
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}Forbidden
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}Not Found
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}Conflict
API error response.
errors [required]A list of errors.
detailA human-readable explanation specific to this occurrence of the error.
metaNon-standard meta-information about the error
sourceReferences to the source of the error.
headerA string indicating the name of a single request header which caused the error.
parameterA string indicating which URI query parameter caused the error.
pointerA JSON pointer to the value in the request document that caused the error.
statusStatus code of the response.
titleShort human-readable summary of the error.
{
"errors": [
{
"detail": "Missing required attribute in body",
"meta": {},
"source": {
"header": "Authorization",
"parameter": "limit",
"pointer": "/data/attributes/title"
},
"status": "400",
"title": "Bad Request"
}
]
}Too many requests
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Code Example
# Path parameters
export request_id="12345678-1234-1234-1234-123456789012"
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/usage/admin/temporary-grant-requests/${request_id}/decision" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"decision": "denied"
},
"id": "12345678-1234-1234-1234-123456789012",
"type": "temporary_grant_requests"
}
}
EOF# Path parameters
export request_id="12345678-1234-1234-1234-123456789012"
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/usage/admin/temporary-grant-requests/${request_id}/decision" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"decision": "denied"
},
"id": "12345678-1234-1234-1234-123456789012",
"type": "temporary_grant_requests"
}
}
EOF# Path parameters
export request_id="12345678-1234-1234-1234-123456789012"
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/usage/admin/temporary-grant-requests/${request_id}/decision" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"decision": "denied"
},
"id": "12345678-1234-1234-1234-123456789012",
"type": "temporary_grant_requests"
}
}
EOF# Path parameters
export request_id="12345678-1234-1234-1234-123456789012"
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/usage/admin/temporary-grant-requests/${request_id}/decision" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"decision": "denied"
},
"id": "12345678-1234-1234-1234-123456789012",
"type": "temporary_grant_requests"
}
}
EOF# Path parameters
export request_id="12345678-1234-1234-1234-123456789012"
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/usage/admin/temporary-grant-requests/${request_id}/decision" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"decision": "denied"
},
"id": "12345678-1234-1234-1234-123456789012",
"type": "temporary_grant_requests"
}
}
EOF# Path parameters
export request_id="12345678-1234-1234-1234-123456789012"
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/usage/admin/temporary-grant-requests/${request_id}/decision" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"decision": "denied"
},
"id": "12345678-1234-1234-1234-123456789012",
"type": "temporary_grant_requests"
}
}
EOF# Path parameters
export request_id="12345678-1234-1234-1234-123456789012"
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/usage/admin/temporary-grant-requests/${request_id}/decision" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"decision": "denied"
},
"id": "12345678-1234-1234-1234-123456789012",
"type": "temporary_grant_requests"
}
}
EOF# Path parameters
export request_id="12345678-1234-1234-1234-123456789012"
# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/usage/admin/temporary-grant-requests/${request_id}/decision" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"decision": "denied"
},
"id": "12345678-1234-1234-1234-123456789012",
"type": "temporary_grant_requests"
}
}
EOF# Path parameters
export request_id="12345678-1234-1234-1234-123456789012"
# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/usage/admin/temporary-grant-requests/${request_id}/decision" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"decision": "denied"
},
"id": "12345678-1234-1234-1234-123456789012",
"type": "temporary_grant_requests"
}
}
EOF