Skip to main content
POST
/
api
/
v2
/
projects
/
{project_id}
/
sessions
/
{session_id}
/
traces
/
id
/
{trace_id}
Record Trace
curl --request POST \
  --url https://{host}.freeplay.ai/api/v2/projects/{project_id}/sessions/{session_id}/traces/id/{trace_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": "<unknown>",
  "output": "<unknown>",
  "parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "test_run_info": {
    "test_run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "test_case_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "agent_name": "<string>",
  "custom_metadata": {},
  "eval_results": {},
  "name": "<string>",
  "kind": "<string>",
  "start_time": "2023-11-07T05:31:56Z",
  "end_time": "2023-11-07T05:31:56Z"
}
'
{}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

project_id
string
required
session_id
string
required
trace_id
string
required

Body

application/json
input
any
required
output
any
required
parent_id
string<uuid> | null
test_run_info
TestRunInfo · object

Information about a test run

agent_name
string | null
custom_metadata
Custom Metadata · object
eval_results
Eval Results · object
name
string | null
kind
string | null
Allowed value: "tool"
start_time
string<date-time> | null
end_time
string<date-time> | null

Response

201 - application/json

EmptyResponse()

The response is of type EmptyResponse · object.