Edit (Service)

URL:
https://<root>/services/<ServiceName>.<ServiceType>/edit
Methods:
POST
Required Capability:
Access allowed with either the "Update", "Delete", or "Security and infrastructure" privileges, or the Publisher role
Version Introduced:
10.9

Description

The edit 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

ParameterDetails

service

(Required)

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

async

(Optional)

Introduced at 10.9.1. This parameter specifies whether the operation will run synchronously or asynchronously. If false, the operation is run synchronously. If true, the operation is run asynchronously and the response returns a JSON object containing job information that can be used to track the job's status. The default value is false.

Values: true | false

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:

Use dark colors for code blocksCopy
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
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-48jjGS2aN5FI18STHZ8RAuKxGasH90SI3C7njZzlGCUrY5m6BDhCMsdpZA14GwNX8Cis

JSON Response examples

If async is false, the following response is returned once a service is edited successfully:

Use dark colors for code blocksCopy
1
{"status": "success"}

If async is true, the following response is returned. The value returned for jobsUrl 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.

Use dark colors for code blocksCopy
1
2
3
4
5
{
  "jobsUrl": "https://organization.domain.com/context/admin/jobs/ja2ca1a35-881c-400c-a49a-b26883002d6c",
  "jobID": "ja2ca1a35-881c-400c-a49a-b26883002d6c",
  "jobStatus": "SUBMITTED"
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.