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

# Start uploading a new version of a data asset



## OpenAPI

````yaml /api-reference/openapi.yml post /data-assets/{username}/{namespace}/{assetId}/versions
openapi: 3.0.3
info:
  title: DataLinks
  version: 3.10.0
servers:
  - url: https://api.datalinks.com/api/v1
    description: production server
security:
  - bearerAuth: []
  - openId:
      - implicit
paths:
  /data-assets/{username}/{namespace}/{assetId}/versions:
    post:
      tags:
        - data-assets
      summary: Start uploading a new version of a data asset
      operationId: addDataAssetVersion
      parameters:
        - name: username
          in: path
          description: The username associated with the request.
          required: true
          schema:
            type: string
        - name: namespace
          in: path
          description: Namespace for the dataset.
          required: true
          schema:
            type: string
          example: cinematography
        - name: assetId
          in: path
          description: The data asset's id.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddDataAssetVersionRequest'
        required: true
      responses:
        '201':
          description: Upload prepared for the new version
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreparedUploadResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
components:
  schemas:
    AddDataAssetVersionRequest:
      required:
        - fileSize
      type: object
      properties:
        fileSize:
          type: integer
          format: int64
        expectedVersion:
          type: integer
        contentType:
          type: string
        concurrency:
          type: integer
          description: >
            Hint only, never a requirement. How many chunks the client would
            like in flight. The server silently clamps it to its own maximum and
            to the total part count, and never rejects a value for being too
            large or too small. Defaults to the server's setting when omitted.
            The client must honour the number of URLs actually returned in
            `next`, not the number it asked for.
    PreparedUploadResponse:
      required:
        - assetId
        - expiresAt
        - next
        - partSize
        - totalParts
        - uploadId
        - versionNo
      type: object
      properties:
        assetId:
          type: string
          format: uuid
        versionNo:
          type: integer
        uploadId:
          type: string
        partSize:
          type: integer
          format: int64
        totalParts:
          type: integer
        expiresAt:
          type: string
          description: Upload deadline. Each acknowledged part pushes it out.
          format: date-time
        next:
          type: array
          description: >
            Part URLs to upload next, and the authority on how many may be in
            flight - it can be fewer than the requested `concurrency`. Empty
            once every part number has been handed out, which is not the same as
            every part having been uploaded: the server tracks only how many it
            has issued, never what landed. The client is the sole authority on
            its own progress. To re-obtain a URL it dropped or let expire, use
            the parts/presign endpoint.
          items:
            $ref: '#/components/schemas/PresignedUploadPart'
    PresignedUploadPart:
      required:
        - partNumber
        - size
        - url
      type: object
      properties:
        partNumber:
          type: integer
        url:
          type: string
        size:
          type: integer
          format: int64
    ErrorResponse:
      required:
        - error_code
        - message
      type: object
      properties:
        error_code:
          type: string
          example: UNAUTHORIZED
        error_message:
          type: string
          example: ''
        message:
          type: string
          example: Missing authentication token
        sub_errors:
          type: array
          items:
            required:
              - code
              - message
            type: object
            properties:
              code:
                type: string
              message:
                type: string
  responses:
    Unauthorized:
      description: >-
        Unauthorized. This error occurs if the authentication token is missing
        or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Forbidden. The user does not have access to this resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Conflict:
      description: >-
        Conflict. The request could not be completed due to a conflict with the
        current state of the resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      description: >
        Use a Bearer token for authentication. Submit the token using the
        `Authorization`

        header: `Authorization: Bearer <token>`.
      scheme: bearer
    openId:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: >-
            https://login.datalinks.com/realms/datalinks-realm/protocol/openid-connect/auth
          scopes:
            openid: openid

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.