Purge time-series
POST
/container/<containerId>/purge-time-series
Description
Purge dead time-series. Time series are considered dead if they didn't got any new data for a period of time. This period must be given in weeks.
Path parameters
Param | Description |
---|---|
containerId |
Container Id. |
Query parameters
none
Body
Param | Type | Required | Description |
---|---|---|---|
weeks |
integer | Yes | Integer value between 1 and 999 (recommended: 5 weeks or more). |
Return codes
Error code | Reason |
---|---|
200 |
Success. |
400 |
Invalid body. |
401 |
Invalid or missing token. |
403 |
Insufficient permissions (required: API +PURGE_TIME_SERIES ). |
404 |
Container not found. |
Example
Curl request:
curl \
-X POST 'https://api.infrasonar.com/container/123/purge-time-series' \
-H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
-H 'Content-Type: application/json' \
--data-raw '{
"weeks": 5
}'
Response:
{
"purgedTimeSeries": 12345
}