Overview
GET
/usage/usage-counters/{scope}/{principalId}/{periodStart}usageGet usage_counters by id
Fetch a record from usage-counters by scope, principalId, periodStart.
Auth: bearerAuth — calls run as the authenticated user.
Parameters
- scopepathstring
- principalIdpathstring
- periodStartpathstring
Responses
200
usage_counters
- scopestring
- principalIdstring
- periodStartstring
- requestsinteger
- bytesinteger
- updatedAtstring
Example
{
"scope": "string",
"principalId": "string",
"periodStart": "string",
"requests": 0,
"bytes": 0,
"updatedAt": "string"
}401
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}404
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}Code examples
cURL
curl -X GET "https://api.agenticdeveloperhub.com/usage/usage-counters/{scope}/{principalId}/{periodStart}" \
-H "Authorization: Bearer YOUR_TOKEN"JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/usage/usage-counters/{scope}/{principalId}/{periodStart}", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
},
});
const data = await res.json();