Making requests
This page covers the conventions every route shares. The API reference documents each operation, and the OpenAPI document is the authoritative schema.
Setup
JSON requests
Send request bodies as JSON with Content-Type: application/json. Fields use
snake_case. Another content type returns 415.
Creating an Import is the exception: the body is the catalog file itself, and its settings are query parameters. See Imports.
A request body can be up to 10 MiB; a larger one returns 413.
Do not infer response casing or optionality from a request example. Generate types from the OpenAPI document or validate responses against its schemas.
Idempotency keys
Writes that create work require an Idempotency-Key header:
The other writes take no key: marking a Store as your own (PATCH),
untracking a Store, updating a Schedule (PATCH), stopping a Run, pausing or
resuming a Schedule, deleting, and sending a webhook test.
Use one unique key per logical operation, and send the same key when you retry it:
- A key is 1 to 255 visible ASCII characters. A missing or malformed key
returns
400. - Extralt keeps a key for 24 hours from its first request. Within that time, retrying with the same key and the same request returns the first request's resource, read as it is now, without doing the work again.
- Reusing a key for a different request returns
409 Conflict. Keys are shared by every route of the organization, so do not reuse one across operations. - After 24 hours the key is forgotten, and a request with it starts new work.
For an Import, the request compared is the file, its Content-Type and its
query parameters. For a webhook, a retry returns the signing secret again.
A retry of a completed request still returns its result after a subscription
ends; a new request then returns 402. See
Subscriptions and access.
Asynchronous work
A Store's crawler, Runs and Imports take time. Their create request returns
at once, and the work continues in the background: a Run or Import with
202 Accepted, a new Store with 201 Created. Adding a Store your
organization already has returns it with 200 OK, and checks it again if its
crawler is none or failed.
Read the resource until it reaches a final state:
Keep the Run or Import id: its PDPs name it as their source.id, and listing
or exporting them takes it. The API has no route that lists Imports.
Poll with a bounded delay, as in Waiting for a Run, or receive a webhook when the work finishes.
Lists
List routes take a limit and, when they page, a cursor. Schedules take
only these two. Stores also take max_staleness_days, Runs finished_since,
and PDPs run_id, import_id, store_id, listing_id, url and latest.
Explore routes take the filters the API reference lists
for each. Prefer the narrowest server-side filter over downloading a
whole collection and filtering it yourself.
A route that pages returns next_cursor: pass it back as cursor until it is
null. See Pagination.
Page sizes
A limit outside the route's range returns 400.
An Analysis does not page: its summary, coverage and freshness always cover
the complete scope, and limit bounds only the evidence rows in data. To get
every PDP of one Run or Import, use the export
rather than paging.
Status codes
Check the status before reading a success body. Every error uses the same
envelope, { "error": { "code", "message", "request_id" } }: branch on its
code, and keep the request_id when you contact support.
Error codes lists every status and code, with what to
do about each.
Retry reads freely after a delay. Retry a create or restart only with its
original Idempotency-Key and the same request.