> For the complete documentation index, see [llms.txt](https://v2.dataos.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v2.dataos.info/consume/october2026/activate/apis/sdk/typescript-sdk.md).

# TypeScript

Install and use the TypeScript SDK for Data Product APIs.

Use the TypeScript SDK when a Node.js or TypeScript application needs typed access to Data Product APIs.

The SDK wraps the API groups into a single `VulcanClient` and uses the native `fetch` API in Node.js 18 and later.

## Installation

Download the SDK package, then install it locally:

{% file src="/files/12dbRo2HOZpyKrFK9FiD" %}

```bash
npm install vulcan-sdk-0.228.1.32.tgz
```

## Create a client

```typescript
import { VulcanClient } from "vulcan-sdk";

const client = new VulcanClient({
  fqdn: "example.dataos.io",
  dpName: "b2b_saas",
  accessToken: "<your-dataos-api-token>",
  tenant: "public",
});
```

The SDK builds the base URL automatically:

```
https://{fqdn}/vulcan/tenants/{tenant}/data-products/{tenant}-{dpName}/api/v1
```

## Constructor options

<table><thead><tr><th width="141.2998046875">Option</th><th width="115.6876220703125">Type</th><th width="108.830322265625">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>fqdn</code></td><td><code>string</code></td><td>Yes</td><td>DataOS FQDN, for example <code>example.dataos.io</code>.</td></tr><tr><td><code>dpName</code></td><td><code>string</code></td><td>Yes</td><td>Data Product name, for example <code>b2b_saas</code>.</td></tr><tr><td><code>accessToken</code></td><td><code>string</code></td><td>Yes</td><td><a href="https://v2.dataos.info/consume/october2026/get-started/before-you-begin.md">DataOS API token</a>.</td></tr><tr><td><code>tenant</code></td><td><code>string</code></td><td>Yes</td><td>Tenant name, for example <code>public</code>.</td></tr></tbody></table>

See [API tokens](https://v2.dataos.info/references/key-concepts/api-tokens) for how tokens work.

## Query example

```typescript
const stmt = await client.query.submitStatement({
  sql: "SELECT order_id, total FROM orders LIMIT 100",
});

const terminal = new Set(["SUCCESS", "FAILED", "CANCELLED", "SUCCEEDED"]);
let detail = await client.query.getStatement(stmt.id);

while (!terminal.has(detail.status?.toUpperCase() ?? "")) {
  await new Promise((resolve) => setTimeout(resolve, 2000));
  detail = await client.query.getStatement(stmt.id);
}

const result = await client.query.getStatementResult(stmt.id);
console.log(result.cols);
for (const row of result.rows ?? []) {
  console.log(row);
}
```

## API groups

<table><thead><tr><th width="179.36798095703125">Group</th><th>Access via</th></tr></thead><tbody><tr><td>Metadata</td><td><code>client.metadata</code></td></tr><tr><td>Query</td><td><code>client.query</code></td></tr><tr><td>Activity</td><td><code>client.activity</code></td></tr><tr><td>Data Quality</td><td><code>client.dq</code></td></tr><tr><td>Perspectives</td><td><code>client.perspectives</code></td></tr><tr><td>Notifications</td><td><code>client.notifications</code></td></tr><tr><td>Followers</td><td><code>client.followers</code></td></tr></tbody></table>

## Troubleshooting

The SDK raises `VulcanAPIError` for API failures, authentication failures, invalid requests, missing parameters, and unexpected API responses.

```typescript
import { VulcanAPIError } from "vulcan-sdk";

try {
  const plan = await client.activity.getPlan("nonexistent-id");
} catch (error) {
  if (error instanceof VulcanAPIError) {
    console.log(error.statusCode);
    console.log(error.detail);
  }
}
```

For the full method reference, see [SDKs](https://v2.dataos.info/references/interfaces/apis/data-product-apis/getting-started/sdks) in References.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://v2.dataos.info/consume/october2026/activate/apis/sdk/typescript-sdk.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
