Search
Delete all search history
Delete all search history entries for the user
DELETE
/
api
/
search
/
histories
Delete all search history
curl --request DELETE \
--url https://{baseUrl}/api/v1/api/search/historiesimport requests
url = "https://{baseUrl}/api/v1/api/search/histories"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://{baseUrl}/api/v1/api/search/histories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{baseUrl}/api/v1/api/search/histories"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true
}Response
200 - application/json
Trạng thái xóa thành công
Example:
true
⌘I
Delete all search history
curl --request DELETE \
--url https://{baseUrl}/api/v1/api/search/historiesimport requests
url = "https://{baseUrl}/api/v1/api/search/histories"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://{baseUrl}/api/v1/api/search/histories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{baseUrl}/api/v1/api/search/histories"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true
}