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

# Confirm a signed-URL raw-data upload

> Verify the file landed in storage, then create the DB record.

The storage path is recomputed server-side from ``organization_id``,
``raw_data_id`` and ``filename``; a client-supplied path is never trusted.



## OpenAPI

````yaml https://api.ionworks.com/openapi.json post /raw_data/{raw_data_id}/confirm-upload
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /raw_data/{raw_data_id}/confirm-upload:
    post:
      tags:
        - Raw Data
      summary: Confirm a signed-URL raw-data upload
      description: >-
        Verify the file landed in storage, then create the DB record.


        The storage path is recomputed server-side from ``organization_id``,

        ``raw_data_id`` and ``filename``; a client-supplied path is never
        trusted.
      operationId: confirm_raw_data_upload_raw_data__raw_data_id__confirm_upload_post
      parameters:
        - name: raw_data_id
          in: path
          required: true
          schema:
            type: string
            title: Raw Data Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConfirmRawDataUploadRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RawData'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ConfirmRawDataUploadRequest:
      properties:
        project_id:
          type: string
          title: Project Id
          description: Owning project ID (required).
        name:
          type: string
          title: Name
          description: User-provided label for the raw file.
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
          description: >-
            Free-text provenance: where this raw file came from (a URL, DOI, S3
            URI, vendor/cycler export description, etc.).
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          description: Loose free-form metadata.
        filename:
          type: string
          title: Filename
          description: Filename that was uploaded.
        content_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Type
          description: MIME type, if known.
        size_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size Bytes
          description: File size in bytes, computed client-side.
      type: object
      required:
        - project_id
        - name
        - filename
      title: ConfirmRawDataUploadRequest
      description: >-
        Body for POST /raw_data/{raw_data_id}/confirm-upload.


        Repeats the record metadata (same as initiate, so no orphan record is

        created if the PUT fails) plus the uploaded file's filename, content
        type,

        and client-computed size. The server recomputes the storage path from

        organization_id + raw_data_id + filename; a client-supplied path is
        never

        trusted.
    RawData:
      properties:
        project_id:
          type: string
          title: Project Id
          description: Owning project ID (required).
        name:
          type: string
          title: Name
          description: User-provided label for the raw file.
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
          description: >-
            Free-text provenance: where this raw file came from (a URL, DOI, S3
            URI, vendor/cycler export description, etc.).
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          description: Loose free-form metadata.
        id:
          type: string
          title: Id
          description: Unique identifier.
        organization_id:
          type: string
          title: Organization Id
          description: Owning organization.
        filename:
          type: string
          title: Filename
          description: Original uploaded filename.
        content_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Type
          description: MIME type, if known.
        size_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size Bytes
          description: File size in bytes.
        storage_path:
          type: string
          title: Storage Path
          description: Path within the raw-data bucket.
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
          description: User ID of the uploader.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Creation timestamp.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: Last update timestamp.
      type: object
      required:
        - project_id
        - name
        - id
        - organization_id
        - filename
        - storage_path
        - created_at
        - updated_at
      title: RawData
      description: A raw-data record as returned by the API.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````