Can Create Service

URL:
https://<root>/services/canCreateService
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 canCreateService operation determines whether a specific service can be created successfully. It is recommended that you run this operation before attempting to create a service using the Create Service operation.

Request parameters

ParameterDetails

folderName

(Optional)

Indicates the folder where canCreateService will check for conflicting services.

Example
Use dark colors for code blocksCopy
1
folderName=TestFolder

serviceType

(Optional; Required if the service parameter is not used in the request)

The type of service that will be created. This is an optional parameter, though either the serviceType or service parameter must be used.

Example
Use dark colors for code blocksCopy
1
serviceType=MapServer

service

(Optional; Required if the serviceType parameter is not used in the request)

The service configuration in JSON format. For more information about the service configuration options, see createService. This is an optional parameter, though either the serviceType or service parameter must be used.

options

(Optional)

Provides additional information about the service, such as whether it is a hosted service.

f

The response format. The default response format is html.

Values: html | json | pjson

Example usage

The following is a sample POST request for the canCreateService 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
POST /context/admin/services/canCreateService HTTP/1.1
Host: organization.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

folderName=TestFolder&serviceType=MapServer&service={
  "serviceName": "FireWeatherWatch",
  "type": "FeatureServer",
  "description": "",
  "capabilities": "Map,Query,Data",
  "provider": "ArcObjects",
  "clusterName": "default",
  "minInstancesPerNode": 1,
  "maxInstancesPerNode": 1,
  "instancesPerContainer": 1,
  "maxWaitTime": 60,
  "maxStartupTime": 300,
  "maxIdleTime": 180,
  "maxUsageTime": 600,
  "loadBalancing": "ROUND_ROBIN",
  "isolationLevel": "HIGH",
  "configuredState": "STARTED",
  "recycleInterval": 24,
  "recycleStartTime": "00:00",
  "keepAliveInterval": -1,
  "private": false,
  "isDefault": false,
  "maxUploadFileSize": 0,
  "allowedUploadFileTypes": "",
  "properties": {
    "useLocalCacheDir": "true",
    "outputDir": "${arcgisoutput}",
    "cacheDir": "${arcgiscache}",
    "maxScale": "4000",
    "filePath": "/arcgis/framework/etc/data/WeatherWatch/FireWeatherWatch.msd",
    "maxRecordCount": "1000",
    "supportedImageReturnTypes": "MIME+URL",
    "clientCachingAllowed": "true",
    "isCached": "false",
    "virtualOutputDir": "/rest/directories/arcgisoutput",
    "maxExportTilesCount": "100000",
    "ignoreCache": "false",
    "exportTilesAllowed": "false",
    "cacheOnDemand": "false",
    "minScale": "295000000"
  },
  "extensions": [
    {
      "typeName": "WMSServer",
      "capabilities": "GetCapabilities,GetFeatureInfo,GetLegendGraphic,GetMap,GetSchemaExtension,GetStyles",
      "enabled": "true",
      "maxUploadFileSize": 0,
      "allowedUploadFileTypes": "",
      "properties": {
        "name": "SampleWorldCities",
        "title": "WMS"
      }
    },
    {
      "typeName": "KmlServer",
      "capabilities": "SingleImage,SeparateImages,Vectors",
      "enabled": "true",
      "maxUploadFileSize": 0,
      "allowedUploadFileTypes": "",
      "properties": {
        "compatibilityMode": "GoogleEarth",
        "useDefaultSnippets": "true",
        "featureLimit": "1000000",
        "minRefreshPeriod": "30",
        "imageSize": "1024",
        "dpi": "96"
      }
    },
    {
      "typeName": "FeatureServer",
      "capabilities": "Create,Query,Update,Delete,Uploads",
      "enabled": "false",
      "maxUploadFileSize": 0,
      "allowedUploadFileTypes": "",
      "properties": {}
    }
  ],
  "frameworkProperties": {},
  "datasets": []
}&options=&f=json&token=ELIMsyURgefHIZ_-x6PzynYsaxLNR30GbWE6PCpgD0Hu7dWQ3vmBLz3bljwvJC8a74K_XARVfs5lpmCkjLkMZANHIDgMHiwgwnNiQBbTWHEbNqJeodE9ipXYeUmlGkveMQ44JjNQlNGYim-LqV4DcrPynxBlvO0CsIT4RIB-OsYp6oU_jqS9xVHxcHwCtvu3rnikAqeb3S96aS0ntC-414Y23t1CWAVhDSmRrl7NyWgw-jN4VBZ3FvPnDDDoFooY

JSON Response example

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