Method: stats.index.datasources.get
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Mendapatkan statistik item yang diindeks untuk satu sumber data.
Catatan: API ini memerlukan akun pengguna akhir standar untuk dieksekusi.
Permintaan HTTP
GET https://cloudsearch.googleapis.com/v1/stats/index/{name=datasources/*}
URL menggunakan sintaksis gRPC Transcoding.
Parameter jalur
Parameter |
name |
string
ID resource sumber data yang statistiknya akan diambil, dalam format berikut: "datasources/{sourceId}"
|
Parameter kueri
Parameter |
fromDate |
object (Date )
Awal rentang tanggal untuk mengambil statistik, dalam PST. Nilai ini harus dalam 1 tahun dari tanggal saat ini. fromDate dan toDate dapat sama untuk memberikan statistik selama satu hari. Jika fromDate dan toDate ditetapkan ke hari ini, statistik real-time akan ditampilkan untuk hari ini. Catatan: Permintaan statistik real-time dari sumber data besar mahal dan memiliki latensi tinggi.
|
toDate |
object (Date )
Akhir rentang tanggal untuk menerima statistik, dalam PST. Nilai ini harus dalam 1 tahun dari tanggal saat ini. Jika ditetapkan ke tanggal saat ini, statistik real-time akan ditampilkan. Catatan: Permintaan statistik real-time dari sumber data besar mahal dan memiliki latensi tinggi. fromDate dan toDate dapat sama untuk memberikan statistik selama satu hari. Jika fromDate dan toDate ditetapkan ke hari ini, statistik real-time akan ditampilkan untuk hari ini.
|
Isi permintaan
Isi permintaan harus kosong.
Isi respons
Jika berhasil, isi respons memuat instance GetDataSourceIndexStatsResponse
.
Cakupan otorisasi
Memerlukan salah satu cakupan OAuth berikut:
https://www.googleapis.com/auth/cloud_search.stats.indexing
https://www.googleapis.com/auth/cloud_search.stats
https://www.googleapis.com/auth/cloud_search
Untuk mengetahui informasi selengkapnya, lihat Panduan otorisasi.
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-25 UTC.
[null,null,["Terakhir diperbarui pada 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)."]]