Method: stats.index.datasources.get
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Recupera le statistiche degli elementi indicizzati per una singola origine dati.
Nota:per l'esecuzione di questa API è necessario un account utente finale standard.
Richiesta HTTP
GET https://cloudsearch.googleapis.com/v1/stats/index/{name=datasources/*}
L'URL utilizza la sintassi di transcodifica gRPC.
Parametri del percorso
Parametri |
name |
string
L'ID risorsa dell'origine dati per cui recuperare le statistiche, nel seguente formato: "datasources/{sourceId}"
|
Parametri di query
Parametri |
fromDate |
object (Date )
Data di inizio dell'intervallo di date per cui recuperare le statistiche, nel fuso orario PST. Questo valore deve essere compreso entro un anno dalla data corrente. Le date fromDate e toDate possono essere uguali per fornire statistiche relative a un singolo giorno. Se sia fromDate sia toDate sono impostati sul giorno corrente, vengono restituite le statistiche in tempo reale per il giorno corrente. Nota: le richieste di statistiche in tempo reale da origini dati di grandi dimensioni sono costose e hanno una latenza elevata.
|
toDate |
object (Date )
Fine dell'intervallo di date per cui ricevere le statistiche, in PST. Questo valore deve essere compreso entro un anno dalla data corrente. Se viene impostata sulla data corrente, vengono restituite le statistiche in tempo reale. Nota: le richieste di statistiche in tempo reale da origini dati di grandi dimensioni sono costose e hanno una latenza elevata. Le date fromDate e toDate possono essere uguali per fornire statistiche relative a un singolo giorno. Se sia fromDate sia toDate sono impostati sul giorno corrente, vengono restituite le statistiche in tempo reale per il giorno corrente.
|
Corpo della richiesta
Il corpo della richiesta deve essere vuoto.
Corpo della risposta
In caso di esito positivo, il corpo della risposta contiene un'istanza di GetDataSourceIndexStatsResponse
.
Ambiti di autorizzazione
Richiede uno dei seguenti ambiti 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
Per ulteriori informazioni, consulta la Guida all'autorizzazione.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-25 UTC.
[null,null,["Ultimo aggiornamento 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)."]]