Data collected from the VidiGates instances and collated is available through an HTTP API using JSON payload.
Get instance data
API point (GET):
A sample response:
Detailed meaning of the response fields:
current (int): The current occupancy
threshold (int): The current occupancy threshold
reset_time: (object): The time of day when counters are reset to 0. This may be null for no reset.
status (str): “ok” if the occupancy is below the threshold, “ko” if not
instances (list): List of instances. Elements are objects with the following fields:
gate_type (str): Gate type for this instance. May be “in”, “out” or “both”. The type applies to all gates defined for this instance.
number (int): The instance’s numeric identifier.
host (str): The IPv4 address of the computer on which the instance runs.
name (str): The instance’s name, as set in its Control Center
boxid (int): The instance’s BoxID
gates (list): A list of the gates defined for this instance, with their numeric ID and in/out counts.
status (str): The current status; may be one of
not-capturing: Capture doesn’t work. Check the camera
disabled: Instance is disabled; contact Quividi support
restricted: Instance is restricted; contact Quividi support
no-gates: Instance does not have any gate configured. Add a gate.
unstable: The background is not stable yet. This happens after VidiGates startup and may last a minute or two.
ok: Everything’s fine.
Set instance type
API point (POST):
The caller should send a JSON payload with the following keys:
boxid (int): The BoxID of the instance to configure
number (int): The number of said instance
gate_type (str): The gate type (“in”, “out” or “both”)
The response is an empty JSON object.
Set occupancy and/or threshold
API point (POST):
The caller should send a JSON payload with the following keys:
occupancy (int): Value to set the current occupancy to
threshold (int): Occupancy threshold to set
reset_time (object): Counters reset time of day, in the form {hour: <number>, minute: <number>}. May be null if no reset has to happen.
All keys are optional, and the associated value will not be changed it it’s omitted.
The response has the followin keys:
current: Current occupancy.
threshold: Current threshold.
reset_time: Current reset time.