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.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 withsdk.tenant_connector_taps.tenant_connector_taps(None, Some(&options)).
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 assdk.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:
Handle errors and retries
The client gives each request 30 seconds. Pass a timeout in milliseconds toClientConfig::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.