Skip To Content
ArcGIS Developer
Dashboard

Update Product

Description

License:

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

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)

The JSON indicating the type of operation and the versions. There are two formats.

If the operation is add or update, the format is as follows:


{
  "operation": "<add | update>",
  "versions": [
     {
        "name":"<name of version>",
        "template": "<name of template>"
     },
     ...
  ]
}

If the operation is remove, the format is as follows:


{
  "operation": "remove",
  "versions": [
        "<name of version 1>",
        "<name of version 2>",
        ...
  ]
}

Starting at ArcGIS Enterprise 11.2, there are additional properties that can be applied to the JSON:

  • extractionDatabase—The value overwrites the value for extractionDatabase at the map product level.
  • operationOverrides—The values in the key-value pairs of parameters overwrite the existing ones for the operation defined by the ID provided.
  • excludedOperations—The operations pertaining to the IDs provided are excluded.

The following JSON example includes examples of the operation overrides and exclusions available at Enterprise 11.2:


"productVersions": [
  {
    "name": "TRD_4_5",
    "template": "MTM50_Layout.pagx"
    "extractionDatabase": "",
    "operationOverrides": [
      {
        "id": "26C62049-A11F-4D5B-BC80-00CF3597555C", //must match an existing operation in json
        "parameters": [
          {
            "name": "input_map",
            "value": "Map"
          },
        ]
      },
    "excludedOperations": [
      "45B62049-A11F-4D5B-BC80-00CF3597555C",
      ...
    ]
  }
]
ancillaryLayers

(Optional)

The JSON indicating the type of operation and layers. There are two formats.

If the operation is an add or update, the format is as follows:


{
  "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>"
   },
   ...
  ]
}

If the operation is remove, the format is as follows:


{
  "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:

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:

{
 "productName": <productName>,
 "success": <true | false>
}

JSON Response example

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

{
 "productName": "MTM50",
 "success": true
}

JSON Response example

The following is an example of an error response:


{
 "error": {
  "code": -2147211775,
  "message": "Product name not found.",
  "details": [
   
  ]
 }
}