> ## 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.

# Quellcodedatei hochladen

> Lädt einzelne Quellcodedateien für einen bestimmten Scan-Lauf hoch. Damit werden die tatsächlich zu analysierenden Quelldateien hochgeladen.



## OpenAPI

````yaml /de/api-reference/openapi.json post /code-upload
openapi: 3.0.0
info:
  title: Corgea API
  version: 1.0.0
  description: >-
    API für die Interaktion mit den Scan- und
    Schwachstellenmanagement-Funktionen von Corgea
servers:
  - url: https://www.corgea.app/api/v1
    description: Produktionsserver
security:
  - CorgeaToken: []
  - BearerAuth: []
paths:
  /code-upload:
    post:
      tags:
        - Uploading 3rd Party Scan
      summary: Quellcodedatei hochladen
      description: >-
        Lädt einzelne Quellcodedateien für einen bestimmten Scan-Lauf hoch.
        Damit werden die tatsächlich zu analysierenden Quelldateien hochgeladen.
      operationId: codeUpload
      parameters:
        - name: run_id
          in: query
          required: true
          schema:
            type: string
          description: ID des dieser Datei zugeordneten Scan-Laufs
        - name: path
          in: query
          required: true
          schema:
            type: string
          description: Repository-Pfad der hochgeladenen Datei
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: Hochzuladende Quellcodedatei
      responses:
        '200':
          description: Quellcodedatei erfolgreich hochgeladen
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - ok
                    example: ok
                required:
                  - status
        '400':
          description: Ungültiger Request – Validierungsfehler
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: missing run_id
              examples:
                missing_run_id:
                  summary: Parameter run_id fehlt
                  value:
                    status: missing run_id
                missing_path:
                  summary: Parameter path fehlt
                  value:
                    status: missing path
                no_file_provided:
                  summary: Keine Datei hochgeladen
                  value:
                    status: no_file_provided
                invalid_content:
                  summary: Validierung des Dateiinhalts fehlgeschlagen
                  value:
                    status: invalid content
components:
  securitySchemes:
    CorgeaToken:
      type: apiKey
      in: header
      name: CORGEA-TOKEN
      description: API-Key für die Authentifizierung
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth2-Access-Token (JWT) im Authorization-Header

````