Skip to content
OAOpenAppPhysical Security as a Service
Login

Organization context & pagination

Most API keys are created under a single organization in the dashboard; authorization and roles are evaluated in that org’s context. Some accounts participate in multiple organizations. Wire-level list endpoints then combine organization selection (X-Org and related query fields) with pagination query parameters described in the canonical OpenAPI bundle.

This page ties those concepts to each SDK. For installation and credentials, start with Authentication.

ConceptDetails
Key issuanceKeys are minted while an organization is selected in the dashboard; role checks apply in that org. See API keys.
Multi-org usersCall GET /orgs (list orgs your principal can access) and choose a target org id before hitting org-scoped routes.
X-Org headerMany operations are documented as “for the organization context (X-Org)”. Pass the organization id (ULID string) in this header when the operation requires an explicit org. OpenAPI lists which operations need it — for example list_devices (GET /devices); see the API reference and packages/api-spec/openapi.json in the repository.
orgId querySome list surfaces accept an orgId filter in addition to X-Org. Prefer matching the same org id in both when your generator or SDK exposes both.

Errors: Missing or invalid org context typically surfaces as 403 Forbidden or 404 depending on the route and server rules, in addition to the usual 401 when the key is invalid.

The public API describes list operations with:

  • output_optionsMultiResourceOutputOptionsQuery in the OpenAPI bundle (include_deleted, include_metadata, only_deleted — all required on the wire in the published schema).
  • paginationPaginationQuery: limit (page size, server-enforced max typically 200) and offset (items to skip).

Response shape for paginated JSON bodies is typically PaginatedResponse: items (array) and total (count). Some SDK-level wrappers may expose cursor-style helpers on top of the same routes; where that applies, see Python — Resources for iteration patterns.

When in doubt, use the interactive API reference for the exact parameters and schemas of the operation you are calling.

devices.list accepts optional org_id, limit, and cursor kwargs; the bridge forwards query parameters to GET /devices.

rows = await client.devices.list(
org_id="01HORG00000000000000000000",
limit=50,
)
# `rows` follows the API response body (shape depends on route — often a list or paginated object).

For large org listings and other resources, combine limit with the pagination fields returned by the API (for example a next_cursor when the service emits one — see Resources).

page = await client.orgs.list(limit=50)
for org in page.get("items", []):
print(org.get("id"), org.get("name"))