---
title: "Register locally stored data to Darwin"
method: POST
path: "/api/v2/teams/{team_slug}/items/register_upload"
tags: ["Imports"]
---

# Register locally stored data to Darwin

`POST /api/v2/teams/{team_slug}/items/register_upload`

Register locally stored data with Darwin for upload. The request response will contain an upload ID for each item. After this step, the upload needs to be signed, the upload URL from this response used, and the upload confirmed.

## Path parameters

- `team_slug` string, required

## Request body

- DatasetsV2ItemRegistrationRegisterNewItemsRequest — Request upload for new Items that are to be added to the Dataset.
  - `dataset_slug` string, required — Dataset's slugified name
  - `items` DatasetsV2ItemRegistrationNewItem[], required
    - union — Definition of registered Item. Can be either in composite format (allows for more then one Slot) or in simple format (enforces single Slot).
      - object — Definition of 'composite' Item that can hold multiple Slots.
        - `layout` union
          - object — Object describing Item's layout. Version 3.
            - `slots_grid` array[], required — 3D grid of slots. Max dimensions are 4x4x128.
              - …
            - `version` 3, required — Layout version.
          - object — Object describing Item's layout. Version 2.
            - `layout_shape` integer[]
            - `slots` DatasetsV2CommonSlotName[], required
            - `type` 'grid' | 'horizontal' | 'vertical' | 'simple', required — View type.
            - `version` 2, required — Layout version.
          - object — Object describing Item's layout. Version 1.
            - `slots` DatasetsV2CommonSlotName[], required
            - `type` 'grid' | 'horizontal' | 'vertical' | 'simple', required — View type.
            - `version` 1, required — Layout version.
        - `name` string, required — Name of the Item.
        - `path` string — Path under which Item should be added to on Darwin platform. Should always be absolute.
        - `slots` DatasetsV2ItemRegistrationNewSlot[], required
          - `as_frames` boolean — When set, processes the video as individual frames creating Item for each frame.
          - `extract_views` boolean — When set, this will extract axial, sagittal and coronal views for a 3D volume.
          - `file_name` string, required — Name of the File. This will be included in exports for easier Item tracking.
          - `fps` union — Framerate which Darwin should extract frames at. Should be either positive number or string 'native'.
            - 'native' — Instructs Darwin that it should extract frames at native framerate.
            - number — Framerate which Darwin should extract frames at.
          - `metadata` object
          - `slot_name` string, required — 'ID' of the Slot to identify it within the Item. It's recommended to use numeric values satarting with 1.
          - `tags` union — Tags to associate with the individual Slot. Use object format to attach tags with text values.
            - string[] — The class names of the Tags to associate with the individual Slot.
            - object — Tags to associate with the individual Slot. The map `key` is the class name of the tag. The map `value` is the Text attribute
          - `type` 'image' | 'video' | 'pdf' | 'dicom' — When type is ommited, it's gonna be infered from the slot's extension if possible.
        - `tags` union — Tags to associate with the individual Slot. Use object format to attach tags with text values.
          - string[] — The class names of the Tags to associate with the individual Slot.
          - object — Tags to associate with the individual Slot. The map `key` is the class name of the tag. The map `value` is the Text attribute
      - object — Definition of 'simple' Item that implicitly hold only a single Slot.
        - `as_frames` boolean — When set, processes the video as individual frames creating Item for each frame.
        - `extract_views` boolean — When set, this will extract axial, sagittal and coronal views for a 3D volume.
        - `fps` union — Framerate which Darwin should extract frames at. Should be either positive number or string 'native'.
          - 'native' — Instructs Darwin that it should extract frames at native framerate.
          - number — Framerate which Darwin should extract frames at.
        - `metadata` object
        - `name` string, required — Name of the Item.
        - `path` string — Path under which Item should be added to on Darwin platform. Should always be absolute.
        - `tags` union — Tags to associate with the individual Slot. Use object format to attach tags with text values.
          - string[] — The class names of the Tags to associate with the individual Slot.
          - object — Tags to associate with the individual Slot. The map `key` is the class name of the tag. The map `value` is the Text attribute
        - `type` 'image' | 'video' | 'pdf' | 'dicom' — When type is ommited, it's gonna be infered from the slot's extension if possible.
  - `options` DatasetsV2ItemRegistrationItemsOptions — Item options.
    - `force_tiling` boolean — Forces tiling for given items.
    - `handle_as_slices` boolean — If true the items will be handled as slices. This means that the items will betreated as a sequence of pixel arrays without any spatial information.
    - `ignore_dicom_layout` boolean — If true the layout which we extract from the users DICOMs will besuperceded by the slots provided by the user.

## Response `200`

DatasetsV2.ItemRegistration.RegistrationResponse

- DatasetsV2ItemRegistrationRegistrationResponse — Presents list of succesfully registered or blocked items/slots. Items can appear on both lists as each item can contain both blocked (existing) slots and new ones.
  - `blocked_items` DatasetsV2ItemRegistrationBlockedItem[], required
    - `id` string, uuid
    - `name` string, required — Name of the Item.
    - `path` string, required — Path under which Item should be added to on Darwin platform. Should always be absolute.
    - `slots` DatasetsV2ItemRegistrationBlockedSlot[], required
      - `as_frames` boolean — When set, processes the video as individual frames creating Item for each frame.
      - `errors` DatasetsV2ItemRegistrationTaggingErrors
        - `MISSING_TEXT_FOR_TAGS` string[]
        - `UNKNOWN_TAGS` string[]
      - `extract_views` boolean — When set, this will extract axial, sagittal and coronal views for a 3D volume.
      - `file_name` string, required — Name of the File. This will be included in exports for easier Item tracking.
      - `fps` union — Framerate which Darwin should extract frames at. Should be either positive number or string 'native'.
        - 'native' — Instructs Darwin that it should extract frames at native framerate.
        - number — Framerate which Darwin should extract frames at.
      - `metadata` object
      - `reason` 'ALREADY_EXISTS' | 'FILE_UPLOAD_TIMEOUT' | 'FILE_UPLOAD_FAILED' | 'UNEXPECTED_ERROR' | 'ITEM_COUNT_LIMIT_EXCEEDED', required
      - `size_bytes` integer — File size in bytes.
      - `slot_name` string, required — 'ID' of the Slot to identify it within the Item. It's recommended to use numeric values satarting with 1.
      - `type` 'image' | 'video' | 'pdf' | 'dicom' — When type is ommited, it's gonna be infered from the slot's extension if possible.
  - `items` DatasetsV2ItemRegistrationAllowedItem[], required
    - `id` string, uuid
    - `name` string, required — Name of the Item.
    - `path` string, required — Path under which Item should be added to on Darwin platform. Should always be absolute.
    - `slots` DatasetsV2ItemRegistrationAllowedSlot[], required
      - `as_frames` boolean — When set, processes the video as individual frames creating Item for each frame.
      - `errors` DatasetsV2ItemRegistrationTaggingErrors
        - `MISSING_TEXT_FOR_TAGS` string[]
        - `UNKNOWN_TAGS` string[]
      - `extract_views` boolean — When set, this will extract axial, sagittal and coronal views for a 3D volume.
      - `file_name` string, required — Name of the File. This will be included in exports for easier Item tracking.
      - `fps` union — Framerate which Darwin should extract frames at. Should be either positive number or string 'native'.
        - 'native' — Instructs Darwin that it should extract frames at native framerate.
        - number — Framerate which Darwin should extract frames at.
      - `metadata` object
      - `size_bytes` integer — File size in bytes.
      - `slot_name` string, required — 'ID' of the Slot to identify it within the Item. It's recommended to use numeric values satarting with 1.
      - `type` 'image' | 'video' | 'pdf' | 'dicom', required — When type is ommited, it's gonna be infered from the slot's extension if possible.
      - `upload_id` string, uuid, required

## Other responses

- `401` — Common.APIError
- `403` — Common.APIError
- `404` — Common.APIError
- `422` — Unprocessable Entity

---

[API](https://skmtc.dev/v7labs/apis/darwin.md) · [All operations](https://skmtc.dev/v7labs/apis/darwin/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/v7labs/darwin/revisions/526a5b6b4cdc/schema)
