Method: stats.getIndex
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
รับสถิติรายการที่จัดทําดัชนีซึ่งรวบรวมจากแหล่งข้อมูลทั้งหมด API นี้จะแสดงเฉพาะสถิติของวันที่ก่อนหน้า โดยไม่แสดงสถิติของวันปัจจุบัน
หมายเหตุ: API นี้ต้องใช้บัญชีผู้ใช้ปลายทางมาตรฐานเพื่อดำเนินการ
คำขอ HTTP
GET https://cloudsearch.googleapis.com/v1/stats/index
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์การค้นหา
พารามิเตอร์ |
fromDate |
object (Date )
จุดเริ่มต้นของช่วงวันที่ที่จะดึงข้อมูลสถิติ ค่านี้ต้องอยู่ภายใน 1 ปีนับจากวันที่ปัจจุบัน
|
toDate |
object (Date )
จุดสิ้นสุดของช่วงวันที่ที่จะดึงข้อมูลสถิติ ค่านี้ต้องอยู่ในช่วง 1 ปีนับจากวันที่ปัจจุบันและมากกว่า fromDate
|
เนื้อหาของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
การแสดง JSON |
{
"stats": [
{
object (CustomerIndexStats )
}
],
"averageIndexedItemCount": string
} |
ช่อง |
stats[] |
object (CustomerIndexStats )
สรุปจำนวนรายการที่จัดทําดัชนีแล้ว 1 รายการต่อวันในช่วงที่ขอ
|
averageIndexedItemCount |
string (int64 format)
จํานวนรายการโดยเฉลี่ยในช่วงวันที่ที่เรียกเก็บเงิน
|
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต 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
ดูข้อมูลเพิ่มเติมได้ที่คู่มือการให้สิทธิ์
CustomerIndexStats
การรวมรายการตามรหัสสถานะ ณ วันที่ที่ระบุ
ช่อง |
date |
object (Date )
วันที่คํานวณสถิติ
|
itemCountByStatus[] |
object (ItemCountByStatus )
จํานวนสินค้าที่รวบรวมตามรหัสสถานะ
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[],[],null,["# Method: stats.getIndex\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.GetCustomerIndexStatsResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [CustomerIndexStats](#CustomerIndexStats)\n - [JSON representation](#CustomerIndexStats.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nGets indexed item statistics aggreggated across all data sources. This API only returns statistics for previous dates; it doesn't return statistics for the current day.\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`\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)`)` Start of the date range to retrieve statistics for. This value must be within 1 year of the current date. |\n| `toDate` | `object (`[Date](/workspace/cloud-search/docs/reference/rest/v1/Date)`)` End of the date range to retrieve statistics for. This value must be within 1 year of the current date and greater than fromDate. |\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/getIndex#CustomerIndexStats) } ], \"averageIndexedItemCount\": string } ``` |\n\n| Fields ||\n|---------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `stats[]` | `object (`[CustomerIndexStats](/workspace/cloud-search/docs/reference/rest/v1/stats/getIndex#CustomerIndexStats)`)` Summary of indexed item counts, one for each day in the requested range. |\n| `averageIndexedItemCount` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Average item count for the given date range for which billing is done. |\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\nCustomerIndexStats\n------------------\n\nAggregation of items by status code as of the specified date.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"date\": { object (/workspace/cloud-search/docs/reference/rest/v1/Date) }, \"itemCountByStatus\": [ { object (/workspace/cloud-search/docs/reference/rest/v1/stats.index.datasources#ItemCountByStatus) } ] } ``` |\n\n| Fields ||\n|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `date` | `object (`[Date](/workspace/cloud-search/docs/reference/rest/v1/Date)`)` The date for which statistics were calculated. |\n| `itemCountByStatus[]` | `object (`[ItemCountByStatus](/workspace/cloud-search/docs/reference/rest/v1/stats.index.datasources#ItemCountByStatus)`)` Number of items aggregrated by status code. |"]]