Edit Services Directory

URL:
https://<root>/system/handlers/rest/servicesdirectory/edit
Methods:
POST
Required Capability:
Access allowed with the "Security and Infrastructure" privilege
Version Introduced:
10.1

Description

The edit operation allows you to enable or disable the HTML view of the Services Directory REST API. You can also adjust the JavaScript and Map Viewer Classic previews of services in the Services Directory so that they work with your own locally hosted JavaScript API and Map Viewer Classic.

Request parameters

ParameterDetails

servicesDirEnabled

The flag to enable or disable the HTML view of the services directory. The default value is true, enabling the services directory HTML view.

Values: true | false

callbackFunctionsEnabled

Introduced at 11.0. The flag to enable or disable the ability to make JSONP callback requests. The JSONP callback feature is enabled by default (true) and allows older clients a way to make CORS requests without being restricted by the same-origin policy. This is useful for older browsers or other clients that do not supports CORS requests.

Values: true | false

allowedOrigins

A comma-separated list of URLs of domains allowed to make requests. * can be used to denote all domains.

Example
1
allowedOrigins=*

jsapi.arcgis

The URL of the JavaScript API to use for service previews. Defaults to the online ArcGIS API for JavaScript, but could be pointed at your own locally-installed instance of the JavaScript API.

Example
1
jsapi.arcgis=https://js.arcgis.com/4.11/

jsapi.arcgis.css

The CSS file associated with the ArcGIS API for JavaScript. Defaults to the online Dojo tundra.css.

Example

Example
1
jsapi.arcgis.css=https://js.arcgis.com/4.11/esri/css/main.css

jsapi.arcgis.sdk

The URL of the ArcGIS API for JavaScript help.

Example
1
jsapi.arcgis.sdk=https://help.arcgis.com/en/webapi/javascript/arcgis/

arcgis.com.map.text

The text to use for the preview link that opens Map Viewer Classic.

Example
1
arcgis.com.map.text=ArcGIS Online Map Viewer

arcgis.com.map

The URL to use for the preview link to open Map Viewer Classic. The defaults URL is to ArcGIS Online's Map Viewer Classic but could be used to point at your ArcGIS Enterprise portal's Map Viewer Classic.

Example
1
arcgis.com.map=http://www.arcgis.com/home/webmap/viewer.html

f

The response format. The default response format is html.

Values: html | json | pjson

Example usage

The following is a sample POST request for the edit operation:

1
2
3
4
5
6
POST /webadaptor/admin/system/handlers/rest/servicesdirectory/edit HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

servicesDirEnabled=true&callbackFunctionsEnabled=true&allowedOrigins=*&jsapi.arcgis=https://js.arcgis.com/4.11/&jsapi.arcgis.sdk=http://help.arcgis.com/en/webapi/javascript/arcgis/&jsapi.arcgis.css=https://js.arcgis.com/4.11/esri/css/main.css&arcgis.com.map.text=ArcGIS Online Map Viewer&arcgis.com.map=https://www.arcgis.com/home/webmap/viewer.html&f=pjson

JSON Response example

1
{"status": "success"}

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