- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- Try it!
Natural language based Insights which powers the next generation of dashboards in Insights. Next generation of locations.queryMetrics.
HTTP request
POST https://{endpoint}/v1/{location=projects/*/locations/*}:generativeInsights
Where {endpoint} is one of the supported service endpoints.
The URLs use gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
location |
Required. The location of the data. "projects/{project}/locations/{location}" |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "naturalLanguageQuery": string, "chart": string, "filter": string, "comparisonFilter": string, "sqlQuery": string, "sqlComparisonKey": string, "sessionId": string, "revisionId": string, "userProvidedChartSpec": { object }, "timeZone": string } |
| Fields | |
|---|---|
naturalLanguageQuery |
The natural language query specified by the user. If this field is specified, |
chart |
The full name of the chart resource this request corresponds to. Format: projects/{project}/locations/{location}/dashboards/{dashboard}/charts/{chart} |
filter |
Filter for the data that can be specified in addition to the natural language query. Users are encouraged to use this field to populate time-windows. |
comparisonFilter |
Optional. Filter for the data that can be specified in addition to the natural language query. This |
sqlQuery |
Optional. The SQL query specified by the user. This query must be in BigQuery SQL dialect. The |
sqlComparisonKey |
Optional. For charts with comparison, this key will determine the metric that will be compared between the current and another dataset. |
sessionId |
Optional. The session id of the conversation. If the session id is not specified, backend will generate a random session id. If the session id is specified, will associate user-provided userQuery with the provided session id. |
revisionId |
Optional. The revision id that maps to the state of the chart state revision. When specified, the backend will reload the chart with the sql and visual spec from that revision. |
userProvidedChartSpec |
Optional. The user provided chart spec for the chart. This will be used to override the visual spec generated by the LLM. |
timeZone |
Optional. The time zone name from the IANA Time Zone Database (for example, |
Response body
If successful, the response body contains an instance of Operation.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permissions on the location resource:
contactcenterinsights.authorizedConversations.listcontactcenterinsights.conversations.list
For more information, see the IAM documentation.