Skip to main content
The Rust client is the crate parable-web-api-sdk. It covers every operation in the API reference. Calls are async.

Get the crate

The Rust client is not in a package registry. Ask your Parable representative for the crate. The examples on this page also use Tokio:

Import and authenticate

Create a client with the base URL and your token. Then create request options that name your Workspace. See Authentication to get a token.
The client sends Authorization: Bearer ... on every call. Pass Some(&options) to each call to send the X-Tenant header.

Read

Read your membership, then the Provider connections in your Workspace:

Update

Stop a Tap. This call needs a Parable token, because an MCP token only reads. Replace the ID with one from your Workspace. List Taps with sdk.tenant_connector_taps.tenant_connector_taps(None, Some(&options)).
The update leaves fields set to None unchanged. enabled: false stops the Tap. enabled: true does not add a Tap that the connection’s enabledTaps leaves out. To turn on an opt-in Tap, see Turn Taps on and off.

Encrypt credentials

Two operations take an encrypted body, such as sdk.connectors.add_connector_to_tenant. The Rust client takes the key on each call, in EncryptedRequestOptions. Put your request options in it too, so that the call names your Workspace:
See Encrypted request bodies.

Handle errors and retries

The client gives each request 30 seconds. Pass a timeout in milliseconds to ClientConfig::with_base_url, or set timeout_ms in RequestOptions for one call, to change it. The client does not retry a request. Each call returns Result<_, SDKError>. These methods sort a failure: The variants are SDKError::Api (the API answered with an error status), SDKError::Network, SDKError::Config (the input failed the client’s checks, or the client is not set up), SDKError::Request, SDKError::Json, and SDKError::Contract.
Each operation page in the API reference shows the Rust call for that operation. It passes Some(&options), as on this page, so that the call sends X-Tenant. A call with None names no Workspace.
For table data, use SQL. See Parable Data Engine.