1

We have a data table stored as table on a ArcGIS server. The data is accessible via REST calls.

I would like to make queries that return all columns from the table, returned as JSON.

https://test.test.org/arcgis/rest/services/testService/MapServer/10/query?where=OBJECTID+%3E0+AND+OBJECTID+%3C+1000

Using the query above I am requesting the first 1000 records from the service. The problem is I don't get all the columns in the table. How could I structure my query to also return all 20+ fields in the table?

sgillies
9,1241 gold badge35 silver badges41 bronze badges
asked May 9, 2017 at 15:33

1 Answer 1

3

You need to set the outfield parameter option.

For example: (relevant addition : &outFields=* , or put each field name in a comma separated list.)

http://sampleserver6.arcgisonline.com/arcgis/rest/services/NapervilleShelters/FeatureServer/0/query?where=1%3D1&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&distance=&units=esriSRUnit_Foot&relationParam=&outFields=*&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=&gdbVersion=&returnDistinctValues=false&returnIdsOnly=false&returnCountOnly=false&returnExtentOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&multipatchOption=&resultOffset=&resultRecordCount=&f=json
answered May 9, 2017 at 15:52

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.