- URL:
- https://<root>/services/<serviceName.serviceType>/edit
- Methods:
- POST
- Version Introduced:
- 10.9
Description
This operation edits the properties of a 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 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 targeted toward the framework that hosts the GIS service. They define the life cycle and load balancing of the service.
- Service type properties—Properties targeted toward 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.
Request parameters
| Parameter | Details | 
|---|---|
| 
 (Required) | The JSON representation of the service and the properties that have been updated or added. | 
| 
 (Optional) | Introduced at 10.9.1. This parameter specifies whether the operation will run synchronously or asynchronously. If  Values:  | 
| 
 | The response format. The default format is  Values:  | 
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}
  }
}&async=false&f=pjson&tpken=Mb0ORrkLObNO2Q8FZoUCHHzSMzZi0CbhLHNRYMqqa6URG_ojQJF3rNsJAfRB23MyCrLwSmuaHPUo4AEIrUuoH1-4Ot5xh4565FtlQahXAhK2C7Sy0oydZhBwD8KdFSnVlnLr-e9uI5ovSWZ2lGNn9SwoV2MPMzeAh_5r-q-wgwF8DTT_nhuCXJGkMRy-48jjGS2aN5FI18STHZ8RAuKxGasH90SI3C7njZzlGCUrY5m6BDhCMsdpZA14GwNX8CisJSON Response examples
If async  is false , the following response is returned once a service is edited successfully:
{"status": "success"}If async  is true , the following response is returned. The value returned for jobs  can be used to access the job resource to track a job's status after it's been submitted. For more information, see the Job resource topic.
{
  "jobsUrl": "https://organization.domain.com/context/admin/jobs/ja2ca1a35-881c-400c-a49a-b26883002d6c",
  "jobID": "ja2ca1a35-881c-400c-a49a-b26883002d6c",
  "jobStatus": "SUBMITTED"
}