ArcGIS REST API

Validate

Description

License:

As of 10.5, you must license your ArcGIS Server as an ArcGIS Image Server to use this resource with a mosaic dataset.

This operation is supported at 10.7 and later.

The validate operation is performed on an image service resource that uses ArcObjects11 or ArcObjectsRasterRendering as the service provider. It validates the given rendering rule and mosaic rule against the image service.

The result of this operation includes the rendering and mosaic rules that are valid for the image service. It also includes the type of errors for the rendering and mosaic rules.

You can provide arguments to the validate operation as query parameters defined in the parameters table below.

Request parameters

ParameterDetails
f

Description: The response format. The default response format is html.

Values: html | json

renderingRule

Description: Specifies the rendering rule for how the requested image service should be rendered.

Refer to the raster function JSON objects for the syntax and examples.

mosaicRule

Description: Specifies the mosaic rule for how individual image items in the requested image service should be mosaicked.

Refer to the mosaic rule JSON objects for the syntax and examples.

Example usage

Validate a rendering rule and a mosaic rule of against an image service.

https://myserver:6443/arcgis/rest/services/myAO11imageservice/ImageServer/validate? renderingRule={"rasterFunction":"Slope"}&mosaicRule=fakeMosaicRule&f=json

JSON response syntax

{
 "mosaicRule" : {
  "isValid" : <true|false>,
  //note: if the mosaicRule is valid, there will be no “validationErrors”
  "validationErrors" : [{
   "code" : <errorCode1>
   "message" : <errorMessage1>
  },{   
   "code" : <errorCode2>
   "message" : <errorMessage2>
  }]
 }
 "renderingRule" : {
  "isValid" : <true|false>,
  //note: if the renderingRule is valid, there will be no “validationErrors”
  "validationErrors" : [{ 
   "code" : <errorCode1>
   "message" : <errorMessage1>
  },{   
   "code" : <errorCode2>
   "message" : <errorMessage2>
  }]
 }
}

JSON response example

{
 "mosaicRule": {
  "isValid": false,
  "validationErrors": [{
   "code": -2147024809,
   "message": "Invalid mosaic rule: fakeMosaicRule"
  }]
 },
 "renderingRule": {"isValid": true}
}