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/v1beta/{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,

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "searchHistorySuggestion": string,
  "removeAllSearchHistorySuggestions": boolean
  // End of mutually exclusive fields.
}
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)

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".

The suggestion to be removed. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
searchHistorySuggestion

string

The search history suggestion to be removed.

removeAllSearchHistorySuggestions

boolean

Remove all search history suggestions for the user.

End of mutually exclusive fields.

Response body

If successful, the response body is empty.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/discoveryengine.assist.readwrite
  • https://www.googleapis.com/auth/discoveryengine.readwrite
  • https://www.googleapis.com/auth/discoveryengine.serving.readwrite

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the completionConfig resource:

  • discoveryengine.completionConfigs.removeSuggestion

For more information, see the IAM documentation.