Yapper Docs
Api reference
GET
/usage/keys

Each API key's spend this month and lifetime (what its credit limit counts, net of refunds) and its charges and refunds in the range. Owners and admins see every key; other members see the keys they made. truncated is true when the range had more than 20,000 credit log entries.

Authorization

bearerAuth usage:read
AuthorizationBearer <token>

In: header

Scope: usage:read

Query Parameters

range?string
Default"month"

Value in

  • "week"
  • "month"
  • "quarter"
  • "year"
  • "all"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/usage/keys"
{  "data": [    {      "keyId": "string",      "name": "string",      "keyPrefix": "string",      "createdBy": "string",      "revoked": true,      "creditLimit": 0,      "creditLimitPeriod": "monthly",      "spentThisMonth": 0,      "spentLifetime": 0,      "range": {        "credits": 0,        "charged": 0,        "refunded": 0,        "charges": 0      }    }  ],  "range": "week",  "rangeStart": "2019-08-24T14:15:22Z",  "rangeEnd": "2019-08-24T14:15:22Z",  "truncated": true}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}
{  "error": {    "code": "string",    "message": "string",    "requestId": "string"  }}