curl --request POST \
--url https://api.example.com/agents/spans/stats \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>",
"start": "2023-11-07T05:31:56Z",
"bucket_by": {
"type": "time"
},
"end": "2023-11-07T05:31:56Z",
"granularity": 1,
"group_by": [
{
"key": "<string>",
"alias": "<string>",
"source": "field"
}
],
"group_filters": [
{
"measure": {
"alias": "<string>",
"filter": {
"$expr": {
"$and": [
{
"$literal": "<string>"
}
]
}
},
"value": {
"key": "<string>",
"source": "field"
}
},
"group_by": [
{
"key": "<string>",
"alias": "<string>",
"source": "field"
}
],
"max": 123,
"min": 123
}
],
"group_limit": 50,
"metrics": [
{
"alias": "<string>",
"value": {
"key": "<string>",
"source": "field"
},
"aggregations": [],
"percentiles": [
123
]
}
],
"query": {
"$expr": {
"$and": [
{
"$literal": "<string>"
}
]
}
},
"timezone": "UTC"
}
'