> ## 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 una integración de Harness

> Actualiza los campos seleccionados. Si se cambia el token, la URL base o el prefijo del gateway, se vuelven a verificar las credenciales. El token de sustitución debe pertenecer a la cuenta de Harness existente. Requiere el permiso `integrations.manage_integration`.



## OpenAPI

````yaml /es/api-reference/openapi.json patch /integrations/harness/{integration_uuid}
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
security:
  - CorgeaToken: []
  - BearerAuth: []
paths:
  /integrations/harness/{integration_uuid}:
    parameters:
      - name: integration_uuid
        in: path
        required: true
        description: UUID de la integración de Harness
        schema:
          type: string
          format: uuid
    patch:
      tags:
        - Integraciones de Harness
      summary: Actualizar una integración de Harness
      description: >-
        Actualiza los campos seleccionados. Si se cambia el token, la URL base o
        el prefijo del gateway, se vuelven a verificar las credenciales. El
        token de sustitución debe pertenecer a la cuenta de Harness existente.
        Requiere el permiso `integrations.manage_integration`.
      operationId: updateHarnessIntegration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateHarnessIntegrationRequest'
      responses:
        '200':
          description: Integración de Harness actualizada correctamente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HarnessIntegrationWriteResponse'
        '400':
          description: >-
            Solicitud no válida, la cuenta no coincide o no se pudieron
            verificar las credenciales
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Acceso a la API denegado o falta el permiso necesario
        '404':
          description: Integración no encontrada
        '409':
          description: >-
            Ya existe una integración para esta cuenta y esta lista de
            organizaciones permitidas
components:
  schemas:
    UpdateHarnessIntegrationRequest:
      type: object
      properties:
        secure_token:
          type: string
          writeOnly: true
          description: >-
            PAT o Service Account Token de sustitución para la misma cuenta de
            Harness.
        name:
          type: string
        org_allowlist:
          type: array
          items:
            type: string
        base_url:
          type: string
          format: uri
        gateway_prefix:
          type: string
    HarnessIntegrationWriteResponse:
      allOf:
        - $ref: '#/components/schemas/HarnessIntegrationResponse'
        - type: object
          required:
            - credentials_verified
          properties:
            credentials_verified:
              type: boolean
              enum:
                - true
    HarnessIntegrationResponse:
      type: object
      required:
        - status
        - integration
      properties:
        status:
          type: string
          enum:
            - ok
        integration:
          $ref: '#/components/schemas/HarnessIntegration'
    HarnessIntegration:
      type: object
      description: >-
        Una integración de SCM de Harness Code. Los valores de las credenciales
        nunca se devuelven.
      required:
        - id
        - uuid
        - type
        - name
        - account_id
        - account_name
        - org_allowlist
        - base_url
        - gateway_prefix
        - expired
      properties:
        id:
          type: integer
        uuid:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - harness
        name:
          type: string
        account_id:
          type: string
          description: ID de la cuenta de Harness obtenido del token.
        account_name:
          type: string
        org_allowlist:
          type: array
          description: >-
            Identificadores de las organizaciones de Harness disponibles para
            esta integración. Una lista vacía permite todas las organizaciones a
            las que puede acceder el token.
          items:
            type: string
        base_url:
          type: string
          format: uri
        gateway_prefix:
          type: string
        expired:
          type: boolean
        created_at:
          type: string
          format: date-time
          nullable: true
        updated_at:
          type: string
          format: date-time
          nullable: true
  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
  securitySchemes:
    CorgeaToken:
      type: apiKey
      in: header
      name: CORGEA-TOKEN
      description: Clave de API para la autenticación
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Token de acceso OAuth2 (JWT) en el encabezado Authorization

````