> 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.

# Get a test suite

GET https://apps.sarvam.ai/api/evals/v1/{org_id}/{workspace_id}/test-suites/{test_suite_id}

Returns the suite with its test cases nested.

Reference: https://docs.sarvam.ai/api-reference/tests/get

## Request

### Path parameters

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

### Headers

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

## Response

### 200

Successful Response

- `test_suite_id` (string, required)
- `name` (string, required)
- `test_case_count` (integer, required)
- `created_by` (object, required)
  - `type` (enum, required) — Whether a user or an API key performed the action.
    - Allowed values: `user`, `api_key`
  - `id` (string, required) — User identifier for `user`; the key prefix for `api_key`.
- `created_at` (datetime, required)
- `updated_at` (datetime, required)
- `app_id` (string, optional, nullable) — App this suite is bound to, or null for a workspace-level suite.
- `description` (string, optional, nullable)
- `variables` (list of object, optional, default: [])
  - `name` (string, required)
  - `value` (string, required)
- `global_guardrails` (list of string, optional, default: [])
- `test_cases` (list of object, optional, default: [])
  - `test_case_id` (string, required)
  - `name` (string, required)
  - `category` (string, required)
  - `user_scenario` (string, required)
  - `expected_behaviors` (list of object, optional, default: [])
    - `name` (string, required)
    - `description` (string, required)
  - `variable_overrides` (list of object, optional, default: [])
    - `name` (string, required)
    - `value` (string, required)
  - `max_turns` (integer, optional, default: 50)
- `updated_by` (object, optional, nullable)
  - `type` (enum, required) — Whether a user or an API key performed the action.
    - Allowed values: `user`, `api_key`
  - `id` (string, required) — User identifier for `user`; the key prefix for `api_key`.

## Errors

### 401 Unauthorized Error

No Bearer token or X-API-Key was supplied, or it is invalid.

- `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

The credential is not valid for this org or 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 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.

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of object, optional)
  - `loc` (list of string or integer, required)
  - `msg` (string, required)
  - `type` (string, required)

### 429 Too Many Requests Error

Rate limit exceeded for this caller.

- `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

**Response**

```json
{
  "test_suite_id": "01K5T8A2MZQ4VE6XCJ0RDBHW7N",
  "name": "Front desk — booking flows",
  "test_case_count": 8,
  "created_by": {
    "type": "api_key",
    "id": "sk_live_7f3ab1"
  },
  "created_at": "2026-09-10T08:42:00Z",
  "updated_at": "2026-09-15T11:20:36Z",
  "app_id": "clinic-front-desk",
  "description": "Rescheduling, cancellations, and identity checks for the clinic agent.",
  "variables": [
    {
      "name": "clinic_name",
      "value": "Sunrise Dental"
    },
    {
      "name": "patient_name",
      "value": "Ravi"
    }
  ],
  "global_guardrails": [
    "Never gives medical advice; clinical questions are directed to a doctor.",
    "Confirms the patient's full name and phone number before changing a booking."
  ],
  "test_cases": [
    {
      "test_case_id": "01K5T8B7PS3KD9GM1FYX4VQCJ2",
      "name": "Caller reschedules to the weekend",
      "category": "Rescheduling",
      "user_scenario": "The caller has an appointment tomorrow morning but now wants a weekend slot. They are in a hurry, switch to Hindi midway, and ask twice whether a cancellation fee applies.",
      "expected_behaviors": [
        {
          "name": "Offers concrete slots",
          "description": "Proposes at least two specific dates and times instead of asking the caller to choose blindly."
        },
        {
          "name": "Confirms the new booking",
          "description": "Repeats the final date, time and clinic name back to the caller before ending the call."
        }
      ],
      "variable_overrides": [
        {
          "name": "patient_name",
          "value": "Meera"
        }
      ],
      "max_turns": 30
    }
  ],
  "updated_by": {
    "type": "user",
    "id": "usr_2c94e7d1"
  }
}
```

**SDK Code**

```python
import requests

url = "https://apps.sarvam.ai/api/evals/v1/org_id/workspace_id/test-suites/test_suite_id"

headers = {"X-API-Key": "<your-api-key>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://apps.sarvam.ai/api/evals/v1/org_id/workspace_id/test-suites/test_suite_id';
const options = {method: 'GET', headers: {'X-API-Key': '<your-api-key>'}};

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

```go
package main

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

func main() {

	url := "https://apps.sarvam.ai/api/evals/v1/org_id/workspace_id/test-suites/test_suite_id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-Key", "<your-api-key>")

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

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

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

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://apps.sarvam.ai/api/evals/v1/org_id/workspace_id/test-suites/test_suite_id")

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

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<your-api-key>'

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

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://apps.sarvam.ai/api/evals/v1/org_id/workspace_id/test-suites/test_suite_id")
  .header("X-API-Key", "<your-api-key>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://apps.sarvam.ai/api/evals/v1/org_id/workspace_id/test-suites/test_suite_id', [
  'headers' => [
    'X-API-Key' => '<your-api-key>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://apps.sarvam.ai/api/evals/v1/org_id/workspace_id/test-suites/test_suite_id");
var request = new RestRequest(Method.GET);
request.AddHeader("X-API-Key", "<your-api-key>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["X-API-Key": "<your-api-key>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://apps.sarvam.ai/api/evals/v1/org_id/workspace_id/test-suites/test_suite_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```