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

# Update Bug Report

> Update an existing bug report by its ID. Requires superuser privileges.

Args:
    bug_report_id (int): The ID of the bug report to update.
    bug_report_data (BugReportUpdateSchema): The fields to update.
    _admin_user (User): The current superuser.

Returns:
    BugReportSchema: The updated bug report.

Raises:
    HTTPException: 404 if the bug report is not found.



## OpenAPI

````yaml https://dev-api.cattix.com/openapi.json put /api/v1/bug-reports/{bug_report_id}
openapi: 3.1.0
info:
  title: CATTIX API
  description: CATTIX Backend API
  version: 0.107.0
servers:
  - url: http://localhost:8000
    description: Local
  - url: https://dev-api.cattix.com
    description: Development
  - url: https://staging-api.cattix.com
    description: Staging
  - url: https://api.cattix.com
    description: Production
security: []
paths:
  /api/v1/bug-reports/{bug_report_id}:
    put:
      tags:
        - Bug Reports
      summary: Update Bug Report
      description: |-
        Update an existing bug report by its ID. Requires superuser privileges.

        Args:
            bug_report_id (int): The ID of the bug report to update.
            bug_report_data (BugReportUpdateSchema): The fields to update.
            _admin_user (User): The current superuser.

        Returns:
            BugReportSchema: The updated bug report.

        Raises:
            HTTPException: 404 if the bug report is not found.
      operationId: update_bug_report_api_v1_bug_reports__bug_report_id__put
      parameters:
        - name: bug_report_id
          in: path
          required: true
          schema:
            type: integer
            title: Bug Report Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BugReportUpdateSchema'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BugReportSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    BugReportUpdateSchema:
      properties:
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: The title of the bug report
        steps_to_reproduce:
          anyOf:
            - type: string
            - type: 'null'
          title: The steps to reproduce the bug
        expected_behavior:
          anyOf:
            - type: string
            - type: 'null'
          title: The expected behavior of the system
        actual_behavior:
          anyOf:
            - type: string
            - type: 'null'
          title: The actual behavior of the system
        send_to_team:
          anyOf:
            - $ref: '#/components/schemas/BugReportTeams'
            - type: 'null'
          title: The team to which the bug report is sent
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: The description of the bug report
        screenshot:
          anyOf:
            - type: string
            - type: 'null'
          title: The screenshot URL or path for the bug report
      type: object
      title: BugReportUpdateSchema
      description: The schema for updating a bug report.
    BugReportSchema:
      properties:
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: The title of the bug report
        steps_to_reproduce:
          anyOf:
            - type: string
            - type: 'null'
          title: The steps to reproduce the bug
        expected_behavior:
          anyOf:
            - type: string
            - type: 'null'
          title: The expected behavior of the system
        actual_behavior:
          anyOf:
            - type: string
            - type: 'null'
          title: The actual behavior of the system
        send_to_team:
          anyOf:
            - $ref: '#/components/schemas/BugReportTeams'
            - type: 'null'
          title: The team to which the bug report is sent
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: The description of the bug report
        screenshot:
          anyOf:
            - type: string
            - type: 'null'
          title: The screenshot URL or path for the bug report
        user:
          anyOf:
            - $ref: '#/components/schemas/UserSchema'
            - type: 'null'
        id:
          type: integer
          title: The ID of the bug report
        date_added:
          type: string
          format: date-time
          title: The date the bug report was added
        date_updated:
          type: string
          format: date-time
          title: The date the bug report was updated
      type: object
      required:
        - id
        - date_added
        - date_updated
      title: BugReportSchema
      description: The schema for a bug report.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BugReportTeams:
      type: string
      enum:
        - frontend
        - backend
        - ux_ui
        - devops
        - suggestion
      title: BugReportTeams
      description: The teams for bug reports.
    UserSchema:
      properties:
        id:
          type: integer
          title: Id
        email:
          type: string
          format: email
          title: Email
        profile:
          $ref: '#/components/schemas/BasicProfileSchema'
        is_google_recaptcha_response_valid:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Whether the Google reCAPTCHA response is valid
      type: object
      required:
        - id
        - email
        - profile
      title: UserSchema
      description: The schema for a user.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    BasicProfileSchema:
      properties:
        first_name:
          type: string
          title: First Name
        last_name:
          type: string
          title: Last Name
        phone_number:
          anyOf:
            - type: string
              maxLength: 15
              minLength: 9
            - type: 'null'
          title: The phone number of the user
      type: object
      required:
        - first_name
        - last_name
      title: BasicProfileSchema
      description: The base schema for a profile.
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: api/v1/users/authorization/token

````