---
title: "POST /v1/{+location}:queryMetrics"
method: POST
path: "/v1/{+location}:queryMetrics"
tags: ["projects"]
---

# POST /v1/{+location}:queryMetrics

`POST /v1/{+location}:queryMetrics`

Query metrics.

## Path parameters

- `location` string, required

## Request body

- GoogleCloudContactcenterinsightsV1QueryMetricsRequest — The request for querying metrics.
  - `filter` string — Required. Filter to select a subset of conversations to compute the metrics. Must specify a window of the conversation create time to compute the metrics. The returned metrics will be from the range [DATE(starting create time), DATE(ending create time)).
  - `timeGranularity` 'TIME_GRANULARITY_UNSPECIFIED' | 'NONE' | 'DAILY' | 'HOURLY' | 'PER_MINUTE' | 'PER_5_MINUTES' | 'MONTHLY' — The time granularity of each data point in the time series. Defaults to NONE if this field is unspecified.
  - `dimensions` GoogleCloudContactcenterinsightsV1Dimension[] — The dimensions that determine the grouping key for the query. Defaults to no dimension if this field is unspecified. If a dimension is specified, its key must also be specified. Each dimension's key must be unique. If a time granularity is also specified, metric values in the dimension will be bucketed by this granularity. Up to one dimension is supported for now.
    - `labelDimensionMetadata` GoogleCloudContactcenterinsightsV1DimensionLabelDimensionMetadata — Metadata about conversation labels.
      - `labelValue` string — Optional. The label value.
      - `labelKey` string — Optional. The label key.
    - `qaQuestionDimensionMetadata` GoogleCloudContactcenterinsightsV1DimensionQaQuestionDimensionMetadata — Metadata about the QA question dimension.
      - `qaScorecardId` string — Optional. The QA scorecard ID.
      - `qaQuestionId` string — Optional. The QA question ID.
      - `questionBody` string — Optional. The full body of the question.
    - `conversationalAgentsPlaybookDimensionMetadata` GoogleCloudContactcenterinsightsV1DimensionConversationalAgentsPlaybookDimensionMetadata — Metadata about the Conversational Agents playbook dimension.
      - `playbookId` string — Optional. The dialogflow playbook ID.
      - `playbookDisplayName` string — Optional. The dialogflow playbook display name.
    - `dimensionKey` 'DIMENSION_KEY_UNSPECIFIED' | 'ISSUE' | 'ISSUE_NAME' | 'AGENT' | 'AGENT_TEAM' | 'QA_QUESTION_ID' | 'QA_QUESTION_ANSWER_VALUE' | 'QA_SCORECARD_ID' | 'CONVERSATION_PROFILE_ID' | 'MEDIUM' | 'CONVERSATIONAL_AGENTS_PLAYBOOK_ID' | 'CONVERSATIONAL_AGENTS_PLAYBOOK_NAME' | 'CONVERSATIONAL_AGENTS_TOOL_ID' | 'CONVERSATIONAL_AGENTS_TOOL_NAME' | 'CLIENT_SENTIMENT_CATEGORY' | 'AGENT_VERSION_ID' | 'AGENT_DEPLOYMENT_ID' | 'AGENT_ASSIST_SUPERVISOR_ID' | 'LABEL_KEY' | 'LABEL_VALUE' | 'LABEL_KEY_AND_VALUE' | 'LAST_TRANSFER_SUB_AGENT_NAME' — The key of the dimension.
    - `conversationProfileDimensionMetadata` GoogleCloudContactcenterinsightsV1DimensionConversationProfileDimensionMetadata — Metadata about the conversation profile dimension.
      - `conversationProfileId` string — Optional. The conversation profile ID.
    - `mediumDimensionMetadata` GoogleCloudContactcenterinsightsV1DimensionMediumDimensionMetadata — Metadata about the conversation medium dimension.
      - `medium` string — Optional. The conversation medium. Currently supports : PHONE_CALL, CHAT.
    - `qaQuestionAnswerDimensionMetadata` GoogleCloudContactcenterinsightsV1DimensionQaQuestionAnswerDimensionMetadata — Metadata about the QA question-answer dimension. This is useful for showing the answer distribution for questions for a given scorecard.
      - `qaQuestionId` string — Optional. The QA question ID.
      - `questionBody` string — Optional. The full body of the question.
      - `qaScorecardId` string — Optional. The QA scorecard ID.
      - `answerValue` string — Optional. The full body of the question.
    - `agentDimensionMetadata` GoogleCloudContactcenterinsightsV1DimensionAgentDimensionMetadata — Metadata about the agent dimension.
      - `agentDisplayName` string — Optional. The agent's name This will be populated for AGENT, AGENT_TEAM, AGENT_VERSION_ID, and AGENT_DEPLOYMENT_ID dimensions.
      - `agentVersionId` string — Optional. The agent's version ID. Only applicable to automated agents. This will be populated for AGENT_VERSION_ID, and AGENT_DEPLOYMENT_ID dimensions.
      - `agentDeploymentId` string — Optional. The agent's deployment ID. Only applicable to automated agents. This will be populated for AGENT and AGENT_DEPLOYMENT_ID dimensions.
      - `agentId` string — Optional. A user-specified string representing the agent. This will be populated for AGENT, AGENT_TEAM, AGENT_VERSION_ID, and AGENT_DEPLOYMENT_ID dimensions.
      - `agentTeam` string — Optional. A user-specified string representing the agent's team.
      - `agentVersionDisplayName` string — Optional. The agent's version display name. Only applicable to automated agents. This will be populated for AGENT_VERSION_ID, and AGENT_DEPLOYMENT_ID dimensions.
      - `agentDeploymentDisplayName` string — Optional. The agent's deployment display name. Only applicable to automated agents. This will be populated for AGENT_DEPLOYMENT_ID dimensions.
    - `qaScorecardDimensionMetadata` GoogleCloudContactcenterinsightsV1DimensionQaScorecardDimensionMetadata — Metadata about the QA scorecard dimension.
      - `qaScorecardId` string — Optional. The QA scorecard ID.
    - `conversationalAgentsToolDimensionMetadata` GoogleCloudContactcenterinsightsV1DimensionConversationalAgentsToolDimensionMetadata — Metadata about the Conversational Agents tool dimension.
      - `toolId` string — Optional. The dialogflow tool ID.
      - `toolDisplayName` string — Optional. The dialogflow tool display name.
    - `issueDimensionMetadata` GoogleCloudContactcenterinsightsV1DimensionIssueDimensionMetadata — Metadata about the issue dimension.
      - `issueId` string — The issue ID.
      - `issueDisplayName` string — The issue display name.
      - `issueModelId` string — The parent issue model ID.
    - `clientSentimentCategoryDimensionMetadata` GoogleCloudContactcenterinsightsV1DimensionClientSentimentCategoryDimensionMetadata — Metadata about the client sentiment category dimension.
      - `sentimentCategory` string — Optional. The client sentiment category.
  - `measureMask` string, google-fieldmask — Measures to return. Defaults to all measures if this field is unspecified. A valid mask should traverse from the `measure` field from the response. For example, a path from a measure mask to get the conversation count is "conversation_measure.count".

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/contactcenterinsights.md) · [All operations](https://skmtc.net/google/apis/contactcenterinsights/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/contactcenterinsights/versions/e071ddf4dfc3/schema)
