Distinct
Finds the distinct values for a specified field across a single collection and returns the results in an array.
Last updated
Was this helpful?
Finds the distinct values for a specified field across a single collection and returns the results in an array.
Last updated
Was this helpful?
Finds the distinct values for a specified field across a single collection and returns the results in an array. https://docs.codemash.io/api/database/collections/distinct
/{version}/db/{CollectionName}/distinct
Collection name - unique, lowercased, collection name without whitespace. E.g., if your collection title you have entered in the CodeMash dashboard is "Business Trips" then collection name would be "business-trips".
The CodeMash API version used to fetch data from the API. If not specified, the last version will be used. E.g.: v2
The field for which to return distinct values
Accept Header
API key of your cluster. Can be passed in a header as X-CM-Cluster.
ID of your project. Can be passed in a header as X-CM-ProjectId.
Specify culture code when your response from the API should be localised. E.g.: en
Finds the distinct values for a specified field across a single collection and returns the results in an array. https://docs.codemash.io/api/database/collections/distinct
/{version}/db/{CollectionName}/distinct
Collection name - unique, lowercased, collection name without whitespace. E.g., if your collection title you have entered in the CodeMash dashboard is "Business Trips" then collection name would be "business-trips".
The CodeMash API version used to fetch data from the API. If not specified, the last version will be used. E.g.: v2
Accept Header
API key of your cluster. Can be passed in a header as X-CM-Cluster.
ID of your project. Can be passed in a header as X-CM-ProjectId.
Specify culture code when your response from the API should be localised. E.g.: en
The field for which to return distinct values
A query that specifies the documents from which to retrieve the distinct values