Authentication
- API key:
Authorization: Bearer <API key>
Path Parameters
The ID of the experiment to update rows in.
{
"rows": [
{
"id": "074ca0b7b28c447996ad7447204b5910",
"input": {
"current_prompt_version": "v2",
"prompt_versions_diff": "come on, some big diff here"
}
},
{
"input": {
"current_prompt_version": "v3",
"prompt_versions_diff": "more_diffs"
}
}
]
}
{
"updated": 2,
"rows": []
}
Authorization: Bearer <API key>{
"rows": [
{
"id": "074ca0b7b28c447996ad7447204b5910",
"input": {
"current_prompt_version": "v2",
"prompt_versions_diff": "come on, some big diff here"
}
},
{
"input": {
"current_prompt_version": "v3",
"prompt_versions_diff": "more_diffs"
}
}
]
}
import requests
experiment_id = "experiment_id_123"
url = f"https://api.keywordsai.co/api/experiments/{experiment_id}/rows"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"rows": [
{
"id": "row_id_123",
"input": {
"current_prompt_version": "v2"
}
}
]
}
response = requests.patch(url, headers=headers, json=data)
print(response.json())
{
"updated": 2,
"rows": []
}
Was this page helpful?
{
"rows": [
{
"id": "074ca0b7b28c447996ad7447204b5910",
"input": {
"current_prompt_version": "v2",
"prompt_versions_diff": "come on, some big diff here"
}
},
{
"input": {
"current_prompt_version": "v3",
"prompt_versions_diff": "more_diffs"
}
}
]
}
{
"updated": 2,
"rows": []
}