Method: query.removeActivity
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ユーザーのロギングされたアクティビティを削除する機能を提供します。
注: この API を実行するには、標準のエンドユーザー アカウントが必要です。サービス アカウントは、アクティビティの削除リクエストを直接実行できません。サービス アカウントを使用してクエリを実行するには、Google Workspace ドメイン全体の権限の委任を設定します。
HTTP リクエスト
POST https://cloudsearch.googleapis.com/v1/query:removeActivity
この URL は gRPC Transcoding 構文を使用します。
リクエストの本文
リクエストの本文には、次の構造のデータが含まれます。
フィールド |
userActivity |
object (UserActivity )
削除するデータを含むユーザー アクティビティ。
|
requestOptions |
object (RequestOptions )
リクエスト オプション(検索アプリケーションや clientId など)。
|
レスポンスの本文
成功すると、レスポンスの本文は空になります。
認可スコープ
以下のいずれかの OAuth スコープが必要です。
https://www.googleapis.com/auth/cloud_search.query
https://www.googleapis.com/auth/cloud_search
詳しくは、認可ガイドをご覧ください。
UserActivity
ユーザーの単一クエリまたは一括クエリ アクティビティ。ログクエリまたは削除クエリです。
JSON 表現 |
{
// Union field activity can be only one of the following:
"queryActivity": {
object (QueryActivity )
}
// End of list of possible types for union field activity .
} |
フィールド |
共用体フィールド activity 。 activity は次のいずれかになります。
|
queryActivity |
object (QueryActivity )
ログに記録または削除する必要があるデータが含まれます。
|
QueryActivity
ユーザーのクエリ アクティビティに関する詳細情報。
JSON 表現 |
{
"query": string
} |
フィールド |
query |
string
ログに記録または削除されるユーザー入力クエリ。
|
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[],[],null,["# Method: query.removeActivity\n\n- [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\n### HTTP request\n\n`POST https://cloudsearch.googleapis.com/v1/query:removeActivity`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request 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\n### Response body\n\nIf successful, the response body is empty.\n\n### Authorization 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\n------------\n\nUser'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\n-------------\n\nDetails 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. |"]]