rest_api_source schema, describing the API client (base URL, authentication, pagination) and the resources (endpoints) to ingest.
Key Features
- Connect to any REST API: base URL, authentication, pagination, and endpoints are all declared in a single JSON configuration.
- Multiple auth styles: bearer tokens, API keys (header or query), HTTP basic, and OAuth2 client credentials.
- Incremental synchronization: declare a cursor field per resource and only new or updated records are delivered on each run.
- Scheduled ingestion: flexible scheduling by minutes, hours, or days, with an immediate first run on creation.
Configuration
| Field | Required | Description |
|---|---|---|
| Configuration | Yes | A JSON object following the dlt rest_api_source schema — see below |
| Schedule | Yes | Sync frequency — see Scheduling |
Configuration structure
The configuration JSON has two main blocks:client— how to reach and authenticate against the API:base_url,auth, optionalpaginatorandheaders.resources— an array of endpoints to ingest. Each resource becomes a stream/table, with itspath, adata_selectorpointing at the records in the response, optional queryparams, and an optionalincrementalcursor.
Example
Ingesting two resources from an API authenticated with a bearer token, with cursor-based incremental sync onupdated_at:
Scheduling
API source connectors run on a schedule rather than streaming continuously. A first run is always triggered immediately after the connector is created; subsequent runs depend on the selected mode:| Mode | Behavior | Example |
|---|---|---|
| days | Runs every N days at 00:00 UTC + offset (in minutes) | Offset 30 → every day at 00:30 UTC |
| hours | Runs every N hours at :00 + offset (in minutes) | Offset 15 → 00:15, 01:15, 02:15, … |
| minutes | Runs every N minutes, anchored on the connector creation time | Created 10:03, interval 10 → 10:13, 10:23, … |