Coveo Result rankings API

The Result rankings API from Coveo — 8 operation(s) for result rankings.

Operations 11

GET /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings Get a List of Result Ranking Rules #
POST /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings Create a New Result Ranking Rule #
GET /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/{resultRankingId} Get a Result Ranking Rule #
PUT /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/{resultRankingId} Update a Result Ranking Rule #
DELETE /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/{resultRankingId} Delete a Result Ranking Rule #
POST /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/bulkGet Bulk Get Result Ranking Rules #
POST /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/bulkDelete Bulk Delete Result Rankings Rules from a Pipeline #
POST /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/copy Copy Result Rankings Rules to a Pipeline. #
POST /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/duplicate/{resultRankingId} Duplicate a Result Ranking Rule #
POST /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/validate Validate a Single Result Ranking Operation. #
POST /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/validate/batch Validate a Batch of Result Ranking Operations. #

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-result-rankings-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-result-rankings-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Coveo Search Result rankings 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: Result rankings
  x-displayName: Result rankings
paths:
  /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings:
    get:
      tags:
      - Result rankings
      summary: Get a List of Result Ranking Rules
      description: 'Get a list of result ranking rules

        <details>

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


        ```json

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

        ```

        </details>'
      operationId: listResultRankingRules
      parameters:
      - $ref: '#/components/parameters/OrganizationIdQuery'
      - $ref: '#/components/parameters/PipelineIdPath'
      - name: kind
        in: query
        deprecated: true
        description: 'The kind of result ranking rules to allow in the returned list (i.e., `featured_result` or `ranking_expression`).


          By default, both kinds of rules are allowed.


          **Deprecated:** Use `ruleTypes` instead.'
        schema:
          type: string
      - name: enabledStatus
        in: query
        deprecated: true
        description: 'The enabled status of result ranking rules to allow in the returned list.


          Set to `true` to only allow rules whose `enabled` property is set to `true`, and vice versa.


          By default, both enabled and disabled rules are allowed.


          **Deprecated:** Use `ruleStatuses` instead.'
        schema:
          type: boolean
      - name: statementGroupId
        in: query
        description: The unique identifier of the statement group.
        schema:
          type: string
      - $ref: '#/components/parameters/IsOrderAscending'
      - name: ruleStatuses
        description: 'The rule status to allow in the results. Available statuses are: "active", "inactive".


          If you leave this parameter undefined, all rule statuses will be allowed in the results. If you pass an empty array (`[]`), no rules will be returned.'
        required: false
        in: query
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ResultRankingRuleStatus'
          default:
          - active
          - inactive
      - $ref: '#/components/parameters/Filter'
      - name: ruleTypes
        description: 'The rule types to allow in the results. Available types are "featuredResults", "rankingExpressions".

          If you leave this parameter undefined, all rule types will be allowed in the results. If you pass an empty array (`[]`), no rules will be returned.'
        required: false
        in: query
        schema:
          type: array
          items:
            $ref: '#/components/schemas/ResultRankingRuleType'
          default:
          - featuredResults
          - rankingExpressions
      - name: associatedGroups
        description: The group names to allow in the results. Include the `null` value in the array to allow rules that are not associated with any groups (e.g., `[null, "mygroup"]`). If you leave this parameter undefined, all groups will be allowed in the results. If you pass an empty array (`[]`), no rules will be returned.
        required: false
        in: query
        schema:
          type: array
          items:
            type:
            - string
            - 'null'
      - name: expand
        in: query
        required: false
        description: 'The related resources to expand in the response.


          Set to `condition.detailed` to include the detailed version of the condition alongside `condition.reference` in each result ranking condition.'
        schema:
          type: array
          items:
            type: string
            enum:
            - condition.detailed
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PerPage'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultRankingListResponse'
        '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:
      - Result rankings
      summary: Create a New Result Ranking Rule
      description: 'Create a new result ranking rule

        <details>

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


        ```json

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

        ```

        </details>'
      operationId: createResultRankingRule
      parameters:
      - $ref: '#/components/parameters/OrganizationIdQuery'
      - $ref: '#/components/parameters/PipelineIdPath'
      requestBody:
        description: The new result ranking to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResultRankingRuleCreateRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultRankingRuleIdOnlyResponse'
        '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}/resultRankings/{resultRankingId}:
    get:
      tags:
      - Result rankings
      summary: Get a Result Ranking Rule
      description: 'Get a result ranking rule

        <details>

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


        ```json

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

        ```

        </details>'
      operationId: getResultRankingRule
      parameters:
      - $ref: '#/components/parameters/OrganizationIdQuery'
      - $ref: '#/components/parameters/PipelineIdPath'
      - name: resultRankingId
        in: path
        description: The unique identifier of the result ranking.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultRankingRuleGetResponse'
        '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
    put:
      tags:
      - Result rankings
      summary: Update a Result Ranking Rule
      description: 'Update a result ranking rule

        <details>

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


        ```json

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

        ```

        </details>'
      operationId: updateResultRankingRule
      parameters:
      - $ref: '#/components/parameters/OrganizationIdQuery'
      - $ref: '#/components/parameters/PipelineIdPath'
      - name: resultRankingId
        in: path
        description: The unique identifier of the result ranking.
        example: 120deecf-7822-4d7b-885f-53f184a3a76c
        required: true
        schema:
          type: string
      requestBody:
        description: The result ranking rule to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResultRankingRuleUpdateRequest'
        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'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
      - oauth2:
        - full
    delete:
      tags:
      - Result rankings
      summary: Delete a Result Ranking Rule
      description: 'Deletes a result ranking rule

        <details>

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


        ```json

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

        ```

        </details>'
      operationId: deleteResultRankingRule
      parameters:
      - $ref: '#/components/parameters/OrganizationIdQuery'
      - $ref: '#/components/parameters/PipelineIdPath'
      - name: resultRankingId
        in: path
        description: The unique identifier of the result ranking.
        example: 120deecf-7822-4d7b-885f-53f184a3a76c
        required: true
        schema:
          type: string
      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'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
      - oauth2:
        - full
  /rest/search/v2/admin/pipelines/{pipelineId}/resultRankings/bulkGet:
    post:
      tags:
      - Result rankings
      summary: Bulk Get Result Ranking Rules
      description: 'Bulk get result ranking rules

        <details>

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


        ```json

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

        ```

        </details>'
      operationId: bulkGetResultRankingOperation
      parameters:
      - $ref: '#/components/parameters/OrganizationIdQuery'
      - $ref: '#/components/parameters/PipelineIdPath'
      - name: kind
        in: query
        description: 'The kind of result ranking rules to allow in the returned list (i.e., `featured_result` or `ranking_expression`).


          By default, both kinds of rules are allowed.'
        schema:
          type: string
      - name: enabledStatus
        in: query
        description: 'The enabled status of result ranking rules to allow in the returned list.


          Set to `true` to only allow rules whose `enabled` property is set to `true`, and vice versa.


          By default, both enabled and disabled rules are allowed.'
        schema:
          type: boolean
      - name: statementGroupId
        in: query
        description: The unique identifier of the statement group.
        schema:
          type: string
      - $ref: '#/components/parameters/IsOrderAscending'
      - $ref: '#/components/parameters/Filter'
      - $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/ResultRankingBulkGetResponse'
        '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}/resultRankings/bulkDelete:
    post:
      tags:
      - Result rankings
      summary: Bulk Delete Result Rankings Rules from a Pipeline
      description: 'Delete multiple result rankings rules in batch for a specific pipeline.

        <details>

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


        ```json

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

        ```

        </details>'
      operationId: bulkDeleteRankingRules
      parameters:
      - $ref: '#/components/parameters/PipelineIdPath'
      - $ref: '#/components/parameters/OrganizationIdQuery'
      requestBody:
        description: The rules to delete
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkDeleteResultRankingRulesRequest'
        required: true
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkDeleteResultRankingRulesResponse'
        '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}/resultRankings/copy:
    post:
      tags:
      - Result rankings
      summary: Copy Result Rankings Rules to a Pipeline.
      description: 'Copies specific result ranking rules from an origin to a target query pipeline. Using the same pipeline as origin and target will duplicate the specified statements in that pipeline.

        <details>

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


        ```json

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

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

        ```

        </details>'
      operationId: copyResultRankingRule
      parameters:
      - $ref: '#/components/parameters/PipelineIdPath'
      - $ref: '#/components/parameters/OrganizationIdQuery'
      requestBody:
        description: The copy operation to perform.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CopyResultRankingRulesRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CopyResultRankingRulesResponse'
        '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}/resultRankings/duplicate/{resultRankingId}:
    post:
      tags:
      - Result rankings
      summary: Duplicate a Result Ranking Rule
      description: 'Duplicate a result ranking rule

        <details>

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


        ```json

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

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

        ```

        </details>'
      operationId: duplicateResultRankingRule
      parameters:
      - $ref: '#/components/parameters/OrganizationIdQuery'
      - $ref: '#/components/parameters/PipelineIdPath'
      - name: resultRankingId
        in: path
        description: The unique identifier of the result ranking.
        example: 120deecf-7822-4d7b-885f-53f184a3a76c
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultRankingRuleIdentifiedWithGroupStatusResponse'
        '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}/resultRankings/validate:
    post:
      tags:
      - Result rankings
      summary: Validate a Single Result Ranking 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: validateResultRankingOperation
      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/ResultRankingSingleOperationValidate'
        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}/resultRankings/validate/batch:
    post:
      tags:
      - Result rankings
      summary: Validate a Batch of Result Ranking Operations.
      description: "\n Validate that a list of operations would be accepted by our API and executed.\n A maximum of 15 can be processed per request.\n<details>\n<summary>Privilege(s) required</summary>\n\n```json\n{\"level\":\"NORMAL\",\"owner\":\"SEARCH_API\",\"targetDomain\":\"QUERY_PIPELINE\",\"type\":\"VIEW\",\"targetId\":\"{pipelineId}\"}\n```\n</details>"
      operationId: validateResultRankingOperations
      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/ResultRankingBatchOperationValidate'
        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
components:
  schemas:
    ResultRankingRuleFeaturedResultsResponse:
      allOf:
      - $ref: '#/components/schemas/ResultRankingRuleResponseBase'
      - $ref: '#/components/schemas/ResultRankingRuleFeaturedResultsBase'
    ResultRankingRuleGetResponse:
      oneOf:
      - $ref: '#/components/schemas/ResultRankingRuleFeaturedResultsGetResponse'
      - $ref: '#/components/schemas/ResultRankingRuleRankingExpressionGetResponse'
      discriminator:
        propertyName: kind
        mapping:
          featured_result: '#/components/schemas/ResultRankingRuleFeaturedResultsGetResponse'
          ranking_expression: '#/components/schemas/ResultRankingRuleRankingExpressionGetResponse'
    StatementGroupStatus:
      type: string
      description: The status of the campaign.
      enum:
      - active
      - inactive
      - expired
      - notStarted
    ResultRankingValidationRequest:
      oneOf:
      - $ref: '#/components/schemas/ResultRankingRuleOperationValidateCreate'
      - $ref: '#/components/schemas/ResultRankingRuleOperationValidateUpdate'
      - $ref: '#/components/schemas/OperationValidateDelete'
      discriminator:
        propertyName: operationType
        mapping:
          CREATE: '#/components/schemas/ResultRankingRuleOperationValidateCreate'
          UPDATE: '#/components/schemas/ResultRankingRuleOperationValidateUpdate'
          DELETE: '#/components/schemas/OperationValidateDelete'
    Predicate:
      oneOf:
      - $ref: '#/components/schemas/PredicateBasicExpression'
      - $ref: '#/components/schemas/PredicateQpl'
      discriminator:
        propertyName: kind
        mapping:
          basicExpressionAndLocalePredicate: '#/components/schemas/PredicateBasicExpression'
          qplPredicate: '#/components/schemas/PredicateQpl'
    ByStatus:
      required:
      - active
      - inactive
      type: object
      properties:
        active:
          type: integer
          format: int32
        inactive:
          type: integer
          format: int32
    ByGroup:
      required:
      - associated
      - orphaned
      type: object
      properties:
        associated:
          type: object
          additionalProperties:
            type: integer
            format: int32
        orphaned:
          type: integer
          format: int32
    ConditionDetailed:
      type: object
      required:
      - condition
      properties:
        condition:
          $ref: '#/components/schemas/BooleanExpression'
    ResultRankingRuleGetBaseResponse:
      type: object
      required:
      - id
      properties:
        id:
          type: string
          description: The identifier of the result ranking rule.
        associatedGroup:
          $ref: '#/components/schemas/ResultRankingRuleAssociatedGroupWithStatus'
    ResultRankingGroupByResponse:
      required:
      - groups
      - status
      - type
      type: object
      properties:
        groups:
          $ref: '#/components/schemas/ByGroup'
        status:
          $ref: '#/components/schemas/ByStatus'
        type:
          $ref: '#/components/schemas/ByType'
    ResultRankingRuleTargetFeaturedResults:
      oneOf:
      - $ref: '#/components/schemas/ResultRankingRuleTargetUniqueId'
      - $ref: '#/components/schemas/ResultRankingRuleTargetLocalizedContent'
      - $ref: '#/components/schemas/ResultRankingRuleTargetQueryExpression'
    ResultRankingRuleFeaturedResultsBase:
      type: object
      required:
      - kind
      - targets
      properties:
        kind:
          type: string
          description: The kind of result ranking.
          enum:
          - featured_result
        targets:
          type: array
          description: Documents that will show up when conditions and predicates are met.
          example:
          - uniqueId: 2228d0a698fd
          - localizedContent:
              familyId: '112233'
              locale:
                auto:
                  default: en-US
              familyIdField: '@sfarticlenumber'
              localeField: '@locale'
          - queryExpression: '@permanentid="6cdw9d02d17"'
          items:
            $ref: '#/components/schemas/ResultRankingRuleTargetFeaturedResults'
        matchQuery:
          type: boolean
          description: When set to true, a featured result item must match the basic part (q) of the query expression, meaning it will only appear if it matches the search request provided by the user.
          example: true
          default: false
        matchAdvancedQuery:
          type: boolean
          description: When set to true, a featured result item must match the advanced part (aq) of the query expression, meaning it will only appear if it matches the selected filters in the search interface.
          example: true
          default: true
        includeInFacets:
          type: boolean
          example: true
          default: true
    ResultRankingRuleTargetQueryExpression:
      type: object
      required:
      - queryExpression
      properties:
        queryExpression:
          type: string
          description: Select documents using a query expression.
          example:
            queryExpression: '@source==TopSource'
    ResultRankingRuleIdentifiedWithGroupStatusListResponse:
      type: object
      required:
      - id
      - resultRanking
      properties:
        id:
          type: string
          description: The identifier of the result ranking rule
        resultRanking:
          $ref: '#/components/schemas/ResultRankingRuleListResponse'
        associatedGroup:
          $ref: '#/components/schemas/ResultRankingRuleAssociatedGroupWithStatus'
    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
    ResultRankingRuleAssociatedGroupWithStatus:
      type: object
      required:
      - id
      - name
      properties:
        id:
          type: string
          description: The unique identifier of the associated statement group.
          example: 679adb80-444e-11ea-b77f-2e728ce88125
        name:
          type: string
          description: The unique name of the associated statement group.
          example: Community
        status:
          $ref: '#/components/schemas/StatementGroupStatus'
    ResultRankingListResponse:
      required:
      - resultRankings
      - totalCount
      - totalPages
      - groupedBy
      type: object
      properties:
        resultRankings:
          type: array
          items:
            $ref: '#/components/schemas/ResultRankingRuleIdentifiedWithGroupStatusListResponse'
        totalCount:
          type: integer
          format: int32
        totalPages:
          type: integer
          format: int32
        groupedBy:
          $ref: '#/components/schemas/ResultRankingGroupByResponse'
    ResultRankingRuleCreateRequest:
      oneOf:
      - $ref: '#/components/schemas/ResultRankingRuleFeaturedResultsCreateRequest'
      - $ref: '#/components/schemas/ResultRankingRuleRankingExpressionCreateRequest'
      discriminator:
        propertyName: kind
        mapping:
          featured_result: '#/components/schemas/ResultRankingRuleFeaturedResultsCreateRequest'
          ranking_expression: '#/components/schemas/ResultRankingRuleRankingExpressionCreateRequest'
    CopyResultRankingRulesRequest:
      required:
      - destinationPipelineId
      - resultRankingIds
      type: object
      properties:
        destinationPipelineId:
          type: string
          description: The unique identifier of the query pipeline to copy the statements to.
          example: 120deecf-7822-4d7b-885f-53f184a3a76
        resultRankingIds:
          type: array
          maxItems: 15
          description: The unique identifiers of the result ranking rules to copy.
          example:
          - 4f0a9531-4fab-45fd-a1e3-eb07a5aceccb
          items:
            type: string
          minItems: 1
    ResultRankingRuleListResponseBase:
      allOf:
      - $ref: '#/components/schemas/ResultRankingRuleResponseBase'
      - type: object
        properties:
          condition:
            $ref: '#/components/schemas/ResultRankingRuleConditionListResponse'
    ResultRankingRuleRankingExpressionCreateRequest:
      allOf:
      - $ref: '#/components/schemas/ResultRankingRuleBase'
      - $ref: '#/components/schemas/ResultRankingRuleRankingExpressionBase'
    ResultRankingRuleTargetLocalizedContent:
      type: object
      required:
      - localizedContent
      properties:
        localizedContent:
          $ref: '#/components/schemas/ResultRankingRuleLocalizedContent'
    ResultRankingRuleType:
      type: string
      enum:
      - featuredResults
      - rankingExpressions
    ResultRankingRuleRankingExpressionListResponse:
      allOf:
      - $ref: '#/components/schemas/ResultRankingRuleListResponseBase'
      - $ref: '#/components/schemas/ResultRankingRuleRankingExpressionBase'
    ResultRankingRuleIdentifiedResponse:
      type: object
      required:
      - id
      - resultRanking
      properties:
        id:
          type: string
          description: The identifier of the result ranking rule
        resultRanking:
          $ref: '#/components/schemas/ResultRankingRuleResponse'
    BulkDeleteResultRankingRulesResponse:
      type: object
    ResultRankingRuleResponse:
      oneOf:
      - $ref: '#/components/schemas/ResultRankingRuleFeaturedResultsResponse'
      - $ref: '#/components/schemas/ResultRankingRuleRankingExpressionResponse'
      discriminator:
        propertyName: kind
        mapping:
          featured_result: '#/components/schemas/ResultRankingRuleFeaturedResultsResponse'
          ranking_expression: '#/components/schemas/ResultRankingRuleRankingExpressionResponse'
    OperatorRightHandSide:
      oneOf:
      - type: string
      - type: number
      - type: integer
        format: int32
      - type: boolean
    ResultRankingRuleOperationValidateUpdate:
      type: object
      required:
      - operationType
      - resourceId
      - model
      properties:
        operationType:
          type: string
          enum:
          - UPDATE
          description: 'Validate the update of a ResultRanking rule.

            '
        model:
          $ref: '#/components/schemas/ResultRankingRuleUpdateRequest'
        resourceId:
          type: string
          description: 'The identifier of the resource. '
          example: id
    IsBetweenOperator:
      type: object
      required:
      - operator
      - left
      - from
      - to
      properties:
        operator:
          type: string
          enum:
          - isBetween
        left:
          $ref: '#/components/schemas/OperatorLeftHandSide'
        from:
          type: string
          format: date-time
        to:
          type: string
          format: date-time
    RestOperationValidationError:
      required:
      - message
      type: object
      properties:
        message:
          type: string
    ResultRankingRuleIdOnlyResponse:
      type: object
      required:
      - id
      properties:
        id:
          type: string
          description: The identifier of the result ranking rule
    ResultRankingRuleFeaturedResultsCreateRequest:
      allOf:
      - $ref: '#/components/schemas/ResultRankingRuleBase'
      - $ref: '#/components/

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