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
User's single or bulk query activity. This can be a logging query or deletion query.
JSON representation
{// Union field activity can be only one of the following:"queryActivity": {object (QueryActivity)}// End of list of possible types for union field activity.}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-04 UTC."],[],[],null,["- [HTTP request](#body.HTTP_TEMPLATE)\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- [UserActivity](#UserActivity)\n - [JSON representation](#UserActivity.SCHEMA_REPRESENTATION)\n- [QueryActivity](#QueryActivity)\n - [JSON representation](#QueryActivity.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nProvides functionality to remove logged activity for a user.\n\n**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](https://developers.google.com/workspace/cloud-search/docs/guides/delegation/).\n\nHTTP request\n\n`POST https://cloudsearch.googleapis.com/v1/query:removeActivity`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nRequest body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"userActivity\": { object (/workspace/cloud-search/docs/reference/rest/v1/query/removeActivity#UserActivity) }, \"requestOptions\": { object (/workspace/cloud-search/docs/reference/rest/v1/RequestOptions) } } ``` |\n\n| Fields ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `userActivity` | `object (`[UserActivity](/workspace/cloud-search/docs/reference/rest/v1/query/removeActivity#UserActivity)`)` User Activity containing the data to be deleted. |\n| `requestOptions` | `object (`[RequestOptions](/workspace/cloud-search/docs/reference/rest/v1/RequestOptions)`)` Request options, such as the search application and clientId. |\n\nResponse body\n\nIf successful, the response body is empty.\n\nAuthorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud_search.query`\n- `https://www.googleapis.com/auth/cloud_search`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nUserActivity User's single or bulk query activity. This can be a logging query or deletion query.\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { // Union field `activity` can be only one of the following: \"queryActivity\": { object (/workspace/cloud-search/docs/reference/rest/v1/query/removeActivity#QueryActivity) } // End of list of possible types for union field `activity`. } ``` |\n\n| Fields ||\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Union field `activity`. `activity` can be only one of the following: ||\n| `queryActivity` | `object (`[QueryActivity](/workspace/cloud-search/docs/reference/rest/v1/query/removeActivity#QueryActivity)`)` Contains data which needs to be logged/removed. |\n\nQueryActivity Details about a user's query activity.\n\n| JSON representation |\n|-----------------------------|\n| ``` { \"query\": string } ``` |\n\n| Fields ||\n|---------|-------------------------------------------------|\n| `query` | `string` User input query to be logged/removed. |"]]