API to Delete a Query
After using a query, you must delete it from the system; otherwise it continues using valuable resources. Deleting a query requires only the ID of the query:
DELETE <baseurl>/api/v2/query/{id}
Alternatively, you can set the timeToLive parameter while creating the query, so that the query is deleted automatically after the specified time of inactivity.