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?
1 Answer 1
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