フィードバック統計
curl --request POST \
--url https://api.example.com/feedback/stats \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"feedback_type": "<string>",
"granularity": 123,
"metrics": [
{
"json_path": "<string>",
"aggregations": [],
"percentiles": [
123
],
"value_type": "numeric"
}
],
"timezone": "UTC",
"trigger_ref": "<string>"
}
'import requests
url = "https://api.example.com/feedback/stats"
payload = {
"project_id": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"feedback_type": "<string>",
"granularity": 123,
"metrics": [
{
"json_path": "<string>",
"aggregations": [],
"percentiles": [123],
"value_type": "numeric"
}
],
"timezone": "UTC",
"trigger_ref": "<string>"
}
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: '<string>',
start: '2023-11-07T05:31:56Z',
end: '2023-11-07T05:31:56Z',
feedback_type: '<string>',
granularity: 123,
metrics: [
{
json_path: '<string>',
aggregations: [],
percentiles: [123],
value_type: 'numeric'
}
],
timezone: 'UTC',
trigger_ref: '<string>'
})
};
fetch('https://api.example.com/feedback/stats', 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/stats",
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' => '<string>',
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z',
'feedback_type' => '<string>',
'granularity' => 123,
'metrics' => [
[
'json_path' => '<string>',
'aggregations' => [
],
'percentiles' => [
123
],
'value_type' => 'numeric'
]
],
'timezone' => 'UTC',
'trigger_ref' => '<string>'
]),
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/stats"
payload := strings.NewReader("{\n \"project_id\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"feedback_type\": \"<string>\",\n \"granularity\": 123,\n \"metrics\": [\n {\n \"json_path\": \"<string>\",\n \"aggregations\": [],\n \"percentiles\": [\n 123\n ],\n \"value_type\": \"numeric\"\n }\n ],\n \"timezone\": \"UTC\",\n \"trigger_ref\": \"<string>\"\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/stats")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"feedback_type\": \"<string>\",\n \"granularity\": 123,\n \"metrics\": [\n {\n \"json_path\": \"<string>\",\n \"aggregations\": [],\n \"percentiles\": [\n 123\n ],\n \"value_type\": \"numeric\"\n }\n ],\n \"timezone\": \"UTC\",\n \"trigger_ref\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/feedback/stats")
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\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"feedback_type\": \"<string>\",\n \"granularity\": 123,\n \"metrics\": [\n {\n \"json_path\": \"<string>\",\n \"aggregations\": [],\n \"percentiles\": [\n 123\n ],\n \"value_type\": \"numeric\"\n }\n ],\n \"timezone\": \"UTC\",\n \"trigger_ref\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"end": "2023-11-07T05:31:56Z",
"granularity": 123,
"start": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"buckets": [
{}
],
"window_stats": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}時間バケットごとの集約済みフィードバック統計を返します。
POST
/
feedback
/
stats
フィードバック統計
curl --request POST \
--url https://api.example.com/feedback/stats \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"feedback_type": "<string>",
"granularity": 123,
"metrics": [
{
"json_path": "<string>",
"aggregations": [],
"percentiles": [
123
],
"value_type": "numeric"
}
],
"timezone": "UTC",
"trigger_ref": "<string>"
}
'import requests
url = "https://api.example.com/feedback/stats"
payload = {
"project_id": "<string>",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"feedback_type": "<string>",
"granularity": 123,
"metrics": [
{
"json_path": "<string>",
"aggregations": [],
"percentiles": [123],
"value_type": "numeric"
}
],
"timezone": "UTC",
"trigger_ref": "<string>"
}
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: '<string>',
start: '2023-11-07T05:31:56Z',
end: '2023-11-07T05:31:56Z',
feedback_type: '<string>',
granularity: 123,
metrics: [
{
json_path: '<string>',
aggregations: [],
percentiles: [123],
value_type: 'numeric'
}
],
timezone: 'UTC',
trigger_ref: '<string>'
})
};
fetch('https://api.example.com/feedback/stats', 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/stats",
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' => '<string>',
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z',
'feedback_type' => '<string>',
'granularity' => 123,
'metrics' => [
[
'json_path' => '<string>',
'aggregations' => [
],
'percentiles' => [
123
],
'value_type' => 'numeric'
]
],
'timezone' => 'UTC',
'trigger_ref' => '<string>'
]),
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/stats"
payload := strings.NewReader("{\n \"project_id\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"feedback_type\": \"<string>\",\n \"granularity\": 123,\n \"metrics\": [\n {\n \"json_path\": \"<string>\",\n \"aggregations\": [],\n \"percentiles\": [\n 123\n ],\n \"value_type\": \"numeric\"\n }\n ],\n \"timezone\": \"UTC\",\n \"trigger_ref\": \"<string>\"\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/stats")
.header("Content-Type", "application/json")
.body("{\n \"project_id\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"feedback_type\": \"<string>\",\n \"granularity\": 123,\n \"metrics\": [\n {\n \"json_path\": \"<string>\",\n \"aggregations\": [],\n \"percentiles\": [\n 123\n ],\n \"value_type\": \"numeric\"\n }\n ],\n \"timezone\": \"UTC\",\n \"trigger_ref\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/feedback/stats")
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\": \"<string>\",\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"feedback_type\": \"<string>\",\n \"granularity\": 123,\n \"metrics\": [\n {\n \"json_path\": \"<string>\",\n \"aggregations\": [],\n \"percentiles\": [\n 123\n ],\n \"value_type\": \"numeric\"\n }\n ],\n \"timezone\": \"UTC\",\n \"trigger_ref\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"end": "2023-11-07T05:31:56Z",
"granularity": 123,
"start": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"buckets": [
{}
],
"window_stats": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}ボディ
application/json
時間バケットごとの集約フィードバック統計のリクエスト。
開始時刻(UTC、ISO 8601、含む)。
終了時刻(UTC、ISO 8601、含まない)。省略した場合は現在時刻がデフォルトです。
feedback_type でフィルターします。
バケット サイズ(秒単位)。省略した場合は、時間範囲に基づいて自動選択されます。
payload_dump から集約するメトリクス。
Show child attributes
Show child attributes
バケットの位置合わせに使用する IANA タイムゾーン。
trigger_ref でフィルターします(all-versions では完全一致またはプレフィックス一致)。
レスポンス
正常なレスポンス
時系列フィードバック統計を含むResponse。
確定した終了時刻(要求したタイムゾーンに関係なく、常に UTC)。
使用されたバケット サイズ(秒単位)
確定した開始時刻(要求したタイムゾーンに関係なく、常に UTC)。
バケットの位置合わせに使用されたタイムゾーン
時間バケットごとの集約。各dict には、'timestamp'(ISO 文字列)、'count'(int)、およびリクエストされた各メトリクス+集約に対応する '{agg}_{slug}' キーが含まれます。
クエリ期間全体に対する集約。メトリクス slug(例: 'output_score')をキーにします。各値は agg 名から結果へのマッピングです。
Show child attributes
Show child attributes
⌘I