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
rest-config.properties, which is found in the
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.
From 10.1 SP1 onwards, ArcGIS Server token service supports Cross Origin Access and will always allow access to all domains.
Example: allowedOrigins=http://foo, http://bar:9090
rest-config.properties discussed here.
Using View in ArcGIS.com Map link in the Services Directory you can view Map, Image and Feature Services in ArcGIS.com map viewer. By default Services Directory is configured to use the map viewer in www.arcgis.com. You can update the arcgis.com.map property to configure Services Directory to use a map viewer from a different portal. The arcgis.com.map.text property can be used to configure the text that will be shown for the View In link in the Services Directory.
arcgis.com.map=http://www.arcgis.com/home/webmap/viewer.html arcgis.com.map.text=ArcGIS.com Map
Logging in the REST API can be configured using the ArcGIS Server Manager.
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.