Aggregation API can aggregate the numeric data point data reported by devices, which supports to calculate the sum/average/maximum/minimum values of data point data for the intervals in hours/days/weeks/months. You can get aggregated data for multiple data points at a time.
To use this API, you must first initiate the access request. Only after the request is approved, the data reported will be aggregated.
For example, for the water consumption data point of a smart water meter, Aggregation API can be used to get the water consumption statistics per household per month, per week, and per day, so that monthly, weekly, and daily reports are available.
The Advanced Data API of OpenAPI is used to obtain device aggregation data.
After you have been granted the permission to use the aggregation API of OpenAPI, you can perform aggregation analysis of the numeric data point data reported by devices including calculating the sum/average/maximum/minimum values of data point data for the intervals in hours/days/weeks/months.
http://docs.gizwits.com/en-us/cloud/OpenAPI.html#APIs
The following figure shows how to.
The API for anonymous user login is the same as creating an anonymous login user.
http://docs.gizwits.com/en-us/cloud/OpenAPI.html#APIs
Use the xpg tool provided by Gizwits to simulate a MCU reporting the current device data.
The usage of xpg is as follows:
http://docs.gizwits.com/en-us/DeviceDev/Debug/DebugTool.html
http://docs.gizwits.com/en-us/cloud/OpenAPI.html#Advanced-Data-API
Query result:
The device data aggregation API only performs data aggregation query on a single device, which provides the aggregation operation for a Wi-Fi device numeric data point data in a certain period of time, including sum, average, maximum, and minimum.
Note: Before using Enterprise API, you must first contact Gizwits technical support to apply for the Enterprise API access and set the whitelist on the API configuration page.
Apply for Enterprise API access:
http://docs.gizwits.com/en-us/cloud/enterprise_api.html
The external IP of your current server is needed.
Contact the Gizwits technical personnel and apply for permission to use the device data aggregation API of Enterprise API.
Request URL:
http://enterpriseapi.gizwits.com/v1/products/447c947fff3245a18dfc709371c34e69/access_token
Body parameters:
1 | { |
Note: It is not possible to request directly on the swagger because the IP of the swagger service is not in your IP whitelist. If you haven’t set up a backend server yet, you can use the chrome browser plugin postman to make the request.
Request URL:
The parameter values of the URL are:
Header parameters:
Device data aggregation API is for enterprise developers. If you want to apply, please contact us through the official website.
Website address: http://en.gizwits.com/about-us
Gizwits official QR code: