- URL:https://<servicesDirectory-url>/edit
(POST only)
- Required Capability:Default administrator role | Security and Infrastructure
- Version Introduced:10.1
Description
The edit operation allows you to enable or disable the HTML view of API REST de ArcGIS (also known as the Services Directory). 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.
Nota:
When the Services Directory is disabled, the HTML view is not accessible. However, the API REST de ArcGIS is still available.
Request parameters
Parameter | Details |
---|---|
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
|
jsapi.arcgis | Nota:As of 10.6.1, when specifying the ArcGIS API for JavaScript version, it must be from the 4.x release. 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
|
jsapi.arcgis.css | Nota:As of 10.6.1, when specifying the ArcGIS API for JavaScript version, it must be from the 4.x release. The CSS file associated with the ArcGIS API for JavaScript. Defaults to the online Dojo tundra.css. Example
|
jsapi.arcgis.css2 | Heredado:This parameter has been deprecated as of 10.6.1. Additional CSS files associated with the ArcGIS API for JavaScript. Defaults to the online esri.css. |
jsapi.arcgis.sdk | The URL of the ArcGIS API for JavaScript help. Example
|
arcgis.com.map.text | The text to use for the preview link that opens Map Viewer Classic. Example
|
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
|
f | The response format. The default response format is html. Values: html | json| pjson |
Example usage
Below is a sample POST request for edit:
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=json
JSON Response example
{"status": "success"}