Skip To Content ArcGIS for Developers Sign In Dashboard

Clear REST Cache

  • URL:https://<admin-url>/system/handlers/rest/cache/clear
  • Version Introduced:10.0



At 10.1 and later, ArcGIS Server automatically updates the REST cache when you add, update, or remove services and folders. This eliminates the need for clearing the REST cache manually when a change is made to the services or folders.

However, if you need to clear the cache manually, use the clear cache operation supported by the ArcGIS Server Admin API using the https://<admin-url>/system/handlers/rest/cache/clear URL. Contact Esri Support if there are use cases that require manual clearing of the REST cache.

The Clear REST Cache operation explicitly clears the REST API cache immediately.

Clients need a security token to clear the REST cache. You can obtain a security token by using the Generate Admin Token operation.

The Clear REST Cache operation supports the following parameters. If the folderName, serviceName, and type parameters are not specified, the entire REST cache will be cleared.

Request parameters


Description: The response format. The default response format is html.

Values: html | json


Description: The name of a folder. If only the folderName parameter is specified in the request, the cache will be cleared for that folder.

Example: folderName=CachedServices


Description: The service for which the REST cache needs to be cleared. When providing a serviceName, also provide the type parameter. If the folderName parameter is not set, the service is assumed to be in the root folder. The REST cache will be cleared for the specified service and its folder.

Example: serviceName=WorldElevation


Description: The type of service.

Example: type=MapServer

Example usage

Example 1: Use the security token generated using the Generate Admin Token operation to clear the REST cache. This will clear the entire REST cache.


Example 2: Clear the cache for a specific service and its folder, for example, when a service is stopped.


Example 3: Clear a folder cache, for example, after a new service is created.


Example 4: Clear a root folder's cache after a folder is added or removed.


JSON Response syntax

  "success": true //the value will always be true. Failure will result in an error response.

JSON Response example

  "success": true