FRAMES | NO FRAMES
REST API Admin
URL http://<host>:<port>/<instance>/admin

Description

From 10.1 onwards the REST API administrative endpoint http://<host>:<port>/<instance>/arcgis/rest/admin is no longer supported. The administrative tasks previously supported in the REST API Admin are now supported in the ArcGIS Server's Admin API.

Also note that from 10.1 onwards ArcGIS Server automatically clears the REST cache when you add, update or remove services and folders. This eliminates the need for clearing REST cache manually when a change is made to the services or folders.

If you need to perform administrative tasks that were previously supported in REST API Admin such as Generate Admin Token, Clear REST Cache and options to enable or disable Services Directory, use the ArcGIS Servers admin API accessible via the following URL:

http://<host>:<port>/<instance>/admin.

The ArcGIS Server Administrator is secured so that only users that have ADMINISTER or PUBLISH privileges have permissions to access the admin.

REST Cache

The REST API caches content pertaining to catalogs, services, maps, models, etc. For example resources such as service resource, layer resource, legend resource, Geoprocessing task resource etc are cached the first time a resource is accessed. If subsequent requests are made to the same resource, REST will return the response from its cache rather than asking the service to execute this request. For static resources that do not change often, caching such content allows significant performance improvements while working with the REST API.

It is important to note that results from operations are not cached by REST. For example, if a query operation is executed against a map service layer, the response for the query will not be cached in the REST cache. However browsers may cache the response and use its cache if the same request is repeated from that browser and server returns a 304 NOT MODIFIED status in its response or if the CACHE-CONTROL response header MAX-AGE value indicates that the browser can reuse the cache for a stipulated time period.

Prior to 10.1, each time a service or folder is updated, it was required that the REST cache be cleared manually using the clear cache operation. From 10.1 onwards ArcGIS Server automatically clears the cache when you add, update or remove services and folders. Also if you have a multiple machine configuration, the REST cache will be cleared on all machines. If necessary, you can manually clear the REST cache using the following URL:

http://<host>:<port>/<instance>/admin/system/handlers/rest/cache/clear

The Clear Cache Options page appears as below:


Clear Cache Options

You can provide a folder name and/or a service name and service type to clear the cache for a specific folder or a service. Clicking "Clear Cache" without providing a folder or service name/service type clears the entire REST API cache.

Services Directory

The Services Directory provides an HTML view of the services published using ArcGIS Server. The ArcGIS Server Admin API gives you the ability to enable or disable the REST Services Directory using the following URL: URL http://<host>:<port>/<instance>/admin/system/handlers/rest/servicesdirectory

Disabling the Services Directory is recommended as a best practice for ArcGIS Server systems that are public. You may choose to enable the Service Directory on production systems, only if there is a need to make the HTML pages and forms available to the end users. Once disabled, users are not able to view and use the services using Services Directory HTML pages i.e requests that are made for HTML output format (f=html or when parameter f is not specified). They'll receive an error message if they attempt to access the Services Directory once it has been disabled by the admin. All client applications (Web APIs, Desktop, Mobile, etc.) that programmatically access the Services using JSON or other output formats will continue to function as expected.

The Services Directory Options page typically appears as below. To disable the Services Directory view, click on the "Edit" link and uncheck the "Services Directory Enabled" check box or programmatically call the URL http://<host>:<port>/<instance>/admin/system/handlers/rest/servicesdirectory/edit using HTTP POST and set a token obtained for an Administrative user and a parameter "servicesDirEnabled" to false. In a multiple machine configuration, this will disable the Services Directory on all machines.


Services Directory Options

When the Services Directory is disabled, the Services Directory Options page appears as below. To enable the Services Directory, check "Services Directory Enabled" check box and click on the edit button or programmatically call the URL http://<host>:<port>/<instance>/admin/system/handlers/rest/servicesdirectory/edit using HTTP POST and set a token obtained for an Administrative user and a parameter "servicesDirEnabled" to true. In a multiple machine configuration, this will enable the Services Directory on all machines.

Services Directory Options