> For clean Markdown of any page, append `.md` to the page URL.
> For a complete documentation index, see https://docs.sarvam.ai/llms.txt.
> For full documentation content in one file, see https://docs.sarvam.ai/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# Run tab

POST https://apps.sarvam.ai/api/analytics/v1/{org_id}/{workspace_id}/boards/{board_id}/tabs/{tab_id}/run
Content-Type: application/json

Runs the tab's widgets together and returns one result per widget, so rendering a tab costs a single call rather than one per widget. Widgets execute concurrently and each is reported as `ok` or `error` by its `status`: a widget that fails does not fail the request, so one broken query cannot hide the rest of the tab. Safe and side-effect free despite being a POST. The tab, not the board, is the unit here — there is no whole-board run.

Reference: https://docs.sarvam.ai/conversations/api/boards/tabs/run

## Request

### Path parameters

- `org_id` (string, required) — Organization ID
- `workspace_id` (string, required) — Workspace ID
- `board_id` (string, required)
- `tab_id` (string, required)

### Headers

- `X-API-Key` (string, required) — Your workspace API key.

### Body (application/json)

This endpoint expects an object.

- `filter_values` (map from string to object, optional) — Values overriding the filters' stored defaults, keyed by token name
  - `filter_type` (enum, required)
    - Allowed values: `number`, `string`, `date`, `dropdown`
  - `value` (string, required)

## Response

### 200

Successful Response

- `results` (list of object, required) — One entry per widget on the tab, each tagged `ok` or `error` by `status`
  - `status`: `error` (WidgetRunError)
    - `error` (object, required) — Why this widget could not be run
      - `code` (string, required) — Machine-readable failure code, e.g. `TIMEOUT`, `CLICKHOUSE_ERROR`
      - `message` (string, required) — Human-readable description of the failure
    - `widget_id` (string, required) — Widget this result belongs to
  - `status`: `ok` (WidgetRunOk)
    - `columns` (list of object, required) — Column metadata in result order
      - `name` (string, required) — Column name as returned by the query
      - `type` (string, required) — ClickHouse type name, e.g. `UInt64`, `String`, `DateTime`
    - `execution_ms` (integer, required) — Query execution time in milliseconds
    - `row_count` (integer, required) — Number of rows in `rows`
    - `rows` (list of list of any, required) — Row values as positional arrays aligned 1:1 with `columns`
    - `truncated` (boolean, required) — True when the row cap cut this widget's result short
    - `widget_id` (string, required) — Widget this result belongs to
- `filter_values_used` (map from string to string, required) — The filter values actually applied, after merging the request with each filter's default

## Errors

### 400 Bad Request Error

Invalid SQL, unresolved filter token, or bad filter value

- `error` (object, required) — Details of the error that occurred.
  - `code` (string, required) — A service-specific error code.
  - `message` (string, required) — A human-readable description of the error.

### 401 Unauthorized Error

Missing or invalid credentials

- `error` (object, required) — Details of the error that occurred.
  - `code` (string, required) — A service-specific error code.
  - `message` (string, required) — A human-readable description of the error.

### 403 Forbidden Error

Credentials are not scoped to this org and workspace

- `error` (object, required) — Details of the error that occurred.
  - `code` (string, required) — A service-specific error code.
  - `message` (string, required) — A human-readable description of the error.

### 404 Not Found Error

No such resource in this workspace

- `error` (object, required) — Details of the error that occurred.
  - `code` (string, required) — A service-specific error code.
  - `message` (string, required) — A human-readable description of the error.

### 408 Request Timeout Error

The analytics query exceeded its time budget

- `error` (object, required) — Details of the error that occurred.
  - `code` (string, required) — A service-specific error code.
  - `message` (string, required) — A human-readable description of the error.

### 422 Unprocessable Entity Error

The analytics database rejected the query

- `error` (object, required) — Details of the error that occurred.
  - `code` (string, required) — A service-specific error code.
  - `message` (string, required) — A human-readable description of the error.

### 429 Too Many Requests Error

Rate limit exceeded. Honour the `Retry-After` response header before retrying.

- `error` (object, required) — Details of the error that occurred.
  - `code` (string, required) — A service-specific error code.
  - `message` (string, required) — A human-readable description of the error.

### 500 Internal Server Error

Unexpected server error

- `error` (object, required) — Details of the error that occurred.
  - `code` (string, required) — A service-specific error code.
  - `message` (string, required) — A human-readable description of the error.

## Examples

**Request**

```json
{
  "filter_values": {
    "start_date": {
      "filter_type": "date",
      "value": "2026-09-01"
    }
  }
}
```

**Response**

```json
{
  "results": [
    {
      "status": "ok",
      "columns": [
        {
          "name": "day",
          "type": "Date"
        },
        {
          "name": "connected",
          "type": "UInt64"
        },
        {
          "name": "total",
          "type": "UInt64"
        }
      ],
      "execution_ms": 184,
      "row_count": 2,
      "rows": [
        [
          "2026-09-01",
          842,
          1104
        ],
        [
          "2026-09-02",
          915,
          1187
        ]
      ],
      "truncated": false,
      "widget_id": "a4c9e0f7-31b8-4d6a-9e25-7f0b3c81d46e"
    },
    {
      "status": "error",
      "error": {
        "code": "TIMEOUT",
        "message": "Query exceeded its 15s time budget."
      },
      "widget_id": "c8b1d5a2-7e34-4902-8f6d-1a3b9c05e7f2"
    }
  ],
  "filter_values_used": {
    "agent_id": null,
    "start_date": "2026-09-01"
  }
}
```

**SDK Code**

```python One widget succeeded, one timed out
import requests

url = "https://apps.sarvam.ai/api/analytics/v1/org_id/workspace_id/boards/board_id/tabs/tab_id/run"

payload = { "filter_values": { "start_date": {
            "filter_type": "date",
            "value": "2026-09-01"
        } } }
headers = {
    "X-API-Key": "<your-api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript One widget succeeded, one timed out
const url = 'https://apps.sarvam.ai/api/analytics/v1/org_id/workspace_id/boards/board_id/tabs/tab_id/run';
const options = {
  method: 'POST',
  headers: {'X-API-Key': '<your-api-key>', 'Content-Type': 'application/json'},
  body: '{"filter_values":{"start_date":{"filter_type":"date","value":"2026-09-01"}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go One widget succeeded, one timed out
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://apps.sarvam.ai/api/analytics/v1/org_id/workspace_id/boards/board_id/tabs/tab_id/run"

	payload := strings.NewReader("{\n  \"filter_values\": {\n    \"start_date\": {\n      \"filter_type\": \"date\",\n      \"value\": \"2026-09-01\"\n    }\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-Key", "<your-api-key>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby One widget succeeded, one timed out
require 'uri'
require 'net/http'

url = URI("https://apps.sarvam.ai/api/analytics/v1/org_id/workspace_id/boards/board_id/tabs/tab_id/run")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<your-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"filter_values\": {\n    \"start_date\": {\n      \"filter_type\": \"date\",\n      \"value\": \"2026-09-01\"\n    }\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java One widget succeeded, one timed out
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://apps.sarvam.ai/api/analytics/v1/org_id/workspace_id/boards/board_id/tabs/tab_id/run")
  .header("X-API-Key", "<your-api-key>")
  .header("Content-Type", "application/json")
  .body("{\n  \"filter_values\": {\n    \"start_date\": {\n      \"filter_type\": \"date\",\n      \"value\": \"2026-09-01\"\n    }\n  }\n}")
  .asString();
```

```php One widget succeeded, one timed out
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://apps.sarvam.ai/api/analytics/v1/org_id/workspace_id/boards/board_id/tabs/tab_id/run', [
  'body' => '{
  "filter_values": {
    "start_date": {
      "filter_type": "date",
      "value": "2026-09-01"
    }
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-Key' => '<your-api-key>',
  ],
]);

echo $response->getBody();
```

```csharp One widget succeeded, one timed out
using RestSharp;

var client = new RestClient("https://apps.sarvam.ai/api/analytics/v1/org_id/workspace_id/boards/board_id/tabs/tab_id/run");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-Key", "<your-api-key>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"filter_values\": {\n    \"start_date\": {\n      \"filter_type\": \"date\",\n      \"value\": \"2026-09-01\"\n    }\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift One widget succeeded, one timed out
import Foundation

let headers = [
  "X-API-Key": "<your-api-key>",
  "Content-Type": "application/json"
]
let parameters = ["filter_values": ["start_date": [
      "filter_type": "date",
      "value": "2026-09-01"
    ]]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://apps.sarvam.ai/api/analytics/v1/org_id/workspace_id/boards/board_id/tabs/tab_id/run")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```