Method: stats.index.datasources.get
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
הצגת נתונים סטטיסטיים של פריטים שנוספו לאינדקס עבור מקור נתונים יחיד.
הערה: כדי להפעיל את ה-API הזה, נדרש חשבון משתמש קצה רגיל.
בקשת HTTP
GET https://cloudsearch.googleapis.com/v1/stats/index/{name=datasources/*}
כתובת ה-URL משתמשת בתחביר של Transcoding של gRPC.
פרמטרים של נתיב
פרמטרים |
name |
string
מזהה המשאב של מקור הנתונים שעבורו רוצים לאחזר נתונים סטטיסטיים, בפורמט הבא: "datasources/{sourceId}"
|
פרמטרים של שאילתה
פרמטרים |
fromDate |
object (Date )
תאריך ההתחלה של טווח התאריכים שבו רוצים לאחזר נתונים סטטיסטיים, לפי שעון החוף המערבי (PST). הערך צריך להיות בטווח של שנה מהתאריך הנוכחי. אפשר להגדיר את fromDate ו-toDate כתאריכים זהים כדי לספק נתונים סטטיסטיים לגבי יום אחד. אם גם fromDate וגם toDate מוגדרים ליום הנוכחי, המערכת מחזירה נתונים סטטיסטיים בזמן אמת לגבי היום הנוכחי. הערה: בקשות לנתונים סטטיסטיים בזמן אמת ממקורות נתונים גדולים הן יקרות וזמן האחזור שלהן גבוה.
|
toDate |
object (Date )
תאריך הסיום של טווח התאריכים שבו רוצים לקבל נתונים סטטיסטיים, לפי שעון החוף המערבי (PST). הערך צריך להיות בטווח של שנה מהתאריך הנוכחי. אם מגדירים את התאריך הנוכחי, המערכת מחזירה נתונים סטטיסטיים בזמן אמת. הערה: בקשות לנתונים סטטיסטיים בזמן אמת ממקורות נתונים גדולים הן יקרות וזמן האחזור שלהן גבוה. אפשר להגדיר את 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 (שעון 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)."]]