Skip to content

REST API

  • Generated REST API: List, get, create, update and delete endpoints for every resource, following the AIP API design guidelines.
  • OpenAPI and reference: An OpenAPI 3.1 document and an API reference page, each showing only what the caller may see and do.
  • Filters: AIP-160 filters and ordering, with word search across a resource’s search fields, lists of values and relative dates.
  • Lists under a record: /objectives/40/tasks lists what belongs to one record, by a relation or a declared link, after reading that record as the caller would.
  • Filtering through related records: A list asks for the records that belong to another with a subfilter, such as an objective’s tasks, in one read under the caller’s access, instead of sending a list of keys. The filter can keep to one page of those records, with their sort, limit and page token, and follow a JSON list of keys they hold.
  • First rows per value (beta): A list can return the first n records per value of a field, such as the latest three comments of each task, in one read.
  • Counts, facets and charts: Endpoints for value counts, grouped sums and averages, records over time, histograms and paging to any row.
  • Map queries: The records inside a map’s view, or counts per area when there are many.
  • Related names and photos: A list response can carry the names of related records and each record’s first photos.
  • ETags: Every record has a version, and a write based on an old version is refused.
  • Lists without ETags: A list can leave out each record’s version, so it reads only the fields it asks for.
  • Minimal responses: A create or update can answer without the record, to save the transfer.
  • Batch writes: Up to 500 creates, updates, deletes, reorders and moves across resources in one transaction.
  • Record permissions: Responses say which records and fields the caller may change.
  • Scan guard: Lists, searches and facets on a column no index serves are refused, at any table size, with the index to create.
  • Statement timeouts: Every request’s queries stop after 1 second by default, with an error that names the request, and reads run read-only.
  • Errors: Every error is a problem document with a stable type and per-field details.
  • Audit events: Reveals of sensitive values and organization changes are published as audit events.
  • Error reporting (beta): Server and admin app errors go to a Sentry-compatible error tracker when a DSN is set.
  • JWT authentication: The API accepts tokens from another identity provider, or a check of your own.
  • CORS: Websites on other origins can call the API once their origins are listed.
  • Typed client: A typed fetch client and React hooks for the API.