Format des payloads
Ce document décrit les spécifications de nos payloads. Il comprend une section générale applicable à tous les devices et des sections spécifiques pour chaque application.
Global
Keepalive
Les messages Keepalive sont envoyés toutes les 10 minutes pour vérifier l'intégrité de la connexion.
GET https://{webhook_url}?source=VIZIOSENSE&id={device_id} HTTP/1.1
User-Agent: axios/1.3.5
Content-Type: application/json
Accept: application/json, text/plain, */*
Paramètres de la chaîne de requête envoyés:
- source: Source du message (toujours à
VIZIOSENSE). - id: L'ID de votre capteur.
Applications
Chaque payload d'application suit un schéma commun:
POST https://{webhook_url} HTTP/1.1
User-Agent: axios/1.3.5
Content-Type: application/json
Accept: application/json, text/plain, */*
{
"stream_id": "<your_device_id>",
"type": "<application_type>",
"timestamp": "<event_timestamp>",
"payload": "<application_specific_payload>"
}
Attributs du message:
- stream_id: L'ID de votre capteur.
- timestamp: L'horodatage au format UNIX (UTC) du message.
- type: Le code du type d'application, qui définit le format du payload pour chaque application :
VPM: VizioparkVYD: VizioyardVCZ: Viziocount par zoneVCB: Viziocount par barrièreVCW: Viziocrowd
- payload: La charge utile spécifique à l'application (comme spécifié ci-dessous).
Viziopark
Les payloads de Viziopark sont envoyées chaque fois qu'une place de parking surveillée change d'état. Le débit est limité à 1 payload toutes les 30 secondes afin d'éviter le spam :
[
{
"name": "P-0",
"is_active": true,
"deactivated": false,
"cls": "car",
"id": "c2b69525-974e-4d26-a80c-70817a628e08",
"event_ts": 1705682525
},
{
"name": "P-1",
"is_active": true,
"deactivated": false,
"cls": "truck",
"id": "20acf01e-9ed0-4211-8ccd-67c931bb41a5",
"event_ts": 1705682280
},
{
"name": "P-2",
"is_active": false,
"deactivated": false,
"cls": null,
"id": "be4efad5-cf22-40a2-bf75-7dcf16ef801f",
"event_ts": 1705682577
}
]
Attributs de la charge utile:
- id: L'ID de la place de parking.
- event_ts: L'horodatage au format UNIX (UTC) de l'événement.
- name: Le nom de la place de parking tel qu'il est défini dans la plateforme intégrateur.
- is_active: L'état actuel de la place surveillée (
truesi occupée). - deactivated: L'état actuel de désactivation de la place surveillée (
truesi désactivée). - cls: La classe du vehicule garé (exemple:
car,bus,truck) ounullsi la place surveillée est libre ou désactivée. C'est un attribut optionnel. - plate: Le texte associé à la plaque d'immatriculation du véhicule garé (exemple:
ER-891-WJ) ounullsi la place surveillée est libre ou désactivée. C'est un attribut optionnel.
Vizioyard
Les payloads de Vizioyard sont envoyées chaque fois qu'un emplacement surveillée change d'état. Le débit est limité à 1 payload toutes les 30 secondes afin d'éviter le spam :
[
{
"name": "Y-0",
"is_active": true,
"deactivated": false,
"cls": "truck",
"plate": "EC-562-WJ",
"id": "5e1f581d-cf32-42ac-81d4-b9ec3af91159",
"event_ts": 1770909921
},
{
"name": "Y-1",
"is_active": true,
"deactivated": false,
"cls": "truck",
"plate": "BZ-348-BY",
"id": "a17b7fdf-0dd8-4621-b89d-c3183f19c371",
"event_ts": 1770908400
},
{
"name": "Y-2",
"is_active": false,
"deactivated": false,
"cls": null,
"plate": null,
"id": "71d35b0e-5c46-4816-a2ef-417a73280cf3",
"event_ts": 1770907200
}
]
Attributs de la charge utile:
- id: L'ID de l'emplacement.
- event_ts: L'horodatage au format UNIX (UTC) de l'événement.
- name: Le nom de l'emplacement tel qu'il est défini dans la plateforme intégrateur.
- is_active: L'état actuel de l'emplacement surveillé (
truesi occupée). - deactivated: L'état actuel de désactivation de l'emplacement surveillé (
truesi désactivée). - cls: La classe du vehicule garé (exemple:
truck,trucktrailer,truckhead) ounullsi l'emplacement surveillé est libre ou désactivé. C'est un attribut optionnel. - plate: Le texte associé à la plaque d'immatriculation du véhicule garé (exemple:
ER-891-WJ) ounullsi l'emplacement surveillé est libre ou désactivé. C'est un attribut optionnel. - ocr: Identifiant unique associé au véhicule (exemple: identifiant d'un conteneur ou d'une remorque), ou
nullsi l'emplacement surveillé est libre ou désactivé. C'est un attribut optionnel.
Viziocount
Comptage par zone
Compte les objets dans une zone sur une période donnée (par défaut : 30 secondes). Les données utiles sont envoyées à la fin de chaque période de comptage, seulement si le compte est supérieur à 1.
[
{
"name": "Polygon_1",
"id": "ba3b60ab-659f-469f-bf5e-4b19124a055d",
"event_ts": 1705938983,
"objects": [
{
"count": 10,
"cls": "person"
}
]
}
]
Attributs du payload:
- id: L'ID de la zone de comptage.
- event_ts: L'horodatage au format UNIX (UTC) de l'événement.
- name: Le nom de la zone de comptage tel que défini dans la plateforme intégrateur.
- objets: Un tableau d'objets détectés.
- cls: La classe de l'objet détecté (par exemple,
person,car,bus,truck,motorcycle). - count: Le nombre d'objets comptés pendant la période définie.
- cls: La classe de l'objet détecté (par exemple,
comptage par franchissement de barrière
Compte les objets qui franchissent une barrière sur une période donnée (par défaut : 30 secondes). Les données utiles sont envoyées à la fin de chaque période de comptage, seulement si le compte est supérieur à 1.
[
{
"name": "Entry",
"start_ts": 1705938983,
"id": "ba3b60ab-659f-469f-bf5e-4b19124a055d",
"end_ts": 1705939013,
"objects": [
{
"count": 1,
"cls": "vehicle"
}
]
},
{
"name": "Exit",
"start_ts": 1705938983,
"id": "aead1317-44e8-4143-8d74-7740c30c5752",
"end_ts": 1705939013,
"objects": [
{
"count": 1,
"cls": "vehicle"
}
]
}
]
Attributs de la charge utile:
- id: L'ID de la barrière.
- start_ts: L'horodatage de début de période au format UNIX (UTC).
- end_ts: L'horodatage de fin de période au format UNIX (UTC).
- name: Le nom de la barrière tel qu'il est défini dans la plateforme intégrateur.
- objects: Un tableau d'objets détectés.
- cls: La classe de l'objet détecté (par exemple,
person,vehicle). - count: Le nombre d'objets comptés pendant la période définie.
- cls: La classe de l'objet détecté (par exemple,
Viziocrowd
Viziocrowd fournit des mesures de foule pour différentes zones de comptage. Il comprend le nombre minimum, maximum et moyen de personnes présentes dans chaque zone sur une période donnée (par défaut : 10 minutes).
[
{
"name": "Polygon_1",
"start_ts": 1705685956,
"id": "9a6f509b-14dc-4338-8fda-dd14e0baadaf",
"end_ts": 1705686557,
"objects": [
{
"cls": "person",
"min": 0,
"avg": 6,
"max": 49
}
]
},
{
"name": "Polygon_2",
"start_ts": 1705685956,
"id": "438ba09c-8f49-409d-9e5a-50070ce66f30",
"end_ts": 1705686557,
"objects": [
{
"cls": "person",
"min": 0,
"avg": 0,
"max": 7
}
]
}
]
Attributs de la charge utile:
- id: L'ID de la zone de détection.
- start_ts: L'horodatage de début de période au format UNIX (UTC).
- end_ts: L'horodatage de fin de période au format UNIX (UTC).
- name: Le nom de la zone de détection tel qu'il est défini dans la plateforme intégrateur.
- objects: Un tableau d'objets détectés.
- cls: La classe de l'objet détecté (
person). - min: Le nombre minimum d'objets détectés au cours de la période d'agrégation.
- avg: Le nombre moyen d'objets détectés au cours de la période d'agrégation.
- max: Le nombre maximum d'objets détectés au cours de la période d'agrégation.
- cls: La classe de l'objet détecté (
Payload Details
- Viewer
- JSON Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Application Payload",
"description": "Viziosense application payload",
"type": "object",
"properties": {
"version": {
"title": "Application version",
"type": "integer",
"description": "The version of the application. if none is provided, assume it is version 0."
},
"stream_id": {
"title": "Device ID",
"type": "string",
"format": "uuid",
"description": "The unique identifier for the device"
},
"type": {
"title": "Application type code",
"type": "string",
"oneOf": [
{
"const": "VPM",
"description": "VizioPark application type code. It will define the content type of payload field"
},
{
"const": "VYD",
"description": "VizioYard application type code. It will define the content type of payload field"
},
{
"const": "VCZ",
"description": "VizioCount Zone application type code. It will define the content type of payload field"
},
{
"const": "VCB",
"description": "VizioCount Barrier application type code. It will define the content type of payload field"
},
{
"const": "VCW",
"description": "VizioCrowd application type code. It will define the content type of payload field"
}
],
"description": "The type of the application."
},
"timestamp": {
"title": "Payload sending timestamp",
"description": "The timestamp in UNIX time format (UTC) of the message.",
"type": "string",
"format": "timestamp",
"pattern": "^[1-9][0-9]*$"
},
"payload": {
"title": "application-specific payload",
"description": "The application-specific payload as defined by its type code",
"oneOf": [
{
"$ref": "#/$defs/VPM"
},
{
"$ref": "#/$defs/VYD"
},
{
"$ref": "#/$defs/VCZ"
},
{
"$ref": "#/$defs/VCB"
},
{
"$ref": "#/$defs/VCW"
}
]
}
},
"required": [
"stream_id",
"type",
"timestamp",
"payload"
],
"$defs": {
"VPM": {
"title": "VPM",
"description": "Viziopark payload content",
"type": "array",
"minContains": 1,
"items": {
"title": "Spot",
"description": "Monitored spot status",
"type": "object",
"properties": {
"name": {
"title": "spot name",
"description": "The name of the parking spot as defined in the integrator platform",
"type": "string"
},
"is_active": {
"title": "occupancy indicator",
"description": "The current state of the monitored spot (true if occupied)",
"type": "boolean"
},
"deactivated": {
"title": "deactivation indicator",
"description": "The current deactivation state of the monitored spot (true if deactivated)",
"type": "boolean"
},
"id": {
"title": "spot id",
"description": "The ID of the parking spot",
"type": "string",
"format": "uuid"
},
"plate": {
"title": "license plate text",
"description": "The license plate text of the parked vehicle (e.g., `ER-891-WJ`) or `null` if the spot is available or deactivated",
"type": [
"string",
"null"
]
},
"cls": {
"title": "object class",
"description": "The class of the parked vehicle (e.g., `car`, `bus`, `truck`) or `null` if the spot is available or deactivated",
"type": [
"string",
"null"
],
"enum": [
"car",
"bus",
"truck"
]
},
"event_ts": {
"title": "event timestamp",
"description": "The UNIX time format (UTC) of the spot status change",
"type": "integer",
"format": "timestamp"
}
},
"required": [
"name",
"id",
"event_ts",
"is_active",
"deactivated"
]
}
},
"VYD": {
"title": "VYD",
"description": "Vizioyard payload content",
"type": "array",
"minContains": 1,
"items": {
"title": "Yard slot",
"description": "Monitored yard slot status",
"type": "object",
"properties": {
"name": {
"title": "yard slot name",
"description": "The name of the yard slot as defined in the integrator platform",
"type": "string"
},
"is_active": {
"title": "occupancy indicator",
"description": "The current state of the monitored yard slot (true if occupied)",
"type": "boolean"
},
"deactivated": {
"title": "deactivation indicator",
"description": "The current deactivation state of the monitored yard slot (true if deactivated)",
"type": "boolean"
},
"id": {
"title": "yard slot id",
"description": "The ID of the yard slot",
"type": "string",
"format": "uuid"
},
"cls": {
"title": "object class",
"description": "The class of the parked vehicle (e.g., `truck`, `trucktrailer`, `truckhead`) or `null` if the yard slot is available or deactivated",
"type": [
"string",
"null"
],
"enum": [
"truck",
"trucktrailer",
"truckhead"
]
},
"plate": {
"title": "license plate text",
"description": "The license plate text of the parked vehicle (e.g., `ER-891-WJ`) or `null` if the yard slot is available or deactivated",
"type": [
"string",
"null"
]
},
"ocr": {
"title": "vehicle marking text",
"description": "A specific text detected on the vehicle (e.g., container or trailer ID), or `null` if the yard slot is available or deactivated",
"type": [
"string",
"null"
]
},
"event_ts": {
"title": "event timestamp",
"description": "The UNIX time format (UTC) of the yard slot status change",
"type": "integer",
"format": "timestamp"
}
},
"required": [
"name",
"id",
"event_ts",
"is_active",
"deactivated"
]
}
},
"VCZ": {
"title": "VCZ",
"description": "Viziocount zone payload content",
"type": "array",
"minContains": 1,
"items": {
"title": "Counting Zone",
"description": "Counting zone status",
"type": "object",
"properties": {
"id": {
"title": "counting zone identifier",
"description": "the counting zone uuid",
"type": "string",
"format": "uuid"
},
"name": {
"title": "Counting zone name",
"description": "The name of the counting zone as defined in the integrator platform",
"type": "string"
},
"event_ts": {
"title": "event timestamp",
"description": "The UNIX time format (UTC) of the count number change",
"type": "integer",
"format": "timestamp"
},
"objects": {
"title": "object counting list",
"description": "an array containing the count of each class of object",
"type": "array",
"minContains": 1,
"items": {
"title": "object count",
"description": "the count information object",
"type": "object",
"properties": {
"count": {
"title": "count number",
"description": "the count number",
"type": "integer",
"minimum": 0
},
"cls": {
"title": "object class",
"description": "the object class",
"type": "string",
"enum": [
"person",
"car",
"bicycle",
"motorcycle",
"bus",
"truck",
"vehicle"
]
}
},
"required": [
"count",
"cls"
]
}
}
},
"required": [
"name",
"event_ts",
"id",
"objects"
]
}
},
"VCB": {
"title": "VCB",
"description": "Viziocount barrier payload content",
"type": "array",
"minContains": 1,
"items": {
"title": "Counting Barrier",
"description": "Counting Barrier status",
"type": "object",
"properties": {
"name": {
"title": "Counting barrier name",
"description": "The name of the counting barrier as defined in the integrator platform",
"type": "string"
},
"id": {
"title": "counting barrier identifier",
"description": "the counting barrier uuid",
"type": "string",
"format": "uuid"
},
"start_ts": {
"title": "start timestamp",
"description": "The start timestamp in UNIX time format (UTC) of the counting period where at least 1 object has crossed the barrier",
"type": "integer",
"format": "timestamp"
},
"end_ts": {
"title": "end timestamp",
"description": "The end timestamp in UNIX time format (UTC) of the counting period where at least 1 object has crossed the barrier",
"type": "integer",
"format": "timestamp"
},
"objects": {
"title": "object counting list",
"description": "an array containing the count of each class of object",
"type": "array",
"minContains": 1,
"items": {
"title": "object count",
"description": "the count information object",
"type": "object",
"properties": {
"count": {
"title": "count number",
"description": "the count number",
"type": "integer",
"minimum": 1
},
"cls": {
"title": "object class",
"description": "the object class",
"type": "string",
"enum": [
"person",
"car",
"bicycle",
"motorcycle",
"bus",
"truck",
"vehicle"
]
}
},
"required": [
"count",
"cls"
]
}
}
},
"required": [
"name",
"id",
"start_ts",
"end_ts",
"objects"
]
}
},
"VCW": {
"title": "VCW",
"description": "Viziocrowd payload content",
"type": "array",
"minContains": 1,
"items": {
"title": "Crowd counting zone",
"description": "Crowd counting zone status",
"type": "object",
"properties": {
"id": {
"title": "Crowd counting zone identifier",
"description": "the crowd counting zone uuid",
"type": "string",
"format": "uuid"
},
"name": {
"title": "Crowd counting zone name",
"description": "The name of the crowd counting zone as defined in the integrator platform",
"type": "string"
},
"start_ts": {
"title": "start timestamp",
"description": "The start timestamp in UNIX time format (UTC) of the crowd counting period.",
"type": "integer",
"format": "timestamp"
},
"end_ts": {
"title": "end timestamp",
"description": "The end timestamp in UNIX time format (UTC) of the crowd counting period.",
"type": "integer",
"format": "timestamp"
},
"objects": {
"title": "object counting list",
"description": "an array containing the count of each class of object",
"type": "array",
"minContains": 1,
"items": {
"title": "object count",
"description": "the count information object",
"type": "object",
"properties": {
"min": {
"title": "min count",
"description": "The minimum number of objects detected over the aggregation period.",
"type": "integer",
"minimum": 0
},
"max": {
"title": "max count",
"description": "The maximum number of objects detected over the aggregation period.",
"type": "integer",
"minimum": 0
},
"avg": {
"title": "average count",
"description": "The average number of objects detected over the aggregation period.",
"type": "integer",
"minimum": 0
},
"cls": {
"type": "string",
"enum": [
"person"
]
}
},
"required": [
"min",
"max",
"avg",
"cls"
]
}
}
},
"required": [
"name",
"id",
"start_ts",
"end_ts",
"objects"
]
}
}
}
}