Delete Dataset Item by Absolute Index
curl --request DELETE \
--url https://api.scale.com/v1/nucleus/dataset/{dataset_id}/iloc/{index} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.scale.com/v1/nucleus/dataset/{dataset_id}/iloc/{index}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.scale.com/v1/nucleus/dataset/{dataset_id}/iloc/{index}', 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}/iloc/{index}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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}/iloc/{index}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.scale.com/v1/nucleus/dataset/{dataset_id}/iloc/{index}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scale.com/v1/nucleus/dataset/{dataset_id}/iloc/{index}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"item": {
"original_image_url": "https://your-bucket/example.png",
"dataset_item_id": "di_zwyt15cag2301b902cw0",
"reference_id": "image_ref_300000",
"metadata": {
"License Plate": "ZPH-J27",
"Recording Date": "2019-09-15",
"Recording Time": "14:24:21",
"weather": "sunny",
"camera": "back"
}
},
"annotations": {
"box": [
{
"label": "car",
"type": "box",
"geometry": {
"x": 648.1969604492188,
"y": 264.34417724609375,
"width": 70.560546875,
"height": 50.55670166015625
},
"reference_id": "image_ref_300000"
},
{
"label": "car",
"type": "box",
"geometry": {
"x": 720.8001098632812,
"y": 246.6089324951172,
"width": 139.6986083984375,
"height": 114.38755798339844
},
"reference_id": "image_ref_300000"
}
]
},
"task_ids": [
"task_6047e1abe19361001ff9ca62",
"task_6047e1abe19361001ff193cd",
"task_6047e1abe19361001f19dj2b"
]
}{}Delete Dataset Item
Delete Dataset Item by Absolute Index
DELETE
/
dataset
/
{dataset_id}
/
iloc
/
{index}
Delete Dataset Item by Absolute Index
curl --request DELETE \
--url https://api.scale.com/v1/nucleus/dataset/{dataset_id}/iloc/{index} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.scale.com/v1/nucleus/dataset/{dataset_id}/iloc/{index}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.scale.com/v1/nucleus/dataset/{dataset_id}/iloc/{index}', 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}/iloc/{index}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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}/iloc/{index}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.scale.com/v1/nucleus/dataset/{dataset_id}/iloc/{index}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scale.com/v1/nucleus/dataset/{dataset_id}/iloc/{index}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"item": {
"original_image_url": "https://your-bucket/example.png",
"dataset_item_id": "di_zwyt15cag2301b902cw0",
"reference_id": "image_ref_300000",
"metadata": {
"License Plate": "ZPH-J27",
"Recording Date": "2019-09-15",
"Recording Time": "14:24:21",
"weather": "sunny",
"camera": "back"
}
},
"annotations": {
"box": [
{
"label": "car",
"type": "box",
"geometry": {
"x": 648.1969604492188,
"y": 264.34417724609375,
"width": 70.560546875,
"height": 50.55670166015625
},
"reference_id": "image_ref_300000"
},
{
"label": "car",
"type": "box",
"geometry": {
"x": 720.8001098632812,
"y": 246.6089324951172,
"width": 139.6986083984375,
"height": 114.38755798339844
},
"reference_id": "image_ref_300000"
}
]
},
"task_ids": [
"task_6047e1abe19361001ff9ca62",
"task_6047e1abe19361001ff193cd",
"task_6047e1abe19361001f19dj2b"
]
}{}Deletes a
DatasetItem based on its integer offset. For instance 42 specifies the 42nd uploaded item to the Dataset.Authorizations
Path Parameters
Response
200