DatasetId

How to find your datasetId for your V7 dataset

In many API queries, it is useful to know the relevant dataset_id. It is a unique identifier for each dataset and the following shows how to find it in the UI or programmatically:

In the UI:
When in the dataset, it will be present in the URL after datasets

878

Using the API:
You can use the following query to get a list of the datasets with their datasetIds as well as the dataset_slugs

import requests

url = "https://darwin.v7labs.com/api/datasets"

headers = {
    "Accept": "application/json",
    "Authorization": "ApiKey $API_KEY>"
}

response = requests.get(url, headers=headers)

for res in response.json():
    print("Dataset Name: {}     Slug: {}     Id: {}".format(res['name'],res['slug'],res['id']))