Skip To Content
ArcGIS Developer
Dashboard

Can Create Service

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 createService operation.

Request parameters

ParameterDetails
folderName

(Optional)

Indicates the folder where canCreateService will check for conflicting services.

Example

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

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:


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

{"status": "success"}