O relatório de ronda de um alarme
curl --request GET \
--url https://api.pictor.cloud/api/patrols/sheets/alarm/{alarm_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pictor.cloud/api/patrols/sheets/alarm/{alarm_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/patrols/sheets/alarm/{alarm_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/patrols/sheets/alarm/{alarm_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/patrols/sheets/alarm/{alarm_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/patrols/sheets/alarm/{alarm_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pictor.cloud/api/patrols/sheets/alarm/{alarm_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{
"cameras": [
{
"device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"situation": "with_frame",
"situation_label": "<string>",
"verdict_label": "<string>",
"channel_number": 123,
"dvr_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dvr_name": "<string>",
"error": "<string>",
"external_id": "<string>",
"finished_at": "2023-11-07T05:31:56Z",
"frames_analyzed": 0,
"name": "<string>",
"owner": "recorder",
"photo": {
"label": "<string>",
"score": 123,
"snapshot_url": "<string>",
"ts": "<string>"
},
"reason_code": "<string>",
"reason_label": "<string>",
"requested_at": "2023-11-07T05:31:56Z",
"verdict": "<string>"
}
],
"emitted_at": "2023-11-07T05:31:56Z",
"header": {
"cameras_not_sampled": 123,
"cameras_pending": 123,
"cameras_person": 123,
"cameras_total": 123,
"cameras_vehicle": 123,
"cameras_with_frame": 123,
"cameras_without_frame": 123,
"photos": 123,
"duration_seconds": 123,
"executor": "Pictor — verificação automática",
"finished_at": "2023-11-07T05:31:56Z",
"site": {
"name": "<string>",
"site_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"address": "<string>",
"external_ref": "<string>"
},
"started_at": "2023-11-07T05:31:56Z",
"trigger": {
"account": "<string>",
"armed": "<string>",
"code": "<string>",
"description": "<string>",
"provider": "<string>",
"registered_at": "<string>",
"task_ref": "<string>"
}
},
"items": [
{
"number": 123,
"question": "<string>",
"source": "<string>",
"state": "answered",
"answer": "<string>",
"comment": "<string>",
"details": [
"<string>"
],
"note": "<string>",
"reason": "<string>"
}
],
"source": {
"kind": "alarm",
"ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"checklist": "GPSTEC - RONDA VIRTUAL CFTV"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}patrols
O relatório de ronda de um alarme
O relatório de ronda de um evento: as verificações feitas sob aquele alarme, prontas para virar a folha que o cliente recebe.
Quando nenhuma verificação foi registrada para o alarme, a resposta é 404 —
não um relatório vazio. Relatório sem verificação seria um documento afirmando
que ninguém olhou, com a aparência de que alguém olhou.
As fotos vêm em endereços assinados e temporários. Quem guarda o relatório guarda os bytes, não o link — é a diferença entre um documento que abre em seis meses e um que abre hoje.
GET
/
api
/
patrols
/
sheets
/
alarm
/
{alarm_id}
O relatório de ronda de um alarme
curl --request GET \
--url https://api.pictor.cloud/api/patrols/sheets/alarm/{alarm_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.pictor.cloud/api/patrols/sheets/alarm/{alarm_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/patrols/sheets/alarm/{alarm_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/patrols/sheets/alarm/{alarm_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/patrols/sheets/alarm/{alarm_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/patrols/sheets/alarm/{alarm_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pictor.cloud/api/patrols/sheets/alarm/{alarm_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{
"cameras": [
{
"device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"situation": "with_frame",
"situation_label": "<string>",
"verdict_label": "<string>",
"channel_number": 123,
"dvr_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dvr_name": "<string>",
"error": "<string>",
"external_id": "<string>",
"finished_at": "2023-11-07T05:31:56Z",
"frames_analyzed": 0,
"name": "<string>",
"owner": "recorder",
"photo": {
"label": "<string>",
"score": 123,
"snapshot_url": "<string>",
"ts": "<string>"
},
"reason_code": "<string>",
"reason_label": "<string>",
"requested_at": "2023-11-07T05:31:56Z",
"verdict": "<string>"
}
],
"emitted_at": "2023-11-07T05:31:56Z",
"header": {
"cameras_not_sampled": 123,
"cameras_pending": 123,
"cameras_person": 123,
"cameras_total": 123,
"cameras_vehicle": 123,
"cameras_with_frame": 123,
"cameras_without_frame": 123,
"photos": 123,
"duration_seconds": 123,
"executor": "Pictor — verificação automática",
"finished_at": "2023-11-07T05:31:56Z",
"site": {
"name": "<string>",
"site_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"address": "<string>",
"external_ref": "<string>"
},
"started_at": "2023-11-07T05:31:56Z",
"trigger": {
"account": "<string>",
"armed": "<string>",
"code": "<string>",
"description": "<string>",
"provider": "<string>",
"registered_at": "<string>",
"task_ref": "<string>"
}
},
"items": [
{
"number": 123,
"question": "<string>",
"source": "<string>",
"state": "answered",
"answer": "<string>",
"comment": "<string>",
"details": [
"<string>"
],
"note": "<string>",
"reason": "<string>"
}
],
"source": {
"kind": "alarm",
"ref": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"checklist": "GPSTEC - RONDA VIRTUAL CFTV"
}{
"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
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes