PgBeam Docs
Analytics

Get project usage

GET
/v1/projects/{project_id}/usage

Returns daily usage data for a specific project, broken down by region.

Authorization

AuthorizationBearer <token>

JWT issued by Better Auth. Verified via JWKS.

In: header

Path Parameters

project_id*string

Unique project identifier (prefixed, e.g. prj_xxx).

Query Parameters

start_date*string

Start date (inclusive, YYYY-MM-DD).

end_date*string

End date (inclusive, YYYY-MM-DD).

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/projects/string/usage?start_date=2024-01-01&end_date=2024-01-31"
{  "usage": [    {      "day": "2019-08-24",      "region": "string",      "queries_total": 0,      "cache_hits": 0,      "cache_misses": 0,      "connection_seconds": 0,      "bytes_transferred": 0    }  ]}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}