Slugs and Identifiers

Guide to slugs and identifiers in V7

In V7, we use slugs and identifiers (alphanumerical values) to uniquely identify objects such as teams, datasets, item and more. This guide takes you through some of the most important you will use and how you can find them.

Alphanumerical Identifiers

The following table details the most common alphanumerical identifiers needed for API requests and SDK methods

Identifier

Description

Where to find it

stage_id

UUID representing a stage in a workflow

ID in stages list when calling this API request

user_id/assignee_id

Unique id per user in your team

user_id in this API request

team_id

Int used as identifier for your team

team_id in this API request

dataset_id

Int used as identifier for a dataset

IDs in objects when calling this API request

workflow_id

UUID representing a workflow

ID field in this API request

item_id/dataset_item_id

UUID representing a dataset item

Item_ids in this API request

annotation_classs_id

Unique int in team representing a particular class

ID field in this API request

report_uuid

UUID for async CSV annotator item reports

ID field in this API request

upload_id

UUID for upload

upload_id in this API request

thread_id

UUID representing a comment thread

ID field in this API request

comment_id

UUID representing an individual comment within a comment thread

ID field in this API request

edge_id/edge

UUID representing an edge connecting workflow stages

ID within edges objects when calling this API request

source_stage_id

stage_id of the source stage of an edge

source_stage_id within edges objects when calling this API request

target_stage_id

stage_id of the target stage of an edge

target_stage_id within edges objects when calling this API request

model_id (WIND API)

UUID representing a model register in V7 (either V7 trained or external)

ID field in this API request

model_template_id (WIND API)

ID of the model template on which to base a TrainingSession

ID field in this API request

running_session_id (WIND API)

The ID of a running session

ID field in this API request

Slugs and other identifiers

Dataset Identifiers
A dataset identifier is a string that uniquely identifies a snapshot of a dataset. It is composed by 3 smaller sub-strings:

  • team slug
  • dataset slug
  • version

And it looks like this: <team-slug>/<dataset-slug>:<version>.

Slugs here are normalized versions of the values they represent, usually without spaces and with special characters either removed or replaced with hyphens.

For our Cars dataset example in Andreas Team, the identifier for the latest version would be: andreas-team/cars:latest

📘

See the SDK documentation on this topic

Finding Team Slugs:

Team slugs can either be found programmatically or in the UI.

In the UI
In the Command Line Upload section of the data upload pop up after push in the automatically generated commands. So In the example below, v7-labs is the team_slug:

354

Note: The dataset_slug will be the part after the forward slash. So in this case it would be traffic-lights

Using the SDK:
You can also run the code below using the darwin-py SDK:

from darwin.client import Client

client = Client.local()
print("Client default team slug: {}".format(client.default_team))

Storage Names and Storage Slugs:

When using external storage, it is necessary to use the storage_name or storage_slug. This is the sluggified version of the Storage Name specified in your storage settings.

📘

Team and Dataset Slugs

If you are unsure on how to generate slugs then you can use the Slugify Python library. However, underscores are not replaced with a hyphens in this case.