Bulk Create Test Cases Endpoint
curl --request POST \
--url https://{tenant_id}.api.useago.com/api/v1/simulation/datasets/{dataset_id}/test-cases/bulk \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"test_cases": [
{
"question": "<string>",
"expected_type": "answer",
"expected_answer": "<string>",
"expected_tool_name": "<string>",
"expected_tool_args": {},
"expected_agent_id": "<string>",
"metadata": {},
"persona_id": "<string>",
"api_data_overrides": {},
"tool_call_overrides": {},
"steps": [
{
"user_message": "<string>",
"step_order": 123,
"expected_type": "answer",
"expected_answer": "<string>",
"expected_tool_name": "<string>",
"expected_tool_args": {}
}
]
}
]
}
'import requests
url = "https://{tenant_id}.api.useago.com/api/v1/simulation/datasets/{dataset_id}/test-cases/bulk"
payload = { "test_cases": [
{
"question": "<string>",
"expected_type": "answer",
"expected_answer": "<string>",
"expected_tool_name": "<string>",
"expected_tool_args": {},
"expected_agent_id": "<string>",
"metadata": {},
"persona_id": "<string>",
"api_data_overrides": {},
"tool_call_overrides": {},
"steps": [
{
"user_message": "<string>",
"step_order": 123,
"expected_type": "answer",
"expected_answer": "<string>",
"expected_tool_name": "<string>",
"expected_tool_args": {}
}
]
}
] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
test_cases: [
{
question: '<string>',
expected_type: 'answer',
expected_answer: '<string>',
expected_tool_name: '<string>',
expected_tool_args: {},
expected_agent_id: '<string>',
metadata: {},
persona_id: '<string>',
api_data_overrides: {},
tool_call_overrides: {},
steps: [
{
user_message: '<string>',
step_order: 123,
expected_type: 'answer',
expected_answer: '<string>',
expected_tool_name: '<string>',
expected_tool_args: {}
}
]
}
]
})
};
fetch('https://{tenant_id}.api.useago.com/api/v1/simulation/datasets/{dataset_id}/test-cases/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"id": "<string>",
"question": "<string>",
"expected_type": "<string>",
"object": "simulation_test_case",
"expected_answer": "<string>",
"expected_tool_name": "<string>",
"expected_tool_args": {},
"expected_agent_id": "<string>",
"expected_agent_name": "<string>",
"metadata": {},
"order": 123,
"persona_id": "<string>",
"persona_name": "<string>",
"api_data_overrides": {},
"tool_call_overrides": {},
"steps": [],
"created_at": "<string>"
}
],
"has_more": true,
"total": 123,
"object": "list"
}Simulation
Bulk Create Test Cases Endpoint
Bulk create test cases in a dataset.
POST
/
api
/
v1
/
simulation
/
datasets
/
{dataset_id}
/
test-cases
/
bulk
Bulk Create Test Cases Endpoint
curl --request POST \
--url https://{tenant_id}.api.useago.com/api/v1/simulation/datasets/{dataset_id}/test-cases/bulk \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"test_cases": [
{
"question": "<string>",
"expected_type": "answer",
"expected_answer": "<string>",
"expected_tool_name": "<string>",
"expected_tool_args": {},
"expected_agent_id": "<string>",
"metadata": {},
"persona_id": "<string>",
"api_data_overrides": {},
"tool_call_overrides": {},
"steps": [
{
"user_message": "<string>",
"step_order": 123,
"expected_type": "answer",
"expected_answer": "<string>",
"expected_tool_name": "<string>",
"expected_tool_args": {}
}
]
}
]
}
'import requests
url = "https://{tenant_id}.api.useago.com/api/v1/simulation/datasets/{dataset_id}/test-cases/bulk"
payload = { "test_cases": [
{
"question": "<string>",
"expected_type": "answer",
"expected_answer": "<string>",
"expected_tool_name": "<string>",
"expected_tool_args": {},
"expected_agent_id": "<string>",
"metadata": {},
"persona_id": "<string>",
"api_data_overrides": {},
"tool_call_overrides": {},
"steps": [
{
"user_message": "<string>",
"step_order": 123,
"expected_type": "answer",
"expected_answer": "<string>",
"expected_tool_name": "<string>",
"expected_tool_args": {}
}
]
}
] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
test_cases: [
{
question: '<string>',
expected_type: 'answer',
expected_answer: '<string>',
expected_tool_name: '<string>',
expected_tool_args: {},
expected_agent_id: '<string>',
metadata: {},
persona_id: '<string>',
api_data_overrides: {},
tool_call_overrides: {},
steps: [
{
user_message: '<string>',
step_order: 123,
expected_type: 'answer',
expected_answer: '<string>',
expected_tool_name: '<string>',
expected_tool_args: {}
}
]
}
]
})
};
fetch('https://{tenant_id}.api.useago.com/api/v1/simulation/datasets/{dataset_id}/test-cases/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"id": "<string>",
"question": "<string>",
"expected_type": "<string>",
"object": "simulation_test_case",
"expected_answer": "<string>",
"expected_tool_name": "<string>",
"expected_tool_args": {},
"expected_agent_id": "<string>",
"expected_agent_name": "<string>",
"metadata": {},
"order": 123,
"persona_id": "<string>",
"persona_name": "<string>",
"api_data_overrides": {},
"tool_call_overrides": {},
"steps": [],
"created_at": "<string>"
}
],
"has_more": true,
"total": 123,
"object": "list"
}Authorizations
Path Parameters
Body
application/json
Schema for bulk-creating simulation test cases via the v1 API.
Show child attributes
Show child attributes
⌘I
