Method: stats.index.datasources.get

Gets indexed item statistics for a single data source.

Note: This API requires a standard end user account to execute.

HTTP request

GET https://cloudsearch.googleapis.com/v1/stats/index/{name=datasources/*}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

The resource id of the data source to retrieve statistics for, in the following format: "datasources/{sourceId}"

Query parameters

Parameters
fromDate

object (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.

toDate

object (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.

Request body

The request body must be empty.

Response body

If successful, the response body contains an instance of GetDataSourceIndexStatsResponse.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud_search.stats.indexing
  • https://www.googleapis.com/auth/cloud_search.stats
  • https://www.googleapis.com/auth/cloud_search

For more information, see the Authorization guide.