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

# Update a rule result

> Update a rule result. Only the fields you send are changed.

Use this to assign an owner, or to exclude a single result from compliance without deactivating
the rule everywhere. `deactivatedReason` is required when setting `deactivated` to `true`.

A result's `status` is computed by Openlayer and cannot be set directly.




## OpenAPI

````yaml patch /rule-results/{ruleResultId}
openapi: 3.0.3
info:
  contact:
    email: support@openlayer.com
    name: Openlayer
    url: https://openlayer.com/
  description: API for interacting with the Openlayer server.
  title: Openlayer API
  version: '1.0'
  x-logo:
    url: https://logo.clearbit.com/openlayer.com
servers:
  - url: https://api.openlayer.com/v1
    description: Our prod backend
security:
  - bearerAuth: []
paths:
  /rule-results/{ruleResultId}:
    patch:
      tags:
        - Governance
      summary: Update a rule result
      description: >
        Update a rule result. Only the fields you send are changed.


        Use this to assign an owner, or to exclude a single result from
        compliance without deactivating

        the rule everywhere. `deactivatedReason` is required when setting
        `deactivated` to `true`.


        A result's `status` is computed by Openlayer and cannot be set directly.
      operationId: updateRuleResult
      parameters:
        - $ref: '#/components/parameters/ruleResultId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                deactivated: 58a9ba3c-51c1-4904-9763-56d48c29f954
                deactivatedReason: b427a668-ac9f-415d-90f9-a47b32bb0daa
                assigneeId: 063889cc-69bf-45ef-ad6f-9d799bd8577b
                blockedBy: ddb84f31-78ef-4571-aa0a-06694893f05e
                blocking: 238ae7f9-5a9a-4c08-a56a-bfaf7f1f4acf
      responses:
        '200':
          description: Status OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleResult'
        default:
          $ref: '#/components/responses/UnexpectedError'
      x-codeSamples:
        - lang: curl
          source: |
            curl --request PATCH \
              --url https://api.openlayer.com/v1/rule-results/2c4e6a8b-1d3f-4b5c-9e7a-0f1b2c3d4e5f \
              --header 'Authorization: Bearer <token>' \
              --header 'Content-Type: application/json' \
              --data '{
                "deactivated": true,
                "deactivatedReason": "Not applicable to this project."
              }'
components:
  parameters:
    ruleResultId:
      name: ruleResultId
      in: path
      description: The rule result id.
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    RuleResult:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          description: The rule result id.
          example: 5b7d9f1a-2c3e-4d5f-8a6b-9c0d1e2f3a4b
        workspaceId:
          type: string
          format: uuid
          readOnly: true
          description: The id of the workspace the rule result belongs to.
        ruleId:
          type: string
          format: uuid
          readOnly: true
          description: The rule this result belongs to.
        projectId:
          type: string
          format: uuid
          nullable: true
          readOnly: true
          description: >-
            The project this result was evaluated for. `null` for
            workspace-scoped rules.
        status:
          type: string
          enum:
            - running
            - passing
            - failing
            - skipped
            - error
            - pending
            - due_soon
          description: The compliance status of the rule for this entity.
          example: passing
        statusMessage:
          type: string
          nullable: true
          description: A human-readable explanation of the status.
        dateLastEvaluated:
          type: string
          format: date-time
          nullable: true
          readOnly: true
          description: When the rule was last evaluated. Platform rules only.
        dateOfNextEvaluation:
          type: string
          format: date-time
          nullable: true
          readOnly: true
          description: When the rule will next be evaluated. Platform rules only.
        dateOfLatestEvidence:
          type: string
          format: date-time
          nullable: true
          readOnly: true
          description: >-
            When the most recent piece of evidence was attached. Evidence rules
            only.
        dateOfRenewal:
          type: string
          format: date-time
          nullable: true
          readOnly: true
          description: >-
            When the evidence must be renewed. Evidence rules with a renewal
            cadence only.
        deactivated:
          type: boolean
          default: false
          description: Whether this result is excluded from compliance calculations.
        deactivatedReason:
          type: string
          nullable: true
          description: Why the result was excluded.
        assigneeId:
          type: string
          format: uuid
          nullable: true
          description: The user responsible for this result.
        blockedBy:
          type: array
          default: []
          description: Rule results that must pass before this one can be satisfied.
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              status: 94a82f0f-5061-4dd0-b0fc-3a5df599bdd5
        blocking:
          type: array
          default: []
          description: Rule results that this one blocks.
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              status: 94a82f0f-5061-4dd0-b0fc-3a5df599bdd5
        dateCreated:
          type: string
          format: date-time
          readOnly: true
          description: The creation date.
          example: '2026-03-22T11:31:01.185Z'
        dateUpdated:
          type: string
          format: date-time
          readOnly: true
          description: The last update date.
          example: '2026-03-22T11:31:01.185Z'
      required:
        - id
        - workspaceId
        - ruleId
        - status
        - deactivated
        - dateCreated
        - dateUpdated
  responses:
    UnexpectedError:
      description: Unexpected error.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - error
            properties:
              code:
                type: integer
                format: int32
              error:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your workspace API key. See [Find your API
        key](https://www.openlayer.com/docs/workspace-and-projects/find-your-api-key)
        for more information.

````