Skip to main content
GET
/
limits
JavaScript
import Limitry from '@limitry/sdk';

const client = new Limitry({
  apiKey: process.env['LIMITRY_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const limit of client.limits.list()) {
  console.log(limit.id);
}
{
  "data": [
    {
      "id": "lmt_abc123",
      "projectId": "proj_xyz",
      "name": "Daily Token Limit",
      "meterId": "mtr_total_tokens",
      "limitValue": 100000,
      "period": "day",
      "customerId": null,
      "dimensionFilters": {},
      "alertThresholds": [
        80,
        100
      ],
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-15T10:30:00Z"
    }
  ],
  "nextCursor": "lmt_xyz789",
  "hasMore": true
}

Authorizations

Authorization
string
header
required

API Key or Personal Access Token (PAT). When using PAT, include X-Project header.

Query Parameters

customerId
string

Filter limits by customer ID

limit
integer
default:50

Maximum number of items to return (1-100, default: 50)

Required range: 1 <= x <= 100
cursor
string

Pagination cursor from the previous response

Response

List of limits

data
object[]
required
nextCursor
string | null
required

Cursor for the next page of results. Null if there are no more results.

hasMore
boolean
required

Whether there are more results available