Dataset Registration
This page provides admin-oriented dataset registration examples. For user workflow, see User Dataset Registration.
Single-file example
import requests
api_key = "YOUR_API_KEY"
team_slug = "your-team-slug"
dataset_slug = "your-dataset"
storage_name = "your-storage-bucket"
headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": f"ApiKey {api_key}",
}
payload = {
"items": [
{
"path": "/",
"slots": [
{
"as_frames": "false",
"slot_name": "1",
"storage_key": "data/000000000.png",
"file_name": "000000000.png",
}
],
"name": "000000000.png",
}
],
"dataset_slug": dataset_slug,
"storage_slug": storage_name,
}
requests.post(
f"https://darwin.v7labs.com/api/v2/teams/{team_slug}/items/register_existing",
headers=headers,
json=payload,
)
If TLS trust fails, use SSL Certificate Error.