Info: This feature requires Assets Server 6.70 or higher.
The Stats cleanup API provides multiple ways for cleaning up stats indices or their content.
Stats index cleanup API
|
Assets Server 6.70 – 6.121: GET/POST /controller/admin/stats/cleanup Assets Server 6.122 or higher: POST /controller/admin/stats/cleanup |
Removes specified stats indices.
Note: It is not allowed to remove the current month’s index.
Parameters
| Name | Type | Description | Example |
|---|---|---|---|
| indices | string |
Comma-separated list of stats indices to remove. Required. |
stats-202101-r1,stats-202102-r1,stats-202103-r1, stats-202104-r1,stats-202105-r1 |
Result
| index name | result |
Example
| stats-202101-r1 | success |
| stats-202101-r2 | failure |
| stats-202501-r1 | not exist |
| assets-r1 | not allowed |
| stats-202108-r1 | not allowed (active) |
Stats history cleanup API
|
Assets Server 6.70 – 6.121: GET/POST /controller/admin/stats/removeHistory Assets Server 6.122 or higher: POST /controller/admin/stats/removeHistory |
Removes stats entries related to files that are not in the system anymore.
Parameters
| Name | Type | Description | Example |
|---|---|---|---|
| age | integer |
Minimal age in days of stats entries to be checked. Optional. When not specified, all entries are affected. |
365 |
Usage stats cleanup API
|
Assets Server 6.70 – 6.121: GET/POST /controller/admin/stats/removeUsage Assets Server 6.122 or higher: POST /controller/admin/stats/removeUsage |
Removes entries from StatsUsage based on the given criteria.
Parameters
| Name | Type | Description | Example |
|---|---|---|---|
| actions | string |
Comma-separated list of actions. Optional. |
METADATA_UPDATE, CREATE |
| users | string |
Comma-separated list of users. Optional. When not specified, the current user name is used. |
admin, server |
| age | integer |
Minimal age in days of stats entries to be checked. Optional. When not specified, all entries are affected. |
365 |
Search stats cleanup API
|
Assets Server 6.70 – 6.121: GET/POST /controller/admin/stats/removeSearch Assets Server 6.122 or higher: POST /controller/admin/stats/removeSearch |
Removes entries from StatsSearch on the given criteria.
Parameters
| Name | Type | Description | Example |
|---|---|---|---|
| clientTypes | string |
Comma-separated list of client types. Optional. |
proWeb, api |
| users | string |
Comma-separated list of users. Optional. When not specified, the current user name is used. |
admin, server |
| age | integer |
Minimal age in days of stats entries to be checked. Optional. When not specified, all entries are affected. |
365 |
Activity stats cleanup API
| POST /controller/admin/stats/removeActivity |
Removes entries from StatsActivity on the given criteria.
Parameters
| Name | Type | Description | Example |
|---|---|---|---|
| activityTypes | string |
Comma-separated list of activity types. Optional. |
LOGIN, LOGOUT |
| clientTypes | string |
Comma-separated list of client types. Optional. |
proWeb, api |
| users | string |
Comma-separated list of users. Optional. When not specified, the current user name is used. |
admin, server |
| age | string |
Minimal age in days of stats entries to be checked. Optional. When not specified, all entries are affected. |
365 |
Monitoring operations
Info: This feature requires Assets Server 6.122 or higher.
The following operations run asynchronously and return the ID of the started process in the Server Status page of the Management Console under Processes > Running.
- removeActivity
- removeHistory
- removeSearch
- removeUsage
Their progress can be observed and canceled from the Management Console.
Their output is added to the server log:
|
Example: INFO com.ds.acm.info.StatsHistoryCleanup - Stats history cleanup: age=0, endDate=Mon Jun 15 13:44:55 UTC 2026, statsIndexCount=3 INFO com.ds.acm.info.StatsHistoryCleanup - Stats history cleanup index=stats-202604-r1: matchedDocs=245, uniqueAssetIds=219, orphaned=200, docsToDelete=200, failedShards=0 INFO com.ds.acm.info.StatsHistoryCleanup - Stats history cleanup index=stats-202606-r1: matchedDocs=515, uniqueAssetIds=235, orphaned=200, docsToDelete=200, failedShards=0 INFO com.ds.acm.info.StatsHistoryCleanup - Stats history cleanup index=stats-202605-r1: matchedDocs=232, uniqueAssetIds=222, orphaned=200, docsToDelete=200, failedShards=0 INFO com.ds.acm.info.StatsHistoryCleanup - Stats history cleanup finished: deleted=600, failedShards=0 |
Revisions
- 11 August 2026: For all sections: Added information about Assets Server 6.122 or higher.
- 11 August 2026: Added section 'Activity stats cleanup API'.
- 11 August 2026: Added section 'Monitoring operations'.
Comments
0 comments
Please sign in to leave a comment.