Skip To Content
ArcGIS Developers
Dashboard

Generate Product

Description

License:

The use of this resource requires an ArcGIS GIS Server Advanced license and a Production Mapping Server or Defense Mapping Server license.

The generateProduct operation automates the process of producing a layout or map based on an existing map product definition.

Request parameters

ParameterDetails
productName

(Required)

The name of the product.

This value must match a name from https://<topographicProductionServer-url>/products.

productVersion

(Required)

The version of the product to generate.

This value must match a name from the productVersion property in https://<topographicProductionServer-url>/products.

aoiLayer

(Required)

The URL of the layer defining the product's area of interest.

aoiFeatureId

(Required)

The object ID of the area of interest feature in the aoiLayer.

layerExclusion

(Optional)

The json array of layer names to exclude from the product.

Syntax:

[
  "url of the layer",
  "url of the layer",
  "url of the layer"
]

ancillaryLayers

(Optional)

The json array of layer URLs to include in the final product.

Syntax:

[
  {
  "layer": "url of the layer",
  "map": "name of the map the layer will be inserted into",
  "layerIndex": "insertion index of the layer"
  },
  ...
]

Ancillary layers are added as feature service layers of the final product and don't extract data to the local geodatabase.

Note:

This parameter supports services located in the same portal site as the server object extension (SOE) or services that are publicly available. The featureClass, map, and layerIndex properties in the array are optional. If the dataset is identifiable from the feature service, it is not necessary to provide the featureClass property. The default values are 0 for layerIndex and BaseMap for map.

outputType

(Required)

The string identifying the type of output. Acceptable values are aprx, pagx, and pdf.

Note:

The APRX and PAGX output types are exported as ZIP files that include a file geodatabase.

Response properties

The following details are for the properties of a response:

PropertyDetails
jobId

The job identifier.

statusUrl

The URL to query the status of the running job.

Example usage

The following example URL queries the generateProduct REST operation:

https://machine.domain.com/server/rest/services/SampleService/TopographicProductionServer/generateProduct?productName=MTM50&productVersion=TRD45&areaOfInterestLayer=https%3A%2F%2Fmachine.domain.com%2Fserver%2Frest%2Fservices%2FAOIService%2FMapServer%2F0&areaOfInterestFeatureId=120733&layerExclusion=&outputType=pdf&f=json

JSON Response syntax

The following is the syntax of a response:

{
"jobId": <jobID>,
"statusURL": <statusURL>,
"success": true | false
}

JSON Response example

The following is an example of a successful response:

{
 "jobId": "0AECA2CE-8690-4EEC-935B-CEA8E403765F",
 "statusUrl": "https://machine.domain.com/server/rest/services/SampleMapService/MapServer/exts/TopographicProductionServer/jobs/job/0AECA2CE-8690-4EEC-935B-CEA8E403765F",
 "success": true
}