10 votes
Accepted

Passing token to ArcGIS Server REST service?

For Post Request You send it over inside a form in the body with the key token and the value is the token you received from this document explaining how to get token For Get Request You can send them ...
Brian McCall's user avatar
9 votes

Download Dataset From ArcGIS REST Service

Download data stored on an ArcGIS REST MapServer one layer at a time using the command line and the Python package pyesridump. Example command: esri2geojson http://gis.naperville.il.us/arcgis/rest/...
stevevance's user avatar
9 votes
Accepted

How to include a single quote / apostrophe in an ArcGIS Server REST API query string

As with the ArcObjects question above, the answer is to include a second single quote: &where=locality = 'O''CONNELL'
Stephen Lead's user avatar
  • 21.1k
9 votes
Accepted

Query Feature Service on ESRI ArcGIS REST API with Python Requests

The easiest way to create a query to an ArcGIS service is to first use the HTML interface, i.e. open https://dpw.gis.lacounty.gov/dpw/rest/services/PW_Open_Data/MapServer/22/query in a browser, and ...
Berend's user avatar
  • 4,637
8 votes

Getting token without providing credentials

If you think of HTTPS security as using a postal system, a GET uses a postcard, and a POST uses a security envelope. Unfortunately, to extend the metaphor, you've written the username and password on ...
Vince's user avatar
  • 20k
7 votes
Accepted

Using output statistics in ArcGIS REST API query?

The statistics you need are the count of OBJECTID for each DFIRM_ID, so your onStatisticField should be OBJECTID instead of DFIRM_ID. The groupBy parameter should be set to DFIRM_ID: [{ "...
Berend's user avatar
  • 4,637
5 votes

Download Dataset From ArcGIS REST Service

To download this data, you can visit https://geodatadownloader.com, specify your URL, pick an extent or a where clause if you like, then click "download". It'll save the output file to your ...
Myles Haynes's user avatar
5 votes

Connecting QGIS to ArcGIS world imagery?

This question appears to have resurfaced so it is worth adding an updated answer. Adding ArcGIS imagery and mapping is now easy in QGIS 3.x and you can add these services through the add data ...
Ed Rollason's user avatar
  • 3,878
5 votes
Accepted

How can I get a map image from an ArcGIS mapserver centered on a single feature?

You can use my restapi module. It is very simple to do these kinds of things: import restapi import os url = 'http://gis.mda.state.mn.us/arcgis/rest/services/MN_Agriculture_EAB_Detection/MapServer' ...
crmackey's user avatar
  • 8,484
5 votes
Accepted

How do I obtain a valid token for updating layer definition in a feature service?

I've found requestip to be somewhat unreliable. A better practice is to request a token with a referer instead. So, in the token request, use it with the URL of your app (or a made up, unique one): '...
KHibma's user avatar
  • 16.7k
5 votes
Accepted

Extracting data from ArcGIS REST endpoint

You need to make a request to the ?query endpoint of the layer, and supply a where clause. Specify &f=json to receive the response in JSON. Note that ArcGIS Server by default only returns the ...
Stephen Lead's user avatar
  • 21.1k
5 votes
Accepted

What URL to use when exporting data from an ArcGIS MapServer layer to GeoJSON using ogr2ogr?

ogr2ogr -f GeoJSON test.json "https://kart.ra.no/arcgis/rest/services/Distribusjon/Kulturminner20180301/MapServer/6/query?where=1=1&outFields=*&outSR=4326&f=geojson" OGRGeoJSON
nmtoken's user avatar
  • 13.3k
4 votes
Accepted

Attempt to generate ESRI REST Token generate 'no client_id specified' error even when client_id is in the request body

I'm successfully using this method to obtain a token: def get_token(): # Retrieve a token from ArcGIS Online to enable access to private services token_params = { 'client_id': "...
Stephen Lead's user avatar
  • 21.1k
4 votes

Web Application and ArcGIS server are two different machines and unable to load layers using rest services

Yes this is possible! There are multiple approaches for this. You can install Apache http server from here and you have to configure modjk module in this using modJk configuration (You will define ...
user4906240's user avatar
  • 1,078
4 votes
Accepted

Finding tables related to layer using ArcPy?

Here is a Python 3 script that crawls a map service and prints out all of the relationships. You should just need to change the map service url. import urllib.request import json MapServiceURL = '...
itrew's user avatar
  • 176
4 votes
Accepted

How to define projection when adding features to a feature service layer using its ArcGIS REST endpoint?

I know you can send the following JSON to an addFeatures end point which defines the input coordinates. [{ "geometry" : {"x" : -115, "y" : 36, "...
KHibma's user avatar
  • 16.7k
4 votes
Accepted

Does ArcGIS Server support querying multiple layers of service in single request?

Simply - No. You can "query", and by query, I mean do a Map Export on a mapservice to get an IMAGE of all the layers. Eg. http://sampleserver6.arcgisonline.com/arcgis/rest/services/...
KHibma's user avatar
  • 16.7k
4 votes

Is Esri REST API the same as REST API

REST is a computer industry acronym (REpresentational State Transfer). Most web-based APIs are REST, so no, neither Esri API (Server or Portal) is the same as any other API (or each other). There are, ...
Vince's user avatar
  • 20k
3 votes

Installing and using ArcGIS REST API Connector plug-in?

Go to Plugins, Manage and Install Plugins, Settings. Enable experimental plugins. Go to all, search for ArcGIS and install the plugin. An ArcMap icon will appear on the Manage Layers Toolbar.
nielsgerrits's user avatar
  • 3,884
3 votes

QGIS: Connect to a REST service

Go to Layer -> Add Layer -> Add ArcGIS FeatureServer Copy only this in the URL http://maps.six.nsw.gov.au/arcgis/rest/services/public/NSW_Property/MapServer Put a name and thats all. Or in navigator:...
Manuel Alejandro's user avatar
3 votes
Accepted

Getting Reconcile Versions geoprocessing tool published as ArcGIS Server service to work with new version?

Yes, you can publish this tool so it can reconcile versions that are created dynamically. You need to add a couple other tools to the model though. Most of the tool parameters can/should be model ...
Kenneth Dinsmore's user avatar
3 votes
Accepted

Is there a size limit when adding features to ArcGIS Server programatically using POST?

SampleServer3 = ArcGIS 10.0. SampleServer6 = 10.3. As suggested, its the server which is having problems, not your code. The following works against 10.3 - note I modified your code to use built-ins ...
KHibma's user avatar
  • 16.7k
3 votes

Adding ArcGIS MapServer Layer via Python

Sorted it out, the data source uri needs to be space delimited. So changing it to: iface.addRasterLayer("url='http://.../MapServer' layer='0'", "mylayer", "arcgismapserver") Does the trick.
jdeolive's user avatar
  • 1,757
3 votes

QGIS fails to open REST Service

This is NOT a WFS, but an ArcGIS REST service! QGIS comes with support for that built-in nowadays. Use the Layer menu: Layers -> Add Layer -> Add ArcGIS Mapserver Layer and use this URL http://www....
bugmenot123's user avatar
  • 11.3k
3 votes
Accepted

How to get around the 1000 ObjectIDs limit on ArcGIS Server

Depending on the type of database, there may be a limit on the amount of items that can be inside the IN clause. I think Oracle has a limit of 1000. Two things you could try are: Instead of using ...
Berend's user avatar
  • 4,637
3 votes

How to get around the 1000 ObjectIDs limit on ArcGIS Server

I know this is a somewhat older question, but I just wanted to share how I've been getting around these limitations from ArcGIS services using a Python script and the GeoPandas library. import numpy ...
Felipe D.'s user avatar
  • 2,401
3 votes

Connecting to ArcGIS ImageServer in QGIS?

I am having the same issue with a Loudoun County, VA ImageService for 2017 orthographic satellite imagery: https://logis.loudoun.gov/image/rest/services/Aerial/COLOR_2017/ImageServer I partially ...
Cayden Brehaut's user avatar
3 votes

Connecting to ArcGIS ImageServer in QGIS?

Hey i found this plugin to be useful: https://plugins.qgis.org/plugins/ImageServerConnector/
john doh's user avatar
3 votes

Geoserver WMTS Service REST url

To use mapbox vector tiles served by GeoServer, you can do it like this: // First the layer URL pattern var layerWMTS = 'http://localhost:8080/geoserver/gwc/service/wmts?layer=public:...
Alex Leith's user avatar
  • 13.4k
3 votes

How to create a simple Web Map with ArcGIS REST API

I was using the wrong access token. I was using the access token I had for the app I was testing instead of the user's access token that I had to get with oauth2. I'm leaving this here for future ...
piptin's user avatar
  • 151

Only top scored, non community-wiki answers of a minimum length are eligible