pub struct Client { /* private fields */ }Expand description
Client for Feldera API
With Feldera, users create data pipelines out of SQL programs. A SQL program comprises tables and views, and includes as well the definition of input and output connectors for each respectively. A connector defines a data source or data sink to feed input data into tables or receive output data computed by the views respectively.
§Pipeline
The API is centered around the pipeline, which most importantly consists out of the SQL program, but also has accompanying metadata and configuration parameters (e.g., compilation profile, number of workers, etc.).
- A pipeline is identified and referred to by its user-provided unique name.
- The pipeline program is asynchronously compiled when the pipeline is first created or when its program is subsequently updated.
- Pipeline deployment start is only able to proceed to provisioning once the program is successfully compiled.
- A pipeline cannot be updated while it is deployed.
§Concurrency
Each pipeline has a version, which is incremented each time its core fields are updated. The version is monotonically increasing. There is additionally a program version which covers only the program-related core fields, and is used by the compiler to discern when to recompile.
§Client request handling
§Request outcome expectations
The outcome of a request is that it either fails (e.g., DNS lookup failed) without any response (no status code nor body), or it succeeds and gets back a response status code and body.
In case of a response, usually it is the Feldera endpoint that generated it:
- If it is success (2xx), it will return whichever body belongs to the success response.
- Otherwise, if it is an error (4xx, 5xx), it will return a Feldera error response JSON body
which will have an application-level
error_code.
However, there are two notable exceptions when the response is not generated by the Feldera endpoint:
- If the HTTP server, to which the endpoint belongs, encountered an issue, it might return 4xx (e.g., for an unknown endpoint) or 5xx error codes by itself (e.g., when it is initializing).
- If the Feldera API server is behind a (reverse) proxy, the proxy can return error codes by itself, for example BAD GATEWAY (502) or GATEWAY TIMEOUT (504).
As such, it is not guaranteed that the (4xx, 5xx) will have a Feldera error response JSON body in these latter cases.
§Error handling and retrying
The error type returned by the client should distinguish between the error responses generated by Feldera endpoints themselves (which have a Feldera error response body) and those that are generated by other sources.
In order for a client operation (e.g., pipeline.resume()) to be robust (i.e., not fail due to
a single HTTP request not succeeding) the client should use a retry mechanism if the operation
is idempotent. The retry mechanism must however have a time limit, after which it times out.
This guarantees that the client operation is eventually responsive, which enables the script
it is a part of to not hang indefinitely on Feldera operations and instead be able to decide
by itself whether and how to proceed. If no response is returned, the mechanism should generally
retry. When a response is returned, the decision whether to retry can generally depend on the status
code: especially the status codes 408, 502, 503 and 504 should be considered as transient errors.
Finer grained retry decisions should be made by taking into account the application-level
error_code if the response body was indeed a Feldera error response body.
§Feldera client errors (4xx)
Client behavior: clients should generally return with an error when they get back a 4xx status code, as it usually means the request will likely not succeed even if it is sent again. Certain requests might make use of a timed retry mechanism when the client error is transient without requiring any user intervention to overcome, for instance a transaction already being in progress leading to a temporary CONFLICT (409) error.
-
BAD REQUEST (400): invalid user request (general).
- Example: the new pipeline name
example1@~contains invalid characters.
- Example: the new pipeline name
-
UNAUTHORIZED (401): the user is not authorized to issue the request.
- Example: an invalid API key is provided.
-
NOT FOUND (404): a resource required to exist in order to process the request was not found.
- Example: a pipeline named
exampledoes not exist when trying to update it.
- Example: a pipeline named
-
CONFLICT (409): there is a conflict between the request and a relevant resource.
- Example: a pipeline named
examplealready exists. - Example: another transaction is already in process.
- Example: a pipeline named
§Feldera server errors (5xx)
-
INTERNAL SERVER ERROR (500): the server is unexpectedly unable to process the request (general).
- Example: unable to reach the database.
- Client behavior: immediately return with an error.
-
NOT IMPLEMENTED (501): the server does not implement functionality required to process the request.
- Example: making a request to an enterprise-only endpoint in the OSS edition.
- Client behavior: immediately return with an error.
-
SERVICE UNAVAILABLE (503): the server is not (yet) able to process the request.
- Example: pausing a pipeline which is still provisioning.
- Client behavior: depending on the type of request, client may use a timed retry mechanism.
§Feldera error response body
When the Feldera API returns an HTTP error status code (4xx, 5xx), the body will contain the following JSON object:
{
"message": "Human-readable explanation.",
"error_code": "CodeSpecifyingError",
"details": {
}
}It contains the following fields:
- message (string): human-readable explanation of the error that occurred and potentially hinting what can be done about it.
- error_code (string): application-level code about the error that occurred, written in CamelCase.
For example:
UnknownPipelineName,DuplicateName,PauseWhileNotProvisioned, … . - details (object): JSON object corresponding to the
error_codewith fields that provide details relevant to it. For example: if a name is unknown, a field with the unknown name in question.
Version: 0.341.0
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(baseurl: &str, inner: RetryPolicy) -> Self
pub fn new(baseurl: &str, inner: RetryPolicy) -> Self
Create a new client.
baseurl is the base URL provided to the internal
reqwest::Client, and should include a scheme and hostname,
as well as port and a path stem if applicable.
Sourcepub fn new_with_client(
baseurl: &str,
client: Client,
inner: RetryPolicy,
) -> Self
pub fn new_with_client( baseurl: &str, client: Client, inner: RetryPolicy, ) -> Self
Construct a new client with an existing reqwest::Client,
allowing more control over its configuration.
baseurl is the base URL provided to the internal
reqwest::Client, and should include a scheme and hostname,
as well as port and a path stem if applicable.
Source§impl Client
impl Client
Sourcepub fn get_config_authentication(&self) -> GetConfigAuthentication<'_>
pub fn get_config_authentication(&self) -> GetConfigAuthentication<'_>
Get Auth Config
Retrieve the authentication provider configuration.
Sends a GET request to /config/authentication
let response = client.get_config_authentication()
.send()
.await;Sourcepub fn list_api_keys(&self) -> ListApiKeys<'_>
pub fn list_api_keys(&self) -> ListApiKeys<'_>
List API Keys
Required role: write or higher.
Retrieve a list of your API keys.
Sends a GET request to /v0/api_keys
let response = client.list_api_keys()
.send()
.await;Sourcepub fn post_api_key(&self) -> PostApiKey<'_>
pub fn post_api_key(&self) -> PostApiKey<'_>
Create API Key
Required role: write or higher.
Create a new API key with the specified name. The generated API key will be returned in the response and cannot be retrieved again later.
Sends a POST request to /v0/api_keys
Arguments:
body:
let response = client.post_api_key()
.body(body)
.send()
.await;Sourcepub fn get_api_key(&self) -> GetApiKey<'_>
pub fn get_api_key(&self) -> GetApiKey<'_>
Get API Key
Required role: write or higher.
Retrieve the metadata of a specific API key by its name.
Sends a GET request to /v0/api_keys/{api_key_name}
Arguments:
api_key_name: Unique API key name
let response = client.get_api_key()
.api_key_name(api_key_name)
.send()
.await;Sourcepub fn delete_api_key(&self) -> DeleteApiKey<'_>
pub fn delete_api_key(&self) -> DeleteApiKey<'_>
Delete API Key
Required role: write or higher.
Remove an API key by its name.
Sends a DELETE request to /v0/api_keys/{api_key_name}
Arguments:
api_key_name: Unique API key name
let response = client.delete_api_key()
.api_key_name(api_key_name)
.send()
.await;Sourcepub fn list_cluster_events(&self) -> ListClusterEvents<'_>
pub fn list_cluster_events(&self) -> ListClusterEvents<'_>
List Cluster Events
Required role: read or higher.
Retrieve a list of retained cluster monitor events ordered from most recent to least recent.
The returned events only have limited details, the full details can be retrieved using
the GET /v0/cluster/events/<event-id> endpoint.
Cluster monitor events are collected at a periodic interval (every 10s), however only every 10 minutes or if the overall health changes, does it get inserted into the database (and thus, served by this endpoint). At most 1000 events are retained (newest first), and events older than 72h are deleted. The latest event, if it already exists, is never cleaned up.
Sends a GET request to /v0/cluster/events
let response = client.list_cluster_events()
.send()
.await;Sourcepub fn get_cluster_event(&self) -> GetClusterEvent<'_>
pub fn get_cluster_event(&self) -> GetClusterEvent<'_>
Get Cluster Event
Required role: read or higher.
Get specific cluster monitor event.
The identifiers of the events can be retrieved via GET /v0/cluster/events.
At most 1000 events are retained (newest first), and events older than 72h are deleted.
The latest event, if it already exists, is never cleaned up.
This endpoint can return a 404 for an event that no longer exists due to clean-up.
Sends a GET request to /v0/cluster/events/{event_id}
Arguments:
event_id: Cluster monitor event identifier orlatestselector: Theselectorparameter limits which fields are returned. Limiting which fields is particularly handy for instance when frequently monitoring over low bandwidth connections while being only interested in status.
let response = client.get_cluster_event()
.event_id(event_id)
.selector(selector)
.send()
.await;Sourcepub fn get_cluster_health(&self) -> GetClusterHealth<'_>
pub fn get_cluster_health(&self) -> GetClusterHealth<'_>
Check Cluster Health
Required role: read or higher.
Determine the latest cluster health via the latest cluster monitor event.
Each service’s unchanged_since reports the approximate time it last transitioned
between healthy and unhealthy, bounded by event retention.
Sends a GET request to /v0/cluster_healthz
let response = client.get_cluster_health()
.send()
.await;Sourcepub fn get_config(&self) -> GetConfig<'_>
pub fn get_config(&self) -> GetConfig<'_>
Get Platform Config
Required role: read or higher.
Retrieve configuration of the Feldera Platform.
Sends a GET request to /v0/config
let response = client.get_config()
.send()
.await;Sourcepub fn get_config_demos(&self) -> GetConfigDemos<'_>
pub fn get_config_demos(&self) -> GetConfigDemos<'_>
List Demos
Required role: read or higher.
Retrieve the list of demos available in the WebConsole.
Sends a GET request to /v0/config/demos
let response = client.get_config_demos()
.send()
.await;Sourcepub fn get_config_owners(&self) -> GetConfigOwners<'_>
pub fn get_config_owners(&self) -> GetConfigOwners<'_>
Get Configured Owners
Required role: owner.
List the identities that hold the platform-wide owner role.
Owner comes from deploy-time configuration and cannot be granted through the API, so this list is read-only: changing it means changing the deployment.
Sends a GET request to /v0/config/owners
let response = client.get_config_owners()
.send()
.await;Sourcepub fn get_config_session(&self) -> GetConfigSession<'_>
pub fn get_config_session(&self) -> GetConfigSession<'_>
Get Session
Required role: read or higher.
Retrieve login session information for your current user session.
This is the one route that answers a login without a resolved acting
tenant: when the user belongs to several tenants (or none) and no
Feldera-Tenant header selects one, the acting-tenant fields are null
and memberships lists the tenants to pick from.
Sends a GET request to /v0/config/session
let response = client.get_config_session()
.send()
.await;Sourcepub fn get_metrics(&self) -> GetMetrics<'_>
pub fn get_metrics(&self) -> GetMetrics<'_>
List All Metrics
Required role: read or higher.
Retrieve the metrics of all running pipelines belonging to this tenant.
The metrics are collected by making individual HTTP requests to /metrics
endpoint of each pipeline, of which only successful responses are included
in the returned list.
Sends a GET request to /v0/metrics
let response = client.get_metrics()
.send()
.await;Sourcepub fn list_oidc_trust(&self) -> ListOidcTrust<'_>
pub fn list_oidc_trust(&self) -> ListOidcTrust<'_>
List OIDC Trust
Required role: admin or higher.
Sends a GET request to /v0/oidc_trust
let response = client.list_oidc_trust()
.send()
.await;Sourcepub fn post_oidc_trust(&self) -> PostOidcTrust<'_>
pub fn post_oidc_trust(&self) -> PostOidcTrust<'_>
Create OIDC Trust
Required role: admin or higher.
Sends a POST request to /v0/oidc_trust
let response = client.post_oidc_trust()
.body(body)
.send()
.await;Sourcepub fn get_oidc_trust(&self) -> GetOidcTrust<'_>
pub fn get_oidc_trust(&self) -> GetOidcTrust<'_>
Get OIDC Trust
Required role: admin or higher.
Retrieve one trust relationship by name, the name it was created under,
which is unique within the tenant (or, with platform, across the
platform-wide owner trusts).
Sends a GET request to /v0/oidc_trust/{name}
Arguments:
name: Trust relationship name
let response = client.get_oidc_trust()
.name(name)
.send()
.await;Sourcepub fn delete_oidc_trust(&self) -> DeleteOidcTrust<'_>
pub fn delete_oidc_trust(&self) -> DeleteOidcTrust<'_>
Delete OIDC Trust
Required role: admin or higher.
Sends a DELETE request to /v0/oidc_trust/{name}
Arguments:
name: Trust relationship name
let response = client.delete_oidc_trust()
.name(name)
.send()
.await;Sourcepub fn list_pipelines(&self) -> ListPipelines<'_>
pub fn list_pipelines(&self) -> ListPipelines<'_>
List Pipelines
Required role: read or higher.
Retrieve the list of pipelines.
Configure which fields are included using the selector query parameter.
Sends a GET request to /v0/pipelines
Arguments:
selector: Theselectorparameter limits which fields are returned for a pipeline. Limiting which fields is particularly handy for instance when frequently monitoring over low bandwidth connections while being only interested in pipeline status.
let response = client.list_pipelines()
.selector(selector)
.send()
.await;Sourcepub fn post_pipeline(&self) -> PostPipeline<'_>
pub fn post_pipeline(&self) -> PostPipeline<'_>
Create Pipeline
Required role: write or higher.
Create a new pipeline with the provided configuration.
Sends a POST request to /v0/pipelines
let response = client.post_pipeline()
.body(body)
.send()
.await;Sourcepub fn get_pipeline(&self) -> GetPipeline<'_>
pub fn get_pipeline(&self) -> GetPipeline<'_>
Get Pipeline
Required role: read or higher.
Retrieve a pipeline.
Configure which fields are included using the selector query parameter.
Sends a GET request to /v0/pipelines/{pipeline_name}
Arguments:
pipeline_name: Unique pipeline nameselector: Theselectorparameter limits which fields are returned for a pipeline. Limiting which fields is particularly handy for instance when frequently monitoring over low bandwidth connections while being only interested in pipeline status.
let response = client.get_pipeline()
.pipeline_name(pipeline_name)
.selector(selector)
.send()
.await;Sourcepub fn put_pipeline(&self) -> PutPipeline<'_>
pub fn put_pipeline(&self) -> PutPipeline<'_>
Upsert Pipeline
Required role: write or higher.
Fully update a pipeline if it already exists, otherwise create a new pipeline.
Sends a PUT request to /v0/pipelines/{pipeline_name}
Arguments:
pipeline_name: Unique pipeline namebody
let response = client.put_pipeline()
.pipeline_name(pipeline_name)
.body(body)
.send()
.await;Sourcepub fn delete_pipeline(&self) -> DeletePipeline<'_>
pub fn delete_pipeline(&self) -> DeletePipeline<'_>
Delete Pipeline
Required role: write or higher.
Delete an existing pipeline by name.
Sends a DELETE request to /v0/pipelines/{pipeline_name}
Arguments:
pipeline_name: Unique pipeline name
let response = client.delete_pipeline()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn patch_pipeline(&self) -> PatchPipeline<'_>
pub fn patch_pipeline(&self) -> PatchPipeline<'_>
Patch Pipeline
Required role: write or higher.
Partially update a pipeline.
Sends a PATCH request to /v0/pipelines/{pipeline_name}
Arguments:
pipeline_name: Unique pipeline namebody
let response = client.patch_pipeline()
.pipeline_name(pipeline_name)
.body(body)
.send()
.await;Sourcepub fn post_pipeline_activate(&self) -> PostPipelineActivate<'_>
pub fn post_pipeline_activate(&self) -> PostPipelineActivate<'_>
Activate Standby Pipeline
Required role: write or higher.
Requests the pipeline to activate if it is currently in standby mode, which it will do asynchronously.
Progress should be monitored by polling the pipeline GET endpoints.
This endpoint is only applicable when the pipeline is configured to start from object store and started as standby.
Sends a POST request to /v0/pipelines/{pipeline_name}/activate
Arguments:
pipeline_name: Unique pipeline nameinitial
let response = client.post_pipeline_activate()
.pipeline_name(pipeline_name)
.initial(initial)
.send()
.await;Sourcepub fn post_pipeline_approve(&self) -> PostPipelineApprove<'_>
pub fn post_pipeline_approve(&self) -> PostPipelineApprove<'_>
Approve Bootstrap
Required role: write or higher.
Approves the pipeline to proceed with bootstrapping.
This endpoint is used when a pipeline has been started with
bootstrap_policy=await_approval, it is resuming from an existing checkpoint,
but the pipeline has been modified since the checkpoint was made and is
currently in the AwaitingApproval state awaiting user approval to proceed
with bootstrapping.
Sends a POST request to /v0/pipelines/{pipeline_name}/approve
Arguments:
pipeline_name: Unique pipeline nameconcurrent_bootstrap: Bootstrap new and modified views concurrently, keeping the pre-existing views live while the new ones backfill. Mutually exclusive withsilent_bootstrap.silent_bootstrap: Bootstrap the pipeline with output connectors disabled.
let response = client.post_pipeline_approve()
.pipeline_name(pipeline_name)
.concurrent_bootstrap(concurrent_bootstrap)
.silent_bootstrap(silent_bootstrap)
.send()
.await;Sourcepub fn checkpoint_pipeline(&self) -> CheckpointPipeline<'_>
pub fn checkpoint_pipeline(&self) -> CheckpointPipeline<'_>
Checkpoint Now
Required role: write or higher.
Initiates checkpoint for a running or paused pipeline.
Returns a checkpoint sequence number that can be used with /checkpoint_status to
determine when the checkpoint has completed.
Sends a POST request to /v0/pipelines/{pipeline_name}/checkpoint
Arguments:
pipeline_name: Unique pipeline name
let response = client.checkpoint_pipeline()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn sync_checkpoint(&self) -> SyncCheckpoint<'_>
pub fn sync_checkpoint(&self) -> SyncCheckpoint<'_>
Sync Checkpoints To S3
Required role: write or higher.
Syncs latest checkpoints to the object store configured in pipeline config.
Sends a POST request to /v0/pipelines/{pipeline_name}/checkpoint/sync
Arguments:
pipeline_name: Unique pipeline name
let response = client.sync_checkpoint()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn get_checkpoint_sync_status(&self) -> GetCheckpointSyncStatus<'_>
pub fn get_checkpoint_sync_status(&self) -> GetCheckpointSyncStatus<'_>
Get Checkpoint Sync Status
Required role: read or higher.
Retrieve status of checkpoint sync activity in a pipeline.
Sends a GET request to /v0/pipelines/{pipeline_name}/checkpoint/sync_status
Arguments:
pipeline_name: Unique pipeline nameincarnation_uuid: Incarnation UUID returned by thePOST checkpoint/syncrequest this status check is for. If given and it does not match the pipeline’s current incarnation, the pipeline process has restarted since the sync was requested and the response is a 400 error rather than a status.
let response = client.get_checkpoint_sync_status()
.pipeline_name(pipeline_name)
.incarnation_uuid(incarnation_uuid)
.send()
.await;Sourcepub fn get_checkpoint_status(&self) -> GetCheckpointStatus<'_>
pub fn get_checkpoint_status(&self) -> GetCheckpointStatus<'_>
Get Checkpoint Status
Required role: read or higher.
Retrieve status of checkpoint activity in a pipeline.
Sends a GET request to /v0/pipelines/{pipeline_name}/checkpoint_status
Arguments:
pipeline_name: Unique pipeline nameincarnation_uuid: Incarnation UUID returned by thePOST checkpointrequest this status check is for. If given and it does not match the pipeline’s current incarnation, the pipeline process has restarted since the checkpoint was requested and the response is a 400 error rather than a status.
let response = client.get_checkpoint_status()
.pipeline_name(pipeline_name)
.incarnation_uuid(incarnation_uuid)
.send()
.await;Sourcepub fn get_checkpoints(&self) -> GetCheckpoints<'_>
pub fn get_checkpoints(&self) -> GetCheckpoints<'_>
Get the checkpoints for a pipeline
Required role: read or higher.
Retrieve the current checkpoints made by a pipeline.
Stability note: for multihost pipelines, this endpoint returns the combined checkpoint list from all hosts. The shape of this response may change in a future release.
Sends a GET request to /v0/pipelines/{pipeline_name}/checkpoints
Arguments:
pipeline_name: Unique pipeline name
let response = client.get_checkpoints()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn get_remote_checkpoints(&self) -> GetRemoteCheckpoints<'_>
pub fn get_remote_checkpoints(&self) -> GetRemoteCheckpoints<'_>
List checkpoints in remote object storage
Required role: read or higher.
Retrieve the list of checkpoints available in the configured remote object storage (e.g., S3). Requires the pipeline to be running with a sync storage configuration.
Sends a GET request to /v0/pipelines/{pipeline_name}/checkpoints/remote
Arguments:
pipeline_name: Unique pipeline name
let response = client.get_remote_checkpoints()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn get_pipeline_circuit_json_profile(
&self,
) -> GetPipelineCircuitJsonProfile<'_>
pub fn get_pipeline_circuit_json_profile( &self, ) -> GetPipelineCircuitJsonProfile<'_>
Performance Profile JSON
Required role: read or higher.
Retrieve the circuit performance profile in JSON format of a running or paused pipeline.
Sends a GET request to /v0/pipelines/{pipeline_name}/circuit_json_profile
Arguments:
pipeline_name: Unique pipeline name
let response = client.get_pipeline_circuit_json_profile()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn get_pipeline_circuit_profile(&self) -> GetPipelineCircuitProfile<'_>
pub fn get_pipeline_circuit_profile(&self) -> GetPipelineCircuitProfile<'_>
Get Performance Profile
Required role: read or higher.
Retrieve the circuit performance profile of a running or paused pipeline.
Sends a GET request to /v0/pipelines/{pipeline_name}/circuit_profile
Arguments:
pipeline_name: Unique pipeline name
let response = client.get_pipeline_circuit_profile()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn post_pipeline_clear(&self) -> PostPipelineClear<'_>
pub fn post_pipeline_clear(&self) -> PostPipelineClear<'_>
Clear Storage
Required role: write or higher.
Clears the pipeline storage asynchronously.
IMPORTANT: Clearing means disassociating the storage from the pipeline. Depending on the storage type this can include its deletion.
It sets the storage state to Clearing, after which the clearing process is
performed asynchronously. Progress should be monitored by polling the pipeline
using the GET endpoints. An /clear cannot be cancelled.
Sends a POST request to /v0/pipelines/{pipeline_name}/clear
Arguments:
pipeline_name: Unique pipeline name
let response = client.post_pipeline_clear()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn clock_advance(&self) -> ClockAdvance<'_>
pub fn clock_advance(&self) -> ClockAdvance<'_>
Advance Clock
Required role: write or higher.
Moves NOW() forward by a specified amount. Returns the
current clock time of the circuit.
Requires dev_tweaks.now_http_driven = true on the pipeline.
Forward-only: delta_ms is u64, so negative bodies are rejected at
JSON parse time. delta_ms = null or omitted advances by one
clock_resolution. Non-zero values round up to the next
clock_resolution boundary, so a sub-resolution delta still moves
the clock by one full tick.
The returned now_ms is the value the worker will emit on its next
pipeline step; queries against materialized views may observe the
previous NOW() until that step completes. Callers that need
read-after-write semantics should poll the view.
Sends a POST request to /v0/pipelines/{pipeline_name}/clock/advance
Arguments:
pipeline_name: Unique pipeline namebody: Milliseconds to add to NOW(); zero reads the current value, null/omitted: advance by one clock_resolution.
let response = client.clock_advance()
.pipeline_name(pipeline_name)
.body(body)
.send()
.await;Sourcepub fn commit_transaction(&self) -> CommitTransaction<'_>
pub fn commit_transaction(&self) -> CommitTransaction<'_>
Commit Transaction
Required role: write or higher.
Commit the current transaction.
Sends a POST request to /v0/pipelines/{pipeline_name}/commit_transaction
Arguments:
pipeline_name: Unique pipeline name
let response = client.commit_transaction()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn completion_status(&self) -> CompletionStatus<'_>
pub fn completion_status(&self) -> CompletionStatus<'_>
Check Completion Status
Required role: read or higher.
Check the status of a completion token returned by the /ingress or /completion_token
endpoint.
Sends a GET request to /v0/pipelines/{pipeline_name}/completion_status
Arguments:
pipeline_name: Unique pipeline nametoken: Completion token returned by the ‘/ingress’ or ‘/completion_status’ endpoint.
let response = client.completion_status()
.pipeline_name(pipeline_name)
.token(token)
.send()
.await;Sourcepub fn get_pipeline_dataflow_graph(&self) -> GetPipelineDataflowGraph<'_>
pub fn get_pipeline_dataflow_graph(&self) -> GetPipelineDataflowGraph<'_>
Get Dataflow Graph
Required role: read or higher.
Retrieve the dataflow graph of a pipeline. The dataflow graph is generated during SQL compilation and shows the structure of the compiled SQL program including the Calcite plan and MIR nodes.
Sends a GET request to /v0/pipelines/{pipeline_name}/dataflow_graph
Arguments:
pipeline_name: Unique pipeline name
let response = client.get_pipeline_dataflow_graph()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn post_pipeline_diff(&self) -> PostPipelineDiff<'_>
pub fn post_pipeline_diff(&self) -> PostPipelineDiff<'_>
Compute Program Diff
Required role: write or higher.
Compute the diff between the pipeline’s current program and a proposed new version, without modifying or restarting the pipeline.
The diff lists the tables, views, and connectors that would be added, removed, or modified. It is the same diff shown when approving changes during bootstrapping, letting you preview the effect of a change before applying it.
The baseline is the pipeline’s currently configured program compiled with its runtime, not necessarily the program in the latest checkpoint (which may have been produced by a different program or runtime version).
Sends a POST request to /v0/pipelines/{pipeline_name}/diff
Arguments:
pipeline_name: Unique pipeline namebody: The proposed new SQL program and/or runtime version (both optional)
let response = client.post_pipeline_diff()
.pipeline_name(pipeline_name)
.body(body)
.send()
.await;Sourcepub fn post_pipeline_dismiss_error(&self) -> PostPipelineDismissError<'_>
pub fn post_pipeline_dismiss_error(&self) -> PostPipelineDismissError<'_>
Dismiss Pipeline Deployment Error
Required role: write or higher.
Clears the deployment_error field of the pipeline, such that a subsequent call to
/start?dismiss_error=false succeeds. It will return an error if the pipeline is not fully
stopped (i.e., both current and desired status must be Stopped) AND a deployment error
is present.
Sends a POST request to /v0/pipelines/{pipeline_name}/dismiss_error
Arguments:
pipeline_name: Unique pipeline name
let response = client.post_pipeline_dismiss_error()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn http_output(&self) -> HttpOutput<'_>
pub fn http_output(&self) -> HttpOutput<'_>
Subscribe to View
Required role: write or higher.
Subscribe to a stream of updates from a SQL view or table.
The pipeline responds with a continuous stream of changes to the specified table or view. The stream is configurable two ways:
-
Simple configuration of the format may be provided using query parameters. Specify
backpressureto specify behavior when the HTTP client cannot keep up. Useformatto specifycsvorjsonoutput. Forjsonoutput format,update_formatandjson_flavormay be provided (with the same possible values as in JSON format configuration for connectors). -
Comprehensive configuration may be provided by providing a connector configuration as a JSON body. In this case, no query parameters are allowed.
Updates are split into Chunks.
The pipeline continues sending updates until the client closes the connection or the pipeline is stopped.
Sends a POST request to /v0/pipelines/{pipeline_name}/egress/{table_name}
Arguments:
pipeline_name: Unique pipeline nametable_name: SQL table name. Unquoted SQL names have to be capitalized. Quoted SQL names have to exactly match the case from the SQL program.array: Set totrueto group updates in this stream into JSON arrays (used in conjunction withformat=json). The default value isfalsebackpressure: Apply backpressure on the pipeline when the HTTP client cannot receive data fast enough. When this flag is set to false (the default), the HTTP connector drops data chunks if the client is not keeping up with its output. This prevents a slow HTTP client from slowing down the entire pipeline. When the flag is set to true, the connector waits for the client to receive each chunk and blocks the pipeline if the client cannot keep up.format: Output data format, either ‘csv’ or ‘json’.send_snapshot: Set totrueto send a full snapshot of a materialized view before streaming incremental updates. The default isfalse. Works on a paused pipeline: the snapshot is delivered from the latest cached view state without requiring the pipeline to be running.
let response = client.http_output()
.pipeline_name(pipeline_name)
.table_name(table_name)
.array(array)
.backpressure(backpressure)
.format(format)
.send_snapshot(send_snapshot)
.send()
.await;Sourcepub fn list_pipeline_events(&self) -> ListPipelineEvents<'_>
pub fn list_pipeline_events(&self) -> ListPipelineEvents<'_>
List Pipeline Events
Required role: read or higher.
Retrieve monitoring events in reverse chronological order.
Pipeline health is monitored regularly every several seconds. Not every monitoring action results in a pipeline monitor event being constructed and inserted into the database. This happens if:
- Any status changed
- Only the status details changed, and it has been 10s since the last event
- Nothing has changed for more than 10 minutes
This endpoint returns the most recent persisted events, up to by default approximately 720.
Sends a GET request to /v0/pipelines/{pipeline_name}/events
Arguments:
pipeline_name: Unique pipeline nameselector: Theselectorparameter limits which fields are returned. Limiting which fields is particularly handy for instance when frequently monitoring over low bandwidth connections while being only interested in status.
let response = client.list_pipeline_events()
.pipeline_name(pipeline_name)
.selector(selector)
.send()
.await;Sourcepub fn get_pipeline_event(&self) -> GetPipelineEvent<'_>
pub fn get_pipeline_event(&self) -> GetPipelineEvent<'_>
Get Pipeline Event
Required role: read or higher.
Get a specific pipeline monitor event.
The identifiers of the events can be retrieved via GET /v0/pipelines/<pipeline>/events.
The most recent approximately 720 (default) events are retained.
This endpoint can return a 404 for an event that no longer exists due to a cleanup.
Sends a GET request to /v0/pipelines/{pipeline_name}/events/{event_id}
Arguments:
pipeline_name: Unique pipeline nameevent_id: Pipeline monitor event identifier orlatestselector: Theselectorparameter limits which fields are returned. Limiting which fields is particularly handy for instance when frequently monitoring over low bandwidth connections while being only interested in status.
let response = client.get_pipeline_event()
.pipeline_name(pipeline_name)
.event_id(event_id)
.selector(selector)
.send()
.await;Sourcepub fn get_pipeline_heap_profile(&self) -> GetPipelineHeapProfile<'_>
pub fn get_pipeline_heap_profile(&self) -> GetPipelineHeapProfile<'_>
Get Heap Profile
Required role: read or higher.
Retrieve the heap profile of a running or paused pipeline.
Sends a GET request to /v0/pipelines/{pipeline_name}/heap_profile
Arguments:
pipeline_name: Unique pipeline name
let response = client.get_pipeline_heap_profile()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn http_input(&self) -> HttpInput<'_>
pub fn http_input(&self) -> HttpInput<'_>
Insert Data
Required role: write or higher.
Push data to a SQL table.
The client sends data encoded using the format specified in the ?format=
parameter as a body of the request. The contents of the data must match
the SQL table schema specified in table_name
The pipeline ingests data as it arrives without waiting for the end of the request. Successful HTTP response indicates that all data has been ingested successfully.
On success, returns a completion token that can be passed to the ‘/completion_status’ endpoint to check whether the pipeline has fully processed the data.
Sends a POST request to /v0/pipelines/{pipeline_name}/ingress/{table_name}
Arguments:
pipeline_name: Unique pipeline nametable_name: SQL table name. Unquoted SQL names have to be capitalized. Quoted SQL names have to exactly match the case from the SQL program.array: Set totrueif updates in this stream are packaged into JSON arrays (used in conjunction withformat=json). The default values isfalse.force: Whentrue, push data to the pipeline even if the pipeline is paused. The default value isfalseformat: Input data format, either `csv’ or ‘json’.update_format: JSON data change event format (used in conjunction withformat=json). The default value is ‘insert_delete’.body: Input data in the specified format
let response = client.http_input()
.pipeline_name(pipeline_name)
.table_name(table_name)
.array(array)
.force(force)
.format(format)
.update_format(update_format)
.body(body)
.send()
.await;Sourcepub fn get_pipeline_logs(&self) -> GetPipelineLogs<'_>
pub fn get_pipeline_logs(&self) -> GetPipelineLogs<'_>
Stream Pipeline Logs
Required role: read or higher.
Retrieve logs of a pipeline as a stream.
The logs stream catches up to the extent of the internally configured per-pipeline circular logs buffer (limited to a certain byte size and number of lines, whichever is reached first). After the catch-up, new lines are pushed whenever they become available.
It is possible for the logs stream to end prematurely due to the API server temporarily losing connection to the runner. In this case, it is needed to issue again a new request to this endpoint.
The logs stream will end when the pipeline is deleted, or if the runner restarts. Note that in both cases the logs will be cleared.
Sends a GET request to /v0/pipelines/{pipeline_name}/logs
Arguments:
pipeline_name: Unique pipeline name
let response = client.get_pipeline_logs()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn get_pipeline_metrics(&self) -> GetPipelineMetrics<'_>
pub fn get_pipeline_metrics(&self) -> GetPipelineMetrics<'_>
Get Pipeline Metrics
Required role: read or higher.
Retrieve the metrics of a running or paused pipeline.
Sends a GET request to /v0/pipelines/{pipeline_name}/metrics
Arguments:
pipeline_name: Unique pipeline nameformat
let response = client.get_pipeline_metrics()
.pipeline_name(pipeline_name)
.format(format)
.send()
.await;Sourcepub fn post_pipeline_pause(&self) -> PostPipelinePause<'_>
pub fn post_pipeline_pause(&self) -> PostPipelinePause<'_>
Pause Pipeline
Required role: write or higher.
Requests the pipeline to pause, which it will do asynchronously.
Progress should be monitored by polling the pipeline GET endpoints.
Sends a POST request to /v0/pipelines/{pipeline_name}/pause
Arguments:
pipeline_name: Unique pipeline name
let response = client.post_pipeline_pause()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn pipeline_adhoc_sql(&self) -> PipelineAdhocSql<'_>
pub fn pipeline_adhoc_sql(&self) -> PipelineAdhocSql<'_>
Execute Ad-hoc SQL
Required role: write or higher.
Execute ad-hoc SQL in a running or paused pipeline.
The evaluation is not incremental.
Sends a GET request to /v0/pipelines/{pipeline_name}/query
Arguments:
pipeline_name: Unique pipeline nameformat: Input data format, e.g., ‘text’, ‘json’ or ‘parquet’sql: SQL query to execute
let response = client.pipeline_adhoc_sql()
.pipeline_name(pipeline_name)
.format(format)
.sql(sql)
.send()
.await;Sourcepub fn post_pipeline_rebalance(&self) -> PostPipelineRebalance<'_>
pub fn post_pipeline_rebalance(&self) -> PostPipelineRebalance<'_>
Initiate rebalancing
Required role: write or higher.
Initiate immediate rebalancing of the pipeline. Normally rebalancing is initiated automatically when the drift in the size of joined relations exceeds a threshold. This endpoint forces the balancer to reevaluate and apply an optimal partitioning policy regardless of the threshold.
This operation is a no-op unless the adaptive_joins feature is enabled in dev_tweaks.
Sends a POST request to /v0/pipelines/{pipeline_name}/rebalance
Arguments:
pipeline_name: Unique pipeline name
let response = client.post_pipeline_rebalance()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn post_pipeline_resume(&self) -> PostPipelineResume<'_>
pub fn post_pipeline_resume(&self) -> PostPipelineResume<'_>
Resume Pipeline
Required role: write or higher.
Requests the pipeline to resume, which it will do asynchronously.
Progress should be monitored by polling the pipeline GET endpoints.
Sends a POST request to /v0/pipelines/{pipeline_name}/resume
Arguments:
pipeline_name: Unique pipeline name
let response = client.post_pipeline_resume()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn get_pipeline_samply_profile(&self) -> GetPipelineSamplyProfile<'_>
pub fn get_pipeline_samply_profile(&self) -> GetPipelineSamplyProfile<'_>
Get Samply Profile
Required role: read or higher.
Retrieve the last samply profile of a pipeline, regardless of whether profiling is currently in progress. If ?latest parameter is specified and Samply profile collection is in progress, returns HTTP 307 with Retry-After header.
Sends a GET request to /v0/pipelines/{pipeline_name}/samply_profile
Arguments:
pipeline_name: Unique pipeline namelatest: If true, returns 204 redirect with Retry-After header if profile collection is in progress. If false or not provided, returns the last collected profile.ordinal: In a multihost pipeline, the ordinal of the pipeline to sample.
let response = client.get_pipeline_samply_profile()
.pipeline_name(pipeline_name)
.latest(latest)
.ordinal(ordinal)
.send()
.await;Sourcepub fn start_samply_profile(&self) -> StartSamplyProfile<'_>
pub fn start_samply_profile(&self) -> StartSamplyProfile<'_>
Start a Samply profile
Required role: read or higher.
Profile the pipeline using the Samply profiler for the next duration_secs seconds.
Sends a POST request to /v0/pipelines/{pipeline_name}/samply_profile
Arguments:
pipeline_name: Unique pipeline nameduration_secs: The number of seconds to sample for the profile.ordinal: In a multihost pipeline, the ordinal of the pipeline to sample.
let response = client.start_samply_profile()
.pipeline_name(pipeline_name)
.duration_secs(duration_secs)
.ordinal(ordinal)
.send()
.await;Sourcepub fn post_pipeline_start(&self) -> PostPipelineStart<'_>
pub fn post_pipeline_start(&self) -> PostPipelineStart<'_>
Start Pipeline
Required role: write or higher.
Start the pipeline asynchronously by updating the desired status.
The endpoint returns immediately after setting the desired status.
The procedure to get to the desired status is performed asynchronously.
Progress should be monitored by polling the pipeline GET endpoints.
Note the following:
- A stopped pipeline can be started through calling
/start?initial=running,/start?initial=paused, or/start?initial=standby. - If the pipeline is already (being) started (provisioned), it will still return success
- It is not possible to call
/startwhen the pipeline has already had/stopcalled and is in the process of suspending or stopping.
Sends a POST request to /v0/pipelines/{pipeline_name}/start
Arguments:
pipeline_name: Unique pipeline namebootstrap_policy: Bootstrap policy.concurrent_bootstrap: Bootstrap new and modified views concurrently, keeping the pre-existing views live while the new ones backfill in the background.dismiss_errorinitial: Theinitialparameter determines whether to after provisioning the pipeline make it becomestandby,pausedorrunning(only valid values).silent_bootstrap: Bootstrap the pipeline with output connectors disabled.
let response = client.post_pipeline_start()
.pipeline_name(pipeline_name)
.bootstrap_policy(bootstrap_policy)
.concurrent_bootstrap(concurrent_bootstrap)
.dismiss_error(dismiss_error)
.initial(initial)
.silent_bootstrap(silent_bootstrap)
.send()
.await;Sourcepub fn post_pipeline_start_compaction(&self) -> PostPipelineStartCompaction<'_>
pub fn post_pipeline_start_compaction(&self) -> PostPipelineStartCompaction<'_>
Initiate compaction
Required role: write or higher.
Initiate immediate compaction of the pipeline’s state.
Sends a POST request to /v0/pipelines/{pipeline_name}/start_compaction
Arguments:
pipeline_name: Unique pipeline name
let response = client.post_pipeline_start_compaction()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn start_transaction(&self) -> StartTransaction<'_>
pub fn start_transaction(&self) -> StartTransaction<'_>
Begin Transaction
Required role: write or higher.
Start a new transaction.
Sends a POST request to /v0/pipelines/{pipeline_name}/start_transaction
Arguments:
pipeline_name: Unique pipeline name
let response = client.start_transaction()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn get_pipeline_stats(&self) -> GetPipelineStats<'_>
pub fn get_pipeline_stats(&self) -> GetPipelineStats<'_>
Get Pipeline Stats
Required role: read or higher.
Retrieve statistics (e.g., performance counters) of a running or paused pipeline.
Sends a GET request to /v0/pipelines/{pipeline_name}/stats
Arguments:
pipeline_name: Unique pipeline name
let response = client.get_pipeline_stats()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn post_pipeline_stop(&self) -> PostPipelineStop<'_>
pub fn post_pipeline_stop(&self) -> PostPipelineStop<'_>
Stop Pipeline
Required role: write or higher.
Stop the pipeline asynchronously by updating the desired state.
There are two variants:
/stop?force=false(default): the pipeline will first atomically checkpoint before deprovisioning the compute resources. When resuming, the pipeline will start from this/stop?force=true: the compute resources will be immediately deprovisioned. When resuming, it will pick up the latest checkpoint made by the periodic checkpointer or by a prior/checkpointcall.
The endpoint returns immediately after setting the desired state to Suspended for
?force=false or Stopped for ?force=true. In the former case, once the pipeline has
successfully passes the Suspending state, the desired state will become Stopped as well.
The procedure to get to the desired state is performed asynchronously. Progress should be
monitored by polling the pipeline GET endpoints.
Note the following:
- The suspending that is done with
/stop?force=falseis not guaranteed to succeed: - If an error is returned during the suspension, the pipeline will be forcefully stopped with that error set
- Otherwise, it will keep trying to suspend, in which case it is possible to cancel suspending
by calling
/stop?force=true /stop?force=truecannot be cancelled: the pipeline must first reachStoppedbefore another action can be done- A pipeline which is in the process of suspending or stopping can only be forcefully stopped
Sends a POST request to /v0/pipelines/{pipeline_name}/stop
Arguments:
pipeline_name: Unique pipeline nameforce: Theforceparameter determines whether to immediately deprovision the pipeline compute resources (force=true) or first attempt to atomically checkpoint before doing so (force=false, which is the default).
let response = client.post_pipeline_stop()
.pipeline_name(pipeline_name)
.force(force)
.send()
.await;Sourcepub fn get_pipeline_support_bundle(&self) -> GetPipelineSupportBundle<'_>
pub fn get_pipeline_support_bundle(&self) -> GetPipelineSupportBundle<'_>
Download Support Bundle
Required role: read or higher.
Generate a support bundle for a pipeline.
This endpoint collects various diagnostic data from the pipeline including circuit profile, heap profile, metrics, logs, stats, and connector statistics, and packages them into a single ZIP file for support purposes.
Sends a GET request to /v0/pipelines/{pipeline_name}/support_bundle
Arguments:
pipeline_name: Unique pipeline namecircuit_profile: Whether to collect circuit profile data (default: true)collect: Whether to collect new data from the running pipeline (default: true) When false, only previously collected data will be included in the bundledataflow_graph: Whether to collect dataflow graph data (default: true)heap_profile: Whether to collect heap profile data (default: true)limit: Maximum number of collections to include in the bundle, counted from the most recent. Must be at least 1;limit=0is rejected with HTTP 400. Omit the parameter to include every retained collection (which is capped server-side by--support-data-retention, default 3).
With the default collect=true, limit=1 returns only the collection
gathered by this request. Combine with collect=false to return the
most recent previously stored collections instead.
logs: Whether to collect logs data (default: true)metrics: Whether to collect metrics data (default: true)pipeline_config: Whether to collect pipeline configuration data (default: true)pipeline_events: Whether to collect the pipeline monitor event history (default: true)stats: Whether to collect stats data (default: true)system_config: Whether to collect system configuration data (default: true)
let response = client.get_pipeline_support_bundle()
.pipeline_name(pipeline_name)
.circuit_profile(circuit_profile)
.collect(collect)
.dataflow_graph(dataflow_graph)
.heap_profile(heap_profile)
.limit(limit)
.logs(logs)
.metrics(metrics)
.pipeline_config(pipeline_config)
.pipeline_events(pipeline_events)
.stats(stats)
.system_config(system_config)
.send()
.await;Sourcepub fn completion_token(&self) -> CompletionToken<'_>
pub fn completion_token(&self) -> CompletionToken<'_>
Get Completion Token
Required role: write or higher.
Generate a completion token for an input connector.
Returns a token that can be passed to the /completion_status endpoint
to check whether the pipeline has finished processing all inputs received from the
connector before the token was generated.
Sends a GET request to /v0/pipelines/{pipeline_name}/tables/{table_name}/connectors/{connector_name}/completion_token
Arguments:
pipeline_name: Unique pipeline nametable_name: SQL table name. Unquoted SQL names have to be capitalized. Quoted SQL names have to exactly match the case from the SQL program.connector_name: Unique input connector name
let response = client.completion_token()
.pipeline_name(pipeline_name)
.table_name(table_name)
.connector_name(connector_name)
.send()
.await;Sourcepub fn get_pipeline_input_connector_status(
&self,
) -> GetPipelineInputConnectorStatus<'_>
pub fn get_pipeline_input_connector_status( &self, ) -> GetPipelineInputConnectorStatus<'_>
Get Input Status
Required role: read or higher.
Retrieve the status of an input connector.
Sends a GET request to /v0/pipelines/{pipeline_name}/tables/{table_name}/connectors/{connector_name}/stats
Arguments:
pipeline_name: Unique pipeline nametable_name: Unique table nameconnector_name: Unique input connector name
let response = client.get_pipeline_input_connector_status()
.pipeline_name(pipeline_name)
.table_name(table_name)
.connector_name(connector_name)
.send()
.await;Sourcepub fn post_pipeline_input_connector_action(
&self,
) -> PostPipelineInputConnectorAction<'_>
pub fn post_pipeline_input_connector_action( &self, ) -> PostPipelineInputConnectorAction<'_>
Control Input Connector
Required role: write or higher.
Start (resume) or pause the input connector.
The following values of the action argument are accepted: start and pause.
Input connectors can be in either the Running or Paused state. By default,
connectors are initialized in the Running state when a pipeline is deployed.
In this state, the connector actively fetches data from its configured data
source and forwards it to the pipeline. If needed, a connector can be created
in the Paused state by setting its
paused property
to true. When paused, the connector remains idle until reactivated using the
start command. Conversely, a connector in the Running state can be paused
at any time by issuing the pause command.
The current connector state can be retrieved via the
GET /v0/pipelines/{pipeline_name}/stats endpoint.
Note that only if both the pipeline and the connector state is Running,
is the input connector active.
Pipeline state Connector state Connector is active?
-------------- --------------- --------------------
Paused Paused No
Paused Running No
Running Paused No
Running Running YesSends a POST request to /v0/pipelines/{pipeline_name}/tables/{table_name}/connectors/{connector_name}/{action}
Arguments:
pipeline_name: Unique pipeline nametable_name: SQL table nameconnector_name: Input connector nameaction
let response = client.post_pipeline_input_connector_action()
.pipeline_name(pipeline_name)
.table_name(table_name)
.connector_name(connector_name)
.action(action)
.send()
.await;Sourcepub fn get_pipeline_time_series(&self) -> GetPipelineTimeSeries<'_>
pub fn get_pipeline_time_series(&self) -> GetPipelineTimeSeries<'_>
Get Time Series Stats
Required role: read or higher.
Retrieve time series for statistics of a running or paused pipeline.
Sends a GET request to /v0/pipelines/{pipeline_name}/time_series
Arguments:
pipeline_name: Unique pipeline name
let response = client.get_pipeline_time_series()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn get_pipeline_time_series_stream(&self) -> GetPipelineTimeSeriesStream<'_>
pub fn get_pipeline_time_series_stream(&self) -> GetPipelineTimeSeriesStream<'_>
Stream Time Series
Required role: read or higher.
Stream time series for statistics of a running or paused pipeline.
Returns a snapshot of all existing time series data followed by a continuous stream of new time series data points as they become available. The response is in newline-delimited JSON format (NDJSON) where each line is a JSON object representing a single time series data point.
Sends a GET request to /v0/pipelines/{pipeline_name}/time_series_stream
Arguments:
pipeline_name: Unique pipeline name
let response = client.get_pipeline_time_series_stream()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn post_update_runtime(&self) -> PostUpdateRuntime<'_>
pub fn post_update_runtime(&self) -> PostUpdateRuntime<'_>
Recompile Pipeline
Required role: write or higher.
Recompile a pipeline with the Feldera runtime version included in the currently installed Feldera platform.
Use this endpoint after upgrading Feldera to rebuild pipelines that were compiled with older platform versions. In most cases, recompilation is not required; pipelines compiled with older versions will continue to run on the upgraded platform.
Situations where recompilation may be necessary:
- To benefit from the latest bug fixes and performance optimizations.
- When backward-incompatible changes are introduced in Feldera. In this case, attempting to start a pipeline compiled with an unsupported version will result in an error.
If the pipeline is already compiled with the current platform version, this operation is a no-op.
Note that recompiling the pipeline with a new platform version may change its query plan. If the modified pipeline is started from an existing checkpoint, it may require bootstrapping parts of its state from scratch. See Feldera documentation for details on the bootstrapping process.
Sends a POST request to /v0/pipelines/{pipeline_name}/update_runtime
Arguments:
pipeline_name: Unique pipeline name
let response = client.post_update_runtime()
.pipeline_name(pipeline_name)
.send()
.await;Sourcepub fn get_pipeline_output_connector_status(
&self,
) -> GetPipelineOutputConnectorStatus<'_>
pub fn get_pipeline_output_connector_status( &self, ) -> GetPipelineOutputConnectorStatus<'_>
Get Output Status
Required role: read or higher.
Retrieve the status of an output connector.
Sends a GET request to /v0/pipelines/{pipeline_name}/views/{view_name}/connectors/{connector_name}/stats
Arguments:
pipeline_name: Unique pipeline nameview_name: SQL view nameconnector_name: Output connector name
let response = client.get_pipeline_output_connector_status()
.pipeline_name(pipeline_name)
.view_name(view_name)
.connector_name(connector_name)
.send()
.await;Sourcepub fn post_pipeline_output_connector_action(
&self,
) -> PostPipelineOutputConnectorAction<'_>
pub fn post_pipeline_output_connector_action( &self, ) -> PostPipelineOutputConnectorAction<'_>
Control Output Connector
Required role: write or higher.
Start (resume) or pause the output connector.
The following values of the action argument are accepted: start and pause.
Output connectors can be in either the Running or Paused state. By default,
connectors are initialized in the Running state when a pipeline is deployed.
In this state, the connector forwards the output of its view to the configured
sink. A connector can be created in the Paused state by setting its
paused property
to true.
A paused output connector discards the output it receives instead of sending
it to its sink; output produced while the connector is paused is gone for
good. The start command resumes the connector with the output the
pipeline produces from that point on.
The current connector state can be retrieved via the
GET /v0/pipelines/{pipeline_name}/stats endpoint.
Sends a POST request to /v0/pipelines/{pipeline_name}/views/{view_name}/connectors/{connector_name}/{action}
Arguments:
pipeline_name: Unique pipeline nameview_name: SQL view nameconnector_name: Output connector nameaction
let response = client.post_pipeline_output_connector_action()
.pipeline_name(pipeline_name)
.view_name(view_name)
.connector_name(connector_name)
.action(action)
.send()
.await;Sourcepub fn list_tenant_users(&self) -> ListTenantUsers<'_>
pub fn list_tenant_users(&self) -> ListTenantUsers<'_>
List Tenant Members
Required role: admin or higher.
List the users that are members of the acting tenant and their roles.
Sends a GET request to /v0/tenant/users
let response = client.list_tenant_users()
.send()
.await;Sourcepub fn add_tenant_user(&self) -> AddTenantUser<'_>
pub fn add_tenant_user(&self) -> AddTenantUser<'_>
Provision Tenant Member
Required role: admin or higher.
Add a member to the acting tenant by identity, before the user’s first
login. The membership authorizes on its own: as soon as that identity
authenticates through the platform’s identity provider, the user may act
in this tenant, and a headerless login with exactly this one membership
lands in it. The role is capped at the caller’s own role and may not be
owner.
Sends a POST request to /v0/tenant/users
let response = client.add_tenant_user()
.body(body)
.send()
.await;Sourcepub fn put_tenant_user(&self) -> PutTenantUser<'_>
pub fn put_tenant_user(&self) -> PutTenantUser<'_>
Assign Member Role
Required role: admin or higher.
Assign or change a user’s role in the acting tenant. The role is capped at
the caller’s own role and may not be owner.
Sends a PUT request to /v0/tenant/users/{user_id}
Arguments:
user_id: User identifierbody
let response = client.put_tenant_user()
.user_id(user_id)
.body(body)
.send()
.await;Sourcepub fn delete_tenant_user(&self) -> DeleteTenantUser<'_>
pub fn delete_tenant_user(&self) -> DeleteTenantUser<'_>
Remove Tenant Member
Required role: admin or higher.
Remove a user from the acting tenant. This drops their role now, but if the identity provider still grants them access they are re-added at the default role on their next login. Revoke access at the provider to disable access completely.
Sends a DELETE request to /v0/tenant/users/{user_id}
Arguments:
user_id: User identifier
let response = client.delete_tenant_user()
.user_id(user_id)
.send()
.await;Sourcepub fn list_tenants(&self) -> ListTenants<'_>
pub fn list_tenants(&self) -> ListTenants<'_>
List Tenants
Required role: owner.
List all tenants in the installation.
Sends a GET request to /v0/tenants
let response = client.list_tenants()
.send()
.await;Sourcepub fn create_tenant(&self) -> CreateTenant<'_>
pub fn create_tenant(&self) -> CreateTenant<'_>
Create Tenant
Required role: owner.
Explicitly create a tenant, rather than relying on first login. A login resolves its tenant by name, so a user whose identity provider asserts this name lands in the tenant created here.
Sends a POST request to /v0/tenants
let response = client.create_tenant()
.body(body)
.send()
.await;Sourcepub fn get_tenant(&self) -> GetTenant<'_>
pub fn get_tenant(&self) -> GetTenant<'_>
Get Tenant
Required role: owner.
Retrieve a single tenant by name or identifier. A selector that parses as a UUID is looked up by tenant identifier, otherwise by name.
Sends a GET request to /v0/tenants/{tenant_id}
Arguments:
tenant_id: Tenant name or identifier (UUID)
let response = client.get_tenant()
.tenant_id(tenant_id)
.send()
.await;Sourcepub fn delete_tenant(&self) -> DeleteTenant<'_>
pub fn delete_tenant(&self) -> DeleteTenant<'_>
Delete Tenant
Required role: owner.
Delete a tenant that holds nothing. Its members lose the membership, and a login that still resolves this tenant’s name simply re-creates it, empty.
The tenant must hold no pipelines, API keys or OIDC trust relationships; otherwise the request fails with a conflict. Everything tenant-scoped cascades on this delete, so the emptiness rule is what keeps a mistyped identifier from taking a live tenant’s pipelines with it. Delete those resources first if you mean to.
Sends a DELETE request to /v0/tenants/{tenant_id}
Arguments:
tenant_id: Tenant identifier
let response = client.delete_tenant()
.tenant_id(tenant_id)
.send()
.await;Sourcepub fn patch_tenant(&self) -> PatchTenant<'_>
pub fn patch_tenant(&self) -> PatchTenant<'_>
Rename Tenant
Required role: owner.
Change a tenant’s name. Only the name changes: pipelines, API keys, members and OIDC trust relationships all reference the tenant by its identifier and are unaffected.
Set displace_existing to replace a tenant atomically with one that’s
currently in use. This renames the conflicting tenant to <name> (<id>) in
the same transaction, with everything it had. Two calls potentially lose to
another user request, which could re-create the name in between.
Sends a PATCH request to /v0/tenants/{tenant_id}
Arguments:
tenant_id: Tenant identifierbody
let response = client.patch_tenant()
.tenant_id(tenant_id)
.body(body)
.send()
.await;Sourcepub fn post_validate_program(&self) -> PostValidateProgram<'_>
pub fn post_validate_program(&self) -> PostValidateProgram<'_>
Validate Program
Required role: write or higher.
Validate a SQL program by compiling it, without creating a pipeline or
building the pipeline binary. Reports SQL errors and warnings and the derived
schema and connectors. Set ir to also return the program IR (dataflow).
Note that this endpoint returns HTTP 200, regardless of whether validation
succeeds or fails. The validation result, including any compiler warnings and errors,
is encoded in the ValidateProgramResponse response body.
Sends a POST request to /v0/validate_program
Arguments:
body: The SQL program to validate, an optional runtime version, and whether to return the IR
let response = client.post_validate_program()
.body(body)
.send()
.await;Trait Implementations§
Source§impl ClientHooks<RetryPolicy> for &Client
impl ClientHooks<RetryPolicy> for &Client
Source§async fn pre<E>(
&self,
request: &mut Request,
info: &OperationInfo,
) -> Result<(), Error<E>>
async fn pre<E>( &self, request: &mut Request, info: &OperationInfo, ) -> Result<(), Error<E>>
Source§impl ClientHooks<RetryPolicy> for Client
Route every request through the retry layer. Overrides the no-op default
on &Client via auto-ref specialization (see progenitor_client::ClientHooks).
impl ClientHooks<RetryPolicy> for Client
Route every request through the retry layer. Overrides the no-op default
on &Client via auto-ref specialization (see progenitor_client::ClientHooks).
Source§async fn exec(&self, request: Request, info: &OperationInfo) -> Result<Response>
async fn exec(&self, request: Request, info: &OperationInfo) -> Result<Response>
Source§impl ClientInfo<RetryPolicy> for Client
impl ClientInfo<RetryPolicy> for Client
Source§fn api_version() -> &'static str
fn api_version() -> &'static str
Source§fn inner(&self) -> &RetryPolicy
fn inner(&self) -> &RetryPolicy
T if one is specified.