Update a testset’s metadata.
Authentication
- API key:
Authorization: Bearer <API key>
Path Parameters
The ID of the testset to update.
Request Body
{
"name": "Updated Test API Dataset",
"starred": false,
"description": "Updated description for the dataset"
}
Examples
import requests
testset_id = "testset_id_123"
url = f"https://api.keywordsai.co/api/testsets/{testset_id}"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"name": "Updated Test API Dataset",
"description": "Updated description for the dataset"
}
response = requests.patch(url, headers=headers, json=data)
print(response.json())
Response
{
"id": "testset_id_123",
"name": "Updated Test API Dataset",
"description": "Updated description for the dataset"
}