Skip to main content
GET
/
api
/
testsets
/
{testset_id}
Retrieve testset
curl --request GET \
  --url https://api.keywordsai.co/api/testsets/{testset_id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "testset_id_123",
  "name": "Test API Key Dataset",
  "description": "Dataset for testing new features",
  "column_definitions": [
    {"field": "input"},
    {"field": "expected_output"}
  ]
}
Retrieve a specific testset by ID.

Authentication

  • API key: Authorization: Bearer <API key>

Path Parameters

testset_id
string
required
The ID of the testset to retrieve.

Examples

import requests

testset_id = "testset_id_123"
url = f"https://api.keywordsai.co/api/testsets/{testset_id}"
headers = {
    "Authorization": "Bearer YOUR_API_KEY"
}

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

Response

{
  "id": "testset_id_123",
  "name": "Test API Key Dataset",
  "description": "Dataset for testing new features",
  "column_definitions": [
    {"field": "input"},
    {"field": "expected_output"}
  ]
}