Coveo Statement groups API

The Statement groups API from Coveo — 8 operation(s) for statement groups.

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-passagev3-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restfacetrequest-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restfacetresult-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restfacetresultvalue-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restgroupby-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restgroupbyresult-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restgroupbyvalue-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-resthighlightresponse-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restquerycorrection-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restqueryfunction-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restqueryparameters-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restqueryparentresult-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restqueryresponse-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restqueryresult-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-restrankingfunction-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-retrievepassagesrequestv3-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-schema/coveo-search-retrievepassagesresponsev3-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-passagev3-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restfacetrequest-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restfacetresult-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restfacetresultvalue-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restgroupby-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restgroupbyresult-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restgroupbyvalue-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-resthighlightresponse-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restquerycorrection-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restqueryfunction-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restqueryparameters-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restqueryparentresult-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restqueryresponse-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restqueryresult-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-restrankingfunction-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-retrievepassagesrequestv3-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/json-structure/coveo-search-retrievepassagesresponsev3-structure.json

Other Resources

OpenAPI Specification

coveo-statement-groups-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Coveo Activity Activities Statement groups API
  description: API for Coveo Platform
  termsOfService: https://www.coveo.com/en/support/terms-agreements
  contact:
    name: Coveo
    url: https://connect.coveo.com/s/discussions
  version: 1.0.0
servers:
- url: https://platform.cloud.coveo.com
  description: Coveo public API endpoint
security:
- oauth2:
  - full
tags:
- name: Statement groups
  x-displayName: Statement groups
paths:
  /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups:
    get:
      tags:
      - Statement groups
      summary: List Statement Groups of a Pipeline
      description: 'List statement groups of a pipeline

        <details>

        <summary>Privilege(s) required</summary>


        ```json

        {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"VIEW","targetId":"{pipelineId}"}

        ```

        </details>'
      operationId: listStatementGroups
      parameters:
      - $ref: '#/components/parameters/OrganizationIdQuery'
      - $ref: '#/components/parameters/PipelineIdPath'
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PerPage'
      - $ref: '#/components/parameters/Filter'
      - $ref: '#/components/parameters/StatementGroupSortBy'
      - $ref: '#/components/parameters/IsOrderAscending'
      - $ref: '#/components/parameters/StatementGroupTypeParam'
      - $ref: '#/components/parameters/StatementGroupStatusParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListStatementGroupsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '419':
          $ref: '#/components/responses/AuthenticationTimeout'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
      - oauth2:
        - full
    post:
      tags:
      - Statement groups
      summary: Create a New Statement Group
      description: 'Create a new statement group

        <details>

        <summary>Privilege(s) required</summary>


        ```json

        {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"EDIT","targetId":"{pipelineId}"}

        ```

        </details>'
      operationId: createStatementGroup
      parameters:
      - $ref: '#/components/parameters/OrganizationIdQuery'
      - $ref: '#/components/parameters/PipelineIdPath'
      requestBody:
        description: The new statement group to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrUpdateStatementGroup'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateStatementGroupResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '419':
          $ref: '#/components/responses/AuthenticationTimeout'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
      - oauth2:
        - full
  /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/associations/dissociate:
    post:
      tags:
      - Statement groups
      summary: Dissociate Pipeline Rules Associated to Groups
      operationId: statementGroupsAssociationsDissociate
      parameters:
      - $ref: '#/components/parameters/OrganizationIdQuery'
      - $ref: '#/components/parameters/PipelineIdPath'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DissociateStatementGroupAssociationsRequest'
      responses:
        '200':
          description: Successfully dissociated the items.
          content:
            application/json:
              schema:
                type: object
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '419':
          $ref: '#/components/responses/AuthenticationTimeout'
        '422':
          $ref: '#/components/responses/UnprocessableStatementGroupAssociations422'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
      - oauth2:
        - full
      description: '<details>

        <summary>Privilege(s) required</summary>


        ```json

        {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"EDIT","targetId":"{pipelineId}"}

        ```

        </details>'
  /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/bulkGet:
    post:
      tags:
      - Statement groups
      summary: List Statement Groups of a Pipeline
      description: 'List statement groups of a pipeline

        <details>

        <summary>Privilege(s) required</summary>


        ```json

        {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"VIEW","targetId":"{pipelineId}"}

        ```

        </details>'
      operationId: bulkGetStatementGroupsOperation
      parameters:
      - $ref: '#/components/parameters/OrganizationIdQuery'
      - $ref: '#/components/parameters/PipelineIdPath'
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PerPage'
      requestBody:
        description: A set of parameters to customize the results.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RestBulkGetRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListStatementGroupsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '419':
          $ref: '#/components/responses/AuthenticationTimeout'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
      - oauth2:
        - full
  /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/validate:
    post:
      tags:
      - Statement groups
      summary: Validate a Single Statement Group Operation.
      description: 'Validate that a specific operation would be accepted by our API and executed.

        <details>

        <summary>Privilege(s) required</summary>


        ```json

        {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"VIEW","targetId":"{pipelineId}"}

        ```

        </details>'
      operationId: validateStatementGroupOperation
      parameters:
      - $ref: '#/components/parameters/OrganizationIdQuery'
      - $ref: '#/components/parameters/PipelineIdPath'
      requestBody:
        description: An object that contains an operation to validate.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RestSingleOperationValidationRequestCreateStatementGroupRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestSingleOperationValidationResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '419':
          $ref: '#/components/responses/AuthenticationTimeout'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
      - oauth2:
        - full
  /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/validate/batch:
    post:
      tags:
      - Statement groups
      summary: Validate a Batch of Statement Groups Operations.
      description: '

        Validate that a list of operations would be accepted by our API and executed.

        A maximum of 15 can be processed per request.

        <details>

        <summary>Privilege(s) required</summary>


        ```json

        {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"VIEW","targetId":"{pipelineId}"}

        ```

        </details>'
      operationId: validateStatementGroupsOperations
      parameters:
      - $ref: '#/components/parameters/OrganizationIdQuery'
      - $ref: '#/components/parameters/PipelineIdPath'
      requestBody:
        description: An object that contains the list of operations to validate.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RestBatchOperationValidationRequestCreateStatementGroupRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestBatchOperationValidationResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '419':
          $ref: '#/components/responses/AuthenticationTimeout'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
      - oauth2:
        - full
  /rest/search/admin/pipelines/featureActiveState:
    get:
      summary: Returns the List of All Pipeline Features and Whether They're Active or Not.
      operationId: getFeatureActiveState
      tags:
      - Statement groups
      parameters:
      - $ref: '#/components/parameters/OrganizationIdQueryRequired'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListFeatureActiveStateResponse'
      security:
      - oauth2:
        - full
      description: '<details>

        <summary>Privilege(s) required</summary>


        ```json


        ```

        </details>'
  /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/{statementGroupId}:
    get:
      tags:
      - Statement groups
      summary: Get a Statement Group of a Pipeline
      description: 'Get a statement group of a pipeline

        <details>

        <summary>Privilege(s) required</summary>


        ```json

        {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"VIEW","targetId":"{pipelineId}"}

        ```

        </details>'
      operationId: Get a statement group of a pipeline
      parameters:
      - $ref: '#/components/parameters/OrganizationIdQuery'
      - $ref: '#/components/parameters/PipelineIdPath'
      - $ref: '#/components/parameters/StatementGroupIdPath'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetStatementGroup'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '419':
          $ref: '#/components/responses/AuthenticationTimeout'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
      - oauth2:
        - full
    delete:
      tags:
      - Statement groups
      summary: Delete a Statement Group of a Pipeline
      description: 'Delete a statement group of a pipeline

        <details>

        <summary>Privilege(s) required</summary>


        ```json

        {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"EDIT","targetId":"{pipelineId}"}

        ```

        </details>'
      operationId: Delete a statement group of a pipeline
      parameters:
      - $ref: '#/components/parameters/OrganizationIdQuery'
      - $ref: '#/components/parameters/PipelineIdPath'
      - $ref: '#/components/parameters/StatementGroupIdPath'
      responses:
        '204':
          description: No response
          content: {}
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '419':
          $ref: '#/components/responses/AuthenticationTimeout'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
      - oauth2:
        - full
    put:
      tags:
      - Statement groups
      summary: Update a Statement Group
      description: 'Update a statement group

        <details>

        <summary>Privilege(s) required</summary>


        ```json

        {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"EDIT","targetId":"{pipelineId}"}

        ```

        </details>'
      operationId: Update a statement group
      parameters:
      - $ref: '#/components/parameters/OrganizationIdQuery'
      - $ref: '#/components/parameters/PipelineIdPath'
      - $ref: '#/components/parameters/StatementGroupIdPath'
      requestBody:
        description: The statement group to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrUpdateStatementGroup'
        required: true
      responses:
        '204':
          description: No Content
          content: {}
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '419':
          $ref: '#/components/responses/AuthenticationTimeout'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
      - oauth2:
        - full
    patch:
      tags:
      - Statement groups
      summary: Toggle a Permanent Group
      description: 'Toggle a permanent group

        <details>

        <summary>Privilege(s) required</summary>


        ```json

        {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"EDIT","targetId":"{pipelineId}"}

        ```

        </details>'
      operationId: Toggle a permanent group
      parameters:
      - $ref: '#/components/parameters/OrganizationIdQuery'
      - $ref: '#/components/parameters/PipelineIdPath'
      - $ref: '#/components/parameters/StatementGroupIdPath'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TogglePermanentGroupRequest'
        required: true
      responses:
        '204':
          description: No Content
          content: {}
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '419':
          $ref: '#/components/responses/AuthenticationTimeout'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
      - oauth2:
        - full
  /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/{statementGroupId}/associations:
    put:
      security:
      - oauth2:
        - full
      tags:
      - Statement groups
      summary: Update the Rules Associated with a Statement Group
      description: 'There are two operations which can update the rules associated with a statement group:


        - **Addition** uses the `toAdd` parameter

        - **Deletion** uses the `toRemove` parameter

        <details>

        <summary>Privilege(s) required</summary>


        ```json

        {"level":"NORMAL","owner":"SEARCH_API","targetDomain":"QUERY_PIPELINE","type":"EDIT","targetId":"{pipelineId}"}

        ```

        </details>'
      operationId: updateStatementGroupsAssociations
      parameters:
      - $ref: '#/components/parameters/OrganizationIdQuery'
      - $ref: '#/components/parameters/PipelineIdPath'
      - $ref: '#/components/parameters/StatementGroupIdPath'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateStatementGroupAssociationsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateStatementGroupAssociationsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '419':
          $ref: '#/components/responses/AuthenticationTimeout'
        '422':
          $ref: '#/components/responses/UnprocessableStatementGroupAssociations422'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    RestSingleOperationValidationRequestCreateStatementGroupRequest:
      required:
      - operation
      type: object
      properties:
        operation:
          $ref: '#/components/schemas/RestOperationValidationRequestCreateStatementGroupRequest'
    StatementGroupStatus:
      type: string
      description: The status of the campaign.
      enum:
      - active
      - inactive
      - expired
      - notStarted
    ProblemDetailResponse:
      type: object
      description: The Problem Details JSON Object [[RFC7807](https://tools.ietf.org/html/rfc7807)].
      minProperties: 1
      properties:
        status:
          type: integer
          minimum: 400
          maximum: 599
          description: The HTTP status code.
        title:
          type: string
          description: A short, human-readable summary of the problem type. This **shouldn't** change from one occurrence of the problem to another, except for localization purposes.
        type:
          type: string
          format: URI
          description: A URI reference [[RFC3986](https://tools.ietf.org/html/rfc3986)] that identifies and provides human-readable documentation for the problem type. When this isn't present, its value is assumed to be "about:blank".
        detail:
          type: string
          description: A human-readable explanation which is specific to this occurrence of the problem.
        instance:
          type: string
          format: URI
          description: A URI reference [[RFC3986](https://tools.ietf.org/html/rfc3986)] that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
    RestBatchOperationValidationResponse:
      required:
      - results
      type: object
      properties:
        results:
          type: array
          description: The list of operation validation results.
          items:
            $ref: '#/components/schemas/RestOperationValidationResponse'
    CreateOrUpdateCampaignGroupBase:
      type: object
      required:
      - campaignStart
      - campaignEnd
      properties:
        campaignStart:
          type: string
          description: The start date of the campaign.
          example: '2001-07-20T23:01:05-04:00'
        campaignEnd:
          type: string
          description: The end date of the campaign.
          example: '2002-09-07T10:07:20-04:00'
    FeatureActiveState:
      type: object
      required:
      - feature
      - active
      properties:
        feature:
          type: string
          description: The name of the QueryPipeline feature
        active:
          type: boolean
          description: Whether the feature is active or not.
    RestBulkGetRequest:
      type: object
      properties:
        ids:
          type: array
          description: A list of resource identifiers to get. A maximum of **1000** can be sent.
          items:
            type: string
            maxItems: 1000
    CreateOrUpdateStatementGroup:
      oneOf:
      - $ref: '#/components/schemas/CreateOrUpdateCampaignGroup'
      - $ref: '#/components/schemas/CreateOrUpdatePermanentGroup'
      discriminator:
        propertyName: type
        mapping:
          campaign: '#/components/schemas/CreateOrUpdateCampaignGroup'
          permanent: '#/components/schemas/CreateOrUpdatePermanentGroup'
      example:
        name: Community
        type: campaign
        description: Provides contextually relevant query recommendations/results to Community site users.
        campaignStart: '2001-07-20T23:01:05-04:00'
        campaignEnd: '2002-09-07T10:07:20-04:00'
    StatementGroupType:
      type: string
      description: The type name of the statement group.
      enum:
      - campaign
      - permanent
    TogglePermanentGroupRequest:
      type: object
      properties:
        isActive:
          type: boolean
          description: Whether or not the group is active.
    GetPermanentGroupBase:
      type: object
      required:
      - isActive
      properties:
        isActive:
          type: boolean
          description: Whether or not the group is active.
        status:
          type: string
          description: The status of the group.
          enum:
          - active
          - inactive
    CreateOrUpdatePermanentGroupBase:
      type: object
      required:
      - isActive
      properties:
        isActive:
          type: boolean
          description: Whether or not the group is active.
    StatementGroupComposition:
      required:
      - otherStatementCount
      - resultRankingStatementCount
      type: object
      properties:
        resultRankingStatementCount:
          type: integer
          description: The number of result ranking statements in this group.
          format: int32
        otherStatementCount:
          type: integer
          description: The number of other types of statements in this group.
          format: int32
    GetStatementGroupBase:
      required:
      - id
      - type
      - name
      - statementComposition
      - createdAt
      - warnings
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the statement group.
          example: 679adb80-444e-11ea-b77f-2e728ce88125
        name:
          type: string
          description: The name of the statement group.
          example: Community
        type:
          $ref: '#/components/schemas/StatementGroupType'
        description:
          type: string
          description: The intended purpose of this statement group.
          example: Provide contextually relevant query recommendations/results to Community site users.
        conditionId:
          type: string
          description: 'The condition that must be met by a query in order to route that query through this query pipeline.


            Typically, each query pipeline except the default one should have a condition, and you should ensure that the conditions you set on query pipelines are mutually exclusive.


            **Note:**


            A query cannot be routed through a query pipeline that does not have a condition unless:


            - That query pipeline is set as the default query pipeline (see the `isDefault` property), or

            - That query pipeline is enforced through the `pipeline` parameter of the query itself, in which case the query pipeline condition is bypassed.'
        conditionDefinition:
          type: string
          description: 'The condition that must be met by a query in order to route that query through this query pipeline.


            Typically, each query pipeline except the default one should have a condition, and you should ensure that the conditions you set on query pipelines are mutually exclusive.


            **Note:**


            A query cannot be routed through a query pipeline that does not have a condition unless:


            - That query pipeline is set as the default query pipeline (see the `isDefault` property), or

            - That query pipeline is enforced through the `pipeline` parameter of the query itself, in which case the query pipeline condition is bypassed.'
        conditionDetailed:
          description: A structured representation of the condition.
        createdAt:
          type: string
        createdBy:
          type: string
        statementComposition:
          $ref: '#/components/schemas/StatementGroupComposition'
        modifiedAt:
          type: string
        modifiedBy:
          type: string
        warnings:
          type: array
          items:
            type: string
    DissociateStatementGroupAssociationsRequest:
      type: object
      properties:
        associations:
          type: array
          maxItems: 50
          description: 'The rules that should be dissociated from their group, if any.


            If a rule is not associated to a group, it won''t be updated.


            **Note:**: Invalid rule IDs will cause the request to fail.'
          items:
            $ref: '#/components/schemas/StatementGroupAssociationItem'
    ListStatementGroupsResponse:
      required:
      - groupComposition
      - groups
      - totalCount
      type: object
      properties:
        groups:
          type: array
          items:
            $ref: '#/components/schemas/GetStatementGroup'
        totalCount:
          type: integer
          description: The total number of matching statements across all pages of results.
          format: int32
          example: 1
        groupComposition:
          $ref: '#/components/schemas/PipelineGroupsComposition'
    CreateOrUpdateStatementGroupBase:
      type: object
      required:
      - type
      - name
      properties:
        name:
          type: string
          description: The name of the statement group.
          example: Community
        type:
          $ref: '#/components/schemas/StatementGroupType'
        description:
          type: string
          description: The intended purpose of this statement group.
          example: Provide contextually relevant query recommendations/results to Community site users.
        conditionId:
          type: string
          description: 'The condition that must be met by a query in order to route that query through this query pipeline.


            Typically, each query pipeline except the default one should have a condition, and you should ensure that the conditions you set on query pipelines are mutually exclusive.


            **Note:**


            A query cannot be routed through a query pipeline that does not have a condition unless:


            - That query pipeline is set as the default query pipeline (see the `isDefault` property), or

            - That query pipeline is enforced through the `pipeline` parameter of the query itself, in which case the query pipeline condition is bypassed.'
    CreateStatementGroupResponse:
      required:
      - id
      - name
      - type
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the statement group.
          example: 679adb80-444e-11ea-b77f-2e728ce88125
        name:
          type: string
          description: The name of the statement group.
          example: Community
        type:
          type: string
          description: The type name of the statement group.
          enum:
          - campaign
          - permanent
        isActive:
          type: boolean
          description: The start date of the campaign.
          example: false
        campaignStart:
          type: string
          description: The start date of the campaign.
          example: '2001-07-20T23:01:05'
        campaignEnd:
          type: string
          description: The end date of the campaign.
          example: '2002-09-07T10:07:20'
        description:
          type: string
          description: The intended purpose of this statement group.
          example: Provide contextually relevant query recommendations/results to Community site users.
        conditionId:
          type: string
          description: 'The condition that must be met by a query in order to route that query through this query pipeline.


            Typically, each query pipeline except the default one should have a condition, and you should ensure that the conditions you set on query pipelines are mutually exclusive.


            **Note:**


            A query cannot be routed through a query pipeline that does not have a condition unless:


            - That query pipeline is set as the default query pipeline (see the `isDefault` property), or

            - That query pipeline is enforced through the `pipeline` parameter of the query itself, in which case the query pipeline condition is bypassed.'
    RestSingleOperationValidationResponse:
      required:
      - result
      type: object
      properties:
        result:
          $ref: '#/components/schemas/RestOperationValidationResponse'
    ErrorMessage:
      type: object
      additionalProperties: true
      properties:
        statusCode:
          type: number
          example: 404
        errorCode:
          type: string
          example: ORGANIZATION_DOES_NOT_EXIST
        message:
          type: string
          example: The organization does not exist in the search api.
    GetCampaignGroup:
      allOf:
      - $ref: '#/components/schemas/GetStatementGroupBase'
      - $ref: '#/components/schemas/GetCampaignGroupBase'
    PipelineGroupsComposition:
      required:
      - campaignGroupCount
      - permanentGroupCount
      - activeGroupCount
      - inactiveGroupCount
      - expiredGroupCount
      - notStartedGroupCount
      type: object
      properties:
        activeGroupCount:
          type: integer
          description: The number of active groups in the pipeline.
          format: int32
        inactiveGroupCount:
          type: integer
          description: The number of inactive groups in the pipeline.
          format: int32
        expiredGroupCount:
          type: integer
          description: The number of expired groups in the pipeline.
          format: int32
        notStartedGroupCount:
          type: integer
          description: The number of groups not started in the pipeline.
          format: int32
        campaignGroupCount:
          type: integer
          description: The number of campaign groups in the pipeline.
          format: int32
        permanentGroupCount:
          type: integer
          description: The number of permanent groups in the pipeline.
          format: int32
    RestOperationValidationResponse:
      required:
      - operationType
      - operationValid
      type: object
      properties:
        operationType:
          type: string
          description: The type of operation that has been validated.
          example: CREATE
        operationValid:
          type: boolean
          description: Whether the operation to validate was successful or not.
          example: true
        resourceId:
          type: string
          description: 'The identifier of the resource. '
          example: id
        validationErrors:
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/RestOperatio

# --- truncated at 32 KB (44 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/coveo/refs/heads/main/openapi/coveo-statement-groups-api-openapi.yml