- URL:
- https://<root>/services/canCreateService
- Methods:
POST- Version Introduced:
- 10.9
Access requirements
Required privileges
The Enterprise Administrator API requires privilege-based access. An administrator must be assigned a specific user privilege, or role, to access any given endpoint. Listed below are the user privileges or roles an administrator can be assigned that provides access to this endpoint. If multiple privileges are listed, only one needs to be assigned to gain access.
Tokens
This API requires token-based authentication. A token is automatically generated for administrators who sign in to the Enterprise Administrator API directory's HTML interface. Tokens generated in this way are stored for the entirety of the session.
Those accessing the API directory outside of the HTML interface will need to acquire a session token from the generate operation in the Enterprise Directory API. For security reasons, all POST requests made to the Enterprise Administrator API must include a token in the request body.
Description
The can 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
| Parameter | Details |
|---|---|
(Optional) | Indicates the folder where Example |
(Optional; Required if the | The type of service that will be created. This is an optional parameter, though either the Example |
(Optional; Required if the | The service configuration in JSON format. For more information about the service configuration options, see createService. This is an optional parameter, though either the |
(Optional) | Provides additional information about the service, such as whether it is a hosted service. |
| The response format. The default response format is Values: |
Example usage
The following is a sample POST request for the can operation, formatted for readability:
POST /<context>/admin/services/canCreateService HTTP/1.1
Host: organization.example.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-jN4VBZ3FvPnDDDoFooYJSON Response example
{"status": "success"}