curl --request POST \
--url https://api.example.com/calls/usage \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>",
"call_ids": [
"<string>"
],
"include_costs": false,
"limit": 10000
}
'{
"call_usage": {}
}複数の root コールについて、その子孫をロールアップした集計使用量を計算します。
curl --request POST \
--url https://api.example.com/calls/usage \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>",
"call_ids": [
"<string>"
],
"include_costs": false,
"limit": 10000
}
'{
"call_usage": {}
}Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
複数のルート call に対して集約された使用量を計算するためのリクエストです。
このエンドポイントは、指定された各ルート call ごとの使用量メトリクスを返します。各ルートのメトリクスには、そのルート自身の使用量に加えて、すべての子孫の使用量の合計が含まれます。
注意: 集約のために、条件に一致するすべての call がメモリに読み込まれます。非常に大きな結果セット(>10k call)の場合は、ルート call ID をバッチ処理するか、アプリケーション層でより狭いフィルターを使用することを検討してください。
成功したレスポンス
ルート call ごとの集約された使用量メトリクスを含むレスポンス。
表示 子属性