Skip To Content
ArcGIS Developers
Dashboard

Edit (Service)

Description

To edit a service, you need to submit the complete JSON representation of the service, which includes the updates to the service properties. Editing a service can cause the service to be restarted with updated properties.

The JSON representation of a service contains the following four sections:

  • Service Description Properties—Common properties that are shared by all services. These properties typically identify a specific service.
  • Service Framework Properties—Properties targets towards the framework that hosts the GIS service. They define the life cycle and load balancing of the service.
  • Service Type Properties—Properties targeted towards the core service type as seen by the server administrator. Since these properties are associated with a server object, they vary across the service types.
  • Extension Properties—Represent the extensions that are enabled on the service.
Note:

The JSON is submitted to the operation URL as a value of the parameter service. You can leave out the serviceName and type parameters in the JSON representation. Any other properties that are left out are not persisted by the server.

Request parameters

ParameterDetails
service

The JSON representation of the service & the properties that have been updated or added.

f

The response format. The default format is html.

Values: html | json | pjson

Example usage

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

POST /context/admin/services/SampleService.MapServer/edit HTTP/1.1
Host: organization.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

service={
  "description": "My updated map service",
  "serviceName": SampleServer
  "capabilities": "Map,Query,Data",
  "clusterName": "default",
  "maxInstancesPerNode": 1,
  "minInstancesPerNode": 1,
  "maxWaitTime": 60,
  "maxIdleTime": 180,
  "maxUsageTime": 600,
  "recycleInterval": 24,
  "recycleStartTime": "00:00",
  "loadBalancing": "ROUND_ROBIN",
  "isolationLevel": "HIGH",
  "keepAliveInterval": -1,
  "properties": {},
  "datasets": [],
  "type": "MapServer",
  "frameworkProperties": {},
  "extensions": [
    {
      "typeName": "WMSServer",
      "enabled": false,
      "capabilities": "GetCapabilities,GetFeatureInfo,GetLegendGraphic,GetMap,GetSchemaExtension,GetStyles",
      "properties": {
        "minRefreshPeriod": "30",
        "compatabilityMode": "GoogleEarth",
        "imageSize": "1024",
        "dpi": "96",
        "endpointURL": "null",
        "featureLimit": "1000000",
        "useDefaultSnippets": "false"
      }
    },
    {
      "typeName": "WFSServer",
      "enabled": true,
      "capabilities": "SingleImage,SeparateImages,Vectors",
      "properties": {}
    },
    {
      "typeName": "WCSServer",
      "enabled": true,
      "capabilities": "Create,Query,Update,Delete,Uploads",
      "properties": {}
    }
  ],
  "properties": {
    "maxBufferCount": "100",
    "maxImageHeight": "2048",
    "maxRecordCount": 1000,
    "filePath": "/arcgis/framework/etc/data/SampleServer/SampleServer.msd",
    "maxImageWidth": "2048",
    "cacheOnDemand": "false",
    "virtualOutputDir": "/rest/directories/arcgisoutput",
    "supportedImageReturnTypes": "MIME+URL",
    "isCached": "false",
    "ignoreCache": "false",
    "clientCachingAllowed": "false",
    "cacheDir": "${arcgiscache}
  }
}&f=pjson&tpken=Mb0ORrkLObNO2Q8FZoUCHHzSMzZi0CbhLHNRYMqqa6URG_ojQJF3rNsJAfRB23MyCrLwSmuaHPUo4AEIrUuoH1-4Ot5xh4565FtlQahXAhK2C7Sy0oydZhBwD8KdFSnVlnLr-e9uI5ovSWZ2lGNn9SwoV2MPMzeAh_5r-q-wgwF8DTT_nhuCXJGkMRy-48jjGS2aN5FI18STHZ8RAuKxGasH90SI3C7njZzlGCUrY5m6BDhCMsdpZA14GwNX8Cis

JSON Response example

{"status": "success"}