Skip to main content
DELETE
/
dynamic-search-rules
/
{uid}
cURL
curl \
  -X DELETE 'MEILISEARCH_URL/dynamic-search-rules/black-friday'
client.deleteDynamicSearchRule('RULE_UID')
$client->deleteDynamicSearchRule('RULE_UID');
client.DeleteSearchRule("black-friday")
await client.DeleteDynamicSearchRuleAsync("black-friday");
import requests

url = "http://localhost:7700/dynamic-search-rules/{uid}"

headers = {"Authorization": "Bearer <token>"}

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

print(response.text)
HttpResponse<String> response = Unirest.delete("http://localhost:7700/dynamic-search-rules/{uid}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("http://localhost:7700/dynamic-search-rules/{uid}")

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

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "message": "The Authorization header is missing. It must use the bearer authorization method.",
  "code": "missing_authorization_header",
  "type": "auth",
  "link": "https://docs.meilisearch.com/errors#missing_authorization_header"
}
{
"message": "Dynamic search rule `black-friday` not found.",
"code": "dynamic_search_rule_not_found",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#dynamic_search_rule_not_found"
}

Authorizations

Authorization
string
header
required

An API key is a token that you provide when making API calls. Read more about how to secure your project.

Include the API key to the Authorization header, for instance:

-H 'Authorization: Bearer 6436fc5237b0d6e0d64253fbaac21d135012ecf1'

If you use a SDK, ensure you instantiate the client with the API key, for instance with JS SDK:

const client = new MeiliSearch({
host: 'MEILISEARCH_URL',
apiKey: '6436fc5237b0d6e0d64253fbaac21d135012ecf1'
});

Path Parameters

uid
string
required

Unique identifier of the search rule.

Response

Dynamic search rule deleted.