Skip to main content
The TypeScript client is @parable-platform/web-api-sdk. It covers every operation in the API reference.

Install

The package is in a private npm registry. Ask your Parable representative for access. Then install the client and its types:
The package contains TypeScript source, not compiled JavaScript. Run it with Bun, or build it with a bundler.

Import and authenticate

Create a client with the base URL, your token, and your Workspace. See Authentication to get a token.
The client sends Authorization: Bearer ... on every call. The requestInterceptor adds 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.tenantConnectorTaps.tenantConnectorTaps().
The update leaves omitted fields 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.addConnectorToTenant(). Get your Workspace’s public key and give it to the client once. The client then encrypts the body of each of these operations:
You can also pass the key when you create the client, as encryption: { publicEncryptionKey: key }, or to one call, as { publicEncryptionKey: key } in its options. See Encrypted request bodies.

Handle errors and retries

The client gives each request 30 seconds. Set timeout in milliseconds when you create the client to change it. 0 turns the time limit off. The client does not retry a request. Each failure is an instance of one of these classes:
Retry only a read, or a call that you made safe to repeat, such as a connection with an idempotencyKey.

Check permissions before a call

@parable-platform/web-api-sdk/permissions exports operationPermissions. It maps each operation, by its namespace.method name, to the permissions that admit it. A caller who holds one of them is admitted. A permission also admits each permission under it: tenant.connectors admits tenant.connectors.create. An empty list means that the operation checks no permission. The module imports nothing, so it does not load the client.
Use it to show a control only when the API would accept the call. The API still checks every request.
Each operation page in the API reference shows the TypeScript call for that operation, such as sdk.users.me().
For table data, use SQL. See Parable Data Engine.