@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:Import and authenticate
Create a client with the base URL, your token, and your Workspace. See Authentication to get a token.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 withsdk.tenantConnectorTaps.tenantConnectorTaps().
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.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:
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. Settimeout 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:
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.