Skip to main content
DELETE
/
solr
/
{collection}
/
{path}
Send a DELETE request to Solr
import requests

url = "https://{FUSION HOST}/api/solr/{collection}/{path}"

payload = {}
headers = {"Content-Type": "*/*"}

response = requests.delete(url, json=payload, headers=headers)

print(response.text)
HttpResponse<String> response = Unirest.delete("https://{FUSION HOST}/api/solr/{collection}/{path}")
.header("Content-Type", "*/*")
.body("{}")
.asString();
const options = {method: 'DELETE', headers: {'Content-Type': '*/*'}, body: JSON.stringify({})};

fetch('https://{FUSION HOST}/api/solr/{collection}/{path}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
require 'uri'
require 'net/http'

url = URI("https://{FUSION HOST}/api/solr/{collection}/{path}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["Content-Type"] = '*/*'
request.body = "{}"

response = http.request(request)
puts response.read_body
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://{FUSION HOST}/api/solr/{collection}/{path}"

payload := strings.NewReader("{}")

req, _ := http.NewRequest("DELETE", url, payload)

req.Header.Add("Content-Type", "*/*")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{FUSION HOST}/api/solr/{collection}/{path}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([

]),
CURLOPT_HTTPHEADER => [
"Content-Type: */*"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request DELETE \
--url https://{FUSION HOST}/api/solr/{collection}/{path} \
--header 'Content-Type: */*' \
--data '{}'
This response has no body data.

Path Parameters

collection
string
required

The collection ID.

path
string
required

The Solr command path.

Pattern: .*

Body

*/*

The body is of type object.

Response

200 - undefined