- URL:
- https://<root>/services/createService
- 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 create
operation creates a GIS service in a folder (either the root folder or a designated subfolder) by submitting a JSON representation of the service or by uploading a service definition.
A service's JSON representation 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 targeting the framework that hosts the GIS service. They define the life cycle and load balancing of the service.
- Service Type Properties—Properties targeting the core service type as identified by the server administrator. Since these properties are associated with a server object, they vary across the service types.
- Extension Properties—Properties that represent the extensions that are enabled on the service.
Scaling in ArcGIS Enterprise on Kubernetes
When creating a service, you can set manual scaling or autoscaling using the service
parameter. Introduced at ArcGIS Enterprise on Kubernetes 10.9.1, autoscaling allows administrators to configure and deploy systems that respond to unexpected performance demands with minimal intervention and overhead. The ArcGIS Enterprise on Kubernetes autoscaling feature uses horizontal pod autoscaling, which, in response to an increase in resource use, deploys more pods according to the values set by the administrator.
When a specific CPU utilization threshold (average
) is crossed, ArcGIS Enterprise on Kubernetes will scale the number of pods up to the maximum (max
) values set in the replicas
JSON object. When utilization drops, and the additional resources are no longer needed, the system scales itself down to no lower than the minimum (min
) value set in the replicas
JSON object. For more information about how to set manual or autoscaling for a service, see the Service scaling properties section below.
Request parameters
Parameter | Details |
---|---|
(Optional) | The JSON representation of the service. |
(Optional) | The upload ID for a service definition that contains information about service properties, capabilities, and the service type. |
(Optional) | The service scaling properties, represented as a JSON object. For information about the editable properties for the Example
|
| The response format. The default response format is Values: |
Service scaling properties
The following properties can be modified for the service
parameter:
Property | Details |
---|---|
| The number of replicas for the service. The default value for Example
For organizations using ArcGIS Enterprise 11.2 on Kubernetes or later versions, version 2 (v2) of the autoscaling feature can be enabled by passing in the JSON object below and modifying the Autoscaling can be enabled by adjusting the Example
Organizations using ArcGIS Enterprise on Kubernetes 10.9.1 can enable version 1 of the autoscaling feature by passing in the JSON object below and modifying the Example
|
| The minimum and maximum resource allocations for the service, including the minimum memory ( Example
|
Example usage
The following is a sample POST request for the create
operation, formatted for readability:
POST /context/admin/services/createService HTTP/1.1
Host: organization.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
serviceJson={
"serviceName": "FireWeatherWatch",
"type": "MapServer",
"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/FireWatch/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": "FireWeatherWatch",
"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": []
}&inputUploadId=&serviceScalingSpec={
"scalingSpec": [
{
"deploymentType": "MapServer",
"replicas": {
"min": 2,
"max": 2,
"scalingMode": "manual"
},
"resources": {
"memoryMin": "1.25Gi",
"memoryMax": "2.5Gi",
"cpuMin": "0.225",
"cpuMax": "3"
}
}
]
}&f=pjson&token=Mb0ORrkLObNO2Q8FZoUCHHzSMzZi0CbhLHNRYMqqa6URG_ojQJF3rNsJAfRB23MyCrLwSmuaHPUo4AEIrUuoH1-4Ot5xh4565FtlQahXAhK2C7Sy0oydZhBwD8KdFSnVlnLr-e9uI5ovSWZ2lGNn9SwoV2MPMzeAh_5r-q-wgwF8DTT_nhuCXJGkMRy-48jjGS2aN5FI18STHZ8RAuKxGasH90SI3C7njZzlGCUrY5m6BDhCMsdpZA14GwNX8Cis
JSON Response example
{"status": "success"}