ArcGIS REST API

Edit Service

  • URL:https://server:port/arcgis/admin/services/[<folder>]/<serviceName.serviceType>/edit(POST only)
  • Required Capability:Publisher or Administrator
  • Version Introduced:10.1

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 causes the service to be restarted with updated properties.

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.
  • Any other properties that are left out of the JSON are not persisted by the server.

Properties

Service Description PropertiesDescription
description

An optional user-readable description for the service.

capabilities

The capabilities of the service. The domains of these values are specific to each service type.

f

The response format. The default response format is html.

Values: html | json

runAsync

Decides if the operation must run asynchronously.

Values: true | false

Service Framework PropertiesDescription
clusterName

The name of the cluster to which this service must be deployed.

Note:

Clusters have been deprecated. While this property remains in the API, the only valid value for it at 10.7 is default.

minInstancesPerNode

The minimum number of instances of the service to create on each machine within the site. The default is 1.

maxInstancesPerNode

The maximum number of instances of the service to create on each machine within the site. The default is 2.

maxWaitTime

The maximum amount of time (in seconds) the framework should wait to get a free instance of the service. The default is 60 seconds.

maxIdleTime

The maximum amount of time (in seconds) an idle instance of a service must be kept alive before it can be destroyed. The default is 1800 seconds.

maxUsageTime

The maximum amount of time (in seconds) an instance can service a request. The default is 600 seconds.

recycleInterval

The maximum amount of time (in hours) an instance of the service can live. The default is 24 hours.

loadBalancing

The load balancing algorithm the framework must use for distributing service instances among all nodes in a cluster. This value should always be set to ROUND_ROBIN.

isolationLevel

The isolation level under which an instance of a service is run. The default is HIGH.

Values: LOW | HIGH

maxuploadfilesize

The maximum file size (in MB) that can be uploaded to the server by a client. The default is 2000.

deprecated

A boolean indicating if the service is displayed in the ArcGIS Server Services Directory. This property is hidden by default and must be added manually. Use this property to hide retired services from the Services Directory and prevent new users or applications from consuming the service. Existing applications will continue to be able to consume the service until it is deleted from the server. Values: true | false

Sample usage: "deprecated": "true",

Service Type PropertiesDescription
properties

A bag of properties for the targeted service type.

Extension PropertiesDescription
typeName

The type of extension. See the supported extension types.

capabilities

The capabilities for this extension type.

enabled

A boolean indicating if the extension will be enabled on the service. Values: true | false

properties

A bag of properties for the targeted extension type.

Framework PropertiesDescription
javaHeapSize

This property allows you to specify a heap size for this particular service, overriding the default heap size properties you can set for all services using the Edit Machine operation.

Specifying a value for javaHeapSize here will only affect this service; all other services in your machine will remain unchanged.

Example

https://server:port/arcgis/admin/services/Maps/Corine.MapServer/edit
service={
 "description": "my updated map service", 
 "capabilities": "map,query,data", 
 "clusterName": "default", 
 "minInstancesPerNode": 2, 
 "maxInstancesPerNode": 4, 
 "maxWaitTime": 60, 
 "maxIdleTime": 1800, 
 "maxUsageTime": 600, 
 "recycleInterval": 24, 
 "loadBalancing": "ROUND_ROBIN", 
 "isolationLevel": "HIGH", 
 "properties": { 
   "maxBufferCount": "100", 
   "virtualCacheDir": "https://SERVER1:6443/arcgis/server/arcgiscache", 
   "maxImageHeight": "2048", 
   "maxRecordCount": "1000", 
   "filePath": "\\\\machine\\data\\Corine\\CORINE6.msd", 
   "maxImageWidth": "2048", 
   "cacheOnDemand": "false", 
   "virtualOutputDir": "https://SERVER1:6443/arcgis/server/arcgisoutput", 
   "outputDir": "C:\\arcgisserver\\arcgisoutput", 
   "supportedImageReturnTypes": "MIME+URL", 
   "isCached": "false", 
   "ignoreCache": "false", 
   "clientCachingAllowed": "false", 
   "cacheDir": "C:\\arcgisserver\\arcgiscache\\Corine" 
 }, 
 "extensions": [ 
    { 
    "typeName": "KmlServer", 
    "enabled": false, 
    "capabilities": "SingleImage,SeparateImages,Vectors", 
    "properties": { 
      "minRefreshPeriod": "30", 
      "compatibilityMode": "GoogleEarth", 
      "imageSize": "1024", 
      "dpi": "96", 
      "endPointURL": "null", 
      "featureLimit": "1000000", 
      "useDefaultSnippets": "false" 
     } 
   }, 
   { 
    "typeName": "WFSServer", 
    "enabled": true, 
    "capabilities": "", 
    "properties": { 
      "appSchemaURI": "https://SERVER1:6443/arcgis", 
      "appSchemaPrefix": "arcgis", 
      "enableTransactions": "false" 
      } 
    }, 
   { 
    "typeName": "WCSServer", 
    "enabled": true, 
    "capabilities": "", 
    "properties": {} 
   } 
 ],
"runAsync":"true" 
}