Skip to Content
OpenETL
Reference

Declarative source manifest

Every field of a DeclarativeSource manifest.

A source for an HTTP API, as data. Expressions are CEL. Templates are text with {expression} holes; {{ and }} are literal braces. A template that is one hole keeps the hole's value: null leaves a parameter or header out, and a list repeats a parameter.

A manifest is a whole source for an HTTP API, which OpenETL runs itself, with no executable. Apply one with openetl connector apply -f FILE, or name one as a role's manifest in openetl-connector.yaml. openetl connector schema manifest prints its JSON Schema.

This page is generated from internal/declarative/manifest.schema.json. A field that isn't listed is refused, unless its section says other fields are allowed.

Top-level fields

FieldTypeRequiredDescription
apiVersionstringYesIs always openetl.io/v1alpha1.
kindstringYesIs always DeclarativeSource.
metadataobjectYesWhich connector and version this is, and what the console shows about it.
specobjectYesThe source: its config, how it calls the API, and its streams.

metadata

Which connector and version this is, and what the console shows about it.

FieldTypeRequiredDescription
namestringYesThe connector's package: owner/name, or name for the official owner, openetl. Each part is lowercase letters, digits and hyphens. Matches ^([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?/)?[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?$.
versionstringYesSemantic version, without build metadata (+…): versions that differ only by it compare as equal. Matches ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?$.
descriptionstringNoOne line. Has at most 500 characters.
licensestringNoAn SPDX expression, such as Apache-2.0. Has at most 100 characters.
repositorystringNoAn https URL of the source repository. Matches ^https://.
docsstringNoAn https URL. Matches ^https://.
tagsarray of stringNoWords the catalog shows with the connector, such as crm. Has at most 20 items. Each item matches ^[a-z0-9][a-z0-9-]{0,31}$.
authorstringNoWho made the connector. Has at most 200 characters.
logostringNoAn https URL of the connector's logo, which the UI shows. Matches ^https://.
releaseobjectNoThe git release this version comes from.

metadata.release

The git release this version comes from.

FieldTypeRequiredDescription
tagstringNoThe git tag. Has at most 255 characters.
urlstringNoAn https URL, such as the release's page. Matches ^https://.

spec

The source: its config, how it calls the API, and its streams.

FieldTypeRequiredDescription
resourcesobjectNoWhat the source asks of its jobs.
configobjectYesThe JSON Schema of the connector's config: an object. Top-level string properties with x-secret: true are secrets, which only auth and sign can reference, by name. Expressions see the other properties as config.NAME.
httpobjectYesHow the source calls the API: its base URL, headers, auth, signing, rate limit and error rules.
checkobjectNoWhat Check does: fetch the first page of a stream. Default: the first stream without a parent.
streamsarray of objectYesThe streams the source reads. Has at least one item.

spec.resources

What the source asks of its jobs.

FieldTypeRequiredDescription
hintstringNoThe job size a pipeline of this source starts at when it's sized automatically. Is one of xs, s, m, l or xl.

spec.config

The JSON Schema of the connector's config: an object. Top-level string properties with x-secret: true are secrets, which only auth and sign can reference, by name. Expressions see the other properties as config.NAME.

FieldTypeRequiredDescription
typestringYesIs always object.
propertiesobjectNoThe config's properties, by name, each a JSON Schema. Each name matches ^[A-Za-z_][A-Za-z0-9_]*$.

Other fields are allowed.

spec.http

How the source calls the API: its base URL, headers, auth, signing, rate limit and error rules.

FieldTypeRequiredDescription
base_urltemplateYesA template over config. Request paths are appended to it, and next-page URLs must have its scheme, host and port.
headerstemplatesNoHeaders for every request: templates, as in a stream's request.
authobjectNoHow requests authenticate. The host adds the credential when a request leaves, and only to the base URL's scheme, host and port.
signobjectNoSigns every request with a key the host holds. hmac puts a MAC of message in a header or a query parameter; jwt sends a JWT as the Authorization header.
rate_limitobjectNoHow fast the source sends requests.
errorserrorsNoError rules for every stream, after the stream's own.

spec.http.auth

How requests authenticate. The host adds the credential when a request leaves, and only to the base URL's scheme, host and port.

FieldTypeRequiredDescription
typestringYesHow requests authenticate. Is one of bearer, basic, api_key, oauth2 or aws_sigv4.

spec.http.auth when type is bearer

FieldTypeRequiredDescription
tokensecretYesThe bearer token.

spec.http.auth when type is basic

FieldTypeRequiredDescription
usernametemplateYesA template over config.
passwordsecretYesThe password.

spec.http.auth when type is api_key

FieldTypeRequiredDescription
keysecretYesThe API key.
headerstringNoThe header the key goes in, such as X-API-Key. Isn't empty.
querystringNoThe query parameter the key goes in. Isn't empty.
prefixstringNoPut before the key, such as "Token ".
  • Has exactly one of header or query.

spec.http.auth when type is oauth2

FieldTypeRequiredDescription
token_urltemplateYesA template over config.
client_idtemplateOrSecretYesThe client's ID.
client_secretsecretYesThe client's secret.
refresh_tokensecretNoA refresh token, for the refresh token grant. Without one, the host uses the client credentials grant.
scopesarray of stringNoThe scopes to ask for.
auth_stylestringNoWhere the client credentials go in token requests. Default: the host tries both. Is one of header or params.

spec.http.auth when type is aws_sigv4

FieldTypeRequiredDescription
access_key_idtemplateOrSecretYesThe AWS access key ID.
secret_access_keysecretYesThe AWS secret access key.
session_tokensecretNoAn AWS session token, for temporary credentials.
regiontemplateYesA template over config.
servicestringYesThe AWS service's signing name, such as execute-api. Isn't empty.

spec.http.sign

Signs every request with a key the host holds. hmac puts a MAC of message in a header or a query parameter; jwt sends a JWT as the Authorization header.

FieldTypeRequiredDescription
typestringYesHow requests are signed. Is one of hmac or jwt.
keysecretYesThe signing key.

spec.http.sign when type is hmac

FieldTypeRequiredDescription
hashstringYesThe HMAC's hash function. Is one of sha1, sha256 or sha512.
messageexpressionYesAn expression over request (method, url, path, query, headers, body), config and now, returning a string or bytes.
encodingstringNoDefault: hex. Is one of hex or base64.
headerstringNoThe header the MAC goes in. Isn't empty.
querystringNoThe query parameter the MAC goes in. Isn't empty.
prefixstringNoPut before the MAC.
  • Has exactly one of header or query.

spec.http.sign when type is jwt

FieldTypeRequiredDescription
algorithmstringYesThe JWT's signing algorithm. Is one of HS256, RS256 or ES256.
claimsexpressionYesAn expression over config and now, returning a map.
jose_headerexpressionNoAn expression returning extra header fields, such as kid. The host sets alg and typ.
prefixstringNoDefault: "Bearer ".

spec.http.rate_limit

How fast the source sends requests.

FieldTypeRequiredDescription
rpsnumberYesRequests per second at most. The rate adapts below it when the API throttles. Is more than 0.

spec.check

What Check does: fetch the first page of a stream. Default: the first stream without a parent.

FieldTypeRequiredDescription
streamstringYesThe stream whose first page Check fetches.

spec.streams[]

A stream the source reads: how to request it, page through it, and find its records.

FieldTypeRequiredDescription
namestringYesThe stream's name. Isn't empty.
primary_keyarray of stringNoThe top-level properties that make up a record's primary key.
requestobjectYesThe request for each page. Templates over config, state, page, parent, partition and now.
recordsexpressionNoAn expression over response, returning the page's records, each an object. Default: response.body.
paginatorobjectNoHow to get the next page. A resume point follows every page. Without a paginator, a stream is one page.
incrementalobjectNoRead from a cursor floor onwards. Requests see the floor, less the lookback, as state.cursor, which is absent on the first sync. The API must return every record whose cursor is at or after it.
parentobjectNoRead the stream once per record of another stream, which the request sees as parent. The parent must have a primary key and no parent of its own.
partitionsobjectNoRead the stream in splits, concurrently where the job has room, each with its own place and floor. Requests see each one as partition. Not for a stream with a parent.
errorserrorsNoError rules for this stream, tried before the API's.
schemaobjectNoJSON Schema for some or all of the record's top-level properties, which declares their types. The others are inferred.

spec.streams[].request

The request for each page. Templates over config, state, page, parent, partition and now.

FieldTypeRequiredDescription
methodstringNoDefault: GET. Is one of GET or POST.
pathtemplateYesAppended to the base URL. Holes are escaped as path segments.
paramstemplatesNoQuery parameters.
headerstemplatesNoHeaders, besides the API's.
bodyexpressionNoAn expression whose value is sent as JSON.
idempotentbooleanNoLets the host retry a POST, such as a search that changes nothing.

spec.streams[].paginator

How to get the next page. A resume point follows every page. Without a paginator, a stream is one page.

FieldTypeRequiredDescription
typestringYesHow the next page is found. Is one of cursor, next_url, link, offset or page.
stopexpressionNoAn expression over response and records; true ends pagination.

spec.streams[].paginator when type is cursor

FieldTypeRequiredDescription
nextexpressionYesAn expression over response and records: the next page's token, or null or an empty string at the end. Requests see it as page.token.
paramstringNoAlso send the token as this query parameter. Isn't empty.

spec.streams[].paginator when type is next_url

FieldTypeRequiredDescription
nextexpressionYesAn expression over response and records: the next page's URL, absolute or relative to the base URL, or null or an empty string at the end. It's fetched as it is, with no params added.

The next page is the Link header's rel="next" URL, fetched as it is.

spec.streams[].paginator when type is offset

FieldTypeRequiredDescription
paramstringNoDefault: offset. Isn't empty.
startintegerNoDefault: 0. Is at least 0.
sizeintegerNoRecords in a full page. A shorter page is the last. Is at least 1.
size_paramstringNoSend size as this query parameter. Isn't empty.

spec.streams[].paginator when type is page

FieldTypeRequiredDescription
paramstringNoDefault: page. Isn't empty.
startintegerNoDefault: 1. Is at least 0.
sizeintegerNoRecords in a full page. A shorter page is the last. Is at least 1.
size_paramstringNoSend size as this query parameter. Isn't empty.

spec.streams[].incremental

Read from a cursor floor onwards. Requests see the floor, less the lookback, as state.cursor, which is absent on the first sync. The API must return every record whose cursor is at or after it.

FieldTypeRequiredDescription
cursor_fieldstringYesA top-level property of the records. Isn't empty.
typestringYesdatetime: RFC 3339 text, and state.cursor is a timestamp. unix: seconds since 1970, and state.cursor is an int. integer and string: compared as they are. Is one of datetime, unix, integer or string.
lookbackstringNoRead again this far behind the floor, for late updates. datetime and unix only. A duration such as 90s, 5m or 1h30m. Matches ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$.
orderedbooleanNoThe API returns records sorted by the cursor, oldest first, so the floor advances after every page.

spec.streams[].parent

Read the stream once per record of another stream, which the request sees as parent. The parent must have a primary key and no parent of its own.

FieldTypeRequiredDescription
streamstringYesThe parent stream's name.

spec.streams[].partitions

Read the stream in splits, concurrently where the job has room, each with its own place and floor. Requests see each one as partition. Not for a stream with a parent.

FieldTypeRequiredDescription
valuesexpressionNoAn expression over config and now, returning a list: a partition per entry.
rangeobjectNoPartitions of {start, end}, in RFC 3339, a step at a time.

spec.streams[].partitions.range

Partitions of {start, end}, in RFC 3339, a step at a time.

FieldTypeRequiredDescription
startexpressionYesAn expression over config and now, returning a timestamp.
endexpressionNoAs start. Default: now.
stepstringYesA duration, such as 24h.

spec.streams[].schema

JSON Schema for some or all of the record's top-level properties, which declares their types. The others are inferred.

FieldTypeRequiredDescription
propertiesmap of names to objectNoThe properties' JSON Schemas, by name.

Other fields are allowed.

Types

Fields above refer to these types by name.

template

Text with {expression} holes. A string.

templates

Names, each with a template, such as a request's query parameters. A map of names to template.

secret

A config property marked x-secret, by name.

FieldTypeRequiredDescription
secretstringYesThe name of a config property marked x-secret. Isn't empty.

templateOrSecret

A template, or a secret. Either template or secret.

expression

A CEL expression. A string. Isn't empty.

errors

Rules tried in order on every response. The first whose when is true decides; an expression that fails to evaluate doesn't match. A list of objects with these fields.

FieldTypeRequiredDescription
whenexpressionYesAn expression over response.
actionstringYesfail: fail with code and message. ignore: treat the response as an empty last page. expired: the page token a resumed read started from was rejected, so the stream starts over from its floor. Is one of fail, ignore or expired.
codestringNoFor fail. Default: how the host classified the response. Is one of TRANSIENT, RATE_LIMITED, AUTH_EXPIRED, AUTH_INVALID, PERMISSION_DENIED, CONFIG_INVALID, CONTRACT_CHANGED or RESOURCE_EXHAUSTED.
messagetemplateNoFor fail: a template over response.

On this page