Delete an un-deployed query rewrite
import requests
url = "https://{FUSION_HOST}/api/query-rewrite/publish/{type}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.delete(url, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.delete("https://{FUSION_HOST}/api/query-rewrite/publish/{type}")
.header("Authorization", "Basic <encoded-value>")
.asString();const options = {method: 'DELETE', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://{FUSION_HOST}/api/query-rewrite/publish/{type}', 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/query-rewrite/publish/{type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{FUSION_HOST}/api/query-rewrite/publish/{type}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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/query-rewrite/publish/{type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$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/query-rewrite/publish/{type} \
--header 'Authorization: Basic <encoded-value>'"<string>"Delete an un-deployed query rewrite
Delete un-deployed query rewrites with an optional type filter.
DELETE
/
query-rewrite
/
publish
/
{type}
Delete an un-deployed query rewrite
import requests
url = "https://{FUSION_HOST}/api/query-rewrite/publish/{type}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.delete(url, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.delete("https://{FUSION_HOST}/api/query-rewrite/publish/{type}")
.header("Authorization", "Basic <encoded-value>")
.asString();const options = {method: 'DELETE', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://{FUSION_HOST}/api/query-rewrite/publish/{type}', 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/query-rewrite/publish/{type}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{FUSION_HOST}/api/query-rewrite/publish/{type}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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/query-rewrite/publish/{type}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$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/query-rewrite/publish/{type} \
--header 'Authorization: Basic <encoded-value>'"<string>"Authorizations
Basic authAPI key
Path Parameters
The query rewrite type. Use /query-rewrite/instances to get the types for your existing query rewrites, or /query-rewrite/schema to get all possible types.
In the Fusion UI, some of these types correspond to the types in the Rewrites Manager and others correspond to actions in the Rules Manager.
Query Parameters
Response
200 - application/octet-stream
OK
The response is of type string.
Was this page helpful?