Delete Index
curl --request DELETE \
--url https://api.usenarrative.ai/api/v1/search/indexes/{index_id}import requests
url = "https://api.usenarrative.ai/api/v1/search/indexes/{index_id}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.usenarrative.ai/api/v1/search/indexes/{index_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}",
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}"
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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenarrative.ai/api/v1/search/indexes/{index_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",
"name": "Sports Highlights Q4 2024",
"items_deleted": 12,
"clips_deleted": 347,
"message": "Index successfully deleted"
}{
"detail": "Invalid request parameters"
}{
"detail": "Invalid request parameters"
}Indexes
Delete Index
Permanently delete a search index and all its contents
DELETE
/
api
/
v1
/
search
/
indexes
/
{index_id}
Delete Index
curl --request DELETE \
--url https://api.usenarrative.ai/api/v1/search/indexes/{index_id}import requests
url = "https://api.usenarrative.ai/api/v1/search/indexes/{index_id}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.usenarrative.ai/api/v1/search/indexes/{index_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}",
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}"
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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenarrative.ai/api/v1/search/indexes/{index_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",
"name": "Sports Highlights Q4 2024",
"items_deleted": 12,
"clips_deleted": 347,
"message": "Index successfully deleted"
}{
"detail": "Invalid request parameters"
}{
"detail": "Invalid request parameters"
}DELETE /api/v1/search/indexes/
Permanently delete a search index and all its contents. This removes the index, all uploaded items, and all indexed clips.Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| index_id | string | Yes | The ID of the index to delete |
Response
| Field | Description |
|---|---|
| index_id | ID of the deleted index |
| name | Name of the deleted index |
| items_deleted | Number of items that were in the index |
| clips_deleted | Total number of clips that were deleted |
| message | Confirmation message |
Example Request
curl -X DELETE https://api.usenarrative.ai/api/v1/search/indexes/idx_abc123xyz
Example Response
{
"index_id": "idx_abc123xyz",
"name": "Sports Highlights Q4 2024",
"items_deleted": 12,
"clips_deleted": 347,
"message": "Index successfully deleted"
}
Notes
- This action is permanent and cannot be undone
- All items and clips in the index will be deleted
- Any URLs pointing to clips in this index will become invalid
- To remove a single item instead, use Delete from Index
Path Parameters
The ID of the index to delete
Response
Index deleted successfully
ID of the deleted index
Example:
"idx_abc123xyz"
Name of the deleted index
Example:
"Sports Highlights Q4 2024"
Number of items that were in the index
Example:
12
Total number of clips that were deleted
Example:
347
Confirmation message
Example:
"Index successfully deleted"

