Update Product

URL:
https://<root>/<serviceName>/TopographicProductionServer/updateProduct
Methods:
GET
Required Capability:
Requires an ArcGIS GIS Server Advanced license and a Production Mapping or Defense Mapping server extension license
Version Introduced:
10.9

Description

The updateProduct operation updates properties of a product.

Request parameters

ParameterDetails

productName

(Required)

The name of the product.

description

(Optional)

The new description for the product.

enabled

(Optional)

Enables or disables the product. If a product is disabled, the generateProduct operation returns an error for that product.

sheetIDField

(Optional)

Updates the sheet ID field.

raster

(Optional)

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

productVersions

(Optional)

Indicates the product version. Use the following syntax to add or update the version:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
{
"operation": "<add | update>",
"versions": [
	{
		"name":"<name of version>",
		"template": "<name of template>"
	},
	...
]
}

Use the following syntax to remove the version:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
"operation": "remove",
"versions": [
		"<name of version 1>",
		"<name of version 2>",
		...
]
}

Starting at ArcGIS Enterprise11.2, additional properties can be applied:

  • extractionDatabase —Overwrites the extractionDatabase value at the map product level.
  • operationOverrides —Overwrites the parameters key-value pairs on an existing operation with the provided ID. The ID must match an existing operation.
  • excludedOperations —The operations pertaining to the IDs provided are excluded.

The following example uses operationOverrides to identify an operation and override its parameter key-value pairs with the ones provided and excludedOperations to identify operations that will be excluded:

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
"productVersions": [
{
	"name": "TRD_4_5",
	"template": "MTM50_Layout.pagx"
	"extractionDatabase": "",
	"operationOverrides": [
	{
		"id": "26C62049-A11F-4D5B-BC80-00CF3597555C",
		"parameters": [
		{
			"name": "input_map",
			"value": "Map"
		},
		]
	},
	]
	"excludedOperations": [
	"45B62049-A11F-4D5B-BC80-00CF3597555C",
	...
	]
}
]

ancillaryLayers

(Optional)

Indicates the product layers. Use the following format to add or update layers:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
{
	"operation" : "<add | update>",
	"layers": [
	{
		"layer": "<url of layer>",
		"featureClass": "<name of feature class to extract to>",
		"map": "<name of map layer will be inserted into>",
		"layerIndex": "<insertion index of layer>"
	},
	...
	]
}

Use the following format to remove the layer:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
{
	"operation" : "remove",
	"layers": [
	{
		"layer": "<url of layer>"
	},
	...
	]
}

Example usage

The following URL queries the products in the Topographic Production Service resource by productName and updates it:

Use dark colors for code blocksCopy
1
https://machine.domain.com/server/rest/services/MTM50/TopographicProductionServer/updateProduct?productName=MTM50&description=test&enabled=&sheetIDField=&raster=&productVersions=&ancillaryLayers=&f=html

JSON Response syntax

The following is the syntax of a response:

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

JSON Response example

The following is an example response when a product's properties were successfully updated:

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

The following is an example of error response when the product fails to update:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
{
 "error": {
  "code": -2147211775,
  "message": "Product name not found.",
  "details": [

  ]
 }
}

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