Replace a test
Replace the test's definition. testId, agentId, source, createdBy, and createdAt keep their stored values; a source in the body is ignored. Runs already started keep the definition they started with.
Authorization
bearerAuth A Tandem bearer token. Requests are scoped to the organization the token belongs to; no organization header is required.
In: header
Path Parameters
The agent's unique ID.
The test's unique ID.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
A test definition. scripted tests need scripted and no simulated; simulated tests need simulated and no scripted.
Response Body
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/v1/agent-media/agents/string/tests/string" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "mode": "scripted" }'{ "test": { "name": "string", "description": "string", "mode": "scripted", "scripted": { "turns": [ "string" ] }, "simulated": { "persona": "string", "goal": "string", "maxTurns": 20 }, "stubs": {}, "checks": [], "criteria": [], "repeat": 1, "caller": { "ani": "string", "contact": { "attributes": { "property1": "string", "property2": "string" } } }, "workflowVariables": { "property1": "string", "property2": "string" }, "memory": { "callCount": 1, "synopsis": "string", "rollingSummary": "string", "openThreads": "string" }, "testId": "string", "agentId": "string", "source": "user", "createdBy": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }}{ "error": "string", "errors": [ { "field": "string", "message": "string" } ]}{ "error": "string", "message": "string", "limit": 0, "length": 0, "reason": "string"}{ "error": "string", "message": "string", "limit": 0, "length": 0, "reason": "string"}