Understanding API Weights
API calls to the deviceWISE Cloud are assigned weights, these weights are either static (meaning a particular API is assigned a given weight), or dynamic, (meaning the specific API will determine its weight based on the parameters passed into the API call). The weighting is intended to relate the usage of various API calls to their effective load on the deviceWISE Cloud. The weight metric helps you manage your API usage within your assigned Rate Limit . The following table provides an overview of weights calculations for some of the APIs.
API | Algorithm |
---|---|
alarm.batch | 1 + (number_of_items / 2) |
attribute.batch | 1 + (number_of_items / 2) |
location.batch | 1 + ( (number_of_items*(2 if address_decode is enabled) / 2) |
location.publish | 1 + (1 if network_decode is enabled) + (1 if address_decode is enabled) |
property.batch | 1 + ( (sum of weights from individual publishes) / 2) |
property.publish | 1 + (1 if deduplicate is enabled) + (1 if aggregation is enabled) |
The weights are displayed in the API log screen.