curl --request POST \
--url https://api.getoneprofile.ai/tables/{table_id}/rows/bulk/delete/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"all": false,
"duplicates": false,
"except_record_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"keep": "first",
"merge": false,
"record_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"where": {
"items": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "<string>",
"type": "condition",
"value": "<string>"
}
],
"joiner": "and",
"unique_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"within": "<unknown>"
}
}
'import requests
url = "https://api.getoneprofile.ai/tables/{table_id}/rows/bulk/delete/"
payload = {
"all": False,
"duplicates": False,
"except_record_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"keep": "first",
"merge": False,
"record_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"where": {
"items": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "<string>",
"type": "condition",
"value": "<string>"
}
],
"joiner": "and",
"unique_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"within": "<unknown>"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
all: false,
duplicates: false,
except_record_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
keep: 'first',
merge: false,
record_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
where: {
items: [
{
column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
path: '<string>',
type: 'condition',
value: '<string>'
}
],
joiner: 'and',
unique_by: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
within: '<unknown>'
}
})
};
fetch('https://api.getoneprofile.ai/tables/{table_id}/rows/bulk/delete/', 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.getoneprofile.ai/tables/{table_id}/rows/bulk/delete/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'all' => false,
'duplicates' => false,
'except_record_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'keep' => 'first',
'merge' => false,
'record_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'where' => [
'items' => [
[
'column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'path' => '<string>',
'type' => 'condition',
'value' => '<string>'
]
],
'joiner' => 'and',
'unique_by' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'within' => '<unknown>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getoneprofile.ai/tables/{table_id}/rows/bulk/delete/"
payload := strings.NewReader("{\n \"all\": false,\n \"duplicates\": false,\n \"except_record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"keep\": \"first\",\n \"merge\": false,\n \"record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"where\": {\n \"items\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"path\": \"<string>\",\n \"type\": \"condition\",\n \"value\": \"<string>\"\n }\n ],\n \"joiner\": \"and\",\n \"unique_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"within\": \"<unknown>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.getoneprofile.ai/tables/{table_id}/rows/bulk/delete/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"all\": false,\n \"duplicates\": false,\n \"except_record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"keep\": \"first\",\n \"merge\": false,\n \"record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"where\": {\n \"items\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"path\": \"<string>\",\n \"type\": \"condition\",\n \"value\": \"<string>\"\n }\n ],\n \"joiner\": \"and\",\n \"unique_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"within\": \"<unknown>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/tables/{table_id}/rows/bulk/delete/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"all\": false,\n \"duplicates\": false,\n \"except_record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"keep\": \"first\",\n \"merge\": false,\n \"record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"where\": {\n \"items\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"path\": \"<string>\",\n \"type\": \"condition\",\n \"value\": \"<string>\"\n }\n ],\n \"joiner\": \"and\",\n \"unique_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"within\": \"<unknown>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"detail": "<string>",
"count": 1,
"deleted_record_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"kept_count": 123,
"merged_cells": 0,
"paid_credits": 0,
"rows_with_paid_data": 0,
"sample": [
{
"deleted": 123,
"filled": 123,
"kept_changed_at": "2023-11-07T05:31:56Z",
"kept_record_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>"
}
],
"swapped_count": 0
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Bulk delete table rows
Delete up to 1000 rows by record ID, or (with all: true) every row the listing matches, optionally narrowed by where/row_status (the rows query’s own predicate vocabulary) and leaving out except_record_ids. With duplicates: true under a where that keeps one row per value, it deletes the duplicates that where hides and keeps the selected rows; keep picks which copy of each value stays (first, newest, most complete), and merge fills the copy kept from the others first. Record IDs that do not exist are simply absent from the result; a predicate delete reports only the count. Row deletion has no recompute effect, so no run is requested.
curl --request POST \
--url https://api.getoneprofile.ai/tables/{table_id}/rows/bulk/delete/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"all": false,
"duplicates": false,
"except_record_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"keep": "first",
"merge": false,
"record_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"where": {
"items": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "<string>",
"type": "condition",
"value": "<string>"
}
],
"joiner": "and",
"unique_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"within": "<unknown>"
}
}
'import requests
url = "https://api.getoneprofile.ai/tables/{table_id}/rows/bulk/delete/"
payload = {
"all": False,
"duplicates": False,
"except_record_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"keep": "first",
"merge": False,
"record_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"where": {
"items": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"path": "<string>",
"type": "condition",
"value": "<string>"
}
],
"joiner": "and",
"unique_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"within": "<unknown>"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
all: false,
duplicates: false,
except_record_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
keep: 'first',
merge: false,
record_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
where: {
items: [
{
column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
path: '<string>',
type: 'condition',
value: '<string>'
}
],
joiner: 'and',
unique_by: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
within: '<unknown>'
}
})
};
fetch('https://api.getoneprofile.ai/tables/{table_id}/rows/bulk/delete/', 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.getoneprofile.ai/tables/{table_id}/rows/bulk/delete/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'all' => false,
'duplicates' => false,
'except_record_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'keep' => 'first',
'merge' => false,
'record_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'where' => [
'items' => [
[
'column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'path' => '<string>',
'type' => 'condition',
'value' => '<string>'
]
],
'joiner' => 'and',
'unique_by' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'within' => '<unknown>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getoneprofile.ai/tables/{table_id}/rows/bulk/delete/"
payload := strings.NewReader("{\n \"all\": false,\n \"duplicates\": false,\n \"except_record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"keep\": \"first\",\n \"merge\": false,\n \"record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"where\": {\n \"items\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"path\": \"<string>\",\n \"type\": \"condition\",\n \"value\": \"<string>\"\n }\n ],\n \"joiner\": \"and\",\n \"unique_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"within\": \"<unknown>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.getoneprofile.ai/tables/{table_id}/rows/bulk/delete/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"all\": false,\n \"duplicates\": false,\n \"except_record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"keep\": \"first\",\n \"merge\": false,\n \"record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"where\": {\n \"items\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"path\": \"<string>\",\n \"type\": \"condition\",\n \"value\": \"<string>\"\n }\n ],\n \"joiner\": \"and\",\n \"unique_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"within\": \"<unknown>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/tables/{table_id}/rows/bulk/delete/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"all\": false,\n \"duplicates\": false,\n \"except_record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"keep\": \"first\",\n \"merge\": false,\n \"record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"where\": {\n \"items\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"path\": \"<string>\",\n \"type\": \"condition\",\n \"value\": \"<string>\"\n }\n ],\n \"joiner\": \"and\",\n \"unique_by\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"within\": \"<unknown>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"detail": "<string>",
"count": 1,
"deleted_record_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"kept_count": 123,
"merged_cells": 0,
"paid_credits": 0,
"rows_with_paid_data": 0,
"sample": [
{
"deleted": 123,
"filled": 123,
"kept_changed_at": "2023-11-07T05:31:56Z",
"kept_record_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>"
}
],
"swapped_count": 0
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Body
Request body for the bulk row delete: two scopes, one body.
Send record_ids to delete a checkbox selection. Send all: true to
delete every row the current listing matches, optionally narrowed by
where/row_status, exactly the predicate vocabulary of the rows
query, so "delete everything matching my filters" and "show me everything
matching my filters" can never disagree about what matches. The explicit
flag exists so an accidentally empty body deletes nothing.
Under a where that keeps one row per value (unique_by, or its within's), delete the duplicates it hides instead of the rows it keeps: every other row the where's other conditions let through whose value in that column a selected row holds. The selected rows stay, so the view shows the same rows afterwards: with all, every row the where keeps less except_record_ids; with record_ids, those of them the where still shows, and none of the rows named is deleted (they then take where too). A row blank in the column is never a duplicate. The answer says how many rows stay (kept_count). Takes no row_status.
With duplicates: which copy of each value stays. first is the row the view shows; newest the copy changed last (its newest cell edit, else when it was added); most_complete the copy with the most filled cells. Ties go to the first in the table. A copy other than the one shown stays where it is, and the shown row goes with the rest. With record_ids the rows named stay whatever it says.
first, newest, most_complete Response
Successful Response
Result of a bulk row delete; missing record IDs are simply absent.
A predicate (all: true) delete reports only the count. Echoing ten
thousand UUIDs would say nothing the count does not.
Was this page helpful?