Method: projects.locations.collections.engines.completionConfig.removeSuggestion

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/v1alpha/{completionConfig=projects/*/locations/*/collections/*/engines/*/completionConfig}:removeSuggestion

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
completionConfig

string

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.

This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id.

The field must be a UTF-8 encoded string with a length limit of 128.

userInfo

object (UserInfo)

Optional. Information about the end user.

This should be the same identifier information as UserEvent.user_info and SearchRequest.user_info.

removeTime

string (Timestamp format)

Optional. 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 uses 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.

Response body

If successful, the response body is empty.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.