Usage Breakdown
GET
/v1/usage/breakdown
const url = 'https://api.cloud.agentums.ru/v1/usage/breakdown?days=0';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.cloud.agentums.ru/v1/usage/breakdown?days=0' \ --header 'Authorization: Bearer <token>'Сводный расход по всем юзерам — только супер-админ (ADMIN_OWNERS, require_superadmin).
Authorizations
Заголовок раздела «Authorizations»Parameters
Заголовок раздела «Parameters»Query Parameters
Заголовок раздела «Query Parameters»days
Days
integer
Responses
Заголовок раздела «Responses»Successful Response
Media typeapplication/json
UsageBreakdown
object
owners
Owners
Array<object>
OwnerUsagetotal_cost_rub
Total Cost Rub
number
Example
{ "owners": [], "total_cost_rub": 0}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}