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

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

const limit = await client.limits.retrieve('id');

console.log(limit.id);
{
  "id": "<string>",
  "projectId": "<string>",
  "name": "<string>",
  "meterId": "<string>",
  "limitValue": 123,
  "period": "<string>",
  "dimensionFilters": {},
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "customerId": "<string>",
  "alertThresholds": [
    50
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Unique identifier for the limit

Response

Limit found

id
string
required

Unique identifier for the limit

projectId
string
required

ID of the project that owns this limit

name
string
required

Human-readable name for the limit

meterId
string
required

ID of the meter this limit references

limitValue
number
required

Limit value

period
string
required

Time period for the limit (hour, day, week, month, annual, all_time). Period boundaries are calculated from the customer billingCycleStart.

dimensionFilters
object
required

Additional dimension filters for scoping

createdAt
string<date-time>
required

ISO 8601 timestamp when the limit was created

updatedAt
string<date-time>
required

ISO 8601 timestamp when the limit was last updated

customerId
string | null

Optional customer ID to scope the limit to

alertThresholds
integer[] | null

Alert thresholds as percentages (e.g., [80, 100])

Required range: 1 <= x <= 100