Method: stats.index.datasources.get
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
آمار موارد نمایه شده را برای یک منبع داده واحد دریافت می کند.
توجه: این API برای اجرا به یک حساب کاربری نهایی استاندارد نیاز دارد.
درخواست HTTP
GET https://cloudsearch.googleapis.com/v1/stats/index/{name=datasources/*}
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای مسیر
پارامترها |
---|
name | string شناسه منبع منبع داده برای بازیابی آمار، در قالب زیر: "datasources/{sourceId}" |
پارامترهای پرس و جو
پارامترها |
---|
fromDate | object ( Date ) شروع محدوده تاریخ برای بازیابی آمار در PST. این مقدار باید در عرض 1 سال از تاریخ جاری باشد. fromDate و toDate می توانند برای ارائه آمار برای یک روز یکسان باشند. اگر هر دو fromDate و toDate روی روز جاری تنظیم شده باشند، آمار بلادرنگ برای روز جاری برگردانده می شود. توجه: درخواستها برای آمار بلادرنگ از منابع داده بزرگ گران هستند و تاخیر بالایی دارند. |
toDate | object ( Date ) پایان محدوده تاریخ برای دریافت آمار، در PST. این مقدار باید در عرض 1 سال از تاریخ جاری باشد. اگر روی تاریخ فعلی تنظیم شود، آمار بلادرنگ برگردانده می شود. توجه: درخواستها برای آمار بلادرنگ از منابع داده بزرگ گران هستند و تاخیر بالایی دارند. fromDate و toDate می توانند برای ارائه آمار برای یک روز یکسان باشند. اگر هر دو 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
برای اطلاعات بیشتر، به راهنمای مجوز مراجعه کنید.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[],[],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)."]]