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

# Actualizar el estado de un problema

> Actualiza un problema SAST accesible. Requiere `heeler.view_issue` y `heeler.change_issue_status`. Indica status y un comment no vacío que justifique la decisión; reabrir no requiere revisar la justificación, pero sí un comentario. Las decisiones de falso positivo y riesgo aceptado de usuarios no administradores devuelven 202 si la empresa exige aprobación, sin cambiar el problema hasta que se apruebe. Los administradores omiten la aprobación; no se aplican umbrales de cantidad ni gravedad para acciones masivas. Se rechazan campos desconocidos.



## OpenAPI

````yaml /es/api-reference/openapi.json patch /issue/{issue_id}
openapi: 3.0.0
info:
  title: API de Corgea
  version: 1.0.0
  description: >-
    API para interactuar con las funciones de escaneo y gestión de
    vulnerabilidades de Corgea
servers:
  - url: https://www.corgea.app/api/v1
    description: Servidor de producción
  - url: https://eu.corgea.app/api/v1
    description: Servidor de producción de la UE
security:
  - CorgeaToken: []
  - BearerAuth: []
paths:
  /issue/{issue_id}:
    patch:
      tags:
        - Issues
      summary: Actualizar el estado de un problema
      description: >-
        Actualiza un problema SAST accesible. Requiere `heeler.view_issue` y
        `heeler.change_issue_status`. Indica status y un comment no vacío que
        justifique la decisión; reabrir no requiere revisar la justificación,
        pero sí un comentario. Las decisiones de falso positivo y riesgo
        aceptado de usuarios no administradores devuelven 202 si la empresa
        exige aprobación, sin cambiar el problema hasta que se apruebe. Los
        administradores omiten la aprobación; no se aplican umbrales de cantidad
        ni gravedad para acciones masivas. Se rechazan campos desconocidos.
      operationId: updateIssueStatus
      parameters:
        - name: issue_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: ID del hallazgo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IssueStatusRequest'
      responses:
        '200':
          description: Solicitud completada correctamente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssueStatusResponse'
        '202':
          description: Pendiente de aprobación; el estado no cambia
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssueStatusResponse'
        '400':
          description: Solicitud inválida o justificación insuficiente
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: El problema cambió antes de guardar; actualiza y reintenta
components:
  schemas:
    IssueStatusRequest:
      type: object
      properties:
        status:
          type: string
          enum:
            - open
            - fix_in_progress
            - fixed
            - false_positive
            - accepted_risk
            - duplicate
        comment:
          type: string
          minLength: 1
        expiry_date:
          type: string
          format: date-time
          nullable: true
          description: Caducidad futura opcional en ISO-8601 para el riesgo aceptado.
      required:
        - status
        - comment
      additionalProperties: false
    IssueStatusResponse:
      type: object
      properties:
        status:
          type: string
          example: ok
        action:
          $ref: '#/components/schemas/EsTriageAction'
        issue:
          type: object
          properties:
            id:
              type: string
              format: uuid
            status:
              type: string
              enum:
                - open
                - fix_in_progress
                - fixed
                - false_positive
                - accepted_risk
                - duplicate
            status_comment:
              type: string
              nullable: true
            accepted_risk_expiry_date:
              type: string
              format: date-time
              nullable: true
    EsTriageAction:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - preview
            - pending_approval
            - applied
            - rejected
            - failed
        source:
          type: string
          enum:
            - api
            - cli
            - cxone
        target_status:
          type: string
        justification:
          type: string
        accepted_risk_expiry_date:
          type: string
          format: date-time
          nullable: true
        rule:
          type: object
        source_metadata:
          type: object
        requires_approval:
          type: boolean
        requested_by:
          type: integer
          nullable: true
        approved_by:
          type: integer
          nullable: true
        rejected_by:
          type: integer
          nullable: true
        created_at:
          type: string
          format: date-time
        reviewed_at:
          type: string
          format: date-time
          nullable: true
        applied_at:
          type: string
          format: date-time
          nullable: true
        counts:
          type: object
          properties:
            matched:
              type: integer
            unmatched:
              type: integer
            ambiguous:
              type: integer
            applied:
              type: integer
            conflicts:
              type: integer
  responses:
    Unauthorized:
      description: Token no válido o ausente
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Missing or invalid authorization header
    Forbidden:
      description: Permiso denegado o función no disponible
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Permission denied
    NotFound:
      description: Recurso no encontrado
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Policy not found
  securitySchemes:
    CorgeaToken:
      type: apiKey
      in: header
      name: CORGEA-TOKEN
      description: >-
        Clave de API para la autenticación Se rechazan los tokens de API de
        usuarios inactivos.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Token de acceso OAuth2 (JWT) en el encabezado Authorization

````

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