cost-control
Overview
Return attributed spend, budget state, quality, and scope breakdowns.
GET
/
api
/
costs
/
overview
Overview
curl --request GET \
--url https://api.aixy-gateway.com/api/costs/overview \
--cookie gateway_session=import requests
url = "https://api.aixy-gateway.com/api/costs/overview"
headers = {"cookie": "gateway_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'gateway_session='}};
fetch('https://api.aixy-gateway.com/api/costs/overview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"window": "<string>",
"period": {
"starts_at": "<string>",
"ends_at": "<string>"
},
"total_spend_usd": "<string>",
"forecast_spend_usd": "<string>",
"requests": 123,
"attributed_requests": 123,
"attribution_coverage_percent": 123,
"quality": {
"estimated_requests": 123,
"provider_reported_requests": 123,
"reconciled_requests": 123,
"partial_requests": 123,
"unattributed_requests": 123,
"unattributed_reasons": [
{
"reason": "<string>",
"requests": 123
}
]
},
"enforcement": {
"description": "<string>",
"mode": "distributed"
},
"budgets": [
{
"id": "<string>",
"scope": "<string>",
"target_id": "<string>",
"target_name": "<string>",
"interval": "<string>",
"limit_usd": "<string>",
"warning_threshold_percent": 123,
"enforcement": "<string>",
"allocation": "shared",
"created_at": "<string>",
"updated_at": "<string>",
"spend_usd": "<string>",
"remaining_usd": "<string>",
"utilization_percent": 123,
"state": "<string>",
"starts_at": "<string>",
"resets_at": "<string>",
"object": "cost.budget"
}
],
"breakdowns": [
{
"scope": "<string>",
"target_id": "<string>",
"target_name": "<string>",
"target_detail": "<string>",
"target_status": "active",
"spend_usd": "<string>",
"requests": 123,
"attributed_requests": 123,
"estimated_requests": 123,
"provider_reported_requests": 123,
"reconciled_requests": 123,
"partial_requests": 123
}
],
"targets": [
{
"scope": "<string>",
"id": "<string>",
"name": "<string>",
"detail": "<string>"
}
],
"object": "cost.overview"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Authorizations
Secure same-origin browser session cookie.
Query Parameters
Available options:
current_month, last_month, 30d, 90d Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Allowed value:
"cost.overview"⌘I
Overview
curl --request GET \
--url https://api.aixy-gateway.com/api/costs/overview \
--cookie gateway_session=import requests
url = "https://api.aixy-gateway.com/api/costs/overview"
headers = {"cookie": "gateway_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'gateway_session='}};
fetch('https://api.aixy-gateway.com/api/costs/overview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"window": "<string>",
"period": {
"starts_at": "<string>",
"ends_at": "<string>"
},
"total_spend_usd": "<string>",
"forecast_spend_usd": "<string>",
"requests": 123,
"attributed_requests": 123,
"attribution_coverage_percent": 123,
"quality": {
"estimated_requests": 123,
"provider_reported_requests": 123,
"reconciled_requests": 123,
"partial_requests": 123,
"unattributed_requests": 123,
"unattributed_reasons": [
{
"reason": "<string>",
"requests": 123
}
]
},
"enforcement": {
"description": "<string>",
"mode": "distributed"
},
"budgets": [
{
"id": "<string>",
"scope": "<string>",
"target_id": "<string>",
"target_name": "<string>",
"interval": "<string>",
"limit_usd": "<string>",
"warning_threshold_percent": 123,
"enforcement": "<string>",
"allocation": "shared",
"created_at": "<string>",
"updated_at": "<string>",
"spend_usd": "<string>",
"remaining_usd": "<string>",
"utilization_percent": 123,
"state": "<string>",
"starts_at": "<string>",
"resets_at": "<string>",
"object": "cost.budget"
}
],
"breakdowns": [
{
"scope": "<string>",
"target_id": "<string>",
"target_name": "<string>",
"target_detail": "<string>",
"target_status": "active",
"spend_usd": "<string>",
"requests": 123,
"attributed_requests": 123,
"estimated_requests": 123,
"provider_reported_requests": 123,
"reconciled_requests": 123,
"partial_requests": 123
}
],
"targets": [
{
"scope": "<string>",
"id": "<string>",
"name": "<string>",
"detail": "<string>"
}
],
"object": "cost.overview"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}