- URL:
- https://<root>/<serviceName>/FeatureServer/<layerId>/cleanupAssets
- Methods:
- GET
- Required Capability:
- Admin privileges
- Version Introduced:
- 11.1
Description
The cleanup  operation cleans unused assets and reclaims space. As assets are never deleted, they may become unnecessary when the asset map is updated. When an asset map updates, it deletes the last reference from the asset map to a specific asset.
Unused assets can be purposefully created using the upload  operation. These assets would be added to the asset map at a later time with an apply  request. To avoid deleting these assets, the cleanup  operation can be used to set a retention period. The retention period limits asset deletion to assets that are older than the specified period, preserving assets that do not exceed the retention period.
Request parameters
| Parameter | Details | 
|---|---|
| 
 | A numerical value representing the retention period. Only unused assets older than this value are deleted. | 
| 
 | Specifies the units of the retention period. Values:  | 
| 
 | The response format. The default response format is  Values:  | 
Example usage
The following is a sample request URL used to access the cleanup  endpoint:
https://machine.domain.com/webadaptor/rest/services/City_Park_Assets/FeatureServer/0/cleanupAssetsJSON Response syntax
{
  "success": "<true | false>",
  "error": {"code": <error code>, "description": "<error description>"}
}JSON Response example
{
  "success": "true"
}