> 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/references/interfaces/apis/data-product-apis/getting-started/api-calls.md).

# API calls

Core HTTP conventions for calling a Data Product API, including URLs, pagination, and Postman.

## Build the base URL

Each Data Product has its own API base URL:

```
https://<DATAOS_FQDN>/vulcan/tenants/<TENANT>/data-products/<TENANT>-<RESOURCE_NAME>/api/v1
```

Store it as `BASE_URL`. Add the endpoint path shown in this documentation to this URL when making a request.

## Make your first call

Use the following request to verify the base URL and access token by retrieving the Data Product metadata:

```bash
export BASE_URL='https://<DATAOS_FQDN>/vulcan/tenants/<TENANT>/data-products/<TENANT>-<RESOURCE_NAME>/api/v1'
export TOKEN='<dataos-access-token>'

curl "$BASE_URL/metadata" \
  --header "Authorization: Bearer $TOKEN" \
  --header "Accept: application/json"
```

Use `Content-Type: application/json` when sending a JSON body.

## HTTP methods and success codes

| Method   | Typical use                                    | Common success                             |
| -------- | ---------------------------------------------- | ------------------------------------------ |
| `GET`    | Retrieve a resource, list, metric, or result.  | `200`; Parquet result download uses `307`. |
| `POST`   | Submit a query or create a perspective.        | Query `202`; perspective creation `201`.   |
| `PUT`    | Partially update an existing perspective.      | `201`.                                     |
| `DELETE` | Remove an owned perspective or follower state. | `204`.                                     |
| `HEAD`   | Check whether a perspective slug exists.       | `200` or `404`; no body.                   |

## Paginate correctly

List endpoints generally accept `limit` and `offset` and return a `pagination` object with `has_more`. Query result endpoints accept `limit`, `offset`, and `columns` only for inline text formats (`json`, `csv`, and `yaml`). They do not slice Parquet downloads.

Always set deterministic query ordering when paging through data; otherwise rows can shift between pages.

## Run requests in Postman

From the Data Product UI, select **Activate → APIs → Download Postman Collection**. Import the JSON file into Postman and set:

| Variable   | Value                                                                    |
| ---------- | ------------------------------------------------------------------------ |
| `base_url` | Data Product URL in the exact form expected by the generated collection. |
| `apikey`   | Current DataOS access token.                                             |

The collection applies Bearer authentication centrally and groups requests into Discover, Query, GraphQL, Perspectives, Engagement, Quality & Activity, and Health.

{% hint style="warning" %}
Inspect the generated collection's `base_url` template before adding `https://` or `/api/v1`; those parts may already exist in each request template.
{% endhint %}

## Query calls are asynchronous

REST, Semantic SQL, Metrics, and Source SQL return `202 Accepted` with an `id`. Poll `/query/statement/{id}` and fetch `/query/statement/{id}/result` only after `SUCCESS`. See [Query lifecycle](https://v2.dataos.info/references/interfaces/apis/data-product-apis/querying-data-products/advanced/query-lifecycle.md).

## Next step

Continue to [Error codes](https://v2.dataos.info/references/interfaces/apis/data-product-apis/getting-started/error-codes.md) to recognize and handle failures before they show up in production.


---

# 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/references/interfaces/apis/data-product-apis/getting-started/api-calls.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.
