[GIS] Not able to query on ArcGIS Server REST query end point

arcgis-rest-apiarcgis-server

I have a map server published on ArcGIS Server and it has a Poles layer. It has following fields:

Images of poles layer attributes

Now when I am trying to run any query against this layer by passing queries like

Owner IS NOT NULL 

or

Owner = 'Utility'

I am getting this error while I am sure the Owner is not NULL and all has value of utility

Failed to execute query.

enter image description here

Can you please let me know what I am doing wrong?

Best Answer

the best way to check an ArcGIS REST API endpoint is to simply add Where 1=1. In this way you should be able to get every possible result.

If you add the * on the out fields as it is mentioned in the commends you will also get all the attributes.

Finally, If you want to check for strings the

Owner = 'Utility'

should work. Check again as we discussed with all the output fields and you should be able to find the issue with this field.