Skip to main content
GET
/
api
/
testsets
/
{testset_id}
/
rows
List testset rows
curl --request GET \
  --url https://api.keywordsai.co/api/testsets/{testset_id}/rows \
  --header 'Authorization: Bearer <token>'
{
  "count": 2,
  "results": [
    {
      "row_index": 0,
      "row_data": {
        "input": "sdf"
      }
    },
    {
      "row_index": 1,
      "row_data": {
        "expected_output": "ccc"
      }
    }
  ]
}
List all rows in a testset.

Authentication

  • API key: Authorization: Bearer <API key>

Path Parameters

testset_id
string
required
The ID of the testset to list rows from.

Examples

import requests

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

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

Response

{
  "count": 2,
  "results": [
    {
      "row_index": 0,
      "row_data": {
        "input": "sdf"
      }
    },
    {
      "row_index": 1,
      "row_data": {
        "expected_output": "ccc"
      }
    }
  ]
}