Method: query.removeActivity
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
มีฟังก์ชันการทำงานเพื่อนำกิจกรรมที่บันทึกไว้ของผู้ใช้ออก
หมายเหตุ: API นี้ต้องใช้บัญชีผู้ใช้ปลายทางมาตรฐานเพื่อดำเนินการ บัญชีบริการไม่สามารถส่งคำขอนำกิจกรรมออกได้โดยตรง หากต้องการใช้บัญชีบริการเพื่อทำการค้นหา ให้ตั้งค่าการมอบสิทธิ์ทั่วทั้งโดเมนของ Google Workspace
คำขอ HTTP
POST https://cloudsearch.googleapis.com/v1/query:removeActivity
URL ใช้ไวยากรณ์การแปลง gRPC
เนื้อหาของคำขอ
เนื้อความของคำขอมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
ช่อง |
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. |"]]