younifyd
Menu

Copy Query Pipeline Statements

Copy query pipeline statements

POST/rest/search/v2/admin/pipelines/{pipelineId}/statements/copy

Use it in a workflow

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

Request

Path parameters

pipelineIdstringrequired

The unique identifier of the target query pipeline.

Query parameters

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.

Request body

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

destinationPipelineIdstringrequired

The unique identifier of the query pipeline to copy the statements to.

statementIdsarray<string>required

The unique identifiers of the query pipeline statements to copy.

json
{
  "destinationPipelineId": "120deecf-7822-4d7b-885f-53f184a3a76",
  "statementIds": [
    "4f0a9531-4fab-45fd-a1e3-eb07a5aceccb"
  ]
}

Response

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

statementsarray<object>

The matching statements in the current page of results.

childrenCountinteger (int32)required

> This property is exposed for backward compatibility reasons.

conditionany
definitionstringrequired

The query pipeline language expression that defines this statement (see [Query Pipeline Language (QPL)](https://docs.coveo.com/en/1449/)).

descriptionstring

The intended purpose of this statement in an actual implementation.

detailedanyrequired
displayNamestring

The display name for this Machine Learning model. This property only has a meaning with `recommendation`, `topClicks`, and `querySuggest` statements.

featurestringrequired

The query pipeline feature expressed by this statement (see [Query Pipeline Language (QPL)](https://docs.coveo.com/en/1449/)).

One offiltertriggerrankingstopthesaurustoptopClicksquerySuggestrankingweightrecommendationqueryParamOverride

idstringrequired

The unique identifier of this statement.

modifiedAtstring (date-time)

The last time this was modified.

modifiedBystring

The identifier of the Coveo Cloud platform user who last modified this.

parentany
positioninteger (int32)required

The 1-based position of this statement relative to other statements in the same query pipeline. Query pipeline statements are evaluated sequentially from the lowest to the highest position, which implies that higher-positioned statements can override or complement lower-positioned ones. **Example:** If a query pipeline contains the following statements: - `replace dog cat` (position 1) - `replace cat feline` (position 2) That pipeline will replace the keyword `dog` in a query by the keyword `feline`.

readybooleanrequired

Whether the underlying Coveo Machine Learning model is ready. This property only has a meaning with `recommendation`, `topClicks`, and `querySuggest` statements.

statementGroupIdstring

Deprecated. Do not use.

warningsarray<string>

The warning messages that apply to this query pipeline statement.

totalCountinteger (int32)

> This property is exposed for backward compatibility reasons. Use the `totalEntries` property instead. The total number of matching entries across all pages of results.

totalEntriesinteger (int32)

The total number of matching statements across all pages of results.

totalPagesinteger (int32)

The total number of available pages of results.

json
{
  "statements": [
    {
      "childrenCount": 0,
      "definition": "boost `coveo` by 100",
      "detailed": null,
      "feature": "ranking",
      "id": "0befc717-dfd7-4962-9b85-28f5c26fd23b",
      "position": 2,
      "ready": false,
      "condition": null,
      "description": "Spotlight the Coveo brand in query results.",
      "displayName": "",
      "modifiedAt": "2021-02-16T15:15:17Z",
      "modifiedBy": "bjones@example.com"
    }
  ],
  "totalCount": 1,
  "totalEntries": 1,
  "totalPages": 1
}

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

Copy Query Pipeline Statements — Coveo — Documentation