Recalculate M4 Aggregates for Time Series Data
Recalculate all M4 aggregates for a specific time range
-
Data categories TimeSeriesData and DerivedData
-
Time range less than or equal to one day. However, the time range cannot be beyond the retention period.
Request
URI: /Things('<ID>')/<thing type name>/<property set ID>/RecalculateAggregate?timerange=<fromTime>-<toTime>
HTTP Method: POST
Permissions: <thing>.c
Request Headers
| Parameter | Required | Description |
|---|---|---|
| Accept-Encoding | No | Retrieve compressed response
Only if you specify the value gzip or gzip,deflate for this parameter, the system returns the compressed response with an additional response header CONTENT-ENCODING with value gzip. If you specify an invalid value or do not use this header parameter, the system returns the uncompressed response. |
Request Parameters
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| ID | Yes | string |
You can specify one of the following values:
|
| thingTypeName | Yes | String | Name of the thing type |
| propertySetID | Yes | String | Unique identifier of the property (that belongs to the property set type) defined in a thing type |
| timeange | Yes | timeStamp | You can provide a from time and to time for which the aggregates are calculated for a property. Alternatively, you can provide the duration of time in days, months, or years for calculating the aggregate. |
Request Example
/Things('503B8711B5D0445688E7FF7ACFC2177A')/core.automobiles:ABCXSeries/wheel_fl/RecalculateAggregate?timerange=2016-10-07T00:00:00.000Z-2016-10-07T00:23:00.000ZResponse
Format: JSON
Response Status and Error Codes
| Code | Description |
|---|---|
| 200 | Recalculation of aggregates successfully completed |