Delete a single redaction box
curl --request DELETE \
--url https://api.indoralabs.com/text-detections/file/{fileId}/rect/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.indoralabs.com/text-detections/file/{fileId}/rect/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.indoralabs.com/text-detections/file/{fileId}/rect/{id}', 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.indoralabs.com/text-detections/file/{fileId}/rect/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.indoralabs.com/text-detections/file/{fileId}/rect/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.indoralabs.com/text-detections/file/{fileId}/rect/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.indoralabs.com/text-detections/file/{fileId}/rect/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"page": 123,
"x": 123,
"y": 123,
"w": 123,
"h": 123,
"label": "<string>",
"type": "<string>",
"reason": "<string>",
"spanIds": [
"<string>"
]
}
]Text Redactions
Delete Redaction
Deletes a redaction box from a file’s detection data. Associated spans that are no longer referenced by any remaining rects are automatically removed. The response returns the full updated list of redaction boxes.
DELETE
/
text-detections
/
file
/
{fileId}
/
rect
/
{id}
Delete a single redaction box
curl --request DELETE \
--url https://api.indoralabs.com/text-detections/file/{fileId}/rect/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.indoralabs.com/text-detections/file/{fileId}/rect/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.indoralabs.com/text-detections/file/{fileId}/rect/{id}', 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.indoralabs.com/text-detections/file/{fileId}/rect/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.indoralabs.com/text-detections/file/{fileId}/rect/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.indoralabs.com/text-detections/file/{fileId}/rect/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.indoralabs.com/text-detections/file/{fileId}/rect/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"page": 123,
"x": 123,
"y": 123,
"w": 123,
"h": 123,
"label": "<string>",
"type": "<string>",
"reason": "<string>",
"spanIds": [
"<string>"
]
}
]Authorizations
Path Parameters
UUID of the file whose redaction details will be modified.
Identifier of the redaction box to delete.
⌘I

