Destinations
API Destinations
API destinations send rows as HTTP calls, one request per row or in batches.
Providers: rest
Output fields
Every output in this type carries these fields; provider and format values live under options.
| Field | Type | Default | Notes |
|---|---|---|---|
name (required) | string | - | - |
from (required) | string | - | - |
mode (required) | append | - | Logical output mode for API writes. |
Minimal example
A complete api destination with one output, written for provider rest:
Code
Providers
rest
Connection
Use settings.connection_name for a saved connection, or configure it inline:
| Field | Type | Default | Notes |
|---|---|---|---|
http_version | HTTP_1_1 or HTTP_2 or HTTP_3 | HTTP_2 | HTTP version to use for the API request. |
ssl_verify | boolean | true | Verify TLS certificates. Set to false to disable certificate and hostname validation (dev/testing only; applies to every call made through this connection, including chained file downloads). |
auth is one of:
OAuth2 (client credentials)
| Field | Type | Default | Notes |
|---|---|---|---|
type (required) | oauth2 | - | - |
credentials (required) | object | - | - |
credentials.token_url (required) | string | - | Token endpoint URL (e.g. https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token). |
credentials.client_id (required) | string | - | OAuth2 application (client) ID. |
credentials.client_secret (required) | string | - | OAuth2 client secret. |
credentials.client_secret_method | basic or post | basic | Client auth method: basic (default) or body. |
credentials.scope | string | - | Scope string (e.g. 'https://graph.microsoft.com/.default'). |
credentials.token_field | string | access_token | Field in the token response that holds the access token. Defaults to 'access_token'. |
Bearer token
| Field | Type | Default | Notes |
|---|---|---|---|
type (required) | bearer | - | - |
credentials (required) | object | - | - |
credentials.token (required) | string | - | Static bearer token. |
Basic auth
| Field | Type | Default | Notes |
|---|---|---|---|
type (required) | basic | - | - |
credentials (required) | object | - | - |
credentials.user (required) | string | - | Username. |
credentials.password (required) | string | - | Password. |
API Key
| Field | Type | Default | Notes |
|---|---|---|---|
type (required) | api_key | - | - |
credentials (required) | object | - | - |
credentials.key (required) | string | - | API key value sent as the 'X-API-Key' header. |
No auth
| Field | Type | Default | Notes |
|---|---|---|---|
type (required) | none | - | - |
Output options
outputs[].options:
| Field | Type | Default | Notes |
|---|---|---|---|
request_mode | per_row or batch | per_row | Send one request per row or one JSON-array request per batch. Row placeholders are supported only in per_row mode. |
batch_size | integer | 100 | Rows sent in each batch request. Minimum: 1. |
headers | array of object | - | - |
headers[].name (required) | string | - | - |
headers[].value (required) | string | - | - |
params | array of object | - | - |
params[].name (required) | string | - | - |
params[].value (required) | string or number or boolean | - | - |
Streaming query options
These apply to every output in a streaming pipeline:
| Field | Type | Default | Notes |
|---|---|---|---|
output_mode | append or complete or update | append | Output mode of the streaming query. append: only new rows; complete: full result table; update: only updated rows (since 2.0). Maps to outputMode. |
trigger_interval | string | - | Trigger interval for processing (e.g. '10 seconds', '1 minute'). When set, uses Trigger.ProcessingTime(interval). Maps to triggerInterval. |
checkpoint_location | string | - | Optional custom checkpoint directory. When not set, a default under /app/data/spark-checkpoints/ is used. Maps to checkpointLocation. |
query_name | string | - | Name for the streaming query (for monitoring and debugging). Maps to queryName. |
Related pages
Last modified on