Skip to main content

Module rest

Module rest 

Source
Available on crate feature source-rest only.

Modules§

auth
Authentication strategies for REST APIs.
config
Stream configuration and builder.
extract
Record extraction from API responses.
pagination
Pagination strategies for REST APIs.
replication
Incremental replication support.
retry
Retry logic with exponential backoff.
schema
JSON Schema inference from record samples.
serde_helpers
Serde helper modules for types that don’t implement Serialize/Deserialize natively.
stream
The main REST stream executor.
transform
Record transformation pipeline.

Structs§

ResponseValidator
Optional callback to decide whether the token endpoint response is successful.
RestStream
A configured REST API stream that handles pagination, auth, and extraction.
RestStreamConfig
Configuration for a RestStream.

Enums§

Auth
Supported authentication methods.
FaucetError
All possible errors returned by faucet-stream.
PaginationStyle
Supported pagination strategies.
RecordTransform
A transformation applied to every record fetched by a source (e.g. the REST source’s RestStream).
ReplicationMethod
Determines how records are replicated from the source.

Constants§

DEFAULT_EXPIRY_RATIO
Default fraction of expires_in after which the token is refreshed.
DEFAULT_TOKEN_ENDPOINT_EXPIRY_RATIO
Default fraction of expires_in after which the token is refreshed.

Traits§

Sink
A sink writes records to an external system.
Source
A source fetches records from an external system.

Functions§

fetch_oauth2_token
Fetch an OAuth2 token using the client credentials grant.
fetch_token_from_endpoint
Fetch a token from the given endpoint and extract it using JSONPath.