Get Dataset Info
curl --request GET \
--url https://api.scale.com/v1/nucleus/dataset/{dataset_id}/info \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.scale.com/v1/nucleus/dataset/{dataset_id}/info"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.scale.com/v1/nucleus/dataset/{dataset_id}/info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scale.com/v1/nucleus/dataset/{dataset_id}/info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scale.com/v1/nucleus/dataset/{dataset_id}/info"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scale.com/v1/nucleus/dataset/{dataset_id}/info")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scale.com/v1/nucleus/dataset/{dataset_id}/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"dataset_id": "ds_bwkezj6g5c4g05gqp1eg",
"model_run_ids": [
"run_bwmaprbx3nhg040ghndg",
"run_c34h8kjpgg31gaswsa9g",
"run_bwmyrbsb8mjrfh6mra2g"
],
"name": "Berkeley Deep Drive",
"length": 101001,
"slice_ids": [
"slc_c4wkaahar0800b1e6aa0",
"slc_c1ywy18f7nz005rx066g",
"slc_bxm16sbqz1q00csh48cg",
"slc_c4zxbwqynbg009h54p60"
],
"annotation_metadata_schema": {
"color": {
"type": "category"
},
"truck_type": {
"type": "category"
}
},
"item_metadata_schema": {
"weather": {
"type": "category"
},
"timeofday": {
"type": "category"
}
}
}{}Datasets
Get Dataset Info
GET
/
dataset
/
{dataset_id}
/
info
Get Dataset Info
curl --request GET \
--url https://api.scale.com/v1/nucleus/dataset/{dataset_id}/info \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.scale.com/v1/nucleus/dataset/{dataset_id}/info"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.scale.com/v1/nucleus/dataset/{dataset_id}/info', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scale.com/v1/nucleus/dataset/{dataset_id}/info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scale.com/v1/nucleus/dataset/{dataset_id}/info"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scale.com/v1/nucleus/dataset/{dataset_id}/info")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scale.com/v1/nucleus/dataset/{dataset_id}/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"dataset_id": "ds_bwkezj6g5c4g05gqp1eg",
"model_run_ids": [
"run_bwmaprbx3nhg040ghndg",
"run_c34h8kjpgg31gaswsa9g",
"run_bwmyrbsb8mjrfh6mra2g"
],
"name": "Berkeley Deep Drive",
"length": 101001,
"slice_ids": [
"slc_c4wkaahar0800b1e6aa0",
"slc_c1ywy18f7nz005rx066g",
"slc_bxm16sbqz1q00csh48cg",
"slc_c4zxbwqynbg009h54p60"
],
"annotation_metadata_schema": {
"color": {
"type": "category"
},
"truck_type": {
"type": "category"
}
},
"item_metadata_schema": {
"weather": {
"type": "category"
},
"timeofday": {
"type": "category"
}
}
}{}Click for Python SDK
Dataset.info() -> DatasetInfo
Dataset: its name, size, any Models associated with it, and any Slices created on it.