Method: stats.index.datasources.get
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
الحصول على إحصاءات العناصر المفهرَسة لمصدر بيانات واحد
ملاحظة: تتطلّب واجهة برمجة التطبيقات هذه حساب مستخدم نهائي عادي لتنفيذها.
طلب HTTP
GET https://cloudsearch.googleapis.com/v1/stats/index/{name=datasources/*}
يستخدِم عنوان URL بنية تحويل ترميز gRPC.
مَعلمات المسار
المعلمات |
name |
string
معرّف المورد لمصدر البيانات الذي تريد استرداد الإحصاءات له، بالتنسيق التالي: "datasources/{sourceId}"
|
مَعلمات طلب البحث
المعلمات |
fromDate |
object (Date )
بداية النطاق الزمني لاسترداد الإحصاءات، بالتوقيت الرسمي لمنطقة المحيط الهادئ يجب أن تكون هذه القيمة خلال عام واحد من التاريخ الحالي. يمكن أن يكون تاريخَا fromDate وtoDate متطابقَين لتقديم إحصاءات ليوم واحد. في حال ضبط كلّ من fromDate وtoDate على اليوم الحالي، يتم عرض الإحصاءات في الوقت الفعلي لليوم الحالي. ملاحظة: إنّ طلبات الإحصاءات في الوقت الفعلي من مصادر بيانات كبيرة تكون باهظة الثمن وتتطلّب وقت استجابة طويلاً.
|
toDate |
object (Date )
نهاية النطاق الزمني الذي يتم تلقّي الإحصاءات عنه، بتوقيت المحيط الهادئ يجب أن تكون هذه القيمة خلال عام واحد من التاريخ الحالي. في حال ضبطها على التاريخ الحالي، يتم عرض الإحصاءات في الوقت الفعلي. ملاحظة: إنّ طلبات الإحصاءات في الوقت الفعلي من مصادر بيانات كبيرة تكون باهظة الثمن وتتطلّب وقت استجابة طويلاً. يمكن أن يكون تاريخَا 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 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة 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)."]]