const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));