Delete from Index
curl --request DELETE \
--url https://api.usenarrative.ai/api/v1/search/indexes/{index_id}/items/{item_id}import requests
url = "https://api.usenarrative.ai/api/v1/search/indexes/{index_id}/items/{item_id}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.usenarrative.ai/api/v1/search/indexes/{index_id}/items/{item_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.usenarrative.ai/api/v1/search/indexes/{index_id}/items/{item_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$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.usenarrative.ai/api/v1/search/indexes/{index_id}/items/{item_id}"
req, _ := http.NewRequest("DELETE", url, nil)
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.usenarrative.ai/api/v1/search/indexes/{index_id}/items/{item_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenarrative.ai/api/v1/search/indexes/{index_id}/items/{item_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body{
"index_id": "idx_abc123xyz",
"item_id": "item_def456",
"clips_removed": 23,
"message": "Item successfully deleted from index"
}{
"detail": "Invalid request parameters"
}{
"detail": "Invalid request parameters"
}Items
Delete from Index
Remove an item from a search index
DELETE
/
api
/
v1
/
search
/
indexes
/
{index_id}
/
items
/
{item_id}
Delete from Index
curl --request DELETE \
--url https://api.usenarrative.ai/api/v1/search/indexes/{index_id}/items/{item_id}import requests
url = "https://api.usenarrative.ai/api/v1/search/indexes/{index_id}/items/{item_id}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.usenarrative.ai/api/v1/search/indexes/{index_id}/items/{item_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.usenarrative.ai/api/v1/search/indexes/{index_id}/items/{item_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$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.usenarrative.ai/api/v1/search/indexes/{index_id}/items/{item_id}"
req, _ := http.NewRequest("DELETE", url, nil)
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.usenarrative.ai/api/v1/search/indexes/{index_id}/items/{item_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenarrative.ai/api/v1/search/indexes/{index_id}/items/{item_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body{
"index_id": "idx_abc123xyz",
"item_id": "item_def456",
"clips_removed": 23,
"message": "Item successfully deleted from index"
}{
"detail": "Invalid request parameters"
}{
"detail": "Invalid request parameters"
}DELETE /api/v1/search/indexes//items/
Remove a specific item (video or clip) from a search index. This permanently deletes the item and all associated clips from the index.Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| index_id | string | Yes | The ID of the index |
| item_id | string | Yes | The ID of the item to delete |
Response
| Field | Description |
|---|---|
| index_id | ID of the index |
| item_id | ID of the deleted item |
| clips_removed | Number of clips removed from the index |
| message | Confirmation message |
Example Request
curl -X DELETE https://api.usenarrative.ai/api/v1/search/indexes/idx_abc123xyz/items/item_def456
Example Response
{
"index_id": "idx_abc123xyz",
"item_id": "item_def456",
"clips_removed": 23,
"message": "Item successfully deleted from index"
}
Notes
- Deletion is permanent and cannot be undone
- All clips derived from the deleted item are also removed
- The item_id is returned in search results and upload responses
- Deleting an item does not affect other items in the index
Path Parameters
The ID of the index
The ID of the item to delete
Response
Item deleted successfully

