Method: stats.index.datasources.get
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
単一のデータソースのインデックス登録済みアイテムの統計情報を取得します。
注: この API を実行するには、標準のエンドユーザー アカウントが必要です。
HTTP リクエスト
GET https://cloudsearch.googleapis.com/v1/stats/index/{name=datasources/*}
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
name |
string
統計情報を取得するデータソースのリソース ID。形式は「datasources/{sourceId}」です。
|
クエリ パラメータ
パラメータ |
fromDate |
object (Date )
統計情報を取得する期間の開始日(PST)。この値は、現在の日付から 1 年以内である必要があります。 fromDate と toDate を同じにすると、1 日分の統計情報を取得できます。fromDate と toDate の両方が当日に設定されている場合、当日のリアルタイム統計情報が返されます。注: 大規模なデータソースからのリアルタイム統計情報のリクエストは費用が高く、レイテンシも高くなります。
|
toDate |
object (Date )
統計情報を取得する期間の終了日(太平洋標準時)。この値は、現在の日付から 1 年以内である必要があります。現在の日付に設定すると、リアルタイムの統計情報が返されます。注: 大規模なデータソースからのリアルタイム統計情報のリクエストは費用が高く、レイテンシも高くなります。 fromDate と toDate を同じにすると、1 日分の統計情報を取得できます。fromDate と toDate の両方が当日に設定されている場合、当日のリアルタイム統計情報が返されます。
|
リクエストの本文
リクエストの本文は空にする必要があります。
レスポンスの本文
成功した場合、レスポンスの本文には GetDataSourceIndexStatsResponse
のインスタンスが含まれます。
認可スコープ
以下のいずれかの 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
詳しくは、認可ガイドをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[],[],null,["# Method: stats.index.datasources.get\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nGets indexed item statistics for a single data source.\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/index/{name=datasources/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|---------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` The resource id of the data source to retrieve statistics for, in the following format: \"datasources/{sourceId}\" |\n\n### Query parameters\n\n| Parameters ||\n|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `fromDate` | `object (`[Date](/workspace/cloud-search/docs/reference/rest/v1/Date)`)` Start of the date range to retrieve statistics for, in PST. This value must be within 1 year of the current date. The fromDate and toDate can be the same to provide statistics for a single day. If both fromDate and toDate are set to the current day, real-time statistics are returned for the current day. Note: Requests for real-time stats from large data sources are expensive and have high latency. |\n| `toDate` | `object (`[Date](/workspace/cloud-search/docs/reference/rest/v1/Date)`)` End of the date range to receive statistics for, in PST. This value must be within 1 year of the current date. If set to the current date, real-time statistics are returned. Note: Requests for real-time stats from large data sources are expensive and have high latency. The fromDate and toDate can be the same to provide statistics for a single day. If both fromDate and toDate are set to the current day, real-time statistics are returned for the current day. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [GetDataSourceIndexStatsResponse](/workspace/cloud-search/docs/reference/rest/v1/stats.index.datasources#GetDataSourceIndexStatsResponse).\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)."]]