I'm having trouble getting REST queries to work for any ESRI Map Service raster layers. Right now I've just been working with the query generator as part of the ESRI Service Directory. Here's are two Map Server examples:

https://apps.fs.usda.gov/arcx/rest/services/RDW_Wildfire/MTBS_CONUS/MapServer/5/query https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryTopo/MapServer/0/query

No matter what my query looks like I get "Invalid or missing input parameters." If this were a vector Map Service I'd put 1=1 in the WHERE clause and the service would return all the features contained in the layer. For raster layers in a Map Service I've tried every combination of inputs I can think of and always get the same "Invalid or missing input parameters.". If I specify JSON as the output format it shows up with error code 400 but I can't find anything on this either.


To be more specific I'm trying to figure out what is wrong with the REST query I'm trying to use, I know there are numerous other ways to access the information I'm looking for but to integrate this information with the rest of my workflow the data needs to come via an API call. I've tried removing fields and adding text or specifying a geometry, requesting only a count or IDS and I can't get anything to work. Here's an example of what one of my current queries looks like:


  • @cm1 That runs but it just returns the layers with the extent and function support not any of the actual data. Sep 11, 2020 at 21:01
  • 2
    Most probably these are mosaic datasets published as map service and Query is one of the map service capabilities. I think what you are trying to do can be done by Identify, gis.stackexchange.com/questions/83168/…
    – fatih_dur
    Sep 15, 2020 at 23:44
  • @fatih_dur I can't seem to get more than one point per layer on each identify request. Am I missing something or is it only possible to get a single value with identify? Sep 16, 2020 at 18:18
  • Let me add to my previous comment I can't seem to get multiple points using a geometry envelope. Sep 16, 2020 at 18:27

2 Answers 2


I think Query is more for making feature layer and table access. This being raster data I think there is a bit of mismatch. In the feature description it days it can support standardized queries but advanced queries are false etc.

You may want to try export https://apps.fs.usda.gov/arcx/rest/services/RDW_Wildfire/MTBS_CONUS/MapServer/export

biggest thing for export is the bounding box must be specified.

When I opened it in the JSapi from the service description the display of the data made a call to this url.


I think the biggest requirement is the bounding box.


Those both get me something.

API Doc https://developers.arcgis.com/rest/services-reference/export-map.htm

  • I've tried using export but from what I can tell it can only export a compressed image rather than a spatially referenced image that can be used for further processing. Am I missing something? Sep 16, 2020 at 15:42
  • I think it "should" be spatially referenced, or at least you can specify a spatial Reference object, but it may just kick out an image. Depending on what you are trying to do with your script/program it may be better for you to try and pull in some kind of spatial handler or different API to point to just the straight MapServer instead of deducing all the rest calls yourself.
    – Ben
    Sep 16, 2020 at 19:03
  • Maybe with leaflet in R? medium.com/@joyplumeri/…
    – Ben
    Sep 16, 2020 at 19:05

Using QGIS and the url:


You have to pick a year 1984-2017

Shown is 2017

enter image description here

  • This works and I can also get it through ArcGIS online but my next step is to include the query into an R workflow so I'd like to get the REST query actually working. Sep 4, 2020 at 22:00
  • can you add your using R, I don't see that mentioned in your original question.
    – Mapperz
    Sep 4, 2020 at 22:02
  • I would export this to a GeoTiff and use R to do the rest.
    – Mapperz
    Sep 4, 2020 at 22:03
  • Sorry I haven't gotten to putting it into R yet as I can't figure out how to format the REST query so it works so I didn't include that. I'm trying to use the REST service instead of just downloading the Geo Tiff so I can update the data through code and for a specific geography rather than regularly downloading the full geo tiff. Also looking at this as potentially being put into a shiny dashboard so API for data would be ideal. Sep 4, 2020 at 22:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.