Create Service
- URL:http://server:port/arcgis/admin/services/createService(POST only)
- Required Capability:Publisher or Administrator
- Version Introduced:10.1
Description
Creates a new GIS service in the folder. A service is created by submitting a JSON representation of the service to this operation.
The JSON representation of a service contains the following four sections:
- Service Description Properties—Common properties that are shared by all service types. Typically, they identify a specific service.
- Service Framework Properties—Properties targeted towards the framework that hosts the GIS service. They define the life cycle and load balancing of the service.
- Service Type Properties —Properties targeted towards 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. The Service Types section in the Help describes the supported properties for each service.
- Extension Properties—Represent the extensions that are enabled on the service. The Extension Types section in the Help describes the supported out-of-the-box extensions for each service type.
Note:- The JSON is submitted to the operation URL as a value of the parameter service.
- The values of all parameters must be either JSON or double quoted strings ("").
Properties
|
Service Description Properties |
Description |
|---|---|
| serviceName |
The name of the service. |
| type | The type of the service. Values: GeometryServer | ImageServer | MapServer | GeocodeServer | GeoDataServer | GPServer | GlobeServer | SearchServer |
| description | An optional user-readable description for the service. |
| capabilities | The capabilities of the service. The domains of these values are specific to each service type. |
| f | The response format. The default response format is html. Values: html | json |
|
Service Framework Properties |
Description |
|---|---|
| clusterName |
The name of the cluster to which this service will be deployed. |
| minInstancesPerNode | The minimum number of instances of the service to create on each node within the cluster. The default is 1. |
| maxInstancesPerNode | The maximum number of instances of the service to create on each node within the cluster. The default is 2. |
| maxWaitTime | The maximum amount of time (in seconds) the framework should wait to get a free instance of the service. The default is 60 seconds. |
| maxStartupTime | When service instances are created in the GIS server, either as a result of the server starting or in response to a request of the server by a client, the time it takes to initialize the service instance is referred to as its creation time. The GIS server maintains a startup timeout that dictates the amount of time that can elapse on a startup attempt before the GIS server assumes its startup is hanging and cancels the creation of the service instance. The default is 300 seconds. |
| maxIdleTime | The maximum amount of time (in seconds) an idle instance of a service will be kept alive before it will be destroyed. The default is 1800 seconds. |
| maxUsageTime | The maximum amount of time (in seconds) an instance can service a request. The default is 600 seconds. |
| recycleInterval | The maximum amount of time (in hours) an instance of the service can live. The default is 24 hours. |
| loadBalancing | The load balancing algorithm the framework must use for using instances of a service among all the nodes within a cluster. The default is ROUND_ROBIN. Values: ROUND_ROBIN | FAIL_OVER |
| isolationLevel | The isolation level under which an instance of a service is run. The default is HIGH. Values: LOW | HIGH |
|
Service Type Properties |
Description |
|---|---|
| properties |
A bag of properties for the targeted service type. |
|
Extension Properties |
Description |
|---|---|
| typeName |
The type of extension. See the list of supported extension types. |
| capabilities | The capabilities for this extension type. |
| enabled | A Boolean indicating if the extension is to be enabled on this service. Values: true | false |
| properties | A bag of properties for the targeted extension type. |
Example
http://server:port/arcgis/admin/services/createService
service={
"serviceName": "Corine",
"type": "MapServer",
"description": "my map service",
"capabilities": "map,query,data",
"clusterName": "default",
"minInstancesPerNode": 1,
"maxInstancesPerNode": 2,
"maxWaitTime": 60,
"maxStartupTime": 300,
"maxIdleTime": 1800,
"maxUsageTime": 600,
"recycleInterval": 24,
"loadBalancing": "ROUND_ROBIN",
"isolationLevel": "HIGH",
"properties": {
"maxBufferCount": "100",
"virtualCacheDir": "http://SERVER1:6080/arcgis/server/arcgiscache",
"maxImageHeight": "2048",
"maxRecordCount": "1000",
"filePath": "\\\\machine\\data\\Corine\\CORINE6.msd",
"maxImageWidth": "2048",
"cacheOnDemand": "false",
"virtualOutputDir": "http://SERVER1:6080/arcgis/server/arcgisoutput",
"outputDir": "C:\\arcgisserver\\arcgisoutput",
"supportedImageReturnTypes": "MIME+URL",
"isCached": "false",
"ignoreCache": "false",
"clientCachingAllowed": "false",
"cacheDir": "C:\\arcgisserver\\arcgiscache\\Corine"
},
"extensions": [
{
"typeName": "KmlServer",
"enabled": true,
"capabilities": "SingleImage,SeparateImages,Vectors",
"properties": {
"minRefreshPeriod": "30",
"compatibilityMode": "GoogleEarth",
"imageSize": "1024",
"dpi": "96",
"endPointURL": "",
"featureLimit": "1000000",
"useDefaultSnippets": "false"
}
},
{
"typeName": "WFSServer",
"enabled": true,
"capabilities": "",
"properties": {
"appSchemaURI": "http://grid5:6080/arcgis",
"appSchemaPrefix": "arcgis",
"enableTransactions": "false"
}
},
{
"typeName": "WCSServer",
"enabled": false,
"capabilities": "",
"properties": {}
}
]
}