Removes the search history suggestion in an engine for a user. This will remove the suggestion from being returned in the AdvancedCompleteQueryResponse.recent_search_suggestions for this user. If the user searches the same suggestion again, the new history will override and suggest this suggestion again.
HTTP request
POST https://discoveryengine.googleapis.com/v1beta/{completionConfig=projects/*/locations/*/collections/*/engines/*/completionConfig}:removeSuggestion
Required. The completionConfig of the parent engine resource name for which the search history suggestion is to be removed, such as projects/*/locations/global/collections/default_collection/engines/*/completionConfig.
Request body
The request body contains data with the following structure:
JSON representation
{"userPseudoId": string,"userInfo": {object (UserInfo)},"removeTime": string,// Union field suggestion can be only one of the following:"searchHistorySuggestion": string,"removeAllSearchHistorySuggestions": boolean// End of list of possible types for union field suggestion.}
Fields
userPseudoId
string
Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website.
This field should NOT have a fixed value such as unknown_visitor.
Required. Time at which the suggestion was removed. If not set, the current time will be used.
Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
Union field suggestion. The suggestion to be removed. suggestion can be only one of the following:
searchHistorySuggestion
string
The search history suggestion to be removed.
removeAllSearchHistorySuggestions
boolean
Remove all search history suggestions for the user.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-26 UTC."],[[["\u003cp\u003eThis API allows the removal of search history suggestions for a specific user, preventing them from appearing in future \u003ccode\u003eAdvancedCompleteQueryResponse.recent_search_suggestions\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request is a POST operation to the URL, \u003ccode\u003ehttps://discoveryengine.googleapis.com/v1beta/{completionConfig=projects/*/locations/*/collections/*/engines/*/completionConfig}:removeSuggestion\u003c/code\u003e, with a specified completionConfig path parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires a \u003ccode\u003euserPseudoId\u003c/code\u003e for identifying the user, a \u003ccode\u003eremoveTime\u003c/code\u003e timestamp for when the suggestion was removed, and either the \u003ccode\u003esearchHistorySuggestion\u003c/code\u003e to be removed or \u003ccode\u003eremoveAllSearchHistorySuggestions\u003c/code\u003e to clear all history.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful removal results in an empty response body.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the OAuth scope \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.collections.engines.completionConfig.removeSuggestion\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n\nRemoves the search history suggestion in an engine for a user. This will remove the suggestion from being returned in the [AdvancedCompleteQueryResponse.recent_search_suggestions](/generative-ai-app-builder/docs/reference/rest/v1beta/AdvancedCompleteQueryResponse#FIELDS.recent_search_suggestions) for this user. If the user searches the same suggestion again, the new history will override and suggest this suggestion again.\n\n### HTTP request\n\n`POST https://discoveryengine.googleapis.com/v1beta/{completionConfig=projects/*/locations/*/collections/*/engines/*/completionConfig}:removeSuggestion`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body is empty.\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]