---
title: "Get upload by id"
method: GET
path: "/uploads/{id}"
---

# Get upload by id

`GET /uploads/{id}`

## Request

- Base URL: `http://localhost:6286`
- URL: `http://localhost:6286/uploads/{id}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/iconik/apis/agent-api/docs/uploads/:id/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `id` string, required

## Response `200`

Represents one file being uploaded

- UploadAssetItem: Represents one file being uploaded
  - `id` string, required
  - `uploadRequestId` string, required
  - `error` object
    - `code` union, required
      - 'UPLOAD_FILE_FAILED'
      - 'CLOSE_FILE_FAILED'
      - 'GENERATE_KEYFRAMES_FAILED'
    - `message` string, required
  - `state` object, required
    - `id` string, required
    - `fileInfo` object, required
      - `targetPath` string, required: Path to upload to including file name. This path is relative to the optional collection id specified for the upload. If only a file name is specified the file will be uploaded to the root of the collection. If a path is specified a collection structure replicating this path will be created in the root of the collection. This path will always be in posix format.
      - `size` number, required: Size of the file in bytes
      - `mimeType` string, required: Mime type of the file
    - `target` union, required
      - object: Upload targets creating a new asset
        - `type` 'newAsset', required
        - `assetId` string: The asset id the file should be uploaded to. Leave this blank to create a new asset
      - object: Upload targets creating a new version of an existing asset
        - `type` 'newVersion', required
        - `assetId` string, required: The asset id the file should be uploaded to
        - `versionId` string: The version id the file should be uploaded to. Leave this blank to create a new version
      - object: Upload adds a format to an asset that already exists and is left in place
        - `type` 'existingAsset', required
        - `assetId` string, required: The asset id the file should be uploaded to
        - `fillsPlaceholder` boolean: The asset is a placeholder that this upload turns into a regular asset
    - `targetAsset` union, required
      - object: Upload targets creating a new asset
        - `type` 'newAsset', required
        - `assetId` string: The asset id the file should be uploaded to. Leave this blank to create a new asset
      - object: Upload targets creating a new version of an existing asset
        - `type` 'newVersion', required
        - `assetId` string, required: The asset id the file should be uploaded to
        - `versionId` string: The version id the file should be uploaded to. Leave this blank to create a new version
      - object: Upload adds a format to an asset that already exists and is left in place
        - `type` 'existingAsset', required
        - `assetId` string, required: The asset id the file should be uploaded to
        - `fillsPlaceholder` boolean: The asset is a placeholder that this upload turns into a regular asset
    - `uploadKind` union, required: What the upload creates on the asset, and the entities it has created so far
      - object
        - `kind` 'file', required
        - `formatId` string: The format the upload created
        - `fileSetId` string: The file set the upload created
        - `fileId` string: The file the bytes are written into
      - object
        - `kind` 'proxy', required
        - `proxyId` string: The proxy the bytes are written into
    - `formatId` string: Deprecated, use uploadKind.formatId instead. Only a file upload has one.
    - `fileSetId` string: Deprecated, use uploadKind.fileSetId instead. Only a file upload has one.
    - `fileId` string: Deprecated, use uploadKind.fileId instead. A proxy upload writes into uploadKind.proxyId.
    - `status` 'WAITING' | 'UPLOADING' | 'COMPLETED' | 'COMPLETING' | 'PAUSED' | 'FAILED', required
    - `chunks` object[]: List of chunks being uploaded and their status. This will only be available after the upload has started.
      - `index` number, required
      - `status` 'WAITING' | 'UPLOADING' | 'COMPLETED' | 'FAILED', required
      - `start` number, required
      - `size` number, required
      - `uploaded` number, required

---

[API](https://skmtc.dev/iconik/apis/agent-api.md) - [All operations](https://skmtc.dev/iconik/apis/agent-api/llms.txt) - [OpenAPI document](https://skmtc.dev/iconik/apis/agent-api/revisions/cd5eb7819e60?raw)
