younifyd
Menu

Insight Panel Search

Search for items

POST/rest/organizations/{organizationId}/insight/v1/configs/{configId}/search

Use it in a workflow

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

Request

Path parameters

organizationIdstringrequired

The unique identifier of the target [organization](https://docs.coveo.com/en/185/).<br /><b>Example:</b> `mycoveocloudv2organizationg8tp8wu3`

configIdstringrequired

The unique identifier of the Insight Panel configuration.

Request body

Enter the body as JSON in the step's Body field.

analyticsobject
actionCausestring

The type of operation that triggered this event. See [Standard actions and Usage Analytics reference](docs.coveo.com/en/1389)).

captureboolean

Whether the search api call should be tracked for analytics and machine learning purposes. When set to `true`, be sure to set the `actionCause` parameter. See [Standard actions and Usage Analytics reference](docs.coveo.com/en/1389)).

clientIdstring

A GUID which represents the current client. If your implementation uses the Atomic or Headless libraries, or newer versions of the JavaScript Search Framework, then the [client ID](https://docs.coveo.com/en/masb0234/) is generated automatically in client-side code. This GUID is held in a browser's local storage as well as a top level domain first-party cookie (`coveo_visitorId`) that expires after 1 year. **Note:** The cookie takes precedence over the value in the browser's local storage. If you have a custom Coveo implementation, you will have to generate a [UUID v4](<https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)>)-formatted GUID. You will need to send this ID as `analytics.clientId` in every event that is sent to Coveo UA and the Search API. Coveo Machine Learning models may use this information to provide contextually relevant output. **Note** The `clientId` replaces the deprecated `visitorId`. For compatibility, the cookie and local storage values are still named `coveo_visitorId`.

clientRequestIdstring

A GUID generated by the client representing the current request. This information is used to identify operations across different apis related to the same request.

clientTimestampstring

Client ISO 8601 timestamp with milliseconds.

configIdstring

An optional external reference to a use-case specific search configuration. These configurations are maintained by LOBs and the search api has no knowledge of them. This field can be used by LOBs to break down search statistics in LOB specific reporting. This field is not present on non-captured search calls.

customDataobject

The user defined dimensions and their values. Keys can only contain alphanumeric or underscore characters. Whitespaces in keys are converted to underscores. Uppercase characters in keys are converted to lowercase characters. The value could be any valid JSON, but it is handled as string over Coveo usage analytics. It is highly recommended that you create your custom dimension before adding customData

documentLocationstring

The URL of the current page or component. If not present, the referrer is obtained from the [Referer](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer) header. **Note**: This information can be obtained from `coveo.analytics.js`.

documentReferrerstring

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**: This information can be obtained from `coveo.analytics.js`.

originContextstring

The origin of the event. Used to specify the deployment from which the user performs the action. Suggested values are Search, InternalSearch, CommunitySearch, or the originLevel1 value

pageIdoneOf

A GUID representing the page ID. **Note**: This information can be obtained from `coveo.analytics.js`.

sourcearray<string>

Defines one or more client side libraries that generated the analytics event. The format should be the library's name followed by '@', and then the version. For example, '[custom.library.js@2.0.0]'.

trackingIdstring

A value to identify which web property an event is related to.

userAgentstring

The user agent of the request. If not present, the user agent is obtained from the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent) header. **Note**: This information is required when endpoints are behind a proxy.

userIdstring

The ID of the user who is currently logged in. If not present, this ID is obtained from the authentication token.

userIpstring

The user IP. If not present, the IP is obtained from the [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For) and [Forwarded](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded) headers. **Note**: This information is required when endpoints are behind a proxy. **Example**: `127.0. 0.1`

caseContextobject

Contextual information about the case.

cqstring

<p>The constant query expression, typically populated with expressions that must apply to all queries sent from a specific search interface (e.g., from a specific tab). Once evaluated, the result sets of those expressions are kept in a special cache.</p><p><strong>Tip:</strong> Avoid including dynamic content in the constant query expression. Otherwise, you risk filling up the cache with useless data, which can have a negative impact on performance.</p>

debugboolean

<p>Whether to force a successful response to include debug information.</p> <p> Notes: <ul> <li>Debug information can only appear in responses in the JSON format (see the <code>format</code> parameter).</li> <li>Avoid setting this parameter to <code>true</code> in production, as it has a negative impact on query performance.</li> </ul> </p>

Default false

enableDidYouMeanboolean

<p><strong>Important:</strong> This feature is still in an experimental state.</p><p>Whether to enable the Coveo ML query suggestions <i>Did You Mean</i> feature, which populates the <code>queryCorrection</code> property of a successful response with keyword correction suggestions.</p><p>Notes: <ul><li>The Coveo ML query suggestions Did You Mean feature only processes the basic query expression (see the <code>q</code> parameter).</li><li>When both the <code>enableDidYouMean</code> and <code>enableMLDidYouMean</code> parameters are set to <code>true</code>, the output of both features will appear in the <code>queryCorrections</code> array.</li></ul></p>

Default false

facetsarray<object>

The facet operations to perform on the query results.

fieldstringrequired

<p>The name of the field on which to base the facet request.</p> <p><strong>Note:</strong> This must reference a field whose <strong>Facet</strong> option is enabled (see <a href="https://docs.coveo.com/en/1833">Add or edit a field</a>).</p>

typestringrequired

Request facet values representing specific values (e.g., Alice Smith, Bob Jones, etc.).

Default "specific"

fieldsToIncludearray<string>

<p>The names of the fields to include with each item in the query results. If specified, no other fields will be included.</p><p><strong>Note:</strong> If you specify both an array of fields to include and an array of fields to exclude (see the <code>fieldsToExclude</code> parameter), the <code>fieldsToExclude</code> parameter has no effect at all.</p> <p>If you do not explicitly specify an array of values for this parameter (or for the <code>fieldsToExclude</code> parameter), each query result item will include all of its available fields.</p>

firstResultinteger

<p>The 0-based position of the first result to return in the non-paginated result set.</p><p>Along with the <code>numberOfResults</code> parameter, this allows you to retrieve a specific page of result items.</p>

numberOfResultsinteger

<p>The number of results to return.</p><p>Along with the <code>firstResult</code> parameter, this allows you to retrieve a specific page of result items.</p><p>This parameter also defines the maximum number of results which can be returned by the Coveo ML Recommencations feature.</p><p><strong>Note:</strong> The maximum <code>numberOfResults</code> value depends on the index settings of your Coveo organization. By default, a Coveo index can return a maximum of 5,000 items per query.</p>

qstring

The basic query expression, typically the keywords entered by the end user in a query box.

sortCriteriastring

<p>The criteria to use for sorting the query results.</p> <p>Allowed values: <ul> <li><code>relevancy</code>: use standard index ranking factors (adjacency, TDIDF, etc.) and custom ranking expressions (QREs and QRFs) to compute a ranking <code>score</code> for each query result item, and sort the query results by descending <code>score</code> value.</li> <li><code>date ascending</code>/<code>date descending</code>: use the <code>@date</code> field to sort the query results. This field typically contains the last modification date of each item.</li> <li><code>qre</code>: use only custom ranking expressions (QREs and QRFs) to compute a ranking <code>score</code> for each query result item, and sort the query results by descending <code>score</code> value.</li> <li><code>nosort</code>: do not sort the query results; the index will return result items in an essentially random order.</li> <li><code>@[field] ascending</code>/<code>@[field] descending</code>: sort using the value of a specific sortable field (replace <code>[field]</code> with the name of the target field).</li> </ul> </p> <p> You can specify a list of comma-separated sort criteria. However, this only works when combining: <ul> <li>two or more field criteria (e.g., <code>@views descending,@likes descending</code>).</li> <li>a single date criteria with one or mode field criteria (e.g., <code>date ascending,@views descending</code>).</li> </ul> </p> <p> Examples: <ul> <li><code>date ascending</code></li> <li><code>@author ascending</code></li> <li><code>date descending,@views descending,@likes descending</code></li> </ul> </p>

Default "relevancy"

tabstring

<p>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.</p> <p>Coveo Machine Learning models use this information to provide contextually relevant output.</p> <p><strong>Note:</strong> When logging a <strong>Search</strong> usage analytics event for a query, the <code>originLevel2</code> field of that event should be set to the <code>tab</code> value of the query (or to the <code>&quot;default&quot;</code> string, if no <code>tab</code> value was specified in the query).</p>

json
{
  "analytics": {
    "actionCause": "facetSelect",
    "capture": false,
    "clientId": "string",
    "clientRequestId": "string",
    "clientTimestamp": "string",
    "configId": "string",
    "customData": {},
    "documentLocation": "string",
    "documentReferrer": "string",
    "originContext": "CommunitySearch",
    "pageId": null,
    "source": [
      "string"
    ]
  },
  "caseContext": {
    "description": "This is the case description",
    "subject": "This is the case subject"
  },
  "cq": "string",
  "debug": false,
  "enableDidYouMean": false,
  "facets": [
    {
      "field": "author",
      "type": "specific"
    }
  ],
  "fieldsToInclude": [
    "clickableuri",
    "author",
    "date",
    "filetype",
    "language",
    "conversationid",
    "messageid",
    "childid",
    "adjustednumberoflikes"
  ],
  "firstResult": 0,
  "numberOfResults": 0,
  "q": "string",
  "sortCriteria": "relevancy",
  "tab": "string"
}

Response

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

apiVersioninteger

<p>The version of the Search API that sent the query.</p>

categoryFacetsarray<object>

Hierarchical data results that correspond to the hierarchical data in the query.

fieldstring
parentValuesarray<object>2 fields
valuesarray<object>2 fields
durationinteger

<p>The <code>requestDuration</code> added to the computing time (in milliseconds) that was required by the Search API.</p>

errorsarray<string>

<p>The errors that critically changed the query behavior. These should be addressed right away to prevent future errors.</p>

exceptionobject
codestring
contextstring
facetsarray<object>

<p>The facet results returned by the query. These results are included in the order they were requested in the <code>facets</code> query parameter.</p>

fieldstring

The name of the field on which the facet is based.

indexScorenumber

The ranking score computed by the index for this facet.

isFromAutoSelectboolean

Whether the facet was recommended by Coveo ML.

mlScorenumber

The ranking score computed by Coveo ML DNE for this facet.

moreValuesAvailableboolean

Whether additional values are available for the facet.

valuesarray<object>10 fields

The returned facet values.

indexstring

<p>The identifier of the index mirror against which the query was executed (see the <code>indexToken</code> query parameter).</p>

indexDurationobject

<p>The time (in milliseconds) that was required for the index to find the query items.</p>

indexTokenstring

<p>The Base64 encoded identifier of the index mirror to which the request was forwarded (see the <code>index</code> parameter).</p> <p>If you do not specify an <code>indexToken</code> (or <code>index</code>) value, any index mirror could be used.</p> <p><strong>Note:</strong> Passing an <code>indexToken</code> (or <code>index</code>) value has no effect when the results of a specific request can be returned from cache (see the <code>maximumAge</code> query parameter).</p>

isFallbackToAdminboolean

<p>Whether the admin session ID was allowed and used by the Coveo for Salesforce search engine. The value will be set to <code>true</code> when this is the case, and might be absent or set to <code>false</code> otherwise.</p>

phrasesToHighlightobject

<p>The phrases to highlight in each query result item. This property is populated when the basic query expression (see the <code>q</code> query parameter) contains one or more exact phrase match requests (terms between double quote characters).</p>

pipelinestring

<p>The name of the query pipeline to use for this request (bypassing its conditions, if it has any).</p>

queryCorrectionsobject

<p>The query corrections suggested by the index, if the <code>enableDidYouMean</code> query parameter was set to <code>true</code>.</p>

correctedQuerystring

The corrected query expression.

wordCorrectionsarray<object>4 fields

The word correction suggestions.

questionAnswerobject
allContentIdsarray<object>2 fields
answerFoundboolean
answerIdstring
answerSnippetstring
documentIdobject2 fields
questionstring
rawobject
relatedQuestionsarray<object>4 fields
scorenumber
refinedKeywordsarray<string>

The refined keywords used by the Coveo ML Automatic Relevance Tuning (ART) model.

requestDurationinteger

<p>The <code>indexDuration</code> added to the time (in milliseconds) that was required to establish a connection between the Search API server and the index server.</p>

resultsarray<object>

The items returned for the query.

absentTermsarray<string>

<p>The basic query expression terms which this query result item does not match.</p> <p><strong>Note:</strong> This property is populated by terms from the query pipeline-processed <code>q</code> value (not from the original <code>q</code> value).</p>

childResultsarray<object>

An array of references to the children of this item, if result folding was applied (see the <code>filterField</code> query parameter). The query results contained in this field will have both their parent and child results set to <code>null</code>.

clickUristring

<p>The hyperlinkable item URI.</p> <p>Notes: <ul> <li>Use the <code>clickUri</code> value when you want to create hyperlinks to the item, rather than the <code>uri</code> or <code>printableUri</code> values.</li> <li>The <code>clickUri</code> value is not necessarily unique for each item.</li> </ul> </p>

excerptstring

<p>The contextual excerpt generated for the item (see the <code>excerptLength</code> query parameter).</p>

excerptHighlightsarray<object>2 fields

The length and offset of each word to highlight in the item <code>excerpt</code> string.

firstSentencesstring

The first sentences from the item (see the <code>retrieveFirstSentences</code> query parameter).

firstSentencesHighlightsarray<object>2 fields

The length and offset of each word to highlight in the item <code>firstSentences</code> string.

flagsstring

The flags that are set on the item by the index. Distinct values are separated by semicolons.

hasHtmlVersionboolean

Whether the index contains an HTML version of this item.

hasMobileHtmlVersionboolean

Whether the index contains a mobile HTML version of this item.

isRecommendationboolean

Whether the item score was boosted as a Coveo ML recommendation.

isTopResultboolean

Whether the item score was boosted by a featured result rule in the query pipeline.

isUserActionViewboolean

Whether the item score was boosted as a Coveo ML recommendation.

parentResultobject

Circular reference: #/components/schemas/RestQueryResult

percentScorenumber

The item ranking score expressed as a percentage (see the <code>sortCriteria</code> and <code>rankingFunctions</code> query parameters).

printableUristring

<p>The human readable item URI.</p> <p><strong>Note:</strong> Avoid using the <code>printableUri</code> value to create hyperlinks to the item. Use the <code>clickUri</code> value instead.</p>

printableUriHighlightsarray<object>2 fields

The length and offset of each word to highlight in the item <code>printableUri</code> string.

rankingInfostring

The raw debug information generated by the index to detail how the item was ranked. This property is <code>null</code> unless the <code>debug</code> query parameter is set to <code>true</code>.

rankingModifierstring

<p>If applicable, represents the type of ranking modification that was applied to this result.</p> <p><strong>Note:</strong> When logging a Click Usage Analytics event for an opened query result item, the <code>rankingModifier</code> field of that event should be set to the <code>rankingModifier</code> value of the opened query result item, if available.</p>

ratingnumber

<p>The item rating (see the <code>enableCollaborativeRating</code> query parameter).</p> <p><strong>Note:</strong> Unless collaborative rating is enabled for your index, the value of this property is always <code>3</code>.</p>

rawobject

<p>The values of the fields which were retrieved for this item (see the <code>fieldsToInclude</code> and <code>fieldsToExclude</code> query parameters).</p>

scoreinteger

The total ranking score computed for the item (see the <code>sortCriteria</code> and <code>rankingFunctions</code> query parameters).

summarystring

The item summary (see the <code>summaryLength</code> query parameter).

summaryHighlightsarray<object>2 fields

The length and offset of each word to highlight in the item <code>summary</code> string.

titlestring

<p>The item title.</p> <p><strong>Note:</strong> When logging a Click Usage Analytics event for an opened query result item, the <code>documentTitle</code> field of that event should be set to the <code>title</code> value of the opened query result item.</p>

titleHighlightsarray<object>2 fields

The length and offset of each word to highlight in the item <code>title</code> string.

totalNumberOfChildResultsinteger

The total number of children available in the index for this item, if result folding was applied (see the <code>filterField</code> query parameter).

uniqueIdstring

<p>The unique item identifier. You should consider the <code>uniqueId</code> value as an opaque string.</p>

uristring

<p>The item URI.</p> <p>Notes: <ul> <li>Avoid using the <code>uri</code> value to create hyperlinks to the item. Use the <code>clickUri</code> value instead.</li> <li>When logging a Click Usage Analytics event for an opened query result item, the <code>documentUrl</code> field of that event should be set to the <code>uri</code> value of the opened query result item.</li> </ul> </p>

searchUidstring

<p>The query <a href="https://en.wikipedia.org/wiki/Universally_unique_identifier">UUID</a>. Each query sent to the Search API has its own randomly generated <code>searchUid</code>.</p> <p><strong>Note:</strong> When logging a Search or Custom Usage Analytics event for a query, or a Click Usage Analytics event for an opened query result item, the <code>searchQueryUid</code> field of that event should be set to the <code>searchUid</code> value of the query response.</p>

suggestedFacetsarray<object>
fieldstring

The name of the field on which the DNE facet suggestion is based.

valuesarray<object>2 fields

The suggested facet values.

termsToHighlightobject

<p>The terms to highlight in each query result item. Includes all basic query expression keywords, as well as any word that was stemmed from a basic query expression keyword (see the <code>q</code> query parameter), unless the keyword was preceded by the no stemming Coveo query syntax operator (<code>+</code>).</p>

totalCountinteger

<p>The total number of items that match the query for the current user (security trimming applied).</p> <p><strong>Note:</strong> When logging a Search Usage Analytics event for a query, the <code>numberOfResults</code> field of that event should be set to the <code>totalCount</code> value of the query (for reporting purposes).</p>

totalCountFilteredinteger

<p>The total number of items that match the query for the current user (security trimming applied) after duplicate filtering has been applied (see the <code>duplicateFiltering</code> query parameter).</p>

triggersobject

<p>The actions that the client should perform based on the Trigger statements defined in the query pipelines (see the <code>pipeline</code> query parameter).</p> <p><strong>Note:</strong> A trigger statement must have a condition. Otherwise, the Search API ignores it and does not include it in the <code>triggers</code> array of the query response (see <a href="https://docs.coveo.com/en/3413">Manage trigger rules</a>).</p>

contentobject
typestring

<p>The type of Coveo query pipeline Trigger statement (see <a href="https://docs.coveo.com/en/3413">Manage trigger rules</a>).</p>

warningsarray<string>

<p>The errors that did not make the query fail, but should be addressed. These might be security issues, deprecated behaviors, or any other kind of concern.</p>

json
{
  "apiVersion": 2,
  "categoryFacets": [
    {
      "field": "string",
      "parentValues": [
        {
          "numberOfResults": 0,
          "value": "string"
        }
      ],
      "values": [
        {
          "numberOfResults": 0,
          "value": "string"
        }
      ]
    }
  ],
  "duration": 1235,
  "errors": [
    "string"
  ],
  "exception": {
    "code": "string",
    "context": "string"
  },
  "facets": [
    {
      "field": "author",
      "indexScore": 0,
      "isFromAutoSelect": false,
      "mlScore": 0,
      "moreValuesAvailable": false,
      "values": [
        {
          "children": [
            {}
          ],
          "endInclusive": false,
          "isAutoSelected": false,
          "isLeafValue": false,
          "isSuggested": false,
          "moreValuesAvailable": false,
          "numberOfResults": 0,
          "path": [
            "string"
          ],
          "state": "idle",
          "value": "Alice Smith"
        }
      ]
    }
  ],
  "index": "mycoveocloudv2organizationid-cqjd206sta1xb9qyxfhhnsu294-Indexer-2-9rbfxhp1n07cth80ckzeh3zotc",
  "indexDuration": "1175",
  "indexToken": "ZXhhbXBsZWluZGV4bWlycm9yLS4uLg==",
  "isFallbackToAdmin": false,
  "phrasesToHighlight": {
    "cloud v2": {
      "cloud": [],
      "v2": []
    }
  },
  "pipeline": "CustomQueryPipeline"
}

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