Skip to main content
POST
/
traces
/
batch
Create Traces Batch
curl --request POST \
  --url https://api.promptmetrics.dev/traces/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "traces": [
    {
      "trace_id": "<string>",
      "span_id": "<string>",
      "function_name": "<string>",
      "start_time": "2023-11-07T05:31:56Z",
      "end_time": "2023-11-07T05:31:56Z",
      "duration_ms": 1,
      "status": "SUCCESS",
      "parent_span_id": "<string>",
      "error": {},
      "input": {},
      "output": {},
      "metadata": {},
      "scores": [
        {}
      ],
      "tags": [
        "<string>"
      ],
      "group_id": "<string>",
      "group_type": "<string>"
    }
  ]
}
'
{
  "responseData": {
    "data": {}
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
traces
object[]
required
Required array length: 1 - 100 elements

Response

Batch processed

responseData
object