AnsweredAssumed Answered

How to use a REST service in Python - DownloadRasters_management

Question asked by bobbistrais on May 31, 2018
Latest reply on Jul 24, 2019 by prasanth49r_rama

I am writing a Python script with uses the DownloadRasters_management tool.  I want to use an Image Service from one of our servers as the input.  According to the documentation, the format is:

arcpy.DownloadRasters_management (in_image_service, out_folder, {where_clause}, {selection_feature}, {clipping}, {convert_rasters}, {format}, {compression_method}, {compression_quality}, {MAINTAIN_FOLDER})


for the in_image_service, I entered the URL to the service in quotes, e.g. "https://myserver/myimageservice/ImageServer"


-When I run the script, I get an error message "pythonw.exe has stopped working.  A problem caused the program to stop working correctly.  Please close the program".


-I also tried using the same URL to the service in ArcGIS Desktop, DownlaodRasters_management tool.  This gives me the message that the tool ran "successfully", but in fact, there is no output.


Any suggestions on how to properly format the URL to the service?