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

# Create Multipart Upload

> Start a multipart upload for a (potentially very large) XML file to S3/MinIO.



## OpenAPI

````yaml https://api.openwearables.io/openapi.json post /api/v1/users/{user_id}/import/apple/xml/s3/multipart/create
openapi: 3.1.0
info:
  title: Open Wearables API
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/users/{user_id}/import/apple/xml/s3/multipart/create:
    post:
      tags:
        - 'External: Apple Health Import'
      summary: Create Multipart Upload
      description: >-
        Start a multipart upload for a (potentially very large) XML file to
        S3/MinIO.
      operationId: >-
        create_multipart_upload_api_v1_users__user_id__import_apple_xml_s3_multipart_create_post
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            title: User Id
        - name: X-Open-Wearables-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Open-Wearables-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MultipartCreateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MultipartCreateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    MultipartCreateRequest:
      properties:
        filename:
          type: string
          maxLength: 200
          title: Filename
          description: Original filename
          default: ''
        content_type:
          type: string
          maxLength: 100
          title: Content Type
          description: Object content type
          default: application/xml
        file_size:
          type: integer
          maximum: 5368709120
          minimum: 5242880
          title: File Size
          description: Total file size in bytes (used to recommend a part size)
      type: object
      required:
        - file_size
      title: MultipartCreateRequest
    MultipartCreateResponse:
      properties:
        upload_id:
          type: string
          title: Upload Id
          description: S3 multipart upload id
        key:
          type: string
          title: Key
          description: S3 object key the parts belong to
        bucket:
          type: string
          title: Bucket
          description: Target bucket
        part_size:
          type: integer
          title: Part Size
          description: Recommended part size in bytes
      type: object
      required:
        - upload_id
        - key
        - bucket
        - part_size
      title: MultipartCreateResponse
    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
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /api/v1/auth/login

````