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:

1
https://machine.domain.com/webadaptor/rest/services/City_Park_Assets/FeatureServer/0/cleanupAssets

JSON Response syntax

1
2
3
4
{
  "success": "<true | false>",
  "error": {"code": <error code>, "description": "<error description>"}
}

JSON Response example

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.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close