Provides functionality to remove logged activity for a user.
Note:This API requires a standard end user account to execute. A service account can't perform Remove Activity requests directly; to use a service account to perform queries, set up Google Workspace domain-wide delegation of authority .
HTTP request
POST https://cloudsearch.googleapis.com/v1/query:removeActivity
The URL uses gRPC Transcoding syntax.
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "userActivity" : { object ( |
| Fields | |
|---|---|
userActivity
|
User Activity containing the data to be deleted. |
requestOptions
|
Request options, such as the search application and clientId. |
Response body
If successful, the response body is empty.
Authorization scopes
Requires one of the following OAuth scopes:
-
https://www.googleapis.com/auth/cloud_search.query -
https://www.googleapis.com/auth/cloud_search
For more information, see the Authorization guide .
UserActivity
User's single or bulk query activity. This can be a logging query or deletion query.
| JSON representation |
|---|
{ // Union field |
Union field activity
.
activity
can be only one of the following:
queryActivity
object (
QueryActivity
)
Contains data which needs to be logged/removed.
QueryActivity
Details about a user's query activity.
| JSON representation |
|---|
{ "query" : string } |
| Fields | |
|---|---|
query
|
User input query to be logged/removed. |

