Create Traces
POSThttps://cloud.agenta.ai/api/observability/trace/
Create Traces
Request
- application/json
Body
required
trace Trace (string)required
spans
object[]
required
Responses
- 200
- 422
Successful Response
- application/json
- Schema
- Example (from schema)
Schema
message Message (string)required
data objectrequired
{
"message": "string",
"data": {}
}
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
detail
object[]
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L 'https://cloud.agenta.ai/api/observability/trace/' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>' \
-d '{
"trace": "string",
"spans": [
{
"id": "string",
"app_id": "string",
"variant_id": "string",
"variant_name": "string",
"inputs": {},
"internals": {},
"outputs": [
"string"
],
"config": {},
"environment": "string",
"tags": [
"string"
],
"token_consumption": 0,
"name": "string",
"parent_span_id": "string",
"attributes": {},
"spankind": "string",
"status": "string",
"user": "string",
"start_time": "2024-08-19T07:55:03.468Z",
"end_time": "2024-08-19T07:55:03.470Z",
"tokens": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0
},
"cost": 0
}
]
}'
ResponseClear