Dear community,
For a school project I need to make use of the Arcgis REST API. I was reading the documentation at this page and decided to try it out with sample server 6. Unfortunately i got this response:
Solved! Go to Solution.
Ah you're right! My bad.
It looks like you need to specify query string for the "layerDefs" to get a response back. This worked for me:
The format is <layerID1>:<whereClause1>;<layerID2>:<whereClause2> and so on.
Good morning! It appears you're trying to query the feature service instead of a specific feature layer within the service. To query a layer within the service, add the layer ID to the URL after /FeatureServer. So I think the URL you are actually looking for is this:
You can get a list of all available layers in the service by going to the endpoint below and looking under "Layers".
https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer
Hi, Thank you for your response!
Your link definitely works, but I was actually looking to get this response as shown in the documentation. The way it was shown in the documentation is that you can make a query directly on the service to get this response and not necessarily on the layer itself.
Ah you're right! My bad.
It looks like you need to specify query string for the "layerDefs" to get a response back. This worked for me:
The format is <layerID1>:<whereClause1>;<layerID2>:<whereClause2> and so on.