Cleanup Assets (Feature Service/Layer)

URL:
https://<root>/<serviceName>/FeatureServer/<layerId>/cleanupAssets
Methods:
GET
Required Capability:
Admin privileges
Version Introduced:
11.1

Description

The cleanupAssets 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 uploadAssets operation. These assets would be added to the asset map at a later time with an applyEdits request. To avoid deleting these assets, the cleanupAssets 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

ParameterDetails

retentionPeriod

A numerical value representing the retention period. Only unused assets older than this value are deleted.

retentionPeriodUnit

Specifies the units of the retention period.

Values: days | hours | minutes | seconds

f

The response format. The default response format is html .

Values: html | json | pjson

Example usage

The following is a sample request URL used to access the cleanupAssets endpoint:

Use dark colors for code blocksCopy
1
https://machine.domain.com/webadaptor/rest/services/City_Park_Assets/FeatureServer/0/cleanupAssets

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
{
  "success": "<true | false>",
  "error": {"code": <error code>, "description": "<error description>"}
}

JSON Response example

Use dark colors for code blocksCopy
1
2
3
{
  "success": "true"
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.