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

# スキャンのアップロードを継続

> 既存のスキャンに対するチャンクのアップロードを継続します



## OpenAPI

````yaml /ja/api-reference/openapi.json patch /start-scan/{transfer_id}
openapi: 3.0.0
info:
  title: Corgea API
  version: 1.0.0
  description: Corgeaのスキャン機能および脆弱性管理機能を操作するためのAPI
servers:
  - url: https://www.corgea.app/api/v1
    description: 本番サーバー
security:
  - CorgeaToken: []
  - BearerAuth: []
paths:
  /start-scan/{transfer_id}:
    patch:
      tags:
        - Corgeaスキャンの開始
      summary: スキャンのアップロードを継続
      description: 既存のスキャンに対するチャンクのアップロードを継続します
      operationId: continueScanUpload
      parameters:
        - name: transfer_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: 最初のスキャンリクエストで返された転送ID
        - name: Upload-Offset
          in: header
          required: true
          schema:
            type: integer
          description: アップロードの現在のバイトオフセット
        - name: Upload-Length
          in: header
          required: true
          schema:
            type: integer
          description: ファイルの合計サイズ（バイト）
        - name: Upload-Name
          in: header
          required: true
          schema:
            type: string
          description: アップロード中のファイル名
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - chunk_data
              properties:
                chunk_data:
                  type: string
                  format: binary
                  description: スキャン用データの次のチャンク
                project_name:
                  type: string
                branch:
                  type: string
                repo_url:
                  type: string
                sha:
                  type: string
                partial_scan:
                  type: boolean
                files_to_scan:
                  type: string
                  description: スキャン対象ファイルの一覧（カンマ区切り）
                metadata:
                  type: string
                  description: >-
                    ユーザー指定のスキャンメタデータをJSONオブジェクト文字列として渡します（例:
                    {"pipeline_url":"https://ci.example/run/123"}）。チャンクリクエストごとに検証され、アップロード完了時にスキャンへ関連付けられます。16,384バイト以下のJSONオブジェクトである必要があり、それ以外の場合はリクエストが400で失敗します。
      responses:
        '200':
          description: チャンクを正常にアップロードしました
          headers:
            Upload-Offset:
              schema:
                type: integer
              description: このチャンクの処理後における現在のアップロードオフセット
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      transfer_id:
                        type: string
                        format: uuid
                      status:
                        type: string
                        example: success
                      message:
                        type: string
                        example: Chunk uploaded successfully.
                  - type: object
                    description: アップロード完了時に返されます
                    properties:
                      scan_id:
                        type: string
                        format: uuid
                        example: 1a5afaa3-72ac-458f-a492-ac40ffc88e76
                      status:
                        type: string
                        example: success
                      message:
                        type: string
                        example: Chunk uploaded successfully.
        '400':
          description: 不正なリクエスト
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: 'Invalid request: ''chunk_data'' file not found.'
                  internal_detail:
                    type: string
        '403':
          description: 権限がありません
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Permission denied
components:
  securitySchemes:
    CorgeaToken:
      type: apiKey
      in: header
      name: CORGEA-TOKEN
      description: 認証用のAPIキー
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Authorizationヘッダーで使用するOAuth2アクセストークン（JWT）

````