1

Using ArcGIS with a developer account, I created a new layer, uploaded a .geojson file, and happily followed along the "query a feature layer" tutorial on their labs site. I successfully generated an OAuth Token in Postman, but when I changed the "f" (format) value in the x-www-form-urlencoded body to "geojson" it looks similar to the originally GeoJSON file, but the properties are missing/null and the only key info included are the Polygon coordinates. The data remains in the ArcGIS Dashboard but isn't included in the data. Any advice? Is this a bug?

Original File (.geojson):

{
  "type": "FeatureCollection",
  "features": [{
    "geometry": {
      "coordinates": [
        [
          [50.0115001901903, 50.2259915257836, 0],
          [50.0115418500254, 50.225991583611, 0],
          [50.0115447598285, 50.2242567612666, 0],
          [50.0115031005844, 50.2242567034437, 0],
          [50.0115001901903, 50.2259915257836, 0]
        ]
      ],
      "type": "Polygon"
    },
    "ID": "asdf98d0-fa90-4293-a780-a6988f5486f7",
    "id": 1,
    "type": "Feature",
    "properties": {
      "CreationDate": "Wed, 17 June 2020 18:40:41 GMT",
      "Editor": "dkoch"
    }
  }]
}

Received file from POST /0/query rest endpoint with f: geojson, token: (working token), where: 1=1:

{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "geometry": {
                "type": "Polygon",
                "coordinates": [
                    [
                        [
                            50.0115001901903,
                            50.2259915257836
                        ],
                        [
                            50.0115418500254,
                            50.225991583611
                        ],
                        [
                            50.0115447598285,
                            50.2242567612666
                        ],
                        [
                            50.0115031005844,
                            50.2242567034437
                        ],
                        [
                            50.0115001901903,
                            50.2259915257836
                        ]
                    ]
                ]
            },
            "properties": null
        }
    ]
}

1 Answer 1

1

I think you need to specify the "outFields" parameter.

To return all available fields I believe its "outFields=*"

2
  • Thanks! This solved it. Still new lol
    – Devon Koch
    Commented Jun 18, 2020 at 16:42
  • No problem! we all were new at some point. If it solved it please mark the answer as correct, thanks!
    – Joe Davies
    Commented Jun 19, 2020 at 14:03

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.