Method: stats.index.datasources.get
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Lấy số liệu thống kê về mục được lập chỉ mục cho một nguồn dữ liệu.
Lưu ý: API này yêu cầu tài khoản người dùng cuối tiêu chuẩn để thực thi.
Yêu cầu HTTP
GET https://cloudsearch.googleapis.com/v1/stats/index/{name=datasources/*}
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
name |
string
Mã tài nguyên của nguồn dữ liệu cần truy xuất số liệu thống kê, ở định dạng sau: "datasources/{sourceId}"
|
Tham số truy vấn
Thông số |
fromDate |
object (Date )
Ngày bắt đầu của phạm vi ngày để truy xuất số liệu thống kê, theo Giờ chuẩn Thái Bình Dương (PST). Giá trị này phải trong vòng 1 năm kể từ ngày hiện tại. fromDate và toDate có thể giống nhau để cung cấp số liệu thống kê cho một ngày. Nếu cả fromDate và toDate đều được đặt thành ngày hiện tại, thì số liệu thống kê theo thời gian thực sẽ được trả về cho ngày hiện tại. Lưu ý: Các yêu cầu về số liệu thống kê theo thời gian thực từ các nguồn dữ liệu lớn sẽ tốn kém và có độ trễ cao.
|
toDate |
object (Date )
Ngày kết thúc của phạm vi ngày để nhận số liệu thống kê, theo giờ chuẩn Thái Bình Dương. Giá trị này phải trong vòng 1 năm kể từ ngày hiện tại. Nếu bạn đặt thành ngày hiện tại, thì số liệu thống kê theo thời gian thực sẽ được trả về. Lưu ý: Các yêu cầu về số liệu thống kê theo thời gian thực từ các nguồn dữ liệu lớn sẽ tốn kém và có độ trễ cao. fromDate và toDate có thể giống nhau để cung cấp số liệu thống kê cho một ngày. Nếu cả fromDate và toDate đều được đặt thành ngày hiện tại, thì số liệu thống kê theo thời gian thực sẽ được trả về cho ngày hiện tại.
|
Nội dung yêu cầu
Nội dung yêu cầu phải trống.
Nội dung phản hồi
Nếu thành công, nội dung phản hồi sẽ chứa một phiên bản của GetDataSourceIndexStatsResponse
.
Phạm vi uỷ quyền
Yêu cầu một trong các phạm vi OAuth sau:
https://www.googleapis.com/auth/cloud_search.stats.indexing
https://www.googleapis.com/auth/cloud_search.stats
https://www.googleapis.com/auth/cloud_search
Để biết thêm thông tin, hãy xem Hướng dẫn uỷ quyền.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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)."]]