curl --request GET \
--url https://api.pictor.cloud/api/analytics/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pictor.cloud/api/analytics/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pictor.cloud/api/analytics/events', 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.pictor.cloud/api/analytics/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pictor.cloud/api/analytics/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pictor.cloud/api/analytics/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pictor.cloud/api/analytics/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"score": 123,
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ts_start": "2023-11-07T05:31:56Z",
"type": "<string>",
"alarm_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bbox": {
"[0]": 123,
"[1]": 123,
"[2]": 123,
"[3]": 123
},
"camera_name": "<string>",
"clip_path": "<string>",
"model_id": "<string>",
"payload": {},
"review_reason": "<string>",
"review_status": "unreviewed",
"reviewed_at": "2023-11-07T05:31:56Z",
"reviewed_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"snapshot_annotated_path": "<string>",
"snapshot_annotated_url": "<string>",
"snapshot_path": "<string>",
"snapshot_url": "<string>",
"track_id": "<string>",
"ts_end": "2023-11-07T05:31:56Z"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}List Events
Eventos de analytics visiveis ao principal — humano OU API token.
E a rota que motivou a onda de API tokens (W1 do plano de identidade de 2026-07-24): a integracao do cliente puxa os eventos do que e dele.
Duas mudancas em relacao a versao anterior, e as duas sao o mesmo movimento:
Depends(allow_api_token)— opt-in EXPLICITO. Sem esta linha a rota continuaria humano-only (default-deny). Nada no corpo sabe se o principal e pessoa ou robo.ctx.device_filterno lugar deWHERE tenant_id— o recorte (scope=client/video_wall) acontece na query, no banco. Um token descope=clientnao “recebe tudo e filtra na saida”: ele nunca chega a ler a linha alheia (falha FECHADA). Parascope=tenanta condicao gerada e exatamente a de antes (tenant_id = :tenant) — zero regressao no console.
W5 acrescenta dois eixos, e os dois existem para a mesma razão: um filtro
client-side sobre a janela do servidor mente sobre o total. O console
filtrava confiança depois de receber até 500 linhas — “12 eventos ≥90%”
significava “12 dentro dos 500 mais recentes”, não 12 no período.
min_score e review_status agora entram no WHERE, antes do
LIMIT.
curl --request GET \
--url https://api.pictor.cloud/api/analytics/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pictor.cloud/api/analytics/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pictor.cloud/api/analytics/events', 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.pictor.cloud/api/analytics/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pictor.cloud/api/analytics/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pictor.cloud/api/analytics/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pictor.cloud/api/analytics/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"score": 123,
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ts_start": "2023-11-07T05:31:56Z",
"type": "<string>",
"alarm_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bbox": {
"[0]": 123,
"[1]": 123,
"[2]": 123,
"[3]": 123
},
"camera_name": "<string>",
"clip_path": "<string>",
"model_id": "<string>",
"payload": {},
"review_reason": "<string>",
"review_status": "unreviewed",
"reviewed_at": "2023-11-07T05:31:56Z",
"reviewed_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"snapshot_annotated_path": "<string>",
"snapshot_annotated_url": "<string>",
"snapshot_path": "<string>",
"snapshot_url": "<string>",
"track_id": "<string>",
"ts_end": "2023-11-07T05:31:56Z"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Chave de API da conta, no formato pct_<prefixo>_<segredo>.
Query Parameters
Confiança mínima (0..1). Filtra NO BANCO, antes do limite.
0 <= x <= 1Recorte pelo veredito do operador.
^(unreviewed|true_positive|false_positive|reviewed)$1 <= x <= 500Response
Successful Response
Show child attributes
Show child attributes
unreviewed, true_positive, false_positive