Edit Service

URL:
https://<root>/services/<serviceName>.<serviceType>/edit
Methods:
POST
Required Capability:
Access allowed with any authorized privilege
Version Introduced:
10.1

Description

The edit operation modifies the properties of a created service. 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 it 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 service properties. Typically, they identify a specific service.
  • Service Framework Properties—Properties targeted 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. The Service Types section in the Help describes that supported properties for each service.
  • Extension Properties—Represent the extensions that are enabled on the service. The Extension Types section in the Help describes the supported out-of-the-box extensions for reach service type.
  • Framework Properties—Specifies a heap size that will be applied to this specific service.

Request parameters

ParameterDetails

service

The JSON representation of the service.

runAsync

Decides if the operation must run asynchronously.

Values: true | false

f

The response format. The default response format is html.

Values: html | json | pjson

Service description properties

The following table outlines the common properties shared by all service types that are used to identify a specific service.

PropertyDescription

serviceName

The name of the service.

Example
1
"serviceName": "Updated Name"

type

The type of service.

Example
1
"type": "MapServer"

description

An optional user-readable description for the service.

Example
1
"description": "An updated description for the service"

capabilities

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

Example
1
"capabilities": "Map,Query,Data"

Service framework properties

The following table outlines the properties targeted toward the framework that hosts the GIS service, which define the life cycle and load balancing of the service.

PropertyDescription

clusterName

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

Example
1
"clusterName": "default"

minInstancesPerNode

The minimum number of instances of the service to create on each node in the cluster. The default is 1.

Example
1
"minInstancesPerNode": 1

maxInstancesPerNode

The maximum number of instances of the service to create on each node in the cluster. The default is 2.

Example
1
"maxInstancesPerNode": 2

maxWaitTime

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

Example
1
"maxWaitTime": 60

maxStartupTime

The maximum amount of time (in seconds) that can elapse on a startup attempt. When service instances are created in the GIS server, either as a result of the server starting or in response to a request of the server by a client, the time it takes to initialize the service instance is referred to as its creation time. When the maximum startup time has passed, it is assumed the startup has stopped responding and the GIS server cancels the creation of the service instance. The default is 300 seconds.

Example
1
"maxStartupTime": 300

maxIdleTime

The maximum amount of time (in seconds) an idle instance of a service will remain idle before it is stopped. The default is 1800 seconds.

Example
1
"maxIdleTime": 1800

maxUsageTime

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

Example
1
"maxUsageTime": 600

recycleInterval

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

Example
1
"recycleInterval": 24

loadBalancing

Specifies the load balancing algorithm the framework will use for instances of a service among all the nodes in a cluster. The default is ROUND_ROBIN.

Values: ROUND_ROBIN | FAIL_OVER

isolationLevel

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

Values: LOW | HIGH

Service type properties

The following table outlines the property that targets the core service type as seen by the server administrator. Since this property is associated with a server object, it varies across the service types.

PropertyDescription

properties

A JSON object containing the properties for the targeted service type.

Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"properties": {
  "maxBufferCount": "100",
  "virtualCacheDir": "https://SERVER:6080/arcgis/server/arcgiscache",
  "maxImageHeight": "2048",
  "maxRecordCount": "1000",
  "filePath": "\\\\machine\\data\\Corine\\CORINE6.msd",
  "maxImageWidth": "2048",
  "cacheOnDemand": "false",
  "virtualOutputDir": "https://SERVER:6080/arcgis/server/arcgisoutput",
  "outputDir": "C:\\arcgisserver\\arcgisoutput",
  "supportedImageReturnTypes": "MIME+URL",
  "isCached": "false",
  "ignoreCache": "false",
  "clientCachingAllowed": "false",
  "cacheDir": "C:\\arcgisserver\\arcgiscache\\Corine"
}

Different properties are required for map, image, geoprocessing, and geocoding services.

PropertyDescription

filePath

(Required)

The full path, including the file name, of the map document file.

Example
1
"filePath": "\\\\machine\\data\\Corine\\CORINE6.msd",

resampling

(Optional)

Specifies whether rendering will be used in Tile Package Clients such as ArcGIS Pro, Map Viewer, and JSAPI. When true, resampling will redraw images up to the maxScale value. In areas with no data, blurred images will be displayed.

Values: true | false

maxRecordCount

(Optional)

The maximum number of records that will be returned by query or data operations. The default value is 500.

Example
1
"maxRecordCount": "500",

dateFieldsTimezoneID

(Optional)

The time zone that will be used by the service using the Windows ID for the time zone (for example, Pacific Standard Time or Eastern Standard Time).

Once set, it is assumed that all date field values will be stored in the specified time zone and data will be converted from UTC to the time zone specified before changes are written to the database. This property, if configured, only applies to date fields that are not used to time enable a layer and are not used in editor tracking date fields. When enabling this property, it must be placed immediately after maxRecordCount; otherwise, dateFieldsTimezoneID will be ignored.

Example

Example
1
"dateFieldsRespectsDaylightSavingTime": "Pacific Standard Time",

dateFieldsRespectsDaylightSavingTime

(Optional)

If dateFieldsTimezoneID is defined, this Boolean property specifies whether time will be adjusted for daylight saving time. If daylight saving time does not apply to the data's region, set the value to false. If date values will be stored using daylight saving time when it is in effect, set this value to true.

Once set, it is assumed that all date field values will be stored in the specified time zone and data will be converted from UTC to the time zone specified before changes are written to the database. This property, if configured, only applies to date fields that are not used to time enable a layer and are not used in editor tracking date fields. When enabling this property, it must be placed immediately after maxRecordCount; otherwise, dateFieldsRespectsDaylightSavingTime will be ignored.

Values: true | false

maxBufferCount

(Optional)

The maximum number of selected features that can be buffered for map operations. The default value is 100.

Example
1
"maxBufferCount": "100",

maxSampleSize

(Optional)

The maximum number of records that will be sampled when computing a class breaks renderer, which is used by the Generate Renderer operation.

Example
1
"maxSampleSize": "100000",

maxImageWidth

(Optional)

The maximum image width allowed for requests. The default is 2048.

Example
1
"maxImageWidth": "2048",

maxImageHeight

(Optional)

The maximum image height allowed for requests. The default is 2048.

Example
1
"maxImageHeight": "2048",

supportedImageReturnTypes

(Optional)

The supported image return types. The default types are MIME+URL

Example
1
"supportedImageReturnTypes": "MIME+URL",

isCached

(Optional)

A Boolean flag that specifies whether the map service will be cached (true) or dynamic (false).

Values: true | false

ignoreCache

(Optional)

A Boolean flag that specifies whether the map service will ignore the cache (true).

Values: true | false

cacheOnDemand

(Optional)

A Boolean flag that specifies whether cache tiles will be created on demand and added to the server cache directory as users navigate the map (true).

Values: true | false

disableCaching

(Optional)

A Boolean flag that specifies whether the REST handler will be disabled from caching all static resources, such as map service resource, layer resource, legends, and so on (true).

Values: true | false

clientCachingAllowed

(Optional)

A Boolean flag that specifies whether clients will be allowed to cache tiles (true).

Values: true | false

cacheDir

(Optional)

The physical directory where the tiles will be stored.

Example
1
"cacheDir": "C:\\arcgisserver\\arcgiscache\\Corine"

virtualCacheDir

(Optional)

The virtual directory where the tiles can be accessed.

Example
1
"virtualCacheDir": "https://SERVER:6080/arcgis/server/arcgiscache",

outputDir

(Required)

The physical directory where the temporary output files will be created.

Example
1
"outputDir": "C:\\arcgisserver\\arcgisoutput",

virtualOutputDir

(Required)

The virtual directory where the output files can be accessed.

Example
1
"virtualOutputDir": "https://SERVER:6080/arcgis/server/arcgisoutput",

connectionCheckInterval

(Optional)

The number of seconds between validity checks or repairs on SDE data connections used in a map service.

Example
1
"connectionCheckInterval": "300",

schemaLockingEnabled

(Optional)

A Boolean tag that specifies whether the map service will acquire schema locks for map layers from a geodatabase (true). If locks will impede your workflow, set this value to false to disable schema locking.

Values: true | false

maxDomainCodeCount

(Optional)

The maximum number of domain codes that can be returned from all fields, subtypes, layers, and tables in a map service. The default value is 25000.

Example
1
"maxDomainCodeCount": "25000",

useLocalCacheDir

(Optional)

A Boolean that specifies whether the ArcGIS Server map caching mechanism will write bundle files to a local directory and copy them to a shared cache directory (true) or write the files directly to the shared cache directory (false). This option can improve performance, but it only applies to the compact cache storage format when multiple machines are working on the cache.

Values: true | false

antialiasingMode

(Optional)

Specifies the antialiasing mode that will be used for drawing vectors in the map. The default is NONE.

Values: FASTEST | FAST | NORMAL | BEST | NONE

textAntialiasingMode

(Optional)

Specifies the antialiasing mode that will be used for drawing vectors in the map. The default is FORCE.

Values: NORMAL | FORCE | NONE

disableIdentifyRelates

(Optional)

A Boolean flag that specifies whether the processing of related records as a part of the identify results will be disabled. If there are too many related records, this may improve the performance of the identify operation. The default is false.

Values: true | false

enableDynamicLayers

(Optional)

A Boolean flag that specifies whether the map service will allow dynamic layer functionality such as reordering layers, changing symbology per request, and so on (true). The default value is false.

Values: true | false

dynamicDataWorkspaces

(Optional)

The workspace connections that will be available for the web clients applications for adding dynamic layers per request. This is a string value representing the JSON array containing JSON objects describing the workspace connection.

Example
1
2
3
4
5
6
7
8
9
10
11
12
"dynamicDataWorkspaces": [
  {
    "id": "<id>",
    "WorkspaceFactory": "SDE",
    "workspaceConnection": "<sde_connection_string>"
  },
  {
    "id": "<id>",
    "WorkspaceFactory":"FileGDB",
    "workspaceConnection": "DATABASE=<path_to_fgdb>"
  }
],

hasStaticData

Specifies whether the performance of a map service that uses static, unchanging data will be optimized (true). This property is automatically set to true when a map service is published by copying data to the server.

Values: true | false

cacheControlMaxAge

The value that will be returned for max-age as the cache-control response header by the Export operation and the Tile resource. If no value is provided, the default value of 0 seconds for the export request, 86400 seconds for tiles that the client can cache, and 0 seconds for tiles that disallow client caching, will be returned as the max-age value.

However, if client caching is not allowed, the max-age value for tile responses will always be 0, and any value provided for cacheControlMaxAge will be ignored.

Example
1
"cacheControlMaxAge": "43200",

disableDownsamplingTilesForExportMap

Specifies whether the cached map service will render the image using the cache tiles. When set to false, if no cache tiles exist at a certain level, the image will use resampled cache data to render an image using CPU resources. When set to true, if no cache tiles exist for an Export request, the service will return an error. This property is used to optimize export requests. The default is false.

Values: true | false

failOnStartWhenDataInaccessible

Added at 10.8.1. Specifies whether starting a map service when a data source is inaccessible will fail. By default, when the data source of a layer or stand-alone table is inaccessible, a map service will start without listing broken layers or tables in its resources. However, when this property is set to true and the map service cannot access any of its layer or table sources, it will fail to start. The default is false.

Values: true | false

Extension properties

The table below outlines the properties that represent the extensions that are enabled on a service.

PropertyDescription

typeName

The type of extension. See the list of supported extension types.

Example
1
"typeName": "KmlServer

capabilities

The capabilities of the extension type.

Example
1
"capabilities": "SingleImage,SeparateImages,Vectors"

enabled

A Boolean that specifies whether the extension will be enabled on the service.

Values: true | false

properties

A bag of properties for the targeted extension type.

Example
1
2
3
4
5
6
7
8
9
"properties": {
  "minRefreshPeriod": "30",
  "compatibilityMode": "GoogleEarth",
  "imageSize": "1024",
  "dpi": "96",
  "endPointURL": "",
  "featureLimit": "1000000",
  "useDefaultSnippets": "false"
}

Framework properties

The table below defines the property used to determine the heap size that will be applied to a service.

PropertyDescription

javaHeapSize

The heap size for a particular service, which will override the default heap size properties you can set for all services using the Edit operation.

Providing a value for javaHeapSize will only affect this service; all other services in the machine will remain unchanged.

Example
1
"javaHeapSize": "64"

Example usage

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
POST /webadaptor/admin/services/Maps/TestMap.MapServer/edit HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

services={
  "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://SERVER:6443/arcgis/server/arcgiscache",
     "maxImageHeight": "2048",
     "maxRecordCount": "1000",
     "filePath": "\\\\machine\\data\\Test\\TESTMAP.msd",
     "maxImageWidth": "2048",
     "cacheOnDemand": "false",
     "virtualOutputDir": "https://SERVER:6443/arcgis/server/arcgisoutput",
     "outputDir": "C:\\arcgisserver\\arcgisoutput",
     "supportedImageReturnTypes": "MIME+URL",
     "isCached": "false",
     "ignoreCache": "false",
     "clientCachingAllowed": "false",
     "cacheDir": "C:\\arcgisserver\\arcgiscache\\Test"
  },
  "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://SERVER:6443/arcgis",
          "appSchemaPrefix": "arcgis",
          "enableTransactions": "false"
       }
     },
     {
       "typeName": "WCSServer",
       "enabled": true,
       "capabilities": "",
       "properties": {}
     }
  ],
  "frameworkProperties": {
     "javaHeapSize": "64"
  },
  "datasets": []
}&runAsync="true"&f=json

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