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

# Approve case from run

> Updates the golden case from a verify run. Requires an actor with an approve role per project policy.



## OpenAPI

````yaml /openapi/control-plane.yaml post /cases/{id}/approve
openapi: 3.1.0
info:
  title: Alibi Control Plane API
  version: 0.1.0
  description: >-
    HTTP API mounted at `/api` on the Alibi control plane (default
    `http://127.0.0.1:4100`). Derived from
    `apps/control-plane/src/api/routes.ts`. Auth via `x-alibi-api-key` or Bearer
    token. Demo keys: `junnu-key-demo`, `laddu-key-demo`, `viewer-key-demo`.
  license:
    name: MIT
servers:
  - url: http://127.0.0.1:4100/api
    description: Local control plane
security:
  - ApiKeyAuth: []
  - BearerAuth: []
tags:
  - name: System
    x-group: System
  - name: Auth
    x-group: Auth
  - name: Projects
    x-group: Projects
  - name: Baselines
    x-group: Baselines
  - name: Policy
    x-group: Policy
  - name: Cases
    x-group: Cases
  - name: Sandboxes
    x-group: Sandboxes
  - name: Sessions
    x-group: Sessions
  - name: Runs
    x-group: Runs
  - name: Verify
    x-group: Verify
  - name: CI
    x-group: CI
  - name: Hosted
    x-group: Hosted environments
paths:
  /cases/{id}/approve:
    post:
      tags:
        - Cases
      summary: Approve case from run
      description: >-
        Updates the golden case from a verify run. Requires an actor with an
        approve role per project policy.
      operationId: approveCase
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Case id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - runId
              properties:
                runId:
                  type: string
      responses:
        '200':
          description: Updated case
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  suiteId:
                    type: string
                  projectId:
                    type: string
                  name:
                    type: string
                  tags:
                    type: array
                    items:
                      type: string
                  owner:
                    type: string
                  caseVersion:
                    type: integer
                  baselineVersion:
                    type: integer
                  schemaFingerprint:
                    type: string
                  steps:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        order:
                          type: integer
                        source:
                          type: string
                          enum:
                            - api
                            - browser
                        request:
                          type: object
                          properties:
                            method:
                              type: string
                            path:
                              type: string
                            headers:
                              type: object
                              additionalProperties:
                                type: string
                            body: {}
                        response:
                          type: object
                          properties:
                            status:
                              type: integer
                            body: {}
                        mutations:
                          type: array
                          items:
                            type: object
                            additionalProperties: true
                        reads:
                          type: array
                          items:
                            type: object
                            additionalProperties: true
                        assertions:
                          type: array
                          items:
                            type: object
                            additionalProperties: true
                        ignoreRules:
                          type: array
                          items:
                            type: object
                            additionalProperties: true
                        browser:
                          type: object
                          additionalProperties: true
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
        '403':
          description: Approve permission required
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
        '404':
          description: Case not found
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-alibi-api-key
      description: 'Demo: junnu-key-demo | laddu-key-demo | viewer-key-demo'
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.