Method: stats.getSession
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
お客様の検索セッション数、クリック クエリ統計情報を含む成功したセッションの割合を取得します。
注: この API を実行するには、標準のエンドユーザー アカウントが必要です。
HTTP リクエスト
GET https://cloudsearch.googleapis.com/v1/stats/session
この URL は gRPC Transcoding 構文を使用します。
クエリ パラメータ
パラメータ |
fromDate |
object (Date )
fromDate から toDate までの利用可能なすべての統計情報が返されます。fromDate は 1 年以内にする必要があります。toDate は fromDate より大きくする必要があります。
|
toDate |
object (Date )
|
リクエストの本文
リクエストの本文は空にする必要があります。
レスポンスの本文
成功すると、レスポンスの本文に次の構造のデータが含まれます。
フィールド |
stats[] |
object (CustomerSessionStats )
|
認可スコープ
以下のいずれかの 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
詳しくは、認可ガイドをご覧ください。
CustomerSessionStats
JSON 表現 |
{
"date": {
object (Date )
},
"searchSessionsCount": string
} |
フィールド |
date |
object (Date )
セッション統計が計算された日付。統計情報は翌日、太平洋標準時の午前 0 時近くに計算され、返されます。
|
searchSessionsCount |
string (int64 format)
その日の検索セッション数
|
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[],[],null,["# Method: stats.getSession\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.GetCustomerSessionStatsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [CustomerSessionStats](#CustomerSessionStats)\n - [JSON representation](#CustomerSessionStats.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nGet the # of search sessions, % of successful sessions with a click query 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/session`\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/getSession#CustomerSessionStats) } ] } ``` |\n\n| Fields ||\n|-----------|---------------------------------------------------------------------------------------------------------------------------|\n| `stats[]` | `object (`[CustomerSessionStats](/workspace/cloud-search/docs/reference/rest/v1/stats/getSession#CustomerSessionStats)`)` |\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\nCustomerSessionStats\n--------------------\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------|\n| ``` { \"date\": { object (/workspace/cloud-search/docs/reference/rest/v1/Date) }, \"searchSessionsCount\": 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 are calculated on the following day, close to midnight PST, and then returned. |\n| `searchSessionsCount` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` The count of search sessions on the day |"]]