- URL:https://<service-url>/edit(POST only)
- Required Capability:Default administrator role | All authorized privileges
- 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.
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 (New at 10.7)—Specifies a heap size that will be applied to this specific 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. Any other properties that are left out of the JSON are not persisted by the server.Request parameters
Parameter | Details |
---|---|
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 |
Properties
Service description | Description |
---|---|
description | An optional user-readable description for the service. Example
|
capabilities | The capabilities of the service. The domains of these values are specific to each service type. Example
|
Service framework | Description |
---|---|
clusterName | Legacy:Clusters have been deprecated. While this property remains in the API, the only valid value for it at 10.7 is default. The name of the cluster to which this service must be deployed. Example
|
minInstancesPerNode | The minimum number of instances of the service to create on each machine within the site. The default is 1. Example
|
maxInstancesPerNode | The maximum number of instances of the service to create on each machine within the site. The default is 2. Example
|
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. Example
|
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. Example
|
maxUsageTime | The maximum amount of time (in seconds) an instance can service a request. The default is 600 seconds. Example
|
recycleInterval | The maximum amount of time (in hours) an instance of the service can live. The default is 24 hours. Example
|
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 | Legacy:The use of Low isolation has been deprecated. Use of this value in previous versions is highly discouraged. The isolation level under which an instance of a service is run. The default is HIGH. Values:HIGH |
maxUploadFileSize | The maximum file size (in MB) that can be uploaded to the server by a client. The default is 2000. Example
|
deprecated | A Boolean indicating if the service is displayed in the 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 Example
|
Service type | Description |
---|---|
properties | A bag of properties for the targeted service type. For a list of properties that are defined for each type, see Service types. Example
|
virtualDirsSecurityEnabled | A boolean that indicates if a specific service's virtual directories are secured and require authentication. If true, accessing the content in the arcgisoutput, arcgisjobs, and arcgisinput directories over HTTP will require user authentication. The default is false. This change is only enacted on the service level. The corresponding site-wide property can be found in the Security Configuration operation. Values: true | false |
Extension | Description |
---|---|
typeName | The type of extension. See the supported extension types. Example
|
capabilities | The capabilities for this extension type. Example
|
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. Example
|
Framework | Description |
---|---|
javaHeapSize | This property, introduced at 10.7, 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
|
Example usage
Below is a sample POST request for edit, formatted for readability:
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
{"status": "success"}