younifyd
Menu

Values Get

Get values for one field

GET/rest/search/v2/values

Use it in a workflow

  1. Add a step and choose the Coveo connector.
  2. Pick the Values Get action (under Search).
  3. Fill in the fields below, then reference the result from later steps as {{valuesGet.response.data}}.

Request

Query parameters

fieldstringrequired

The name of the field from which to retrieve values.

lookupFieldstring

This parameter is exposed for backward compatibility reasons. The name of an additional field from which to retrieve values.

ignoreAccentsboolean

Whether to treat accentuated characters as non-accentuated characters when retrieving field values (e.g., treat `é`, `è`, `ê`, etc., as `e`). **Default:** `true`

sortCriteriastring

The sort criteria to use. Use: - `occurrences` to sort by number of occurrences, with field values having the highest number of occurrences appearing first. - `nosort` to avoid sorting the results of the Group By operation. The field values will appear in an unspecified order. **Default:** `occurrences`

maximumNumberOfValuesinteger (int32)

The maximum number of field values to return. **Default:** `10`

queryOverridestring

A different basic query expression (q) use.

constantQueryOverridestring

A different constant query expression (cq) to use.

disjunctionQueryOverridestring

A different disjunction query expression (dq) to use.

patternstring

The pattern that the field values must match. See also the `patternType` parameter."

patternTypestring

The type of pattern that is being used to list field values. Use: - `wildcard` to parse the specified `pattern` as a wildcard expression. - `regularexpression` to parse the specified `pattern` as a regular expression. - `editdistance` to apply the Edit Distance algorithm to match values that are close to the specified `pattern`. - `phonetic` to apply a phonetic algorithm to match values that are phonetically similar to the specified `pattern`. **Default:** `wildcard`

commerceany

The parameters for Coveo for Commerce.

dictionaryFieldContextany

A key-value store where each pair corresponds to the name of a dictionary field to query, along with the key to target within that field. **Example:** Suppose that in your index, the `@price` dictionary field contains different values for its `storeA` and `storeB` keys. Including `"dictionaryFieldContext": { "price": "storeA" }` in the query means that any part of the query expression that targets the `@price` field will in fact only query the `storeA` values of that field. **Note:** This cannot be used at the same time as `fieldAliases`. **Note:** This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`dictionaryFieldContext`](https://docs.coveo.com/en/56/#dictionaryfieldcontext-object-optional).

pipelinestring

The name of the query pipeline to use for this request (bypassing its conditions, if it has any). You can pass an empty `pipeline` value to use an empty query pipeline (i.e., `?pipeline=` or `"pipeline": ""`). If a query does not contain the `pipeline` parameter, the first query pipeline whose conditions are met by the request is used (query pipelines without conditions are not evaluated). Should the request fail to meet the conditions of each evaluated query pipeline, the default query pipeline of the target Coveo Cloud organization is used (bypassing its conditions, if it has any). **Notes:** - This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition. - For reporting purposes, when logging a **Search** usage analytics event for a query, the `queryPipeline` field of that event should be set to the final `pipeline` value used in the query execution. This value is determined from the query response. If no pipeline was specified, it uses the `"default"` value. - When using this parameter to list field values, not all query pipeline rules are supported. The only supported ones are [stop](https://docs.coveo.com/en/1446), [thesaurus](https://docs.coveo.com/en/3405) and [queryParamOverride](https://docs.coveo.com/en/1491). See also [Managing Query Pipelines](https://docs.coveo.com/en/1450/).

maximumAgeinteger (int32)

The maximum age of cached results, in milliseconds. If the results of a specific request are available in the cache, and if those results are no older than the `maximumAge` value, the service returns those results rather than forwarding a new query to the index. Such cache hits improve responsiveness but still count as queries in your queries per month (QPM) count. **Note:** This parameter is automatically overridden when `staticQuery` is set to `true`. **Default:** `-1` (which corresponds to the internal default value (15 minutes)

searchHubstring

The first level of origin of the request, typically the identifier of the graphical search interface from which the request originates. Coveo Machine Learning models use this information to provide contextually relevant output. **Notes:** - This parameter will be overridden if the search request is authenticated by a [search token](https://docs.coveo.com/en/56/) that enforces a specific [`pipeline`](https://docs.coveo.com/en/56/#pipeline-string-optional), or a [`searchHub`](https://docs.coveo.com/en/56/#searchhub-string-optional) that routes queries to a specific `pipeline` via a query pipeline condition. - When logging a **Search** usage analytics event for a query, the `originLevel1` field of that event should be set to the value of the `searchHub` search request parameter. See also the `tab` parameter.

tabstring

The second level of origin of the request, typically the identifier of the selected tab in the graphical search interface from which the request originates. Coveo Machine Learning models use this information to provide contextually relevant output. **Note:** When logging a **Search** usage analytics event for a query, the `originLevel2` field of that event should be set to the `tab` value of the query (or to the `"default"` string, if no `tab` value was specified in the query). See also the `searchHub` parameter.

referrerstring

The third level of origin of the request, typically the URL of the page that linked to the search interface from which the request originates (e.g., in JavaScript, this would correspond to the `document.referrer` value). Coveo Machine Learning models may use this information to provide contextually relevant output. **Note:** When logging a **Search** usage analytics event for a query, the `originLevel3` field of that event should be set to the `referrer` value of the query, if specified. See also the `context` parameter.

contextany

The custom context information to send along with the request. Must be a dictionary of key-value pairs (JSON) where each key is a string, and each value is either a string or an array of strings. Coveo Machine Learning models may use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$context` object. **Note:** When logging a **Search** usage analytics event for a query, the `customData` field of that event should include the same data as the `context` parameter of the query. However, each `context` key included in `customData` must be prefixed by `context_` (e.g., the `userRoles` key in `context` becomes `context_userRoles` in `customData`). See also the `referrer` parameter. **Example** `{"userAgeRange":"25-35","userRoles":["PremiumCustomer","ProductReviewer"]}`

actionsHistoryany

The query and page view actions previously made by the current user. Coveo Machine Learning event recommendations models use this information to provide contextually relevant output. **Note:** Page view actions are typically populated by the [coveo.analytics.js](https://github.com/coveo/coveo.analytics.js) script.

recommendationstring

The identifier of the recommendation interface from which the request originates (see [`CoveoRecommendation`](https://coveo.github.io/search-ui/components/recommendation.html)). Coveo Machine Learning event recommendations models may use this information to provide contextually relevant output.

localestring

The locale of the current user. Must comply with IETF's [BCP 47](http://www.rfc-editor.org/rfc/bcp/bcp47.txt) definition. Coveo Machine Learning models use this information to provide contextually relevant output. Moreover, this information can be referred to in query expressions and QPL statements by using the `$locale` object. **Note:** When logging a **Search** usage analytics event, the `language` field of that event should match the language part of the `locale` value of the query (e.g., `en-US` in `locale` becomes `en` in `language`).

timezonestring

The [tz database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) identifier of the time zone to use to correctly interpret dates in the query expression and result items. If not specified, the default time zone of the server hosting the index is used. **Note:** While no Coveo Machine Learning model uses this information, it can nevertheless affect the ranking scores (and thus, potentially the order) of result items, as ranking expressions may be based on time constants.

formatstring

The format of a successful response. - Use `json` to get the response in the JSON format. - Use `xlsx` to generate an Excel file containing the results (binary). **Note:** Debug information (see the `debug` parameter) can only appear in a response in the JSON format. **Default:** `json`

debugboolean

Whether to force a successful response to include debug information. **Notes:** - Debug information can only appear in responses in the JSON format (see the `format` parameter). - Avoid setting this parameter to `true` in production, as it has a negative impact on query performance. **Default:** `false`

indexTokenstring

The Base64 encoded identifier of the index mirror to forward the request to. See also the `index` parameter. If you do not specify an `indexToken` (or `index`) value, any index mirror could be used. **Note:** Passing an `indexToken` (or `index`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).

visitorIdstring

A GUID which represents the current user, who can either be authenticated or anonymous. `visitorId` is deprecated and has been replaced by [`clientId`](https://docs.coveo.com/en/masb0234/) in newer versions of the Coveo UI libraries. For compatibility, the new first-party cookie and local storage values are still named `coveo_visitorId`. For older versions of the JavaScript Search Framework, the visitor ID is generated by the Coveo Usage Analytics service and stored in a non-expiring third-party cookie. **Note:** Third-party cookies [have also been deprecated](https://docs.coveo.com/en/m54b9238/). This is unrelated to the deprecation of `visitorId`.

isGuestUserboolean

Whether the current user is anonymous. Coveo Machine Learning models may use this information to provide contextually relevant output. **Note:** When logging a **Search** usage analytics event for a query, the `anonymous` field of that event should be set to the `isGuestUser` value of the query. **Default:** `false`

languagestring

This parameter is exposed for backward compatibility reasons. Use the `locale` parameter instead.

mlParametersany

A map of options to pass to the Coveo ML models associated with the request's target query pipeline. **Available parameters:** - `considerUserContext` (boolean): Whether the models should attempt to leverage the `context` object of the request to personalize their output. Applies to CR models only. Default is `true`. - `maxActionsHistoryItemsToConsider` (unsigned integer): The maximum number of items in the `actionsHistory` array of the request that should be taken into account by the models. Applies to CR models only. By default, all `actionsHistory` items are considered. - `num` (unsigned integer): The maximum number of recommendations/suggestions to request from the models. Must be in range [1, 50], if specified. Applies to ART, CR, and QS models. Default depends on model configuration. - `padding` (string enum): The kind of padding the models should complete their output with, if their maximum number of recommendations/suggestions (i.e., `num`) has not been reached. Applies to CR models only. Allowed values are `popular` (i.e., pad recommendations with all time most popular items) and `trending` (i.e., pad recommendations with items that have recently been increasingly popular). By default, no padding applies. - `wordSelection` (string): The ITD keyword selection options the models should use. Applies only to ART models with ITD enabled. If specified, must be a string in the format `option:value`. The only available option is `wordsKept` (i.e., the maximum number of `lq` keywords to inject in `q`); its default value is `5`. - `minNumberOfWords` (unsigned integer): The minimum number of words a query suggestion may contain to be returned by the model. Applies to QS models only. Must be in range [1, 10] Default is `1`, which implies that the model will return all candidates. - `itemId` (string): The unique identifier (e.g., SKU) of a product to get recommendations for. Only applies when querying a Product Recommendations model with an association strategy considering a single item as an input. - `itemIds` (array of strings): The unique identifiers (e.g., SKUs) of the products to get recommendations for. Only applies when querying a Product Recommendations model with an association strategy considering multiple items as an input. - `categoryFilter` (string): The name of a category of products to get recommendations for. - `brandFilter` (string): The name of a brand of products to get recommendations for. - `filters` (map of strings): The dimensions along with the values to be used at query time by the model as filters for potential suggestions. Only applies to ART, QS, and DNE models that don't use the default `filterFields` advanced parameter values. **Example:** `"filters": { "originContext": "<MY-VALUE>", "originLevel2": "<MY-VALUE>" }`. **Examples:** - `{"num": 3, "padding": "trending", "maxActionsHistoryItemsToConsider": 10, "considerUserContext": false}` - `{"wordSelection": "wordsKept:4"}`

indexTypestring

The type of index against which to execute the query. Must correspond to an index that has been configured for the target Coveo Cloud organization. **Default:** `coveo`

indexstring

The identifier of the index mirror to forward the request to. See also the `indexToken` parameter. If you do not specify an `index` (or `indexToken`) value, any index mirror could be used. **Note:** Passing an `index` (or `indexToken`) value has no effect when the results of a specific request can be returned from cache (see the `maximumAge` parameter).

logicalIndexstring

The identifier for a logical group of indexes that have been configured to include documents from the same sources. If you do not specify a `logicalIndex` value, the `default` grouping will be used, typically including all indexes.

maximumTimeoutMsinteger (int32)

The maximum number of milliseconds to allow the request to last before timing out. **Maximum:** 10000 **Minimum/Default:** 0, meaning that Coveo determines the most appropriate timeout to use.

analyticsany
organizationIdstring

The unique identifier of the target Coveo Cloud organization. Specifying a value for this parameter is only necessary when you are authenticating the API call with an OAuth2 token.

viewAllContentboolean

Whether to bypass document permissions. Only effective if the access token grants the **Search - View all content** privilege.

Response

Returns 200 with an object. Read it in later steps with {{valuesGet.response.data.<field>}}.

valuesarray<object>
lookupValuestringrequired
numberOfResultsintegerrequired
valuestringrequired
json
{
  "values": [
    {
      "lookupValue": "string",
      "numberOfResults": 0,
      "value": "string"
    }
  ]
}

Need more? See the Coveo guide for connection setup and behaviour shared by every action.

Values Get — Coveo — Documentation