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

# Finish multipart upload

> Finish a multipart upload by providing all part ETags.



## OpenAPI

````yaml /api-reference/openapi.yml post /upload/multipart/{username}/{namespace}/{datasetName}/finish
openapi: 3.0.3
info:
  title: DataLinks
  version: 2.2.3
servers:
  - url: https://api.datalinks.com/api/v1
    description: production server
security:
  - bearerAuth: []
  - openId:
      - implicit
paths:
  /upload/multipart/{username}/{namespace}/{datasetName}/finish:
    post:
      tags:
        - multipart-upload
      summary: Finish multipart upload
      description: Finish a multipart upload by providing all part ETags.
      operationId: finishMultipartUpload
      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: datasetName
          in: path
          description: Name of the dataset.
          required: true
          schema:
            type: string
          examples:
            movies:
              summary: Movies
              value: movies
            actors:
              summary: Actors
              value: actors
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FinishedMultipartRequest'
        required: true
      responses:
        '201':
          description: Completes the multipart upload and returns the ingestion id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedIngestionTrackingResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          description: Failed to complete the multipart upload.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    FinishedMultipartRequest:
      required:
        - key
        - parts
        - uploadId
      type: object
      properties:
        uploadId:
          type: string
          description: Upload ID from the prepare response.
          example: >-
            2~VmxqYXRlRDZWfjJrRWRiZ2FEQXk3dHI4DGhGLygtTmQNXEZPQXFzMVZOZTUgdEdrXCEyNStkQUp3U3Q2RjJqSkV4MFNBOWxJCk0yIHEkfcQ
        key:
          type: string
          description: S3 object key from the prepare response.
          example: uploads/data/20240301-143022-uuid.json
        parts:
          minItems: 1
          type: array
          description: Array of completed parts with their ETags.
          items:
            $ref: '#/components/schemas/FinishedMultipartItem'
        name:
          type: string
          description: Optional name/label for the ingestion (e.g., original filename).
          example: sales-data-2024.csv
        infer:
          $ref: '#/components/schemas/IngestRequestInfer'
        link:
          $ref: '#/components/schemas/IngestLink'
        inferBatchSize:
          type: integer
          description: >-
            Number of rows per LLM inference batch. Defaults to 1000. Reduce for
            large files to avoid S3 read timeouts caused by slow LLM processing.
          nullable: true
          example: 100
        dataDescription:
          $ref: '#/components/schemas/DataDescription'
        schemaDefinition:
          $ref: '#/components/schemas/SchemaDefinition'
    CreatedIngestionTrackingResponse:
      required:
        - id
      type: object
      properties:
        id:
          type: string
          description: Ingestion id created for background ingestion.
          format: uuid
          example: 550e8400-e29b-41d4-a716-446655440000
    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
    FinishedMultipartItem:
      required:
        - etag
        - partNumber
      type: object
      properties:
        partNumber:
          type: integer
          description: Part number (1-based)
          example: 1
        etag:
          type: string
          description: ETag returned by S3 after uploading the part.
          example: d41d8cd98f00b204e9800998ecf8427e
    IngestRequestInfer:
      type: object
      properties:
        steps:
          type: array
          items:
            $ref: '#/components/schemas/IngestRequestInferStep'
    IngestLink:
      type: object
      properties:
        ExactMatch:
          nullable: true
          anyOf:
            - $ref: '#/components/schemas/ExactMatchConfig'
            - $ref: '#/components/schemas/ResolutionParameters'
        GeoMatch:
          nullable: true
          anyOf:
            - $ref: '#/components/schemas/GeoMatchConfig'
            - $ref: '#/components/schemas/ResolutionParameters'
    DataDescription:
      maxLength: 10000
      type: string
      description: >-
        A description of the dataset to help the AI system understand the
        context.
      example: Employee dataset containing demographics and compensation.
    SchemaDefinition:
      type: object
      additionalProperties:
        type: string
      description: >-
        A schema definition mapping field names to descriptions, to guide the AI
        system in structuring the extracted data.
      example:
        id: unique employee identifier
        name: full employee name
        age: employee age in years
        department: work department
        salary: annual salary in USD
    IngestRequestInferStep:
      type: object
      discriminator:
        propertyName: type
        mapping:
          table:
            $ref: '#/components/schemas/TableStep'
          rows:
            $ref: '#/components/schemas/RowsStep'
          normalise:
            $ref: '#/components/schemas/NormaliseStep'
          validate:
            $ref: '#/components/schemas/ValidateStep'
          reverseGeo:
            $ref: '#/components/schemas/ReverseGeoStep'
          namedEntities:
            $ref: '#/components/schemas/NamedEntitiesStep'
      anyOf:
        - $ref: '#/components/schemas/TableStep'
        - $ref: '#/components/schemas/RowsStep'
        - $ref: '#/components/schemas/NormaliseStep'
        - $ref: '#/components/schemas/ValidateStep'
        - $ref: '#/components/schemas/ReverseGeoStep'
        - $ref: '#/components/schemas/NamedEntitiesStep'
    ExactMatchConfig:
      type: object
      properties:
        minDistinct:
          type: number
        minVariation:
          type: number
      nullable: true
    ResolutionParameters:
      type: object
      properties:
        bidirectional:
          type: boolean
        targetColumns:
          type: array
          items:
            type: string
        ignorePrivateColumns:
          type: boolean
    GeoMatchConfig:
      type: object
      properties:
        distance:
          type: number
        distanceUnit:
          type: string
      nullable: true
    TableStep:
      required:
        - deriveFrom
        - type
      type: object
      properties:
        type:
          type: string
          enum:
            - table
        deriveFrom:
          type: string
          description: Name of the source column to extract from.
        additionalInstructions:
          type: string
          description: >-
            Additional instructions to guide the AI system for higher accuracy
            during extraction.
          example: >-
            This text contains a table comma separated, but instead of line
            breaks we are using a ';'.
        model:
          type: string
          description: The LLM model to use for this step.
        provider:
          type: string
          description: The LLM provider to use for this step.
        replaceOriginalColumn:
          type: boolean
          description: >-
            When true, the source column specified in deriveFrom is removed from
            the output after extraction.
          default: false
    RowsStep:
      required:
        - deriveFrom
        - type
      type: object
      properties:
        type:
          type: string
          enum:
            - rows
        deriveFrom:
          type: string
          description: Name of the column that contains the JSON content.
    NormaliseStep:
      required:
        - mode
        - type
      type: object
      properties:
        type:
          type: string
          enum:
            - normalise
            - normalize
        mode:
          type: string
          description: Normalisation mode.
          enum:
            - all-in-one
            - field-by-field
            - embeddings
        targetCols:
          type: object
          additionalProperties:
            type: string
          description: Target columns with their descriptions.
        dataDescription:
          $ref: '#/components/schemas/DataDescription'
        model:
          type: string
          description: The LLM model to use for this step.
        provider:
          type: string
          description: The LLM provider to use for this step.
    ValidateStep:
      required:
        - columns
        - mode
        - type
      type: object
      properties:
        type:
          type: string
          enum:
            - validate
        mode:
          type: string
          description: Validation mode.
          enum:
            - regex
            - rows
            - fields
        columns:
          type: array
          description: Columns to validate.
          items:
            type: string
        model:
          type: string
          description: The LLM model to use for this step.
        provider:
          type: string
          description: The LLM provider to use for this step.
    ReverseGeoStep:
      required:
        - type
      type: object
      properties:
        type:
          type: string
          enum:
            - reverseGeo
        deriveFrom:
          type: string
          description: Name of the location column.
    NamedEntitiesStep:
      required:
        - type
      type: object
      properties:
        type:
          type: string
          enum:
            - namedEntities
  responses:
    BadRequest:
      description: Bad request. The request was malformed or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: >-
        Unauthorized. This error occurs if the authentication token is missing
        or invalid.
      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

````