---
title: "Register externally stored data in read-only"
method: POST
path: "/api/v2/teams/{team_slug}/items/register_existing_readonly"
tags: ["Imports"]
---

# Register externally stored data in read-only

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

Send a request to register files stored in external storage with a Darwin dataset in read-only. This means Darwin will not process the data or generate thumbnails. Instead, paths to thumbnails must be specified in the request.


Note: This operation is rate-limited to 100 requests per minute and can contain up to 100 items per request.

## Path parameters

- `team_slug` string, required

## Request body

- DatasetsV2ItemRegistrationRegisterItemsRequest — Request registration of existing read-only Items that are to be added to the Dataset.
  - `dataset_slug` string, required — Dataset's slugified name
  - `items` DatasetsV2ItemRegistrationReadOnlyItem[], 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 'read-only' Item that can hold multiple Slots. Registration of such item will not trigger any data processing.
        - `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` DatasetsV2ItemRegistrationReadOnlySlot[], required
          - union — Object encapsulating a 'read-only' Slot to be registered in Dataset. You can choose from 3 object formats. ReadOnlyImageSlot is a simplified form for image-only Slots.
            - object — Object encapsulating a Slot to be registered in Dataset.
              - …
            - object — Object encapsulating a Slot to be registered in Dataset.
              - …
            - object — Object encapsulating a Slot to be registered in Dataset.
              - …
        - `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 'read-only', 'simple' Item that implicitly hold only a single Slot. Registration of such item will not trigger any data processing.
        - `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.
        - `sections` DatasetsV2ItemRegistrationReadOnlySlotSection[], required
          - `height` integer, required — Height of the high-quality section image in pixels.
          - `section_index` integer, required — index of the section within the slot, e.g. for videos this would be frame number. Sections will be sorted based on this number.
          - `size_bytes` integer — File size in bytes.
          - `storage_hq_key` string, required — Path to the file on the storage.
          - `storage_lq_key` string — Path to the file on the storage.
          - `type` 'frame' | 'simple_image' | 'tiled_image' | 'page' | 'slice' — Section type. If not defined then inferred from slot type.
          - `width` integer, required — Width of the high-quality section image in pixels.
        - `storage_key` string, required — Path to the file on the storage.
        - `storage_thumbnail_key` string, required — Path to the file on the storage.
        - `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
        - `total_size_bytes` integer — File size in bytes.
        - `type` 'image' | 'video' | 'pdf' | 'dicom', required — When type is ommited, it's gonna be infered from the slot's extension if possible.
      - object — Definition of 'read-only', 'simple' Item that implicitly hold only a single Slot. Only for image Slots. Registration of such item will not trigger any data processing.
        - `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.
        - `height` integer, required — Height of the image in pixels.
        - `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.
        - `storage_key` string, required — Path to the file on the storage.
        - `storage_thumbnail_key` string, required — Path to the file on the storage.
        - `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
        - `total_size_bytes` integer — File size in bytes.
        - `type` 'image', required
        - `width` integer, required — Width of the image in pixels.
      - object — Definition of 'read-only', 'simple' Item that implicitly hold only a single Slot.Registration of such item will not trigger any data processing.
        - `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.
        - `height` integer, required — Height of the video in pixels.
        - `hls_segments` object, required
          - `high_quality` DatasetsV2ItemRegistrationHLSSegmentsInfo, required
            - `bitrate` number, required — Bitrate of the video segment in bits per second.
            - `index` string, required — HLS index file content with segment storage keys.
          - `low_quality` DatasetsV2ItemRegistrationHLSSegmentsInfo, required
            - `bitrate` number, required — Bitrate of the video segment in bits per second.
            - `index` string, required — HLS index file content with segment storage keys.
        - `metadata` object
        - `name` string, required — Name of the Item.
        - `native_fps` number, required — Native framerate of the video.
        - `path` string — Path under which Item should be added to on Darwin platform. Should always be absolute.
        - `storage_audio_peaks_key` string — Storage key of audio peaks. Audio peaks are expected to be in gzipped binary format where each peak is an unsigned integer.
        - `storage_frames_manifest_key` string, required — Path to the file on the storage.
        - `storage_key` string, required — Path to the file on the storage.
        - `storage_low_quality_sections_key_prefix` string — Prefix for storage keys of low-quality video sections. Sections storage keys are expected to be in format `{prefix}/%9d.jpg`.
        - `storage_sections_key_extension` string — File extension to append to generated frame keys with `storage_sections_key_prefix`.
        - `storage_sections_key_prefix` string, required — Prefix for storage keys of video sections. Sections storage keys are expected to be in format `{prefix}/%9d.{ext}` where `ext` is defined by `storage_sections_key_extension` (defaults to `png`).
        - `storage_thumbnail_key` string, required — Path to the file on the storage.
        - `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
        - `total_frames` integer, required — Total number of frames in the video.
        - `total_size_bytes` integer — File size in bytes.
        - `type` 'image' | 'video' | 'pdf' | 'dicom' — When type is ommited, it's gonna be infered from the slot's extension if possible.
        - `visible_frames` integer, required — Number of frames visible for annotation.
        - `width` integer, required — Width of the video in pixels.
  - `storage_slug` string, required — Slugified name of the storage on which the slots reside.

## 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
- `404` — Common.APIError
- `422` — Unprocessable Entity
- `429` — Common.APIError

---

[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)
