Method: stats.getUser
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
取得客戶的使用者統計資料。
注意:執行這個 API 需要標準使用者帳戶。
HTTP 要求
GET https://cloudsearch.googleapis.com/v1/stats/user
這個網址使用 gRPC 轉碼語法。
查詢參數
參數 |
fromDate |
object (Date )
系統會傳回從 fromDate 到 toDate 之間的所有可用統計資料。fromDate 應在當年內,且 toDate 必須大於等於 fromDate。
|
toDate |
object (Date )
|
回應主體
欄位 |
stats[] |
object (CustomerUserStats )
|
授權範圍
需要下列其中一種 OAuth 範圍:
https://www.googleapis.com/auth/cloud_search.stats.indexing
https://www.googleapis.com/auth/cloud_search.stats
https://www.googleapis.com/auth/cloud_search
詳情請參閱授權指南。
CustomerUserStats
JSON 表示法 |
{
"date": {
object (Date )
},
"oneDayActiveUsersCount": string,
"sevenDaysActiveUsersCount": string,
"thirtyDaysActiveUsersCount": string
} |
欄位 |
date |
object (Date )
計算工作階段統計資料的日期。系統會傳回隔天午夜前計算的統計資料。
|
oneDayActiveUsersCount |
string (int64 format)
過去一天內的不重複活躍使用者人數
|
sevenDaysActiveUsersCount |
string (int64 format)
過去七天內不重複的活躍使用者人數
|
thirtyDaysActiveUsersCount |
string (int64 format)
過去三十天內不重複的活躍使用者人數
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[],[],null,["# Method: stats.getUser\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.GetCustomerUserStatsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [CustomerUserStats](#CustomerUserStats)\n - [JSON representation](#CustomerUserStats.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nGet the users statistics for customer.\n\n**Note:** This API requires a standard end user account to execute.\n\n### HTTP request\n\n`GET https://cloudsearch.googleapis.com/v1/stats/user`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `fromDate` | `object (`[Date](/workspace/cloud-search/docs/reference/rest/v1/Date)`)` All available stats from fromDate to toDate are returned. fromDate should be within the year and toDate \\\u003e= fromDate. |\n| `toDate` | `object (`[Date](/workspace/cloud-search/docs/reference/rest/v1/Date)`)` |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------|\n| ``` { \"stats\": [ { object (/workspace/cloud-search/docs/reference/rest/v1/stats/getUser#CustomerUserStats) } ] } ``` |\n\n| Fields ||\n|-----------|------------------------------------------------------------------------------------------------------------------|\n| `stats[]` | `object (`[CustomerUserStats](/workspace/cloud-search/docs/reference/rest/v1/stats/getUser#CustomerUserStats)`)` |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud_search.stats.indexing`\n- `https://www.googleapis.com/auth/cloud_search.stats`\n- `https://www.googleapis.com/auth/cloud_search`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nCustomerUserStats\n-----------------\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"date\": { object (/workspace/cloud-search/docs/reference/rest/v1/Date) }, \"oneDayActiveUsersCount\": string, \"sevenDaysActiveUsersCount\": string, \"thirtyDaysActiveUsersCount\": string } ``` |\n\n| Fields ||\n|------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `date` | `object (`[Date](/workspace/cloud-search/docs/reference/rest/v1/Date)`)` The date for which session stats were calculated. Stats calculated on the next day close to midnight are returned. |\n| `oneDayActiveUsersCount` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The count of unique active users in the past one day |\n| `sevenDaysActiveUsersCount` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The count of unique active users in the past seven days |\n| `thirtyDaysActiveUsersCount` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The count of unique active users in the past thirty days |"]]