Mapservice JSON configuration - merkator-software/GaiaBuilder-manual GitHub Wiki

Key Type Values Description
action string "publishSD", "publishImageSD", "publishScene", "publishVectortile", "publishTemplate", "deleteService" Required, must be publishSD when publishing a Mapserrvice. Must be publishImageSD when publishing a ImageService. Must be publishScene when publishing a SceneService. Must be publishVectortile when publishing a VectortileService. Must be publishTemplate when Publishing a APTX template.
change it to "deleteService" to delete the service and related content on ArcGIS Server and Portal for ArcGIS.
antialiasingMode string "None","Fastest", "Fast", "Normal", "Best" Optional, sets the geometry antialiasing mode
aprx string Required, the filename of the ArcGIS Pro document. This file should be in the same directory when publishing from Aprx
cachedirectory string Optional, the ArcGIS Server directory to use to store the map service cache
capabilities string "Map,Query,Data" Optional, the map service operations which the service should support, should contain a combination of "Map,Query,Data"
categories array string categories is specified with an array that lists all content categories to update on the item, each with full hierarchical path prefixed with /.
cim_to_layer bool true / false Optional, True allows ArcGIS Pro 3 / ArcGIS Enterprise 11 advanced CIM symbology on the Featureservice, False downgrades the symbology on the featurelayer to ArcGIS Javascript API 3 compatibility.
clientCachingAllowed bool true / false Optional, true allows clients to cache vectortiles locally
content_status string "authoritative" / "deprecated" Optional, label the content in portal as authoritative or deprecated
contentUser string Optional, the user account the published content must be assigned to
copydata bool true / false Optional, True allows data to be copied to ArcGIS Server when the data is not available using the server datastores. False will fail the deploy when the data is not available using the server datastores.
cpuMin string Optional, sets the minimum CPU resource allocation for the microservice (ArcGIS Enterprise on Kubernetes only)
cpuMax string Optional, sets the maximum CPU resource allocation for the microservice (ArcGIS Enterprise on Kubernetes only)
createCache bool true / false Optional, when set to true the Mapservice cache will be created or updated as the final step of publishing
credits string Optional, the Copyright credits of the mapservice
dateFieldsRespectsDaylightSavingTime bool true / false Optional, use daylight savings time when using dateFieldsTimezoneID
dateFieldsTimezoneID string "None", "W. Europe Standard Time", etc Optional, set the UTC time field to follow a specific time zone
description string Optional, description text of the mapservice, no (decode) HTML allowed
deprecateService bool true / false Optional, marks the service as deprecated and this makes the service invisible on the ArcGIS REST HTML. Set the content_status to "deprecated" to mark the service deprecated on Portal
disableIdentifyRelates bool true / false Optional, enable or disable the display of related information in identify results
enableDynamicLayers bool true / false Optional, enable or disable dynamic layers
extensions array extensionobjects Required, but can be an empty array, enable and configure Mapservice extensions
extent extentarray Optional, the extent as an array with two items: the lowerleft coordinates as an array and the upperright coordinates as an array
exportTilesAllowed bool true / false Optional, true allows Vectortile exports
FeatureService object Optional, can contain overrides for mapservice or featureservice specific portal configurations, allowed keywords: description, layerDataJson, portaldescription, portalTitle, sourceitemid, summary, tags
forcedeletetiles bool true / false Optional, deletes the existing tiles on a tiled mapservice cache
forcedeletecache bool true / false Optional, deletes the tiled mapservice cache
forcecreatetiles bool true / false Optional, recreates all tiles on a new or existing tiled mapservice cache\
frameworkProperties object {} Optional, SOI and SOE configuration properties, default {} when no SOI or SOE is configured. The configuration depends on your SOI or SOE, use the Import Mapservice To JSON From Current Portal tool from the Toolbox in ArcGIS Pro to fetch the existing configuration from your ArcGIS Server
keepAliveInterval integer -1 - 3600 Optional, sets the interval in seconds to check and repair instances. -1 disables the check
layerDataJson string Optional, the filename of the JSON configuration for the Mapservice in Portal for ArcGIS
mapx string Required, the filename of the ArcGIS Pro Mapx. This file should be in the same directory when publishing from Mapx and combined with the -m option
mapxjson string Required, the filename of the ArcGIS Pro Mapx JSON. This file should be in the same directory when publishing from Mapxjson and combined with the -q and -m option
max_cached_scale double Optional, required when creating a Vectortile Service. The maximum (largest) scale at which tiles will be generated.
maxBufferCount string Optional, sets the maxBufferCount of a Vectortile service, the number must be within double quotes as a string
maxDomainCodeCount integer 1 - 1000000 Optional, sets the maximum number of coded domains
maxExportTilesCount string Optional, sets the maximum amount of tiles which can be exported on a Vectortile service, the number must be within double quotes as a string
maxIdleTime integer 1 - 86400 Optional, sets the time in seconds an idle Mapservice can be kept running
maxImageHeight integer 256 - 8192 Optional, sets the maximum image height
maxImageWidth integer 256 - 8192 Optional, sets the maximum image width
maxInstancesPerNode integer 1 - 25 Optional, sets the maximum number of instances of a Mapservice per server
maxLOD string Optional, sets the maximum LOD of a Vectortile service, the number must be within double quotes as a string
maxRecordCount integer 1 - 100000 Optional, sets the maximum number of records returned by a query operation
maxRecordCountFactor integer > 1 Optional, sets the maxRecordCountFactor on a service
maxSampleSize integer 1 - 1000000 Optional, sets the maximum sample size
maxStartupTime integer 1 - 2400 Optional, sets the maximum startup time in seconds
maxUsageTime integer 1 - 2400 Optional, sets the maximum time in seconds an instance can use to process a request before a timeout is returned
maxWaitTime integer 1 - 2400 Optional, sets the maximum time in seconds an client can wait for a request to be processed before a timeout is returned
MapService object Optional, can contain overrides for mapservice or feature specific portal configurations, allowed keywords: description, portaldescription, portalTitle, summary, tags
memoryMin string Optional, sets the minimum memory resource allocation for the microservice (ArcGIS Enterprise on Kubernetes only)
memoryMax string Optional, sets the maximum memory resource allocation for the microservice (ArcGIS Enterprise on Kubernetes only)
metadatafromlayer bool true / false Optional, reads the metadata from the layer in the Enterprise Geodatabase. Setting summary, portalTitle, portaldescription, tags,credits or uselimitations in this configuration overrules the metadata from the database.
minInstancesPerNode integer 0 - 25 Optional, sets the minimum number of instances of a Mapservice per server
min_cached_scale double Optional, required when creating a Vectortile Service. The minimum (smallest) scale at which tiles will be generated.
minLOD string Optional, sets the minimum LOD of a Vectortile service, the number must be within double quotes as a string
name string Required, the service name
outputdir string Optional, the output directory a geoprocessing service deployed to this ArcGIS Server should use, overrides the default from GaiaBuilder.ini
portaldescription string Optional, description text for the portal item, this discription can contain json-encoded HTML
portalFolder string Optional, the Portal folder the Mapservice is published to
portalLogo string Optional, configures the item logo in portal with specified file. This file should be in the same directory
portalTitle string Optional, sets a different title for the portal item.
protected bool true / false Optional, protect the items in portal from accidental removal
recycleInterval integer 1 - 48 Optional, sets the recycle interval of the service in hours
recycleStartTime string "00:00" - "23:59" Optional, sets the recycle start time, must be a formatted time string HH:mm
remove_extensions string Optional, comma separated list of extensions. The listed extensions will be removed from the service configuration before the service is published. Use this when a SOE or SOI is blocking the publication process
replicaMin integer Optional, sets the minimum number of replicas for the microservice (ArcGIS Enterprise on Kubernetes only)
replicaMax integer Optional, sets the maximum number of replicas for the microservice (ArcGIS Enterprise on Kubernetes only)
schemaLockingEnabled bool true / false Optional, enable or disable schema locking by the service
serverFolder string Optional, the ArcGIS Server folder the Mapservice is published to
servers object ServerObject Required, One or more server or environment configurations
serverconfiguration string Optional, can replace the servers object with a separate servers JSON file configuration, can be used to configure the same servers configuration for different services and updating a service configuration won't update the settings in this file.
stepconfiguration string Optional, the steps configured in this file will overrule the default steps from the commandline
serviceType string "MapServer" Required, must be MapServer
service_type string 'ONLINE', 'EXISTING' Optional, required when creating a Vectortile Service. When ONLINE is configured the Tile scheme will be for ArcGIS Online. When EXISTING is configured a tiling_scheme configuration file should be configured in this file
sharedSoc bool true / false Optional, true will publish the service to a Shared Instance SOC on ArcGIS Enterprise 10.7 or higher
sourceitemid string 32 character hexidecimal string Optional, the ItemID which the service should be registered under in Portal for ArcGIS, configuring an empty string will generate the itemid from a MD5 Hash of the URL subfolder, which will yield the same ItemIDs in your DTAP when the services are published to different servers, but webadaptor, servicename and servicefolder are the same on these servers. Omitting this property will assign a random Item ID
summary string Required (optional with metadatafromlayer set to true), the summary of the Mapservice
tags string Required (optional with metadatafromlayer set to true), comma separated list of tags for the service
textAntialiasingMode string "None", "Normal", "Force" Optional, sets the label text antialiasing mode
templateaprx string Optional, template aprx file in the repository to use for importing mapx files
tilingscheme TilingSchemeObject Optional, the settings for a tiles mapservice cache.
tiling_scheme string Optional, required file name of a tiling_scheme XML file when publishing a vectortile service with service_type = EXISTING, the XML file is expected in the same directory
tile_structure string 'INDEXED', 'FLAT' Optional, required when creating a Vectortile Service. Defines the tile_structure of the package
uselimitations string Optional, use limitations text of the mapservice
validateDatasources bool true / false Optional, Default true, fails the build when the datasources are not valid
vtpk string Optional, required when creating a Vectortileservice, the name of the VTPK file to generate.
layerDescriptionTemplate string Optional, template text for individual layer description, placeholders {layerName}, {dataset}, {definitionExpression}.
tableDescriptionTemplate string Optional, defaults to layerDescriptionTemplate when not present, template text for individual table description, placeholders {layerName}, {dataset}, {definitionExpression}.
layerTitleTemplate string Optional, template text for individual layer or table title, placeholders {layerName}.
layerSnippetTemplate string Optional, template text for individual layer or table snippet, placeholders {layerName}.
registerMapserviceLayers bool true / false Optional, register the individual layers in the mapservice as Portal items.
registerMapserviceTables bool true / false Optional, register the individual tables in the mapservice as Portal items.
registerFeatureserviceLayers bool true / false Optional, register the individual layers in the featureservice as Portal items.
registerFeatureserviceTables bool true / false Optional, register the individual tables in the featureservice as Portal items.
deleteObsoleteRegisteredLayersTables bool true / false Optional, deletes obsolete registered layers or tables from your Portal when set to true. Requires version 2.6 / 3.1

Steps

The properties below can be included to force the configured step to be executed regardless the setting from the commandline

  • configureService | bool | true / false | Optional, will override the configureService parameter from the commandline
  • createSDFile | bool | true / false | Optional, will override the createSDFile parameter from the commandline
  • createCache | bool | true / false | Optional, will override the createCache parameter from the commandline
  • deleteService | bool | true / false | Optional, will override the deleteService parameter from the commandline
  • installService | bool | true / false | Optional, will override the installService parameter from the commandline
  • lyrxrestore | bool | true / false | Optional, will override the lyrxrestore parameter from the commandline
  • lyrximport | bool | true / false | Optional, will override the lyrximport parameter from the commandline
  • mapxrestore | bool | true / false | Optional, will override the mapxrestore parameter from the commandline
  • mapximport | bool | true / false | Optional, will override the mapximport parameter from the commandline
  • replaceDatasources | bool | true / false | Optional, will override the replaceDatasources parameter from the commandline
  • startService | bool | true / false | Optional, will override the startService parameter from the commandline
  • stopService | bool | true / false | Optional, will override the stopService parameter from the commandline

ServerObject

Any of the properties above can be re-used in the serverobject and this overwrites the global setting

Serverobject use the environment name as the Key Value

Key Type Values Description
datasources array Optional, instructions on how to update the datasources in the Layer of the Map, see Datasources below for more instructions
sharing json dictionary {string:string / list} {"unshare" : "true / false", "esriEveryone": "true / false","organization": "true / false","groups": ["Group1","Group2" ]} ,"managementgroups" :[ "Shared update group"]
sharingMapService, sharingFeatureService, sharingXXX json dictionary {string:string / list} {"unshare" : "true / false", "esriEveryone": "true / false","organization": "true / false","groups": ["Group1","Group2" ]} ,"managementgroups" :[ "Shared update group"]

datasources

Datasources contains an array of objects, depending on desired behavior when restoring the mapx

  • Insert the connections from a mapx.json file with multiple options of possible connections in the ArcGIS Server Datastore. For instance, you have a connection to both the test database and the acceptance database on your acceptance ArcGIS Server. In order to force GaiaBuilder to restore the username to the full connection string of the acceptance database, you can add {"databasehint" : "acceptance_db"} to the datasources array. "acceptance_db" must be present in as text in the connectionstring and must bu unique for this database. It can be any text from the connectionstring, but preferably, it is a reference to the database name.
{
    "datasources" : [
        {"databasehint" : "acceptance"}
    ]
}
  • Rewrite a OSA database connection to SQL Server. In this scenario, you stored a mapx or a lyrx file to your repository with OSA connections, which do not contain credentials. Before GaiaBuilder imports the file, it can rewrite the connection string to point to the right database server and database using rewrite rules. The key on each rule is the text which will be replaced on the connectionstring by the value found on that key
{
    "datasources" : [
        {"rewrites" : {
            "develop_db_server" : "test_db_server",
            "develop_db_name" : "test_db_name"
        }
    ]
}

TilingSchemeObject

Key Type Values Description
numOfScales integer 1 - 20 Required, the number of scale levels in the tile cache
scales array double Required, the scales in the mapservice cache
dots_per_inch integer 75 - 300 Required, the dpi of the tiles, most often 96 dpi is used
tileOrigin_x double 1 - 20 Required, the tiling scheme X origin
tileOrigin_y double 1 - 20 Required, the tiling scheme Y origin
tile_size string "128 x 128", "256 x 256","512 x 512","1024 x 1024" Required, the size in pixels of the tile images
cache_tile_format string "PNG", "PNG8", "PNG24", "PNG32", "JPEG" and "MIXED" Required, the image format
tileCompressionQuality integer 1 - 100 Required, the image compression for JPEG , possible values are 1-100, when one of the PNG formats is used, this value is ignored
storage_format string "COMPACT", "EXPLODED" Required, "COMPACT" (Tiles will be grouped into large files called bundles. This storage format is efficient in terms of storage and mobility.) or "EXPLODED"
update_extent string "MAXOF","MINOF",string with space delimited string of coordinates Required, "MAXOF" (The maximum extent of all inputs will be used.), "MINOF" (The minimum area common to all inputs will be used.) or a string with space delimited string of coordinates—The extent of the specified string will be used. Coordinates are expressed in the order of x-min, y-min, x-max, y-max.
num_of_caching_service_instances integer 1 - 3 Required, the number of caching instances used for generating or deleting cache tiles