curl --request GET \
--url https://api.pictor.cloud/api/recording-segments/{recording_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pictor.cloud/api/recording-segments/{recording_id}"
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/recording-segments/{recording_id}', 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/recording-segments/{recording_id}",
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/recording-segments/{recording_id}"
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/recording-segments/{recording_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pictor.cloud/api/recording-segments/{recording_id}")
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{
"camera_id": "<string>",
"partial": true,
"recording_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"storage_backend": "<string>",
"storage_bucket": "<string>",
"storage_key": "<string>",
"tenant_id": "<string>",
"alarm": {
"alarm_id": "<string>",
"account": "<string>",
"event_code": "<string>",
"event_group": "<string>",
"event_label": "<string>",
"event_ref": "<string>",
"occurred_at": "<string>",
"provider": "<string>",
"received_at": "2023-11-07T05:31:56Z",
"site_ref": "<string>",
"triage_state": "<string>"
},
"appliance_id": "<string>",
"camera_channel": 123,
"camera_manufacturer": "<string>",
"camera_model": "<string>",
"camera_name": "<string>",
"camera_ref": "<string>",
"client_name": "<string>",
"duration_s": 123,
"ended_at": "2023-11-07T05:31:56Z",
"file": "<string>",
"playback_url": "<string>",
"reason": "<string>",
"related": [],
"session": "<string>",
"site_address": "<string>",
"site_contact_name": "<string>",
"site_contact_phone": "<string>",
"site_external_ref": "<string>",
"site_id": "<string>",
"site_name": "<string>",
"size_bytes": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Uma gravação, pronta para tocar
Uma gravação, com o endereço de playback recém-assinado — e as câmeras irmãs.
Peça esta rota (em vez de reusar o playback_url da lista) quando o operador
for realmente abrir o vídeo: a assinatura sai nova, com prazo cheio.
related traz as OUTRAS gravações do mesmo alarme. Um evento num local com oito
câmeras produz oito gravações; sem essa lista quem abre uma não tem como saber
que as outras sete existem — e é justamente varrer os ângulos do mesmo instante
que resolve o atendimento.
curl --request GET \
--url https://api.pictor.cloud/api/recording-segments/{recording_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pictor.cloud/api/recording-segments/{recording_id}"
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/recording-segments/{recording_id}', 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/recording-segments/{recording_id}",
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/recording-segments/{recording_id}"
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/recording-segments/{recording_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pictor.cloud/api/recording-segments/{recording_id}")
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{
"camera_id": "<string>",
"partial": true,
"recording_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"storage_backend": "<string>",
"storage_bucket": "<string>",
"storage_key": "<string>",
"tenant_id": "<string>",
"alarm": {
"alarm_id": "<string>",
"account": "<string>",
"event_code": "<string>",
"event_group": "<string>",
"event_label": "<string>",
"event_ref": "<string>",
"occurred_at": "<string>",
"provider": "<string>",
"received_at": "2023-11-07T05:31:56Z",
"site_ref": "<string>",
"triage_state": "<string>"
},
"appliance_id": "<string>",
"camera_channel": 123,
"camera_manufacturer": "<string>",
"camera_model": "<string>",
"camera_name": "<string>",
"camera_ref": "<string>",
"client_name": "<string>",
"duration_s": 123,
"ended_at": "2023-11-07T05:31:56Z",
"file": "<string>",
"playback_url": "<string>",
"reason": "<string>",
"related": [],
"session": "<string>",
"site_address": "<string>",
"site_contact_name": "<string>",
"site_contact_phone": "<string>",
"site_external_ref": "<string>",
"site_id": "<string>",
"site_name": "<string>",
"size_bytes": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Chave de API da conta, no formato pct_<prefixo>_<segredo>.
Path Parameters
Response
Successful Response
O alarme que mandou gravar — o "porquê" da gravação.
Só existe quando a gravação nasceu de um evento (pictor.alarm_event_log
casado pelo alarm_id determinístico). Gravação manual/agendada não tem
alarme e o campo vem None — não se inventa evento para preencher tela.
Os campos vêm de uma LISTA BRANCA de caminhos do payload do provedor. O
dossiê cru carrega senha/contra_senha/coacao do local; nada disso
pode vazar para uma tela de gravação, e a forma de garantir isso é nunca
projetar o payload inteiro — só estes caminhos.
Show child attributes
Show child attributes
URL do vídeo pelo proxy do gateway (/api/storage/…), com TTL de 1h. NUNCA a URL crua do object storage. null significa SEM VÍDEO TOCÁVEL — quem consome deve falhar honesto e não cair no ao vivo.
Show child attributes
Show child attributes