FRAMES | NO FRAMES
Configuring the REST API

ArcGIS Server REST API works out-of-the-box without requiring special configuration. However, if you needed to change the defaults, an understanding of the various configuration points is required.

Configuring the REST API

The REST configuration consists of one file:

Cross Origin Access

If the client includes a “Origin” header in the request, the REST instance will determine if this origin has cross-domain access or not. If it has access, then it will include an “Access-Control-Allow-Origin” header in the response and the value will simply echo the value of the “Origin” header. If it does not have access, it will not include this response header.

By default, the REST API will allow access to all domains. To restrict access, users need to specify a new allowedOrigins property in the rest config. The value should be a comma-delimited list of allowed domains.

Example: allowedOrigins=http://foo, http://bar:9090

JavaScript API URLs

Services Directory gives you the ability to view map services in the three JavaScript libraries - ArcGIS JavaScript API, ArcGIS JavaScript Extension for the Google Maps API, and ArcGIS JavaScript Extension for Bing Maps. You can configure the URLs to various resources for these libraries using the properties in rest-config.properties discussed here.

A typical configuration of the JavaScript API URLs would look like this:

jsapi.arcgis=http://serverapi.arcgisonline.com/jsapi/arcgis?v=2.6
jsapi.arcgis.sdk=http://resources.esri.com/arcgisserver/apis/javascript/arcgis
jsapi.arcgis.css=
http://serverapi.arcgisonline.com/jsapi/arcgis/2.6/js/dojo/dijit/themes/tundra/tundra.css

REST API Logging

Logging in the REST API can be configured using the ArcGIS Server Manager.

Maximum Upload Size

Since 10.1 the maximum allowed size of a multipart request for uploading files is a service level property <MaxUploadFileSize>. This limit, for example, applies to files uploaded using Uploads API or the Feature Service Add Attachment and Update Attachment operations. See section limiting Upload file size and file types to learn more.