# QueryApiMetricsRequest

- [JSON representation](https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/QueryApiMetricsRequest#SCHEMA_REPRESENTATION)

The \[QueryApiMetrics\]\[InsightsService.QueryApiMetricsRequest\] method's request.

| JSON representation |
|---|
| ``` { "parent": string, "dimensions": [ string ], "metrics": [ { object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/InsightsMetric`) } ], "filter": string } ``` |

| Fields ||
|---|---|
| `parent` | `string` Required. The parent resource name. Format: `projects/{project}/locations/{location}`. |
| `dimensions[]` | `string` Optional. List of dimension names for which metrics needs to be fetched. The dimensions we support for querying insights on API resource type are: \* targetUser.enum_values.values.display_name \* businessUnit.enum_values.values.display_name \* team.enum_values.values.display_name \* maturityLevel.enum_values.values.display_name \* apiStyle.enum_values.values.display_name |
| `metrics[]` | ``object (`https://docs.cloud.google.com/apigee/docs/reference/apis/apihub/rest/v1/InsightsMetric`)`` Required. List of metrics and their aggregations. The only metric supported right now is apiId. |
| `filter` | `string` Optional. The filter expression to be used for filtering the API resources. The fields we support for filtering are: \* `displayName` - The display name of the ApiResource. Allowed comparison operators: `=`. \* `owner.email` - The email of the team which owns the ApiResource. Allowed comparison operators: `=`. \* `createTime` - The time at which the ApiResource was created. The value should be in the (RFC3339)\[https://tools.ietf.org/html/rfc3339\] format. Allowed comparison operators: `>` and `<`. \* `targetUser.enum_values.values.id` - The allowed value id of the target users attribute associated with the ApiResource. Allowed comparison operator is `:`. \* `targetUser.enum_values.values.display_name` - The allowed value display name of the target users attribute associated with the ApiResource. Allowed comparison operator is `:`. \* `team.enum_values.values.id` - The allowed value id of the team attribute associated with the ApiResource. Allowed comparison operator is `:`. \* `team.enum_values.values.display_name` - The allowed value display name of the team attribute associated with the ApiResource. Allowed comparison operator is `:`. \* `businessUnit.enum_values.values.id` - The allowed value id of the business unit attribute associated with the ApiResource. Allowed comparison operator is `:`. \* `businessUnit.enum_values.values.display_name` - The allowed value display name of the business unit attribute associated with the ApiResource. Allowed comparison operator is `:`. \* `maturityLevel.enum_values.values.id` - The allowed value id of the maturity level attribute associated with the ApiResource. Allowed comparison operator is `:`. \* `maturityLevel.enum_values.values.display_name` - The allowed value display name of the maturity level attribute associated with the ApiResource. Allowed comparison operator is `:`. \* `apiStyle.enum_values.values.id` - The allowed value id of the api style attribute associated with the ApiResource. Allowed comparison operator is `:`. \* `apiStyle.enum_values.values.display_name` - The allowed value display name of the api style attribute associated with the ApiResource. Allowed comparison operator is `:`. \* `version_count` - The number of versions associated with the ApiResource. Allowed comparison operator is `=`. \* `deployment_count` - The number of deployments associated with the ApiResource. Allowed comparison operator is `=`. \* `specCount` - The number of specs associated with the ApiResource. Allowed comparison operator is `=`. |