Passer au contenu principal
POST
/
agents
/
spans
/
stats
Statistiques des spans Genai
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"
}
'
{
  "end": "2023-11-07T05:31:56Z",
  "start": "2023-11-07T05:31:56Z",
  "timezone": "<string>",
  "bucket_type": "time",
  "columns": [
    {
      "name": "<string>",
      "aggregation": "<string>",
      "metric": "<string>"
    }
  ],
  "granularity": 123,
  "rows": [
    {}
  ]
}

Autorisations

Authorization
string
header
requis

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Corps

application/json

Demande une agrégation prête pour les graphiques sur les spans d’agent GenAI.

project_id
string
requis
start
string<date-time>
requis
bucket_by
AgentSpanStatsTimeBucketSpec · object

Répartir les lignes de statistiques en buckets selon des intervalles de temps started_at.

end
string<date-time> | null
granularity
integer | null
Plage requise: x > 0
group_by
AgentGroupByRef · object[]
group_filters
AgentSpanGroupFilter · object[]
group_limit
integer
défaut:50
Plage requise: 1 <= x <= 1000
metrics
AgentSpanStatsMetricSpec · object[]
query
Query · object
timezone
string
défaut:UTC

Réponse

Réponse réussie

Réponse contenant des lignes de statistiques de span d'agent prêtes pour les graphiques.

end
string<date-time>
requis
start
string<date-time>
requis
timezone
string
requis
bucket_type
enum<string>
défaut:time
Options disponibles:
time,
number
columns
AgentSpanStatsColumn · object[]
granularity
integer | null
rows
Rows · object[]