v1

latestOpenAPI 3.0.02026-07-2480355389.7 KB
Imports

Register externally stored data in read-only

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.

post/api/v2/teams/{team_slug}/items/register_existing_readonly

Path parameters

team_slugstring required

Team's sluggified name

Request body

dataset_slugstring required

Dataset's slugified name

storage_slugstring required

Slugified name of the storage on which the slots reside.

Example request

{
  "dataset_slug": "my-dataset",
  "items": [
    {
      "layout": {
        "slots_grid": [
          [
            [
              "1",
              "2"
            ],
            "3"
          ],
          [
            "4"
          ]
        ],
        "version": 3
      },
      "name": "some-item",
      "slots": [
        {
          "file_name": "my_image.jpg",
          "sections": [
            {
              "size_bytes": 500,
              "storage_hq_key": "my/existing/file.jpg",
              "storage_lq_key": "my/existing/file.jpg"
            }
          ],
          "size_bytes": 500,
          "slot_name": "0",
          "storage_key": "my/existing/file.jpg",
          "storage_thumbnail_key": "my/existing/file.jpg",
          "tags": [
            "tag_class_name1",
            "tag_class_name2"
          ]
        }
      ],
      "tags": [
        "tag_class_name1",
        "tag_class_name2"
      ]
    }
  ],
  "storage_slug": "my-storage-bucket"
}

Response

DatasetsV2.ItemRegistration.RegistrationResponse

Example response

{
  "blocked_items": [
    {
      "id": "e23ff3f3-8f77-4e78-9e81-fdb25abfb781",
      "name": "some-item",
      "slots": [
        {
          "file_name": "my_image.jpg",
          "size_bytes": 500,
          "slot_name": "0"
        }
      ]
    }
  ],
  "items": [
    {
      "id": "e23ff3f3-8f77-4e78-9e81-fdb25abfb781",
      "name": "some-item",
      "slots": [
        {
          "file_name": "my_image.jpg",
          "size_bytes": 500,
          "slot_name": "0",
          "upload_id": "e23ff3f3-8f77-4e78-9e81-fdb25abfb781"
        }
      ]
    }
  ]
}