Workspace
Set up
Section titled “Set up”npm install @limitry/sdkimport { createClient } from "@limitry/sdk";
const limitry = createClient(); // reads LIMITRY_API_KEYpip install limitryfrom limitry import Limitry
limitry = Limitry() # reads LIMITRY_API_KEYnpm install -g @limitry/clilimitry loginexport LIMITRY_API_KEY="lim_test_…"Get the current workspace
Section titled “Get the current workspace”GET /v1/workspace
Returns the Workspace the credential acts in — the API key’s own, or the one named by X-Workspace for a personal access token.
await limitry.workspace.get();limitry.workspace.get()limitry workspace getcurl -X GET "https://api.limitry.com/v1/workspace" \ -H "Authorization: Bearer $LIMITRY_API_KEY"More about this endpoint
Useful as an integration smoke test (“who am I?”).
List workspace members
Section titled “List workspace members”GET /v1/workspace/members
The workspace’s members with their roles, newest first.
await limitry.workspace.members.list();limitry.workspace.members.list()limitry workspace members listcurl -X GET "https://api.limitry.com/v1/workspace/members" \ -H "Authorization: Bearer $LIMITRY_API_KEY"| Field | Description |
|---|---|
limit | Items per page, 1–100 (default 25). |
cursor | Opaque token from a previous page's nextCursor. |
More about this endpoint
Paginate with the opaque nextCursor; limit is clamped to 1–100 (default 25). Members are invited, removed and given roles in the app.
List pending invitations
Section titled “List pending invitations”GET /v1/workspace/invitations
Invitations sent and not yet accepted, declined or expired, newest first.
await limitry.workspace.invitations.list();limitry.workspace.invitations.list()limitry workspace invitations listcurl -X GET "https://api.limitry.com/v1/workspace/invitations" \ -H "Authorization: Bearer $LIMITRY_API_KEY"| Field | Description |
|---|---|
limit | Items per page, 1–100 (default 25). |
cursor | Opaque token from a previous page's nextCursor. |
More about this endpoint
Owners and admins only for a personal credential, as in the app. Paginate with the opaque nextCursor.
Get your plan’s usage this period
Section titled “Get your plan’s usage this period”GET /v1/workspace/usage
How much of each meter the workspace used this period, with the plan’s limit for it (null = unlimited).
await limitry.workspace.usage();limitry.workspace.usage()limitry workspace usagecurl -X GET "https://api.limitry.com/v1/workspace/usage" \ -H "Authorization: Bearer $LIMITRY_API_KEY"More about this endpoint
A period is a month from the workspace’s billing date: its subscription’s (an annual plan refills monthly from its start), else the day the workspace was created.
List teams
Section titled “List teams”GET /v1/workspace/teams
The workspace’s teams with their members’ user ids, newest first.
await limitry.workspace.teams.list();limitry.workspace.teams.list()limitry workspace teams listcurl -X GET "https://api.limitry.com/v1/workspace/teams" \ -H "Authorization: Bearer $LIMITRY_API_KEY"| Field | Description |
|---|---|
limit | Items per page, 1–100 (default 25). |
cursor | Opaque token from a previous page's nextCursor. |
More about this endpoint
Paginate with the opaque nextCursor; limit is clamped to 1–100 (default 25). Teams are created and staffed in the app.