Skip to content
URL:
https://<rasteranalysistools-url>/BatchPublishRaster
Methods:
GET
Version Introduced:
10.9

Description

The BatchPublishRaster operation supports publishing multiple imagery layers from multiple raster dataset.

Request parameters

ParameterDetails

inputServices

(Required)

The service configuration JSON for each image service to be published. The image service configuration must contain the following under properties: serviceName, type, capabilities, provider, and path. The itemProperties property is optional.

There are three possible scenarios for batch publish raster:

  • Publish by reference: the raster data is in a registered data store and the data path is part of the service configuration.
  • Publish by value on Enterprise: the raster data is uploaded to the GIS server using the Upload operation. The path property value must be the dataset name. All uploaded items must be included as part of the inputServices parameter's JSON using the itemIds property. The itemOnServer flag needs to be set to true.
  • Publish to ArcGIS Online: the image data must first be uploaded to ArcGIS Online. The image data can then be referenced in the service JSON using the uri property. For this workflow, users must have the ArcGIS Image for ArcGIS Online user type extension and required privileges.
Publish by referencePublish by referencePublish by value to EnterprisePublish to ArcGIS Online
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
{
  "services": [
    {
      "serviceConfig": {
        "serviceName": "test6397_1831d1",
        "type": "ImageServer",
        "capabilities": "Image, Metadata, Mensuration",
        "provider": "ArcObjectsRasterRendering",
        "properties": {
          "path": "/fileShares/pubdata_ds_9npfc8c9wecwzfs2/6397_1831d.tif",
          "isManaged": false,
Expand

convertToCRF

(Optional)

Flag to configure whether the raster data to be published will be converted to Cloud Raster Format (CRF) dataset or not. Values: true | false

context

(Optional)

Context contains additional environment settings that affect task execution. For Batch Publish Raster service tools, the supported environment settings are:

  • parallelProcessingFactor: The number of processes across which a tool will spread its operation.
  • processAsMultidimensional: Determine whether to publish data as multi-dimensional raster or not. Accepted values are true or false.
  • buildTranspose : Determine whether to build transpose if multidimensional raster is converted to CRF. Accepted values are true or false.
  • compression: The compression method to use if batch publishing is converting raster data to CRF.

f

The response format. The default format is html.

Values: html | json | pjson

Example usage

The following is a sample request URL for the BatchPublishRaster operation:

Use dark colors for code blocksCopy
1
2

https://organization.example.com/<context>/rest/services/System/RasterAnalysisTools/GPServer/BatchPublishRaster/submitJob?inputServices={"services": [{"serviceConfig": { "serviceName": "test6397_1831d1","type": "ImageServer","capabilities": "Image, Metadata, Mensuration","provider": "ArcObjectsRasterRendering", "properties": {"path": "/fileShares/pubdata_ds_9npfc8c9wecwzfs2/6397_1831d.tif","isManaged": false,"isCached": false,"isTiledImagery": "false","colormapToRGB": "false","defaultResamplingMethod": 1}},"itemProperties": {"folderId": ""}},{"serviceConfig": {"serviceName": "test6403_1826b1","type": "ImageServer","capabilities": "Image, Metadata, Mensuration","provider": "ArcObjectsRasterRendering","properties": {"path": "/fileShares/pubdata_ds_9npfc8c9wecwzfs2/6403_1826b.tif","isManaged": false, "isCached": false, "isTiledImagery": "false","colormapToRGB": "false","defaultResamplingMethod": 1}}}]}&f=pjson

JSON Response example

The response returns the outputServices output parameter, which has properties for parameter name, data type, and value. The content of value is a list of output service URLs.

Use dark colors for code blocksCopy
1
2
3
4
5
6
{
 "paramName": "outputServices",
 "dataType": "GPString",
 "value": ["https://<server url>/arcgis/rest/services/Hosted/byvalueA_1_1test/ImageServer","https://<server url>/arcgis/rest/services/Hosted/byvalueA_1_2test/ImageServer"
 ]
}

Response

When you submit a request, the task assigns a unique job ID for the transaction.

Syntax:

Use dark colors for code blocksCopy
1
{ "jobId": "<unique job identifier>", "jobStatus": "<job status>" }

After the initial request is submitted, you can use the jobId to periodically check the status of the job and messages, as described in Check job status. Once the job has successfully completed, use the jobId to retrieve the results. To track the status, you can make a request of the following form:

Use dark colors for code blocksCopy
1
https://<raster analysis tools url>/BatchPublishRaster/jobs/<jobId>

When the status of the job request is esriJobSucceeded , you can access the results of the analysis by making a request of the following form:

Use dark colors for code blocksCopy
1
https://<raster analysis tools url>/BatchPublishRaster/jobs/<jobId>/results/result

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