> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update bulk operation

> Update an existing bulk operation. Used to modify operation parameters or retry failed rules.



## OpenAPI

````yaml /api-reference/saas/cs-rules-rewrites.json put /bulk-operations/{id}
openapi: 3.0.3
info:
  title: Rules & Rewrites API
  description: >-
    Manage Commerce Studio rules and query rewrites. Rules control search result
    behavior including boosting, burying, pinning, redirects, banners, and facet
    configuration. Query rewrites handle synonym expansion, misspelling
    correction, phrase matching, and query term manipulation.


    The endpoints require an authentication token with scope
    `commercestudio.rules` for rule operations, `commercestudio.rewrites` for
    query rewrite operations, and `commercestudio.bulkoperations` for bulk
    operations.
  version: 1.0.0
  contact:
    name: Lucidworks
    url: https://lucidworks.com/
    email: support@lucidworks.com
servers:
  - url: https://{commerce_studio_id}.experiencemanager.lucidworks.com
    description: Production.
    variables:
      commerce_studio_id:
        default: commerce_studio_id
        description: The ID of your Commerce Studio instance.
security:
  - authToken: []
tags:
  - name: Rule Management
    description: Create/Read/Update/Delete (CRUD) operations for Commerce Studio rules.
  - name: Query Rewrite Management
    description: >-
      Create/Read/Update/Delete (CRUD) operations for Commerce Studio query
      rewrites.
  - name: Bulk Operations
    description: >-
      Perform actions on multiple rules simultaneously, including publish,
      unpublish, edit, delete, and migrate operations. Requires an
      authentication token with scope `commercestudio.bulkoperations`.
paths:
  /bulk-operations/{id}:
    put:
      tags:
        - Bulk Operations
      summary: Update bulk operation
      description: >-
        Update an existing bulk operation. Used to modify operation parameters
        or retry failed rules.
      operationId: update_7
      parameters:
        - name: id
          in: path
          required: true
          description: Bulk operation ID.
          example: 8fc2056c-6515-497d-9bb3-74e26d961d90
          schema:
            type: string
        - name: If-Match
          in: header
          required: false
          description: ETag value for optimistic concurrency control.
          example: '"a1b2c3d4e5f6"'
          schema:
            type: string
        - name: fields
          in: query
          required: false
          description: Fields to include in the response.
          example:
            - NONE
          schema:
            type: array
            items:
              type: string
              enum:
                - NONE
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/DeleteRuleBulkOperationRequest'
                - $ref: '#/components/schemas/EditRuleBulkOperationRequest'
                - $ref: '#/components/schemas/MigrateRuleBulkOperationRequest'
                - $ref: '#/components/schemas/PublishRuleBulkOperationRequest'
                - $ref: '#/components/schemas/UnpublishRuleBulkOperationRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                oneOf:
                  - $ref: '#/components/schemas/DeleteRuleBulkOperationSummary'
                  - $ref: '#/components/schemas/EditRuleBulkOperationSummary'
                  - $ref: '#/components/schemas/MigrateRuleBulkOperationSummary'
                  - $ref: '#/components/schemas/PublishRuleBulkOperationSummary'
                  - $ref: '#/components/schemas/UnpublishRuleBulkOperationSummary'
components:
  schemas:
    DeleteRuleBulkOperationRequest:
      type: object
      title: Delete
      description: Delete a set of rules in bulk.
      example:
        type: deleteRule
        specification:
          publishState: DRAFT
          lastModifiedEnd: '2026-01-01T00:00:00Z'
        excludeRuleIds:
          - 3fa85f64-5717-4562-b3fc-2c963f66afa6
      allOf:
        - $ref: '#/components/schemas/BulkOperationRequest'
        - type: object
          properties:
            type:
              type: string
              description: >-
                Discriminator for the operation type. Must be `deleteRule` for
                this operation.
              enum:
                - deleteRule
            ruleIds:
              type: array
              description: >-
                List of rule IDs to operate on. These will be put into the
                operation in addition to the rules matching the specification,
                if any.
              items:
                type: string
                description: A rule's UUID.
                format: uuid
            ruleExternalIds:
              type: array
              description: >-
                List of rule external IDs to operate on. These will be put into
                the operation in addition to the rules matching the
                specification or referenced by ruleIds, if any.
              items:
                type: string
                description: A rule's external ID.
            excludeRuleIds:
              type: array
              description: >-
                List of rule IDs to exclude from the operation. These will be
                excluded even if they match the specification or are included in
                ruleIds.
              items:
                type: string
                description: A rule's UUID to exclude.
                format: uuid
            excludeRuleExternalIds:
              type: array
              description: >-
                List of rule external IDs to exclude from the operation. These
                will be excluded even if they match the specification, are
                included in ruleIds, or are included in ruleExternalIds.
              items:
                type: string
                description: A rule's external ID to exclude.
            specification:
              $ref: '#/components/schemas/RuleSpecification'
    EditRuleBulkOperationRequest:
      required:
        - patch
      type: object
      title: Edit
      description: Edit a set of rules in bulk.
      example:
        type: editRule
        specification:
          tags:
            - holiday-2026
        patch:
          precedence: 5
        stageChanges: false
      allOf:
        - $ref: '#/components/schemas/BulkOperationRequest'
        - type: object
          properties:
            type:
              type: string
              description: >-
                Discriminator for the operation type. Must be `editRule` for
                this operation.
              enum:
                - editRule
            ruleIds:
              type: array
              description: >-
                List of rule IDs to operate on. These will be put into the
                operation in addition to the rules matching the specification,
                if any.
              items:
                type: string
                description: A rule's UUID.
                format: uuid
            ruleExternalIds:
              type: array
              description: >-
                List of rule external IDs to operate on. These will be put into
                the operation in addition to the rules matching the
                specification or referenced by ruleIds, if any.
              items:
                type: string
                description: A rule's external ID.
            excludeRuleIds:
              type: array
              description: >-
                List of rule IDs to exclude from the operation. These will be
                excluded even if they match the specification or are included in
                ruleIds.
              items:
                type: string
                description: A rule's UUID to exclude.
                format: uuid
            excludeRuleExternalIds:
              type: array
              description: >-
                List of rule external IDs to exclude from the operation. These
                will be excluded even if they match the specification, are
                included in ruleIds, or are included in ruleExternalIds.
              items:
                type: string
                description: A rule's external ID to exclude.
            specification:
              $ref: '#/components/schemas/RuleSpecification'
            patch:
              $ref: '#/components/schemas/JsonNode'
            stageChanges:
              type: boolean
              description: >-
                When true, the patch is applied to staging content only for any
                published rule, using the current live content as the baseline
                (discarding any existing staged changes). Has no effect on
                unpublished rules.
              default: false
    MigrateRuleBulkOperationRequest:
      required:
        - targetExperienceManagerInstanceId
      type: object
      title: Migrate
      description: Migrate a set of rules to another Commerce Studio instance in bulk.
      example:
        type: migrateRule
        ruleExternalIds:
          - promo-summer-2026
        targetExperienceManagerInstanceId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        published: true
      allOf:
        - $ref: '#/components/schemas/BulkOperationRequest'
        - type: object
          properties:
            type:
              type: string
              description: >-
                Discriminator for the operation type. Must be `migrateRule` for
                this operation.
              enum:
                - migrateRule
            ruleIds:
              type: array
              description: >-
                List of rule IDs to operate on. These will be put into the
                operation in addition to the rules matching the specification,
                if any.
              items:
                type: string
                description: A rule's UUID.
                format: uuid
            ruleExternalIds:
              type: array
              description: >-
                List of rule external IDs to operate on. These will be put into
                the operation in addition to the rules matching the
                specification or referenced by ruleIds, if any.
              items:
                type: string
                description: A rule's external ID.
            excludeRuleIds:
              type: array
              description: >-
                List of rule IDs to exclude from the operation. These will be
                excluded even if they match the specification or are included in
                ruleIds.
              items:
                type: string
                description: A rule's UUID to exclude.
                format: uuid
            excludeRuleExternalIds:
              type: array
              description: >-
                List of rule external IDs to exclude from the operation. These
                will be excluded even if they match the specification, are
                included in ruleIds, or are included in ruleExternalIds.
              items:
                type: string
                description: A rule's external ID to exclude.
            specification:
              $ref: '#/components/schemas/RuleSpecification'
            targetExperienceManagerInstanceId:
              type: string
              description: ID of the Commerce Studio destination instance.
              format: uuid
            published:
              type: boolean
              description: >-
                Whether the migrated rules should be created in the destination
                as published (true) or in draft state (false).
    PublishRuleBulkOperationRequest:
      type: object
      title: Publish
      description: Publish a set of rules in bulk.
      example:
        type: publishRule
        specification:
          tags:
            - holiday-2026
          publishState: DRAFT
      allOf:
        - $ref: '#/components/schemas/BulkOperationRequest'
        - type: object
          properties:
            type:
              type: string
              description: >-
                Discriminator for the operation type. Must be `publishRule` for
                this operation.
              enum:
                - publishRule
            ruleIds:
              type: array
              description: >-
                List of rule IDs to operate on. These will be put into the
                operation in addition to the rules matching the specification,
                if any.
              items:
                type: string
                description: A rule's UUID.
                format: uuid
            ruleExternalIds:
              type: array
              description: >-
                List of rule external IDs to operate on. These will be put into
                the operation in addition to the rules matching the
                specification or referenced by ruleIds, if any.
              items:
                type: string
                description: A rule's external ID.
            excludeRuleIds:
              type: array
              description: >-
                List of rule IDs to exclude from the operation. These will be
                excluded even if they match the specification or are included in
                ruleIds.
              items:
                type: string
                description: A rule's UUID to exclude.
                format: uuid
            excludeRuleExternalIds:
              type: array
              description: >-
                List of rule external IDs to exclude from the operation. These
                will be excluded even if they match the specification, are
                included in ruleIds, or are included in ruleExternalIds.
              items:
                type: string
                description: A rule's external ID to exclude.
            specification:
              $ref: '#/components/schemas/RuleSpecification'
    UnpublishRuleBulkOperationRequest:
      type: object
      title: Unpublish
      description: Unpublish a set of rules in bulk.
      example:
        type: unpublishRule
        ruleIds:
          - 3fa85f64-5717-4562-b3fc-2c963f66afa6
          - 7c9e6679-7425-40de-944b-e07fc1f90ae7
      allOf:
        - $ref: '#/components/schemas/BulkOperationRequest'
        - type: object
          properties:
            type:
              type: string
              description: >-
                Discriminator for the operation type. Must be `unpublishRule`
                for this operation.
              enum:
                - unpublishRule
            ruleIds:
              type: array
              description: >-
                List of rule IDs to operate on. These will be put into the
                operation in addition to the rules matching the specification,
                if any.
              items:
                type: string
                description: A rule's UUID.
                format: uuid
            ruleExternalIds:
              type: array
              description: >-
                List of rule external IDs to operate on. These will be put into
                the operation in addition to the rules matching the
                specification or referenced by ruleIds, if any.
              items:
                type: string
                description: A rule's external ID.
            excludeRuleIds:
              type: array
              description: >-
                List of rule IDs to exclude from the operation. These will be
                excluded even if they match the specification or are included in
                ruleIds.
              items:
                type: string
                description: A rule's UUID to exclude.
                format: uuid
            excludeRuleExternalIds:
              type: array
              description: >-
                List of rule external IDs to exclude from the operation. These
                will be excluded even if they match the specification, are
                included in ruleIds, or are included in ruleExternalIds.
              items:
                type: string
                description: A rule's external ID to exclude.
            specification:
              $ref: '#/components/schemas/RuleSpecification'
    DeleteRuleBulkOperationSummary:
      type: object
      title: Delete
      description: Summary of a bulk delete rule operation.
      example:
        type: deleteRule
        id: 3c90c3cc-0d44-4b50-8888-8dd25736052a
        createdBy: >-
          fe56a9d2-f6eb-4906-f7fc-dd5eb0e43337@serviceaccounts.examplepetstore.com
        creationDate: '2026-07-13T18:04:12.190428685Z'
        lastModifiedBy: >-
          fe56a9d2-f6eb-4906-f7fc-dd5eb0e43337@serviceaccounts.examplepetstore.com
        lastModified: '2026-07-13T18:04:14.902428685Z'
        status: COMPLETED
        lastHeartbeat: '2026-07-13T18:04:14.900484876Z'
        errorMessage: null
        rules:
          - ruleId: af2d99c0-3d11-4002-a5d0-835b673d7f32
            status: COMPLETED
            errorMessage: null
            detailedErrorMessage: null
      allOf:
        - $ref: '#/components/schemas/BulkOperationSummary'
        - type: object
          properties:
            type:
              type: string
              description: >-
                Discriminator for the operation type. Is `deleteRule` for this
                operation.
              enum:
                - deleteRule
            rules:
              type: array
              description: >-
                List of rules and their individual status in this bulk
                operation.
              items:
                $ref: '#/components/schemas/BulkOperationRuleStatusSummary'
    EditRuleBulkOperationSummary:
      type: object
      title: Edit
      description: Edit a set of rules in bulk.
      example:
        type: editRule
        id: 5b1a2f3e-9c44-4b50-8888-8dd257360abc
        createdBy: >-
          fe56a9d2-f6eb-4906-f7fc-dd5eb0e43337@serviceaccounts.examplepetstore.com
        creationDate: '2026-07-13T18:06:02.190428685Z'
        lastModifiedBy: >-
          fe56a9d2-f6eb-4906-f7fc-dd5eb0e43337@serviceaccounts.examplepetstore.com
        lastModified: '2026-07-13T18:06:04.902428685Z'
        status: COMPLETED
        lastHeartbeat: '2026-07-13T18:06:04.900484876Z'
        errorMessage: null
        rules:
          - ruleId: af2d99c0-3d11-4002-a5d0-835b673d7f32
            status: COMPLETED
            errorMessage: null
            detailedErrorMessage: null
          - ruleId: 68e2aa2f-f27b-4f29-87f4-ce39f2ba050c
            status: COMPLETED
            errorMessage: null
            detailedErrorMessage: null
        patch:
          precedence: 5
        stageChanges: false
      allOf:
        - $ref: '#/components/schemas/BulkOperationSummary'
        - type: object
          properties:
            type:
              type: string
              description: >-
                Discriminator for the operation type. Is `editRule` for this
                operation.
              enum:
                - editRule
            rules:
              type: array
              description: >-
                List of rules and their individual status in this bulk
                operation.
              items:
                $ref: '#/components/schemas/BulkOperationRuleStatusSummary'
            patch:
              $ref: '#/components/schemas/JsonNode'
            stageChanges:
              type: boolean
              description: >-
                When true, the patch is applied to staging content only for any
                published rule, using the current live content as the baseline
                (discarding any existing staged changes). Has no effect on
                unpublished rules.
    MigrateRuleBulkOperationSummary:
      type: object
      title: Migrate
      description: Summary of a bulk migrate rule operation.
      example:
        type: migrateRule
        id: 7d4e8f21-3a55-4b50-8888-8dd25736def0
        createdBy: >-
          fe56a9d2-f6eb-4906-f7fc-dd5eb0e43337@serviceaccounts.examplepetstore.com
        creationDate: '2026-07-13T18:08:19.190428685Z'
        lastModifiedBy: >-
          fe56a9d2-f6eb-4906-f7fc-dd5eb0e43337@serviceaccounts.examplepetstore.com
        lastModified: '2026-07-13T18:08:22.902428685Z'
        status: COMPLETED
        lastHeartbeat: '2026-07-13T18:08:22.900484876Z'
        errorMessage: null
        rules:
          - ruleId: af2d99c0-3d11-4002-a5d0-835b673d7f32
            status: COMPLETED
            errorMessage: null
            detailedErrorMessage: null
        targetExperienceManagerInstanceId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        published: true
      allOf:
        - $ref: '#/components/schemas/BulkOperationSummary'
        - type: object
          properties:
            type:
              type: string
              description: >-
                Discriminator for the operation type. Is `migrateRule` for this
                operation.
              enum:
                - migrateRule
            rules:
              type: array
              description: >-
                List of rules and their individual status in this bulk
                operation.
              items:
                $ref: '#/components/schemas/BulkOperationRuleStatusSummary'
            targetExperienceManagerInstanceId:
              type: string
              description: ID of the Commerce Studio destination instance.
              format: uuid
            published:
              type: boolean
              description: >-
                Whether the migrated rules should be published (true) or in
                draft state (false).
    PublishRuleBulkOperationSummary:
      type: object
      title: Publish
      description: Summary of a bulk publish rule operation.
      example:
        type: publishRule
        id: 8fc2056c-6515-497d-9bb3-74e26d961d90
        createdBy: >-
          fe56a9d2-f6eb-4906-f7fc-dd5eb0e43337@serviceaccounts.examplepetstore.com
        creationDate: '2026-07-13T17:59:29.690428685Z'
        lastModifiedBy: >-
          fe56a9d2-f6eb-4906-f7fc-dd5eb0e43337@serviceaccounts.examplepetstore.com
        lastModified: '2026-07-13T17:59:29.690428685Z'
        status: PENDING
        lastHeartbeat: '2026-07-13T17:59:29.681484876Z'
        errorMessage: null
        rules:
          - ruleId: af2d99c0-3d11-4002-a5d0-835b673d7f32
            status: PENDING
            errorMessage: null
            detailedErrorMessage: null
          - ruleId: 68e2aa2f-f27b-4f29-87f4-ce39f2ba050c
            status: PENDING
            errorMessage: null
            detailedErrorMessage: null
      allOf:
        - $ref: '#/components/schemas/BulkOperationSummary'
        - type: object
          properties:
            type:
              type: string
              description: >-
                Discriminator for the operation type. Is `publishRule` for this
                operation.
              enum:
                - publishRule
            rules:
              type: array
              description: >-
                List of rules and their individual status in this bulk
                operation.
              items:
                $ref: '#/components/schemas/BulkOperationRuleStatusSummary'
    UnpublishRuleBulkOperationSummary:
      type: object
      title: Unpublish
      description: Summary of a bulk unpublish rule operation.
      example:
        type: unpublishRule
        id: 1f9c7a3d-2b66-4b50-8888-8dd257361234
        createdBy: >-
          fe56a9d2-f6eb-4906-f7fc-dd5eb0e43337@serviceaccounts.examplepetstore.com
        creationDate: '2026-07-13T18:10:45.190428685Z'
        lastModifiedBy: >-
          fe56a9d2-f6eb-4906-f7fc-dd5eb0e43337@serviceaccounts.examplepetstore.com
        lastModified: '2026-07-13T18:10:47.902428685Z'
        status: COMPLETED
        lastHeartbeat: '2026-07-13T18:10:47.900484876Z'
        errorMessage: null
        rules:
          - ruleId: af2d99c0-3d11-4002-a5d0-835b673d7f32
            status: COMPLETED
            errorMessage: null
            detailedErrorMessage: null
          - ruleId: 68e2aa2f-f27b-4f29-87f4-ce39f2ba050c
            status: COMPLETED
            errorMessage: null
            detailedErrorMessage: null
      allOf:
        - $ref: '#/components/schemas/BulkOperationSummary'
        - type: object
          properties:
            type:
              type: string
              description: >-
                Discriminator for the operation type. Is `unpublishRule` for
                this operation.
              enum:
                - unpublishRule
            rules:
              type: array
              description: >-
                List of rules and their individual status in this bulk
                operation.
              items:
                $ref: '#/components/schemas/BulkOperationRuleStatusSummary'
    BulkOperationRequest:
      required:
        - type
      type: object
      properties:
        type:
          type: string
      description: Details about the bulk operation.
    RuleSpecification:
      type: object
      properties:
        searchQuery:
          type: string
        tags:
          uniqueItems: true
          type: array
          items:
            type: string
        groups:
          uniqueItems: true
          type: array
          items:
            type: string
        types:
          uniqueItems: true
          type: array
          description: Types of rules to filter by (using OR logic).
          items:
            type: string
            description: A rule type to filter by.
        publishState:
          type: string
          description: >-
            Filter by publish state (DRAFT, PUBLISHED,
            PUBLISHED_WITH_DRAFT_EDITS).
          enum:
            - DRAFT
            - PUBLISHED
            - PUBLISHED_WITH_DRAFT_EDITS
        published:
          type: boolean
        targetedDocumentId:
          type: string
        targetedDocumentIdField:
          type: string
        activeDateStart:
          type: string
          format: date-time
        activeDateEnd:
          type: string
          format: date-time
        expirationDateStart:
          type: string
          format: date-time
        expirationDateEnd:
          type: string
          format: date-time
        lastModifiedStart:
          type: string
          format: date-time
        lastModifiedEnd:
          type: string
          format: date-time
        createdStart:
          type: string
          format: date-time
        createdEnd:
          type: string
          format: date-time
        contentType:
          type: string
          enum:
            - RULE
            - QUERY_REWRITE
      description: Filter for rules.
    JsonNode:
      type: object
      description: Query parameters to be passed to Fusion in the body.
    BulkOperationSummary:
      required:
        - type
      type: object
      properties:
        id:
          type: string
          description: Entity id.
          format: uuid
        createdBy:
          type: string
          description: User who created the entity.
        creationDate:
          type: string
          description: Date when the entity was created.
          format: date-time
        lastModifiedBy:
          type: string
          description: User who last updated the entity.
        lastModified:
          type: string
          description: Date when the entity was last updated.
          format: date-time
        status:
          type: string
          description: Current status of the bulk operation.
          enum:
            - PENDING
            - WAITING
            - COMPLETED
            - COMPLETED_WITH_ERRORS
            - FAILED
        lastHeartbeat:
          type: string
          description: Last time the heartbeat was sent for this bulk operation.
          format: date-time
        errorMessage:
          type: string
          nullable: true
          description: >-
            User friendly message if the bulk operation failed or completed with
            errors. `null` if the operation has not failed.
        type:
          type: string
      description: Summary of a bulk operation.
    BulkOperationRuleStatusSummary:
      type: object
      properties:
        ruleId:
          type: string
          description: ID of the rule.
          format: uuid
        externalId:
          type: string
          description: >-
            External ID of the rule at the time the bulk operation was created,
            if the rule had one.
        status:
          type: string
          description: Current status of the rule in this bulk operation.
          enum:
            - PENDING
            - WAITING
            - COMPLETED
            - FAILED
        errorMessage:
          type: string
          nullable: true
          description: >-
            Error message if the operation failed for this rule. `null` if the
            rule has not failed.
        detailedErrorMessage:
          type: string
          nullable: true
          description: >-
            Detailed error message if the operation failed for this rule. `null`
            if the rule has not failed.
      description: Status of an individual rule in a bulk operation.
  securitySchemes:
    authToken:
      type: http
      scheme: bearer

````