ArcGIS REST API Server Query - Which URL should I use Query(GET) or Query (POST)

1300
2
03-29-2018 11:45 AM
deleted-user-4LjGx0CueIPn
New Contributor II

I am writing a simple test application using Left-let. The feature class is coming directly from the server which works great, but when I create a query the new URL does not return any records. In other words, my application does not show any of the points in the feature class. Since I am not an expert of the field, I started to think if I was choosing the wrong URL but both Query(GET) and Query (POST) give me the same result. 

 

I have done the following:

Change "Return Geometry : True"

 

any help would be great. 

 

0 Kudos
2 Replies
JohnGravois
Frequent Contributor

if you want to return all the features in the service, you need to supply a SQL where clause that always resolves to true.

where: 1=1

http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3/query?where=1=1&f=html 

0 Kudos
deleted-user-4LjGx0CueIPn
New Contributor II

John,

I was under the impression that by running the query using Query(GET) or Query (POST) I would get the correct link. I type the query directly and that seems to work now. I appreciate your help.