Coveo Statement groups API

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

Operations 12

GET /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups List Statement Groups of a Pipeline #
POST /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups Create a New Statement Group #
POST /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/associations/dissociate Dissociate Pipeline Rules Associated to Groups #
POST /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/bulkGet List Statement Groups of a Pipeline #
POST /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/validate Validate a Single Statement Group Operation. #
POST /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/validate/batch Validate a Batch of Statement Groups Operations. #
GET /rest/search/admin/pipelines/featureActiveState Returns the List of All Pipeline Features and Whether They're Active or Not. #
GET /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/{statementGroupId} Get a Statement Group of a Pipeline #
DELETE /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/{statementGroupId} Delete a Statement Group of a Pipeline #
PUT /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/{statementGroupId} Update a Statement Group #
PATCH /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/{statementGroupId} Toggle a Permanent Group #
PUT /rest/search/v2/admin/pipelines/{pipelineId}/statementGroups/{statementGroupId}/associations Update the Rules Associated with a Statement Group #

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

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/coveo-statement-groups-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

coveo-statement-groups-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Coveo Search Statement groups API
  description: Documentation for Coveo Search API
  termsOfService: http://www.coveo.com/en/support/terms-agreements
  contact:
    name: support@coveo.com
  license:
    name: ''
  version: 1.0.0
  x-ApiVersion: V3
servers:
- url: https://platform.cloud.coveo.com
  description: Coveo public API endpoint
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:
    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.'
    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
    ListFeatureActiveStateResponse:
      type: object
      required:
      - featureActiveState
      properties:
        featureActiveState:
          type: array
          items:
            $ref: '#/components/schemas/FeatureActiveState'
    StatementGroupAssociationItem:
      type: object
      description: An object representing a rule to associate to a group.
      required:
      - featureType
      - ruleId
      properties:
        featureType:
          type: string
          enum:
          - resultRankings
          description: The query pipeline feature that's enabled by this rule.
        ruleId:
          type: string
          description: The unique identifier of the rule.
          example: 493e51a8-bc9b-462d-9534-08a0995ecd55
    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'
    RestOperationValidationRequestCreateStatementGroupRequest:
      required:
      - operationType
      type: object
      properties:
        operationType:
          type: string
          description: '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`.

            '
          example: CREATE
          enum:
          - CREATE
          - UPDATE
          - DELETE
        model:
          $ref: '#/components/schemas/CreateOrUpdateStatementGroup'
        resourceId:
          type: string
          description: 'The identifier of the resource. '
          example: id
    UpdateStatementGroupAssociationsRequest:
      type: object
      properties:
        toAdd:
          type: array
          maxItems: 50
          description: 'The rules to add to this group.


            If you specify a rule from another group, it will be removed from the original group and added to this one instead.


            **Note:** Invalid rule IDs will cause the request to fail.'
          items:
            $ref: '#/components/schemas/StatementGroupAssociationItem'
        toRemove:
          type: array
          maxItems: 50
          description: 'The rules to remove from this group.


            **Note:** Orphaned rules, rules that are associated with another group, and non-existent rules will be ignored.'
          items:
            $ref: '#/components/schemas/StatementGroupAssociationItem'
    CreateOrUpdateCampaignGroup:
      allOf:
      - $ref: '#/components/schemas/CreateOrUpdateStatementGroupBase'
      - $ref: '#/components/schemas/CreateOrUpdateCampaignGroupBase'
    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
    RestBatchOperationValidationResponse:
      required:
      - results
      type: object
      properties:
        results:
          type: array
          description: The list of operation validation results.
          items:
            $ref: '#/components/schemas/RestOperationValidationResponse'
    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'
    StatementGroupStatus:
      type: string
      description: The status of the campaign.
      enum:
      - active
      - inactive
      - expired
      - notStarted
    RestBatchOperationValidationRequestCreateStatementGroupRequest:
      required:
      - operations
      type: object
      properties:
        operations:
          type: array
          description: A list of operations to validate.
          example:
          - operationType: CREATE
            model: {}
          - operationType: UPDATE
            model: {}
            resourceId: resource-id
          - operationType: DELETE
            resourceId: resource-id
          items:
            $ref: '#/components/schemas/RestOperationValidationRequestCreateStatementGroupRequest'
    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/RestOperationValidationError'
          description: If the operation failed, the `validationError` will contains the error message.
          example: Access Denied. You don't have the required privileges to perform  this operation.
    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
    GetCampaignGroup:
      allOf:
      - $ref: '#/components/schemas/GetStatementGroupBase'
      - $ref: '#/components/schemas/GetCampaignGroupBase'
    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.
    GetPermanentGroup:
      allOf:
      - $ref: '#/components/schemas/GetStatementGroupBase'
      - $ref: '#/components/schemas/GetPermanentGroupBase'
    CreateOrUpdatePermanentGroupBase:
      type: object
      required:
      - isActive
      properties:
        isActive:
          type: boolean
          description: Whether or not the group is active.
    CreateOrUpdatePermanentGroup:
      allOf:
      - $ref: '#/components/schemas/CreateOrUpdateStatementGroupBase'
      - $ref: '#/components/schemas/CreateOrUpdatePermanentGroupBase'
    GetStatementGroup:
      oneOf:
      - $ref: '#/components/schemas/GetCampaignGroup'
      - $ref: '#/components/schemas/GetPermanentGroup'
      discriminator:
        propertyName: type
        mapping:
          campaign: '#/components/schemas/GetCampaignGroup'
          permanent: '#/components/schemas/GetPermanentGroup'
    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 int

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