Axis P8815-2 API

AXIS P8815-2 3D People Counter
API specification
List download statistics
Returns statistics stored in the camera in JSON or plain text comma separated format (CSV)
Format:
Method:
GET
Request (CSV)
http://<servername>/a3dpc/api/export/csv?start=<date>&end=<date>&resolution=<resolut ion>
Request (JSON)
http://<servername>/a3dpc/api/export/json?start=<date>&end=<date>&resolution=<resolu tion>
Request parameter descriptions
Field
Parameters
date
YYYYMMDD (start-of-day)
yesterday (start-of-day)
today (start-of-day)
now (current time)
resolution
minute
hour
day
Return
on success: 200 OK
Returns statistics stored in the camera in JSON or plain text comma separated format (CSV). The first line of the CSV file contains a description of each element, and the following lines contain the corresponding data for the chosen time interval and resolution: start, end, in,
out
on error: 400 Bad Request
"error": {
"message": "Validation failed",
"errors": [
{
"field": <field>
"reason": "<reason>"
}
]
}
}
Examples
Retrieve statistics in JSON format from the previous day in hourly intervals
http://<servername>/a3dpc/api/export/json?start=yesterday&end=today&resolution=hour
Sample output
{
"data": [
{
"start": "2020-06-23 00:00:00",
"end": "2020-06-23 01:00:00",
"in": 0,
"out": 0
}
]
}
Retrieve statistics in CSV format for the current day in minute intervals
http://<servername>/a3dpc/api/export/csv?start=today&end=now&resolution=minute
Sample output (first 10 lines)
start,end,in,out
2020-09-23 00:00:00,2020-09-23 00:01:00,0,0
2020-09-23 00:01:00,2020-09-23 00:02:00,0,0
2020-09-23 00:02:00,2020-09-23 00:03:00,0,0
2020-09-23 00:03:00,2020-09-23 00:04:00,0,0
2020-09-23 00:04:00,2020-09-23 00:05:00,0,0
2020-09-23 00:05:00,2020-09-23 00:06:00,0,0
2020-09-23 00:06:00,2020-09-23 00:07:00,0,0
2020-09-23 00:07:00,2020-09-23 00:08:00,0,0
2020-09-23 00:08:00,2020-09-23 00:09:00,0,0
Retrieve statistics in CSV format for specific date range between 2020-08-01 until today in daily intervals
http://<servername>/a3dpc/api/export/csv?start=20200801&end=today&resolution=day
Sample output (first 10 lines)
start,end,in,out
2020-08-01 00:00:00,2020-08-02 00:00:00,0,0
2020-08-02 00:00:00,2020-08-03 00:00:00,0,0
2020-08-03 00:00:00,2020-08-04 00:00:00,0,0
2020-08-04 00:00:00,2020-08-05 00:00:00,0,0
2020-08-05 00:00:00,2020-08-06 00:00:00,0,0
2020-08-06 00:00:00,2020-08-07 00:00:00,0,0
2020-08-07 00:00:00,2020-08-08 00:00:00,0,0
2020-08-08 00:00:00,2020-08-09 00:00:00,0,0
2020-08-09 00:00:00,2020-08-10 00:00:00,0,0
Request real-time data
Returns real-time estimated occupancy and counting statistics for primary camera and connected secondary cameras in JSON.
Note: Occupancy mode needs to be configured and enabled within the AXIS 3D People Counter application to use this functionality.
Format:
JSON
Method:
GET
Request
http://<servername>/a3dpc/api/occupancy
Sample output
{
"occupancy":15,
"serial":"00:40:8c:18:82:27",
"timestamp":"2020-12-03T16:28:05+01:00",
"total_in":100,
"total_out":85
}
Generic data push
Pushes statistics stored in the camera in JSON format to HTTPS endpoints.
Note: The generic data push functionality is configured within the AXIS 3D People Counter application - the endpoint URL, send time interval, and API token (optional) are all specified from the “Reporting” section.
Format:
JSON
Method:
POST
Server Requirements:
The remote destination must be configured with HTTPS using a valid SSL/TLS certificate which must also be installed on the Axis network camera in order to ensure proper handshake and encryption of the data.
Send Time Intervals:
1 minute, 5 minutes, 15 minutes
API Token:
An API token can be specified for the push, and is added to a request via the HTTP header Authorization: Bearer <token>
Sample output:
{
"apiName":"Axis Retail Data",
"apiVersion":"0.3",
"utcSent":"2020-12-08T12:20:12Z",
"localSent":"2020-12-08T13:20:12",
"data":{
"utcFrom":"2020-12-08T12:19:00Z",
"utcTo":"2020-12-08T12:20:00Z",
"localFrom":"2020-12-08T13:19:00",
"localTo":"2020-12-08T13:20:00",
"measurements":[
{
"kind":"people-counts",
"utcFrom":"2020-12-08T12:19:00Z",
"utcTo":"2020-12-08T12:20:00Z",
"localFrom":"2020-12-08T13:19:00",
"localTo":"2020-12-08T13:20:00",
"items":[
{
"direction":"in",
"count":0,
"adults":0
},
{
"direction":"out",
"count":0,
"adults":0
}
]
}
]
},
"sensor":{
"application":"AXIS 3D People Counter",
"applicationVersion":"10.3 ",
"timeZone":"Europe/Stockholm",
"name":"axis-accc8ef3d92e",
"serial":"accc8ef3d92e",
"ipAddress":"172.25.70.165"
}
}
Field
Description
apiName
Name of the API being utilized
apiVersion
Version number of the API being utilized
utcSent
UTC date and time when the data was delivered
localSent
Local date and time when the data was delivered
data
Array containing counting data information
data[ ].utcFrom
UTC start date and time of the counting data
data[ ].utcTo
UTC end date and time of the counting data
data[ ].localFrom
Local start date and time of the counting data
data[ ].localTo
Local end date and time of the counting data
data[ ].measurements
Array containing counting data measurements
data[ ].measurements[ ].kind
Type of data provided by the Axis network camera
data[ ].measurements[ ].utcFrom
UTC start date and time of the counting data for specific time interval
data[ ].measurements[ ].utcTo
UTC end date and time of the counting data for specific time interval
data[ ].measurements[ ].localFrom
Local start date and time of the counting data for specific time interval
data[ ].measurements[ ].localTo
Local end date and time of the counting data for specific time interval
data[ ].measurements[ ].items
Array containing the counting data for specific time interval
data[ ].measurements[ ].items[ ].direction
Direction of the data recorded during specific time interval – in or out
data[ ].measurements[ ].items[ ].count
Number of counts recorded during specific time interval
data[ ].measurements[ ].items[ ].adults
Number of adult counts recorded during specific time interval
sensor
Array containing sensor specific information
sensor[ ].application
Type of people counter application
sensor[ ].timeZone
Selected time zone for the Axis network camera
sensor[ ].name
Device name provided from the application
sensor[ ].serial
Serial number of the Axis network camera
sensor[ ].ipAddress
IP address of the Axis network camera
Generic data push – Protocol version
At the time of writing, the latest protocol version is 0.3. If the data being sent does not correspond to the description stated in this document, it is necessary to manually modify the version of the protocol.
Format:
JSON
Method:
PATCH
http://<servername>/a3dpc/api/settings
JSON input parameters
{"push_protocol_version":"V0_X"}
Examples
Change protocol version to 0.3
{"push_protocol_version":"V0_3"}
Return
on success: 200 OK
on error: 400 Bad Request
"error": {
"message": "Validation failed",
"errors": [
{
"field": "push_protocol_version",
"reason": "not a valid value"
}
]
}
}
Loading...