URL:
https://<root>/<serviceName>/TopographicProductionServer/addProduct
Methods:
POST
Required Capability:
Requires a Professional or Professional Plus user type account and a Topographic Mapping server extension license.
Version Introduced:
10.9

Description

The addProduct operation adds a definition of a map product to the Topographic Production Service resource that can be used to generate a map.

Request parameters

ParameterDetails

productDefinition

(Required)

The JSON definition of a map product. Review each property's help topic to learn more.

raster

(Optional)

The path to a raster on disk (server path) or the URL of an image service.

ancillaryLayers

(Optional)

A JSON array of additional layers to include in the final product. Syntax:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
[
	{
		"layer": "<URL of the layer>",
		"featureClass": "<name of the feature class to extract to>",
		"map": "<name of the map the layer will be inserted into>",
		"layerIndex": "<insertion index of the layer>"
	},
	...
]

f

(Required)

The response format. The default format is html.

Values: html | json | pjson

Example usage

Add a map product definition to the service using the addProduct REST operation.

Request URL and parameters:

Use dark colors for code blocksCopy
1
https://organization.example.com/<context>/rest/services/SampleService/TopographicProductionServer/addProduct
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
productDefinition=
{
  "version": 0,
  "name": "ExampleProduct",
  "type": "MTM",
  "gridType": "TM50",
  "description": "Test Masking Product",
  "sheetIDField": "NRN",
  "featureDataset": "BM",
  "extractionDatabase": "MTM.gdb",
  "scale": "1:50,000",
  "productVersions": [
    {
      "name": "TRD_4_5",
      "template": "MTM50_Layout.pagx"
    }
  ],
  "resources": [
    {
      "name": "SourceWorkspace",
      "type": 3,
      "value": ""
    },
    {
      "name": "AOILayer",
      "type": 2,
      "value": ""
    },
    {
      "name": "SheetID",
      "type": 1,
      "value": ""
    },
    {
      "name": "Layout",
      "type": 6,
      "value": ""
    },
    {
      "name": "ProductFiles",
      "type": 7,
      "value": ""
    }
  ],
  "dataExtraction": [
    {
      "name": "MapService",
      "type": 19,
      "id": "MapService",
      "description": "Test extract from Map Service",
      "parameters": [
        {
          "name": "input_data",
          "value": "https://organization.example.com/<context>/rest/services/PostGreTest/MapServer"
        },
        {
          "name": "AOI",
          "value": "[AOILayer]\\Extent"
        },
        {
          "name": "buffer",
          "value": "5 kilometers"
        },
        {
          "name": "spatial_relationship",
          "value": "esriSpatialRelIntersects"
        },
        {
          "name": "DefinitionQuery",
          "value": ""
        },
        {
          "name": "includeDatasets",
          "value": ""
        },
        {
          "name": "excludedDatasets",
          "value": ""
        }
      ]
    }
  ],
  "operations": [
    {
      "name": "MapResource",
      "type": 11,
      "id": "62C3FFDE-F2C9-401E-9F57-50BECC3E15AP",
      "description": "Update BaseMap DataSources",
      "parameters": [
        {
          "name": "in_map",
          "value": "BaseMap"
        }
      ]
    },
    {
      "name": "Grid",
      "type": 4,
      "id": "22C3FFDE-F4C9-401E-9F57-50BRCC3E15GN",
      "description": "BaseMap Grid",
      "toolName": "MakeGridsAndGraticulesLayer_topographic",
      "validation": 2,
      "properties": {
        "type": "PropertySet",
        "propertySetItems": [
          "AddOutputToMap",
          "BaseMap"
        ]
      },
      "parameters": [
        {
          "name": "in_grid_xml",
          "value": "[GridLocator]\\BaseMap"
        },
        {
          "name": "area_of_interest",
          "value": "[AOILayer]"
        },
        {
          "name": "target_feature_dataset",
          "value": "[SourceWorkspace]\\BM_GRD"
        },
        {
          "name": "out_layer_name",
          "value": "BMGrid"
        },
        {
          "name": "grid_name",
          "value": "BMGrid"
        },
        {
          "name": "configure_layout",
          "value": "CONFIGURE_LAYOUT"
        },
        {
          "name": "layout",
          "value": "[Layout]"
        },
        {
          "name": "map_frame",
          "value": "BaseMap Map Frame"
        }
      ]
    },
    {
      "name": "CreateMasks",
      "type": 7,
      "id": "35C3FFRF-F2C9-401E-9F57-30BECC3E15KF",
      "description": "Create Masks for Base Map",
      "toolName": "MakeMasksFromRules_topographic",
      "validation": 2,
      "properties": {
        "type": "PropertySet",
        "propertySetItems": [
          "MapName",
          "BaseMap"
        ]
      },
      "parameters": [
        {
          "name": "in_map",
          "value": "BaseMap"
        },
        {
          "name": "rule_file",
          "value": "[ProductFiles]\\MTM_Basemap_Masking_Rules.xml"
        },
        {
          "name": "out_feature_dataset",
          "value": "[SourceWorkspace]\\Masks"
        }
      ]
    },
    {
      "name": "ApplyMasks",
      "type": 7,
      "id": "93C3FFDE-F2C9-401K-9F57-50BRCC3E15RW",
      "description": "Apply Masks for Base Map",
      "toolName": "ApplyMasksFromRules_topographic",
      "validation": 2,
      "properties": {
        "type": "PropertySet",
        "propertySetItems": [
          "MapName",
          "BaseMap"
        ]
      },
      "parameters": [
        {
          "name": "in_map",
          "value": "BaseMap"
        },
        {
          "name": "rule_file",
          "value": "[ProductFiles]\\MTM_Basemap_Masking_Rules.xml"
        },
        {
          "name": "in_feature_dataset",
          "value": "[SourceWorkspace]\\Masks"
        }
      ]
    }
  ]
}
raster=https://gisserver.example.com/server/rest/services/DEM/ImageServer
ancillaryLayers=
{
	"layer": "https://gisserver.example.com/server/rest/services/SampleWorldCities/MapServer/1",
	"featureClass": "",
	"map": "BaseMap",
	"layerIndex": "0"
}
f=json

JSON Response syntax

The following is the syntax of a response:

Use dark colors for code blocksCopy
1
2
3
{
  "success": <true | false>
}

JSON Response example

The following is an example response when the product is added successfully:

Use dark colors for code blocksCopy
1
2
3
4
{
  "productName": "ExampleProduct",
  "success": true
}

The following is an example error response:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
  "error": {
    "code": -2147211754,
    "message": "Map product ExampleProduct already exists. Map product names must be unique.",
    "details": [
    ]
  }
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.