import requests
url = "https://api.datagrid.com/v1/organization/reports/consumption-breakdown"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datagrid.com/v1/organization/reports/consumption-breakdown', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.datagrid.com/v1/organization/reports/consumption-breakdown \
--header 'Authorization: Bearer <token>'{
"object": "list",
"data": [
{
"object": "consumption_breakdown",
"credits": 123,
"created_at": "2023-11-07T05:31:56Z",
"action": "<string>",
"organization": "<string>",
"resource": "<string>",
"resource_type": "<string>",
"credit_source": "<string>"
}
],
"has_more": true,
"first_id": "<string>",
"last_id": "<string>"
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}List consumption breakdown
Return Control Tower teamspace/organization credit consumption rows for
the authenticated organization. The date window is measured in UTC
calendar days and must not exceed 90 days. A date-only start_date
begins at UTC midnight and a date-only end_date covers that whole
UTC day. Pagination uses opaque after / before cursors from
first_id / last_id. The cursors encode a position in the result
set, not a record id, so rows written between two page requests can
shift the window. Dollar amount is not included.
import requests
url = "https://api.datagrid.com/v1/organization/reports/consumption-breakdown"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.datagrid.com/v1/organization/reports/consumption-breakdown', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.datagrid.com/v1/organization/reports/consumption-breakdown \
--header 'Authorization: Bearer <token>'{
"object": "list",
"data": [
{
"object": "consumption_breakdown",
"credits": 123,
"created_at": "2023-11-07T05:31:56Z",
"action": "<string>",
"organization": "<string>",
"resource": "<string>",
"resource_type": "<string>",
"credit_source": "<string>"
}
],
"has_more": true,
"first_id": "<string>",
"last_id": "<string>"
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Inclusive start of the report window (ISO 8601 date or date-time). Date-only values are UTC midnight.
Inclusive end of the report window (ISO 8601 date or date-time). A date-only value covers that entire UTC day; a date-time is used exactly as given.
The limit on the number of objects to return, ranging between 1 and 100.
1 <= x <= 100A cursor to use in pagination. after is an object ID that defines your place in the list. For example, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo to fetch the next page of the list.
A cursor to use in pagination. before is an object ID that defines your place in the list. For example, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include before=obj_bar to fetch the previous page of the list.
Response
Consumption breakdown rows
The object type, always 'list'.
list Consumption breakdown rows for this page.
Show child attributes
Show child attributes
Whether additional rows exist after this page.
Opaque cursor for the first row on this page, or null when the page is empty.
Opaque cursor for the last row on this page, or null when the page is empty.