Add Image
- URL:https://<rasteranalysistools-url>/AddImage
- Related Resources: Calculate Density, Calculate Distance, Calculate Travel Cost, Classify, Classify Pixels Using Deep Learning, Convert Feature to Raster, Convert Raster to Feature, Copy Raster, Create Image Collection, Create Viewshed, Delete Image, Delete Image Collection, Detect Objects Using Deep Learning, Determine Optimum Travel Cost Network, Determine Travel Cost Paths to Destinations, Determine Travel Cost Path as Polyline, Export Training Data for Deep Learning, Fill, Flow Accumulation, Flow Direction, Flow Distance, Generate Raster, Install Deep Learning Model, Interpolate Points, List Deep Learning Model Info, Nibble, Query Deep Learning Model Info, Segment, Stream Link, Summarize Raster Within, Train Classifier, Uninstall Deep Learning Model, Watershed
- Version Introduced:10.6.1
Description
The AddImage operation allows you to add new images to an existing image collection.

Request parameters
Parameter | Details |
---|---|
inputRasters (Required) | The portal folder ID, portal item ID, image service URL, cloud raster dataset, or shared raster dataset that will be added to the image collection. At least one type of input needs to be provided in the JSON object. If multiple inputs are given, the itemId takes priority. Syntax: A JSON object describes the input raster.
|
imageCollection (Required) | The output image collection name or URL. The image service must exist before you add the images. Syntax: A JSON object supports three case sensitive keys: itemId, url, and uri. Example:
|
rasterType (Required) | The raster type used to add images to the image collection. When adding new images, it's assumed that imageCollectionType is already set. Syntax: A JSON object describes the raster type. The supported raster type keywords are: UAV/UAS, Aerial, ScannedAerial, Landsat 7 EMT+, Landsat 8, Sentinel-2, ZY3-SASMAC, and ZY3-CRESDA. The input values for dem follow the same syntax as raster input for the GenerateRaster service: url, itemId, and uri.
|
f | The response format. The default response format is html. Values: html | json |

Response
When you submit a request, the task assigns a unique job ID for the transaction.
Syntax:
{ "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:
https://<raster analysis tools url>/AddImage/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:
https://<raster analysis tools url>/AddImage/jobs/<jobId>/results/result
Example Usage
Below is a sample request URL for AddImage:
https://services.myserver.com/arcgis/rest/services/System/RasterAnalysisTools/GPServer/AddImage
JSON request example
inputRasters={"itemIds": ["1780d648db3545bba8661ad98df824a4", "1780d648db3545bba8661ad98df824a5", "1780d648db3545bba8661ad98df824a6"]}&
imageCollection={"itemId": "780d648db3545bba8661ad98df824a4"}&
rasterType={
"Raster": {"itemId": "04180233981a4b978755d854687e149e"},
"VisibleBandID": "3",
"InfraredBandId": "4"
}
JSON response example
The response returns the results output parameter, which has properties for parameter name, data type, and value. The content of value is always the image service URL.
{
"paramName": "result",
"dataType": "GPString",
"value": {
"url": "https://<server name>/arcgis/rest/services/Hosted/<service name>/ImageServer"
}
}