MyanLex

Report recorded project usage (usage.read)

Verified session and current membership/usage.read required; bearer keys are not accepted. Inclusive UTC date range, 1–90 days, no future dates, earliest 1970-01-01. Supply both dates or neither (last 30 days including today). Today's bucket is partial. Missing days are zero-filled. This is best-effort recorded usage, not a billing statement. Bootstrap traffic and rejections before the interceptor, including rate limits, are excluded. Persistence failures can leave gaps. Batch HTTP requests count once; item failures within successful responses are not HTTP errors. Submitted characters are Unicode code points, including failed requests that reached the interceptor. No submitted text is retained or returned. Counter strings preserve exact integer precision. Handler durations exclude network, guards and usage persistence. Totals match the returned buckets.

GET/platform/organizations/{organizationId}/projects/{projectId}/usage

Verified session and current membership/usage.read required; bearer keys are not accepted. Inclusive UTC date range, 1–90 days, no future dates, earliest 1970-01-01. Supply both dates or neither (last 30 days including today). Today's bucket is partial. Missing days are zero-filled. This is best-effort recorded usage, not a billing statement. Bootstrap traffic and rejections before the interceptor, including rate limits, are excluded. Persistence failures can leave gaps. Batch HTTP requests count once; item failures within successful responses are not HTTP errors. Submitted characters are Unicode code points, including failed requests that reached the interceptor. No submitted text is retained or returned. Counter strings preserve exact integer precision. Handler durations exclude network, guards and usage persistence. Totals match the returned buckets.

Authorization

accountSession
better-auth.session_token<token>

Better Auth signed HttpOnly session cookie; HTTPS uses the __Secure-better-auth.session_token name. Sign in through /api/auth. Browser clients send cookies automatically; do not paste secrets into docs.

In: cookie

Path Parameters

organizationId*string

Tenant-scoped resource identifier.

Formatuuid
projectId*string

Tenant-scoped resource identifier.

Formatuuid

Query Parameters

from?string

Inclusive start UTC calendar date; requires the other date.

Formatdate
to?string

Inclusive end UTC calendar date; requires the other date.

Formatdate

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/platform/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/usage"
{  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",  "from": "2019-08-24",  "to": "2019-08-24",  "timezone": "UTC",  "generatedAt": "2019-08-24T14:15:22Z",  "metering": "best-effort",  "sources": {    "api_key": {      "requestCount": "string",      "errorCount": "string",      "charactersProcessed": "string",      "processingTimeMs": "string",      "averageProcessingTimeMs": "string"    },    "playground": {      "requestCount": "string",      "errorCount": "string",      "charactersProcessed": "string",      "processingTimeMs": "string",      "averageProcessingTimeMs": "string"    }  },  "totals": {    "requestCount": "string",    "errorCount": "string",    "charactersProcessed": "string",    "processingTimeMs": "string",    "averageProcessingTimeMs": "string"  },  "days": [    {      "date": "2019-08-24",      "requestCount": "string",      "errorCount": "string",      "charactersProcessed": "string",      "processingTimeMs": "string",      "averageProcessingTimeMs": "string"    }  ]}