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

# Initiate a signed-URL raw-data upload

> Generate a signed upload URL. No DB record is created yet.

Returns the pre-generated raw-data ID and a single-element list of
signed-URL upload targets. The client PUTs the file bytes to the signed
URL and then calls the confirm endpoint to create the record.



## OpenAPI

````yaml https://api.ionworks.com/openapi.json post /raw_data/initiate-upload
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /raw_data/initiate-upload:
    post:
      tags:
        - Raw Data
      summary: Initiate a signed-URL raw-data upload
      description: |-
        Generate a signed upload URL. No DB record is created yet.

        Returns the pre-generated raw-data ID and a single-element list of
        signed-URL upload targets. The client PUTs the file bytes to the signed
        URL and then calls the confirm endpoint to create the record.
      operationId: initiate_raw_data_upload_raw_data_initiate_upload_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InitiateRawDataUploadRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InitiateRawDataUploadResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    InitiateRawDataUploadRequest:
      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: Original filename to upload.
        content_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Type
          description: MIME type, if known.
      type: object
      required:
        - project_id
        - name
        - filename
      title: InitiateRawDataUploadRequest
      description: |-
        Body for POST /raw_data/initiate-upload.

        Carries the record metadata (project_id, name, source, metadata from
        RawDataBase) plus the original filename and optional content type needed
        to build the storage path and signed URL. No DB row is created.
    InitiateRawDataUploadResponse:
      properties:
        raw_data_id:
          type: string
          title: Raw Data Id
          description: Pre-generated raw-data record ID.
        uploads:
          items:
            $ref: '#/components/schemas/RawDataUploadInfo'
          type: array
          title: Uploads
          description: Signed-URL targets (always a single-element list).
      type: object
      required:
        - raw_data_id
        - uploads
      title: InitiateRawDataUploadResponse
      description: Response from POST /raw_data/initiate-upload.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RawDataUploadInfo:
      properties:
        filename:
          type: string
          title: Filename
          description: Filename this signed URL targets.
        signed_url:
          type: string
          title: Signed Url
          description: Pre-signed URL to PUT the file to.
        token:
          type: string
          title: Token
          description: Upload token from storage.
        path:
          type: string
          title: Path
          description: Storage path within the raw-data bucket.
      type: object
      required:
        - filename
        - signed_url
        - token
        - path
      title: RawDataUploadInfo
      description: Signed-URL info for the single raw-data upload target.
    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

````