--- title: "Delete a query by name: Request" slug: "delete-a-query-by-name-request" tags: ["Reference", "NDRC 4.x", "Customer", "Network Security", "NDR 4.x"] updated: 2026-09-09T18:07:45Z published: 2026-09-09T18:07:45Z canonical: "docs.trellix.com/delete-a-query-by-name-request" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.trellix.com/llms.txt > Use this file to discover all available pages before exploring further. # Delete a query by name: Request To delete a specific query, send the following request: ``` DELETE https://:/savedquery/v1/querybody// ``` Required header: ``` Cookie: px= ``` ### Options - IA_IP_address—The IP address of the NDR appliance running the NDR API. - port_number—The port number of the NDR appliance running the NDR API. - user_name—The name of the user. The user_name must match the name of the logged-in user. - query_name—The name of the query. - token—This token authenticates the session. By default, the session times out after 24 hours. ### Example ``` DELETE https://xxx.xxx.xxx.xxx:443/savedquery/v1/querybody/npadmin/savedqueryplain ``` Required header: ``` Cookie: px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ``` ### Delete a query by name: Response ``` HTTP/1.1 [Response Code] [Response Message] Server: [Server] Date: [Date] Content-Type: [Content Type] ``` ###### Response fields - Response code—A standard HTTP response code. - 200—Request successful; the specified information was deleted. - 410—Request unsuccessful because the name does not exist. - Response message—A standard HTTP response message. - OK—Request successful; the specified information was deleted. - Gone—Request unsuccessful because the name does not exist. - Server—The server being used. - Date—Standard HTML date format. - Content type—The response format. ###### Example ``` HTTP/1.1 200 OK Server: nginx Date: Thu, 28 Apr 2016 19:28:21 GMT Content-Type: application/json; charset=utf-8 ``` ### cURL code sample: Delete a query by name ``` curl -k -X DELETE -H "Content-Type: Application/Json" --cookie "px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" https://xxx.xxx.xxx.xxx:443/savedquery/v1/querybody/npadmin/savedqueryplain ``` This cURL sample includes the following options: - `-k`—This option explicitly allows cURL to perform insecure SSL connections and transfers, which allows you to test your SSL connection without installing a CA certificate. - `-X DELETE`—This option specifies using the DELETE method. - `-H "Content-Type: Application/json"`—This header specifies that the request body is in JSON format. - `--cookie "px=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"`—This option specifies the authentication token for this session. - `https://xxx.xxx.xxx.xxx:443/savedquery/v1/querybody/npadmin/savedqueryplain`—The saved query request URL. Replace `xxx.xxx.xxx.xxx` with the IP address of your NDR appliance. Replace `npadmin` with the user name of interest. Replace `savedqueryplain` with the query name to delete. ###### Results This example deletes the specified query.