| Command | Description | Parameters |
|---|---|---|
GET /ping |
Returns "pong", indicating that the server is running. |
|
GET /totalcount |
Returns the total count of people ever detected by CrowdCount. |
|
GET /check_user |
Checks if a device exists and returns its online status. |
|
GET /connection_status |
Returns the connection status of a specified device. |
|
POST /check_password |
Checks if the provided password for a specified device is correct. Prefer POST with JSON body for security. |
|
GET /currentcount |
Returns the current count for a specified device. |
|
POST /currentcount |
Updates the current count for a specified device. |
|
GET /get_user_days |
Returns a list of days for which the device has count data. |
|
GET /check_if_user_has_day |
Checks if the device has data for a specific day. |
|
GET /get_day_data |
Returns data for a specific day for the device. An example of this api call is provided below. |
|
GET /get_average_day_data |
Returns the average data for a specific day for the device. The average is calculated based on data from the same weekday over the previous 8 weeks, provided there is enough data. A minimum of 2 weeks of data is required. |
|
GET /check_if_user_has_week |
Checks if the device has data for a specific week. |
|
GET /get_week_data |
Returns data for a specific week for the device. To select a week, input any day of that week and it will provide the data from the previous Monday to the next Sunday |
|
GET /get_average_week_data |
Returns the average data for a specific week for the device. The average is calculated based on weekly weekday data over the previous 4 weeks, provided there is enough data. |
|
GET /check_if_user_has_month |
Checks if the device has data for a specific month. |
|
GET /get_month_data |
Returns data for a specific month for the device. Returns daily averages for each day of the month that has data. |
|
GET /get_average_month_data |
Returns the average data for a specific month for the device. The average is calculated based on data from the same month over the previous 5 months, provided there is enough data. A minimum of 2 months of data is required. Returns "N/A" if insufficient data. |
|
GET /get_year_data |
Returns data for a specific year for the device. Returns monthly averages for each month of the year that has data. |
|
GET /get_average_year_data |
Returns the average data for a specific year for the device. The average is calculated based on data from the same month over the previous 3 years, provided there is enough data. A minimum of 2 years of data is required. Returns "N/A" if insufficient data. |
|
GET /export_csv |
Exports CSV data for a specified device and date. If no date is provided, all data is exported in a zip file. |
|
user_id is still accepted for backwards compatibility.{"device_id": "your_id", "password": "your_password"}