Method: stats.getSession

获取搜索会话的数量、成功会话所占百分比以及客户的点击查询统计信息。

注意:执行此 API 需要标准的最终用户帐号。

HTTP 请求

GET https://cloudsearch.googleapis.com/v1/stats/session

网址采用 gRPC 转码语法。

查询参数

参数
fromDate

object (Date)

返回从 fromDate 到 toDate 的所有可用统计信息。fromDate 应在一年内,并且 toDate >= fromDate。

toDate

object (Date)

请求正文

请求正文必须为空。

响应正文

如果成功,响应正文将包含结构如下的数据:

JSON 表示法
{
  "stats": [
    {
      object (CustomerSessionStats)
    }
  ]
}
字段
stats[]

object (CustomerSessionStats)

授权范围

需要以下 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

有关详情,请参阅授权指南

CustomerSessionStats

JSON 表示法
{
  "date": {
    object (Date)
  },
  "searchSessionsCount": string
}
字段
date

object (Date)

计算会话统计信息的日期。统计数据在第二天(接近太平洋标准时间午夜)计算,然后返回。

searchSessionsCount

string (int64 format)

当日的搜索会话数