- URL:
- https://<root>/services/createService
- Methods:
POST
- Required Capability:
- Access allowed with any authorized privilege
- Version Introduced:
- 10.1
Description
The create
operation creates a new GIS service in a folder. A service is created by submitting a JSON representation of the service to this operation.
The JSON representation of a service contains a number of properties that are divided into five sections:
- Service description properties
- Service framework properties
- Service type properties
- Extension properties
- Framework properties
Request parameters
Parameter | Details |
---|---|
| The JSON representation of the service being created, which includes service description, service framework, service type, extension, and framework properties. Example
|
| The response format. The default response format is Values: |
Service description properties
The following table outlines the common properties shared by all service types that are used to identify a specific service.
Property | Description |
---|---|
| The name of the service. Example
|
| The type of service. Example
|
| An optional user-readable description for the service. Example
|
| The capabilities of the service. The domains of these values are specific to each service type. Example
|
Service framework properties
The following table outlines the properties targeted toward the framework that hosts the GIS service, which define the life cycle and load balancing of the service.
Property | Description |
---|---|
| The name of the cluster to which this service will be deployed. Example
|
| The minimum number of instances of the service to create on each node in the cluster. The default is 1. Example
|
| The maximum number of instances of the service to create on each node in the cluster. The default is 2. Example
|
| The maximum amount of time (in seconds) the framework will wait to get a free instance of the service. The default is 60 seconds. Example
|
| The maximum amount of time (in seconds) that can elapse on a startup attempt. 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. When the maximum startup time has passed, it is assumed the startup has stopped responding and the GIS server cancels the creation of the service instance. The default is 300 seconds. Example
|
| The maximum amount of time (in seconds) an idle instance of a service will remain idle before it is stopped. The default is 1800 seconds. Example
|
| The maximum amount of time (in seconds) an instance can service a request. The default is 600 seconds. Example
|
| The maximum amount of time (in hours) an instance of the service can run. The default is 24 hours. Example
|
| Specifies the load balancing algorithm the framework will use for instances of a service among all the nodes in a cluster. The default is Values: |
| Specifies the isolation level under which an instance of a service will run. The default is Values: |
Service type properties
The following table outlines the property that targets the core service type as seen by the server administrator. Since this property is associated with a server object, it varies across the service types.
Property | Description |
---|---|
| A JSON object containing the properties for the targeted service type. Example
|
Different properties are required for map, image, geoprocessing, and geocoding services.
Property | Description |
---|---|
(Required) | The full path, including the file name, of the map document file. Example
|
(Optional) | Specifies whether rendering will be used in Tile Package Clients such as ArcGIS Pro, Map Viewer, and JSAPI. When Values: |
(Optional) | The maximum number of records that will be returned by query or data operations. The default value is 500. Example
|
(Optional) | The time zone that will be used by the service using the Windows ID for the time zone (for example, Pacific Standard Time or Eastern Standard Time). Once set, it is assumed that all date field values will be stored in the specified time zone and data will be converted from UTC to the time zone specified before changes are written to the database. This property, if configured, only applies to date fields that are not used to time enable a layer and are not used in editor tracking date fields. When enabling this property, it must be placed immediately after Example Example
|
(Optional) | If Once set, it is assumed that all date field values will be stored in the specified time zone and data will be converted from UTC to the time zone specified before changes are written to the database. This property, if configured, only applies to date fields that are not used to time enable a layer and are not used in editor tracking date fields. When enabling this property, it must be placed immediately after Values: |
(Optional) | The maximum number of selected features that can be buffered for map operations. The default value is 100. Example
|
(Optional) | The maximum number of records that will be sampled when computing a class breaks renderer, which is used by the Generate Renderer operation. Example
|
(Optional) | The maximum image width allowed for requests. The default is 2048. Example
|
(Optional) | The maximum image height allowed for requests. The default is 2048. Example
|
(Optional) | The supported image return types. The default types are MIME+URL Example
|
(Optional) | A Boolean flag that specifies whether the map service will be cached ( Values: |
(Optional) | A Boolean flag that specifies whether the map service will ignore the cache ( Values: |
(Optional) | A Boolean flag that specifies whether cache tiles will be created on demand and added to the server cache directory as users navigate the map ( Values: |
(Optional) | A Boolean flag that specifies whether the REST handler will be disabled from caching all static resources, such as map service resource, layer resource, legends, and so on ( Values: |
(Optional) | A Boolean flag that specifies whether clients will be allowed to cache tiles ( Values: |
(Optional) | The physical directory where the tiles will be stored. Example
|
(Optional) | The virtual directory where the tiles can be accessed. Example
|
(Required) | The physical directory where the temporary output files will be created. Example
|
(Required) | The virtual directory where the output files can be accessed. Example
|
(Optional) | The number of seconds between validity checks or repairs on SDE data connections used in a map service. Example
|
(Optional) | A Boolean tag that specifies whether the map service will acquire schema locks for map layers from a geodatabase ( Values: |
(Optional) | The maximum number of domain codes that can be returned from all fields, subtypes, layers, and tables in a map service. The default value is 25000. Example
|
(Optional) | A Boolean that specifies whether the ArcGIS Server map caching mechanism will write bundle files to a local directory and copy them to a shared cache directory ( Values: |
(Optional) | Specifies the antialiasing mode that will be used for drawing vectors in the map. The default is Values: |
(Optional) | Specifies the antialiasing mode that will be used for drawing vectors in the map. The default is Values: |
(Optional) | A Boolean flag that specifies whether the processing of related records as a part of the identify results will be disabled. If there are too many related records, this may improve the performance of the Values: |
(Optional) | A Boolean flag that specifies whether the map service will allow dynamic layer functionality such as reordering layers, changing symbology per request, and so on ( Values: |
(Optional) | The workspace connections that will be available for the web clients applications for adding dynamic layers per request. This is a string value representing the JSON array containing JSON objects describing the workspace connection. Example
|
| Specifies whether the performance of a map service that uses static, unchanging data will be optimized ( Values: |
| The value that will be returned for max-age as the cache-control response header by the Export operation and the Tile resource. If no value is provided, the default value of 0 seconds for the However, if client caching is not allowed, the max-age value for tile responses will always be 0, and any value provided for Example
|
| Specifies whether the cached map service will render the image using the cache tiles. When set to Values: |
| Added at 10.8.1. Specifies whether starting a map service when a data source is inaccessible will fail. By default, when the data source of a layer or stand-alone table is inaccessible, a map service will start without listing broken layers or tables in its resources. However, when this property is set to Values: |
Property | Description |
---|---|
(Required; Optional if | The path to the published raster dataset or raster layer. Example
|
(Required; Optional if | The connection properties of a geodatabase containing the published raster dataset. |
(Required if | The published raster dataset name in the geodatabase specified by |
(Required; Optional if | The published classic image server service URL |
(Optional) | The maximum number of columns of the image returned by the Export Image operation. Example
|
(Optional) | The maximum number of rows of the image returned by the Export Image operation. Example
|
(Optional) | The supported image return types. The default types are Example
|
(Optional) | The maximum number of images that will be used for generating a mosaic image. Example
|
(Optional) | The maximum number of records that can be fetched. Example
|
(Optional) | The maximum number of images that can be downloaded. Example
|
(Optional) | The transmission compressions that can be used. Example
|
(Optional) | Specifies the level of raster item metadata that can be used. Values: |
| The visible fields for the image service. Example
|
(Optional) | The list of allowed mosaic methods. Example
|
(Optional) | Specifies the mensuration capabilities that can be used. Values: |
(Optional) | The default compression quality. Example
|
(Optional) | The default resampling method. Example
|
(Optional) | The physical output directory. Example
|
(Optional) | The virtual output directory. Example
|
(Optional) | The number of seconds between validity checks or repairs on SDE data connections used in a map service. Example
|
(Optional) | A list of physical directories for direct download. Each list entry must be separated by a semicolon ( |
(Optional) | A list of virtual directories for direct download. Each list entry must be separated by a semicolon ( |
(Optional) | A list of published raster function templates ( |
(Optional) | A list of published raster types ( |
(Optional) | A Boolean flag that specifies whether the performing of a raster function is allowed. Values: |
(Optional) | A Boolean flag that specifies whether pseudo-color images will be converted to RGB images. Values: |
(Optional) | A list of physical directories for storing uploaded images. Each list entry must be separated by a semicolon ( |
(Optional) | Specifies the published source data type. Values: |
(Optional) | A Boolean flag that specifies whether the map service will be cached ( Values: |
(Optional) | A Boolean flag that specifies whether the map service will use the cache ( Values: |
(Optional) | A Boolean tag that specifies whether cache tiles will be created on demand and added to the server cache directory as users navigate the map ( Values: |
(Optional) | The physical directory where the tiles will be stored. Example
|
(Optional) | The virtual directory where the tiles can be accessed. Example
|
(Optional) | A Boolean that specifies whether the ArcGIS Server map caching mechanism will write bundle files to a local directory and copy them to a shared cache directory ( Values: |
(Optional) | A Boolean flag that specifies whether clients can cache tiles locally ( Values: |
(Optional) | The value returned for max-age as the cache-control response header by an Export Image request and the Tile resource. If no value is provided, the default value of 43200 seconds for the However, if client caching is not allowed, the max-age value for tile responses will always be 43200, and any value provided for Example
|
Parameters | Details |
---|---|
(Required) | The path to the toolbox that is the source of the geoprocessing service tasks. Example
|
(Optional) | Specifies whether the client will perform operations for this service synchronously or asynchronously. If performed synchronously, the client waits until the server has completed the current running operation. If performed asynchronously, the client can do other work while the server completes the current operation. The default is Values: |
(Optional) | A Boolean flag that specifies whether a map server will be used to draw the geoprocessing results. The default is Values: |
(Optional) | The maximum number of features the geoprocessing service will return. The default is 1000. Example
|
(Optional) | A Boolean flag that specifies whether tool processing messages will be included in geoprocessing service messages. The default is Values: |
(Required) | The path to the jobs directory where the geoprocessing service output will be written. Example
|
(Optional) | The URL to the jobs directory. Example
|
(Optional) | The path to the directory that will return the written files. Example
|
(Optional) | The URL to the output directory. Example
|
(Optional) | A Boolean flag that specifies whether the temp directory will be used for the jobs directory when running tasks. The default is Values: |
Parameters | Details |
---|---|
(Required for locators in databases) | The parameters for a connection to the geodatabase storing the locator Example
|
( Required for file-based locators) | The path to the location on disk where the locator file is stored Example
|
(Required) | The name of the address locator for the geocode service. Example
|
(Optional) | The suggested number of addresses that will be sent to a server in one batch geocoding request. The default is 1000. Example
|
(Optional) | The maximum number of result records that can be processed in one batch geocoding request. The default is 1000. Example
|
(Optional) | The maximum number of result records that can be returned by the Example
|
Extension properties
The table below outlines the properties that represent the extensions that are enabled on a service.
Property | Description |
---|---|
| The type of extension. See the list of supported extension types. Example
|
| The capabilities of the extension type. Example
|
| A Boolean that specifies whether the extension will be enabled on the service. Values: |
| A bag of properties for the targeted extension type. Example
|
Framework properties
The table below defines the property used to determine the heap size that will be applied to a service.
Property | Description |
---|---|
| The heap size for a particular service, which will override the default heap size properties you can set for all services using the Edit operation. Providing a value for Example
|
Example usage
The following is a sample POST request for the create
operation:
POST /webadaptor/admin/services/createService HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
service={
"serviceName": "Test",
"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": "https://SERVER:6080/arcgis/server/arcgiscache",
"maxImageHeight": "2048",
"maxRecordCount": "1000",
"filePath": "\\\\machine\\data\\Corine\\CORINE6.msd",
"maxImageWidth": "2048",
"cacheOnDemand": "false",
"virtualOutputDir": "https://SERVER: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": "https://grid5:6080/arcgis",
"appSchemaPrefix": "arcgis",
"enableTransactions": "false"
}
},
{
"typeName": "WCSServer",
"enabled": false,
"capabilities": "",
"properties": {}
}
],
"frameworkProperties": {
"javaHeapSize": "64"
}
}&f=json
JSON Response examples
The following is a sample success response for the create
operation, indicating that the service was created successfully:
{
"status": "success"
}
The following error response is returned when an attempt is made to create a service with ArcMap as its service provider:
{
"status": "error",
"messages": ["Failed to create the service 'SampleWorldCities10x.MapServer'. This service cannot be created because the ArcObjects provider is no longer supported. Starting at version 11.0, you must use the ArcObjects11 provider."],
"code": 500
}