ArcGIS Server REST API has:

Description: If true, then returns distinct values based on the fields specified in outFields. This parameter applies only if the supportsAdvancedQueries property of the layer is true.
Values: <true | false>
Example: returnDistinctValues=true


Is there an equivalent when querying agol feature service?


ArcGIS Online / ArcGIS.com is a platform/portal which contains a whole bunch of functionality, but it also exposes its feature services via the ArcGIS Server REST API.

Log into your ArcGIS Online account then go to My Content and click on the feature service. Under the Layers section, click on the hyperlink - this will take you to the REST endpoint for this service.

However, it unfortunately appears that while ArcGIS Online does support the ArcGIS Server REST API, it doesn't support the returnDistinctValues option.

(The REST API's query page mentions "This parameter applies only if the supportsAdvancedQueries property of the layer is true" which is possibly the reason this doesn't work.)

  • Yes understood, but i didn't see the returnDistinctValues parameter. This parameter is the focus of the question – bcollins Jul 9 '14 at 0:46
  • @bcollins what happens if you append returnDistinctValues to the REST endpoint's query statement, eg http://<featurelayer-url>/query?where=1%3D1&f=html&returnDistinctValues=true ? – Stephen Lead Jul 9 '14 at 1:58
  • yeah i've tested. The returnDistinctValues parameter doesn't exists resources.arcgis.com/en/help/arcgis-rest-api/index.html#/… – bcollins Jul 9 '14 at 14:24
  • That's disappointing - I'll update this answer. Sorry I couldn't help! – Stephen Lead Jul 9 '14 at 23:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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