Method: locations.businesscallsinsights.list

Returns insights for Business calls for a location.

HTTP request

GET https://mybusinessbusinesscalls.googleapis.com/v1/{parent=locations/*}/businesscallsinsights

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The parent location to fetch calls insights for. Format: locations/{locationId}

Query parameters

Parameters
pageSize

integer

Optional. The maximum number of BusinessCallsInsights to return. If unspecified, at most 20 will be returned. Some of the metric_types(e.g, AGGREGATE_COUNT) returns a single page. For these metrics, the pageSize is ignored.

pageToken

string

Optional. A page token, received from a previous businesscallsinsights.list call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to businesscallsinsights.list must match the call that provided the page token. Some of the metric_types (e.g, AGGREGATE_COUNT) returns a single page. For these metrics, the pake_token is ignored.

filter

string

Optional. A filter constraining the calls insights to return. The response includes only entries that match the filter.

If the MetricType is not provided, AGGREGATE_COUNT is returned. If no endDate is provided, the last date for which data is available is used. If no startDate is provided, we will default to the first date for which data is available, which is currently 6 months. If startDate is before the date when data is available, data is returned starting from the date when it is available.

At this time we support following filters. 1. startDate="DATE" where date is in YYYY-MM-DD format. 2. endDate="DATE" where date is in YYYY-MM-DD format. 3. metricType=XYZ where XYZ is a valid MetricType. 4. Conjunctions(AND) of all of the above. e.g., "startDate=2021-08-01 AND endDate=2021-08-10 AND metricType=AGGREGATE_COUNT" The AGGREGATE_COUNT metricType ignores the DD part of the date.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

Response message for businesscallsinsights.list.

JSON representation
{
  "businessCallsInsights": [
    {
      object (BusinessCallsInsights)
    }
  ],
  "nextPageToken": string
}
Fields
businessCallsInsights[]

object (BusinessCallsInsights)

A collection of business calls insights for the location.

nextPageToken

string

A token, which can be sent as pageToken to retrieve the next page. If this field is omitted, there are no subsequent pages. Some of the metric_types (e.g, AGGREGATE_COUNT) returns a single page. For these metrics, the nextPageToken will be empty.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

BusinessCallsInsights

Insights for calls made to a location.

JSON representation
{
  "name": string,
  "metricType": enum (MetricType),
  "aggregateMetrics": {
    object (AggregateMetrics)
  }
}
Fields
name

string

Required. The resource name of the calls insights. Format: locations/{location}/businesscallsinsights

metricType

enum (MetricType)

The metric for which the value applies.

aggregateMetrics

object (AggregateMetrics)

Metric for the time range based on startDate and endDate.

MetricType

The type of metric.

Enums
METRIC_TYPE_UNSPECIFIED Type of metric is unspecified.
AGGREGATE_COUNT The metrics provided are counts aggregated over the input time_range.

AggregateMetrics

Metrics aggregated over the input time range.

JSON representation
{
  "missedCallsCount": integer,
  "answeredCallsCount": integer,
  "hourlyMetrics": [
    {
      object (HourlyMetrics)
    }
  ],
  "weekdayMetrics": [
    {
      object (WeekDayMetrics)
    }
  ],
  "startDate": {
    object (Date)
  },
  "endDate": {
    object (Date)
  }
}
Fields
missedCallsCount

integer

Total count of missed calls.

answeredCallsCount

integer

Total count of answered calls.

hourlyMetrics[]

object (HourlyMetrics)

A list of metrics by hour of day.

weekdayMetrics[]

object (WeekDayMetrics)

A list of metrics by day of week.

startDate

object (Date)

Date for this metric. If metric is monthly, only year and month are used.

endDate

object (Date)

End date for this metric.

HourlyMetrics

Metrics for an hour.

JSON representation
{
  "hour": integer,
  "missedCallsCount": integer
}
Fields
hour

integer

Hour of the day. Allowed values are 0-23.

missedCallsCount

integer

Total count of missed calls for this hour.

WeekDayMetrics

Metrics for a week day.

JSON representation
{
  "day": enum (DayOfWeek),
  "missedCallsCount": integer
}
Fields
day

enum (DayOfWeek)

Day of the week. Allowed values are Sunday - Saturday.

missedCallsCount

integer

Total count of missed calls for this hour.

DayOfWeek

Represents a day of the week.

Enums
DAY_OF_WEEK_UNSPECIFIED The day of the week is unspecified.
MONDAY Monday
TUESDAY Tuesday
WEDNESDAY Wednesday
THURSDAY Thursday
FRIDAY Friday
SATURDAY Saturday
SUNDAY Sunday

Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following:

  • A full date, with non-zero year, month, and day values
  • A month and day, with a zero year (e.g., an anniversary)
  • A year on its own, with a zero month and a zero day
  • A year and month, with a zero day (e.g., a credit card expiration date)

Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp

JSON representation
{
  "year": integer,
  "month": integer,
  "day": integer
}
Fields
year

integer

Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.

month

integer

Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.

day

integer

Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.