curl --request POST \
--url https://api.example.com/feedback/aggregate \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "entity/project",
"after_ms": 1,
"before_ms": 1,
"time_bucket_seconds": 1,
"feedback_types": [
"<string>"
],
"tags": [
"<string>"
],
"rating_min": 0.5,
"rating_max": 0.5,
"monitor_ids": [
"<string>"
],
"scorer_ids": [
"<string>"
],
"span_agent_names": [
"<string>"
],
"span_types": [],
"group_by": []
}
'import requests
url = "https://api.example.com/feedback/aggregate"
payload = {
"project_id": "entity/project",
"after_ms": 1,
"before_ms": 1,
"time_bucket_seconds": 1,
"feedback_types": ["<string>"],
"tags": ["<string>"],
"rating_min": 0.5,
"rating_max": 0.5,
"monitor_ids": ["<string>"],
"scorer_ids": ["<string>"],
"span_agent_names": ["<string>"],
"span_types": [],
"group_by": []
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
project_id: 'entity/project',
after_ms: 1,
before_ms: 1,
time_bucket_seconds: 1,
feedback_types: ['<string>'],
tags: ['<string>'],
rating_min: 0.5,
rating_max: 0.5,
monitor_ids: ['<string>'],
scorer_ids: ['<string>'],
span_agent_names: ['<string>'],
span_types: [],
group_by: []
})
};
fetch('https://api.example.com/feedback/aggregate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/feedback/aggregate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'project_id' => 'entity/project',
'after_ms' => 1,
'before_ms' => 1,
'time_bucket_seconds' => 1,
'feedback_types' => [
'<string>'
],
'tags' => [
'<string>'
],
'rating_min' => 0.5,
'rating_max' => 0.5,
'monitor_ids' => [
'<string>'
],
'scorer_ids' => [
'<string>'
],
'span_agent_names' => [
'<string>'
],
'span_types' => [
],
'group_by' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/feedback/aggregate"
payload := strings.NewReader("{\n \"project_id\": \"entity/project\",\n \"after_ms\": 1,\n \"before_ms\": 1,\n \"time_bucket_seconds\": 1,\n \"feedback_types\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"rating_min\": 0.5,\n \"rating_max\": 0.5,\n \"monitor_ids\": [\n \"<string>\"\n ],\n \"scorer_ids\": [\n \"<string>\"\n ],\n \"span_agent_names\": [\n \"<string>\"\n ],\n \"span_types\": [],\n \"group_by\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/feedback/aggregate")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"entity/project\",\n \"after_ms\": 1,\n \"before_ms\": 1,\n \"time_bucket_seconds\": 1,\n \"feedback_types\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"rating_min\": 0.5,\n \"rating_max\": 0.5,\n \"monitor_ids\": [\n \"<string>\"\n ],\n \"scorer_ids\": [\n \"<string>\"\n ],\n \"span_agent_names\": [\n \"<string>\"\n ],\n \"span_types\": [],\n \"group_by\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/feedback/aggregate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"project_id\": \"entity/project\",\n \"after_ms\": 1,\n \"before_ms\": 1,\n \"time_bucket_seconds\": 1,\n \"feedback_types\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"rating_min\": 0.5,\n \"rating_max\": 0.5,\n \"monitor_ids\": [\n \"<string>\"\n ],\n \"scorer_ids\": [\n \"<string>\"\n ],\n \"span_agent_names\": [\n \"<string>\"\n ],\n \"span_types\": [],\n \"group_by\": []\n}"
response = http.request(request)
puts response.read_body{
"after_ms": 123,
"before_ms": 123,
"time_bucket_seconds": 123,
"buckets": [
{
"total_count": 123,
"scored_count": 123,
"time_bucket_start_ms": 123,
"group": {},
"tag_counts": {},
"rating_counts": {},
"rating_sums": {}
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}피드백 집계
Aggregate typed scorer feedback (tags, ratings) over time buckets.
curl --request POST \
--url https://api.example.com/feedback/aggregate \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "entity/project",
"after_ms": 1,
"before_ms": 1,
"time_bucket_seconds": 1,
"feedback_types": [
"<string>"
],
"tags": [
"<string>"
],
"rating_min": 0.5,
"rating_max": 0.5,
"monitor_ids": [
"<string>"
],
"scorer_ids": [
"<string>"
],
"span_agent_names": [
"<string>"
],
"span_types": [],
"group_by": []
}
'import requests
url = "https://api.example.com/feedback/aggregate"
payload = {
"project_id": "entity/project",
"after_ms": 1,
"before_ms": 1,
"time_bucket_seconds": 1,
"feedback_types": ["<string>"],
"tags": ["<string>"],
"rating_min": 0.5,
"rating_max": 0.5,
"monitor_ids": ["<string>"],
"scorer_ids": ["<string>"],
"span_agent_names": ["<string>"],
"span_types": [],
"group_by": []
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
project_id: 'entity/project',
after_ms: 1,
before_ms: 1,
time_bucket_seconds: 1,
feedback_types: ['<string>'],
tags: ['<string>'],
rating_min: 0.5,
rating_max: 0.5,
monitor_ids: ['<string>'],
scorer_ids: ['<string>'],
span_agent_names: ['<string>'],
span_types: [],
group_by: []
})
};
fetch('https://api.example.com/feedback/aggregate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/feedback/aggregate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'project_id' => 'entity/project',
'after_ms' => 1,
'before_ms' => 1,
'time_bucket_seconds' => 1,
'feedback_types' => [
'<string>'
],
'tags' => [
'<string>'
],
'rating_min' => 0.5,
'rating_max' => 0.5,
'monitor_ids' => [
'<string>'
],
'scorer_ids' => [
'<string>'
],
'span_agent_names' => [
'<string>'
],
'span_types' => [
],
'group_by' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/feedback/aggregate"
payload := strings.NewReader("{\n \"project_id\": \"entity/project\",\n \"after_ms\": 1,\n \"before_ms\": 1,\n \"time_bucket_seconds\": 1,\n \"feedback_types\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"rating_min\": 0.5,\n \"rating_max\": 0.5,\n \"monitor_ids\": [\n \"<string>\"\n ],\n \"scorer_ids\": [\n \"<string>\"\n ],\n \"span_agent_names\": [\n \"<string>\"\n ],\n \"span_types\": [],\n \"group_by\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/feedback/aggregate")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"entity/project\",\n \"after_ms\": 1,\n \"before_ms\": 1,\n \"time_bucket_seconds\": 1,\n \"feedback_types\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"rating_min\": 0.5,\n \"rating_max\": 0.5,\n \"monitor_ids\": [\n \"<string>\"\n ],\n \"scorer_ids\": [\n \"<string>\"\n ],\n \"span_agent_names\": [\n \"<string>\"\n ],\n \"span_types\": [],\n \"group_by\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/feedback/aggregate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"project_id\": \"entity/project\",\n \"after_ms\": 1,\n \"before_ms\": 1,\n \"time_bucket_seconds\": 1,\n \"feedback_types\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"rating_min\": 0.5,\n \"rating_max\": 0.5,\n \"monitor_ids\": [\n \"<string>\"\n ],\n \"scorer_ids\": [\n \"<string>\"\n ],\n \"span_agent_names\": [\n \"<string>\"\n ],\n \"span_types\": [],\n \"group_by\": []\n}"
response = http.request(request)
puts response.read_body{
"after_ms": 123,
"before_ms": 123,
"time_bucket_seconds": 123,
"buckets": [
{
"total_count": 123,
"scored_count": 123,
"time_bucket_start_ms": 123,
"group": {},
"tag_counts": {},
"rating_counts": {},
"rating_sums": {}
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}본문
Query for aggregate scores by time bucket and dimension.
"entity/project"
Inclusive lower bound on created_at (milliseconds since epoch).
x >= 0Exclusive upper bound on created_at (milliseconds since epoch).
x >= 0Time bucket size in seconds, e.g. 3600 for 1h buckets
x > 0Filter on feedback_type by prefix
Filter to feedback that includes any of the given tags
Include only rows with a rating >= this value
0 <= x <= 1Include only rows with a rating <= this value
0 <= x <= 1Filter to these monitor ids (exact match; suffix with '*' for prefix match).
Filter to these scorer ids (exact match; suffix with '*' for prefix match).
Filter to feedback whose span_agent_name matches any of these (exact).
Filter by span type (turn vs conversation).
agent_turn, agent_conversation Allowed: ['scorer_id', 'span_agent_name', 'span_agent_version', 'span_status_code'].
scorer_id, span_agent_name, span_agent_version, span_status_code 응답
Successful Response
Sparse time-series of aggregated scorer feedback (empty buckets omitted).
이 페이지가 도움이 되었나요?