1

Using an ArcGIS REST API call, I'm trying to access the Houston 311-reports public data (https://www.houstontx.gov/311/). Following Extracting data from ArcGIS REST endpoint?, I created a query that returned incomplete data. To elaborate, it returned only the status (i.e., Active or not) and the location of the report. Additional data (say, the type of report, time stamps etc.) that are available in the 311 dashboard are missing.

I tried different queries using the variables in the data (e.g., Status=Open), and the queries returned error code 400. I'm not sure if I'm trying to access the wrong API or if there are mistakes in my API call.

Query: https://mycity2.houstontx.gov/pubgis01/rest/services/311/D365_SR311_PROD/MapServer/1/query?&where=ObjectID%3E=1000+and+ObjectID%3C1999&f=json

Data homepage: https://mycity.maps.arcgis.com/home/item.html?id=278ec211ab53471d950ed224540c00c7

1
  • 1
    Your query returned results for me.
    – Fezter
    Apr 30, 2022 at 4:59

1 Answer 1

1

To return all Active 311 reports you can use

&havingClause=StateCodeName%3D%27Active%27

https://mycity2.houstontx.gov/pubgis01/rest/services/311/D365_SR311_PROD/MapServer/1/query?where=1%3D1&text=&objectIds=&time=&timeRelation=esriTimeRelationOverlaps&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&distance=&units=esriSRUnit_Foot&relationParam=&outFields=&returnGeometry=true&returnTrueCurves=false&maxAllowableOffset=&geometryPrecision=&outSR=&havingClause=StateCodeName%3D%27Active%27&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&historicMoment=&returnDistinctValues=false&resultOffset=&resultRecordCount=&returnExtentOnly=false&sqlFormat=none&datumTransformation=&parameterValues=&rangeValues=&quantizationParameters=&featureEncoding=esriDefault&f=geojson&as_sfid=AAAAAAW2hpHn5EuUvqECWEauZDCRV2dU6NxTVn_9o4BuJ3-tPmFu4Khw1xULw886p6AW6s-yo6Y-osUmTFldSol2eAekwxzxSQRgUmvGf8VgYb4KdbtB_2z5zTJtLt7DrhRwBU8%3D&as_fid=35db37329ad918c84713150bbf9325e724ddec5b

You can build your own query here https://mycity2.houstontx.gov/pubgis01/rest/services/311/D365_SR311_PROD/MapServer/find

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.