# Method: locations.businesscallsinsights.list

- [HTTP request](https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#body.PATH_PARAMETERS)
- [Query parameters](https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#body.request_body)
- [Response body](https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#body.response_body)
  - [JSON representation](https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#body.ListBusinessCallsInsightsResponse.SCHEMA_REPRESENTATION)
- [Authorization Scopes](https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#body.aspect)
- [BusinessCallsInsights](https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#BusinessCallsInsights)
  - [JSON representation](https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#BusinessCallsInsights.SCHEMA_REPRESENTATION)
- [MetricType](https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#MetricType)
- [AggregateMetrics](https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#AggregateMetrics)
  - [JSON representation](https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#AggregateMetrics.SCHEMA_REPRESENTATION)
- [HourlyMetrics](https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#HourlyMetrics)
  - [JSON representation](https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#HourlyMetrics.SCHEMA_REPRESENTATION)
- [WeekDayMetrics](https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#WeekDayMetrics)
  - [JSON representation](https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#WeekDayMetrics.SCHEMA_REPRESENTATION)
- [DayOfWeek](https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#DayOfWeek)
- [Date](https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#Date)
  - [JSON representation](https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#Date.SCHEMA_REPRESENTATION)

Returns insights for Business calls for a location.

### HTTP request

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

The URL uses [gRPC Transcoding](https://google.aip.dev/127) 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 (`https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#BusinessCallsInsights`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `businessCallsInsights[]` | ``object (`https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#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](https://developers.google.com/identity/protocols/OAuth2).

## BusinessCallsInsights

Insights for calls made to a location.

| JSON representation |
|---|
| ``` { "name": string, "metricType": enum (`https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#MetricType`), "aggregateMetrics": { object (`https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#AggregateMetrics`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` Required. The resource name of the calls insights. Format: locations/{location}/businesscallsinsights |
| `metricType` | ``enum (`https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#MetricType`)`` The metric for which the value applies. |
| `aggregateMetrics` | ``object (`https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#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 (`https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#HourlyMetrics`) } ], "weekdayMetrics": [ { object (`https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#WeekDayMetrics`) } ], "startDate": { object (`https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#Date`) }, "endDate": { object (`https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#Date`) } } ``` |

| Fields ||
|---|---|
| `missedCallsCount` | `integer` Total count of missed calls. |
| `answeredCallsCount` | `integer` Total count of answered calls. |
| `hourlyMetrics[]` | ``object (`https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#HourlyMetrics`)`` A list of metrics by hour of day. |
| `weekdayMetrics[]` | ``object (`https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#WeekDayMetrics`)`` A list of metrics by day of week. |
| `startDate` | ``object (`https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#Date`)`` Date for this metric. If metric is monthly, only year and month are used. |
| `endDate` | ``object (`https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#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 (`https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#DayOfWeek`), "missedCallsCount": integer } ``` |

| Fields ||
|---|---|
| `day` | ``enum (`https://developers.google.com/my-business/reference/businesscalls/rest/v1/locations.businesscallsinsights/list#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. |