younifyd
Menu

Validate Statement Group Operation

Validate a single statement group operation.

POST/rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/validate

Use it in a workflow

  1. Add a step and choose the Coveo connector.
  2. Pick the Validate Statement Group Operation action (under Search).
  3. Fill in the fields below, then reference the result from later steps as {{validateStatementGroupOperation.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.

operationobjectrequired
modeloneOf
operationTypestringrequired

The type of operation to validate. Each operation type has specific validation rules. Additional request parameters are required based on the type of operation to validate: - `CREATE`: You must provide a `model`. - `UPDATE`: You must provide a `model` and a `resourceId`. - `DELETE`: You must provide a `resourceId`.

One ofCREATEUPDATEDELETE

resourceIdstring

The identifier of the resource.

json
{
  "operation": {
    "operationType": "CREATE",
    "model": {
      "campaignEnd": "2002-09-07T10:07:20-04:00",
      "campaignStart": "2001-07-20T23:01:05-04:00",
      "description": "Provides contextually relevant query recommendations/results to Community site users.",
      "name": "Community",
      "type": "campaign"
    },
    "resourceId": "id"
  }
}

Response

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

resultobject
operationTypestringrequired

The type of operation that has been validated.

operationValidbooleanrequired

Whether the operation to validate was successful or not.

resourceIdstring

The identifier of the resource.

validationErrorsobject

If the operation failed, the `validationError` will contains the error message.

json
{
  "result": {
    "operationType": "CREATE",
    "operationValid": true,
    "resourceId": "id",
    "validationErrors": "Access Denied. You don't have the required privileges to perform  this operation."
  }
}

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

Validate Statement Group Operation — Coveo — Documentation