Method: stats.index.datasources.get
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Tek bir veri kaynağı için dizine eklenen öğe istatistiklerini alır.
Not: Bu API'nin çalıştırılması için standart bir son kullanıcı hesabı gerekir.
HTTP isteği
GET https://cloudsearch.googleapis.com/v1/stats/index/{name=datasources/*}
URL, gRPC Kod Dönüştürme söz dizimini kullanır.
Yol parametreleri
Parametreler |
name |
string
İstatistikleri alınacağı veri kaynağının kaynak kimliği. Şu biçimde: "datasources/{sourceId}"
|
Sorgu parametreleri
Parametreler |
fromDate |
object (Date )
İstatistikleri alınacağı tarih aralığının başlangıcı (PST). Bu değer, geçerli tarihten itibaren 1 yıl içinde olmalıdır. Tek bir güne ait istatistikler sağlamak için fromDate ve toDate aynı olabilir. Hem fromDate hem de toDate geçerli güne ayarlanırsa geçerli gün için gerçek zamanlı istatistikler döndürülür. Not: Büyük veri kaynaklarından alınan gerçek zamanlı istatistik istekleri pahalıdır ve yüksek gecikmeye sahiptir.
|
toDate |
object (Date )
İstatistikleri almak istediğiniz tarih aralığının bitiş tarihi (PST). Bu değer, geçerli tarihten itibaren 1 yıl içinde olmalıdır. Geçerli tarihe ayarlanırsa gerçek zamanlı istatistikler döndürülür. Not: Büyük veri kaynaklarından alınan gerçek zamanlı istatistik istekleri pahalıdır ve yüksek gecikmeye sahiptir. Tek bir güne ait istatistikler sağlamak için fromDate ve toDate aynı olabilir. Hem fromDate hem de toDate geçerli güne ayarlanırsa geçerli gün için gerçek zamanlı istatistikler döndürülür.
|
İstek içeriği
İstek metni boş olmalıdır.
Yanıt metni
Başarılıysa yanıt metni, GetDataSourceIndexStatsResponse
öğesinin bir örneğini içerir.
Yetkilendirme kapsamları
Aşağıdaki OAuth kapsamlarından birini gerektirir:
https://www.googleapis.com/auth/cloud_search.stats.indexing
https://www.googleapis.com/auth/cloud_search.stats
https://www.googleapis.com/auth/cloud_search
Daha fazla bilgi için Yetkilendirme kılavuzuna bakın.
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-25 UTC.
[null,null,["Son güncelleme tarihi: 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)."]]