- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization Scopes
- BusinessCallsInsights
- MetricType
- AggregateMetrics
- HourlyMetrics
- WeekDayMetrics
- DayOfWeek
- Date
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 |
Required. The parent location to fetch calls insights for. Format: locations/{locationId} |
Query parameters
Parameters | |
---|---|
pageSize |
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 |
Optional. A page token, received from a previous When paginating, all other parameters provided to |
filter |
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 ( |
Fields | |
---|---|
businessCallsInsights[] |
A collection of business calls insights for the location. |
nextPageToken |
A token, which can be sent as |
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 ( |
Fields | |
---|---|
name |
Required. The resource name of the calls insights. Format: locations/{location}/businesscallsinsights |
metricType |
The metric for which the value applies. |
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 ( |
Fields | |
---|---|
missedCallsCount |
Total count of missed calls. |
answeredCallsCount |
Total count of answered calls. |
hourlyMetrics[] |
A list of metrics by hour of day. |
weekdayMetrics[] |
A list of metrics by day of week. |
startDate |
Date for this metric. If metric is monthly, only year and month are used. |
endDate |
End date for this metric. |
HourlyMetrics
Metrics for an hour.
JSON representation |
---|
{ "hour": integer, "missedCallsCount": integer } |
Fields | |
---|---|
hour |
Hour of the day. Allowed values are 0-23. |
missedCallsCount |
Total count of missed calls for this hour. |
WeekDayMetrics
Metrics for a week day.
JSON representation |
---|
{
"day": enum ( |
Fields | |
---|---|
day |
Day of the week. Allowed values are Sunday - Saturday. |
missedCallsCount |
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 |
Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. |
month |
Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. |
day |
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. |