Contact Center AI Insights API . projects . locations . dashboards . charts

Instance Methods

close()

Close httplib2 connections.

create(parent, body=None, chartId=None, x__xgafv=None)

Creates a Chart.

delete(name, x__xgafv=None)

Deletes a Chart.

get(name, x__xgafv=None)

Gets a Chart.

list(parent, x__xgafv=None)

Lists Charts.

patch(name, body=None, updateMask=None, x__xgafv=None)

Updates a Chart.

Method Details

close()
Close httplib2 connections.
create(parent, body=None, chartId=None, x__xgafv=None)
Creates a Chart.

Args:
  parent: string, Required. The parent resource of the chart. (required)
  body: object, The request body.
    The object takes the form of:

{ # Configurable dashboard's widget that displays data as a chart.
  "chartType": "A String", # Output only. Chart type.
  "chartVisualizationType": "A String", # Chart visualization type.
  "createTime": "A String", # Output only. Chart create time.
  "dataSource": { # The request data for visualizing the dataset in the chart.
    "generativeInsights": { # Request that use natural language query to generate the chart. # Use natural language query to generate the chart.
      "chartCheckpoint": { # The current chart checkpoint state. # The chart checkpoint used to generate the chart.
        "revisionId": "A String", # The revision id of the chart.
        "sessionId": "A String", # The session id of the chart.
      },
      "chartConversations": [ # Output only. The chart conversations used to generate the chart.
        { # The conversation used to generate the chart.
          "conversationId": "A String", # The conversation id of the chart.
          "createTime": "A String", # The create time of the conversation.
          "messages": [ # Ordered list of messages, including user inputs and system responses.
            { # The message in the conversation.
              "createTime": "A String", # For user messages, this is the time at which the system received the message. For system messages, this is the time at which the system generated the message.
              "messageId": "A String", # The message id of the message.
              "systemMessage": { # A message from the system in response to the user. This message can also be a message from the user as historical context for multiturn conversations with the system. # A message from the system in response to the user.
                "chartSpec": { # Chart spec from LLM
                  "a_key": "", # Properties of the object.
                },
                "generatedSqlQuery": "A String", # Raw SQL from LLM, before templatization
                "textOutput": { # A text output message from the system. # A direct natural language response to the user message.
                  "texts": [ # The parts of the message.
                    "A String",
                  ],
                  "type": "A String", # The type of the text message.
                },
              },
              "userMessage": { # The user message. # A message from the user that is interacting with the system.
                "text": "A String", # A message from the user that is interacting with the system.
              },
            },
          ],
          "updateTime": "A String", # The update time of the conversation.
        },
      ],
      "chartSpec": { # Chart spec for the chart.
        "a_key": "", # Properties of the object.
      },
      "request": {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
      "sqlComparisonKey": "A String", # Optional. For charts with comparison, this key will determine the metric that will be compared between the current and another dataset.
      "sqlQuery": "A String", # SQL query used to generate the chart.
    },
    "queryMetrics": { # Request data that use the existing QueryMetrics. # Use the existing QueryMetrics to generate the chart.
      "request": {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    },
  },
  "dateRangeConfig": { # Date range configuration for dashboard charts. # Date range config applied to the chart.
    "absoluteDateRange": { # A time window for querying conversations. # An absolute date range.
      "endTime": "A String", # Required. The end time of the time window.
      "startTime": "A String", # Required. The start time of the time window.
    },
    "relativeDateRange": { # Relative date range configuration. # A relative date range.
      "quantity": "A String", # Required. The quantity of units in the past.
      "unit": "A String", # Required. The unit of time.
    },
  },
  "description": "A String", # Chart description
  "displayName": "A String", # User provided display name of the chart.
  "filter": "A String", # Filter applied to all charts in the container. Should support scope later.
  "height": 42, # The height of the chart in grid units.
  "name": "A String", # Identifier. Chart resource name. Format: projects/{project}/locations/{location}/dashboards/{dashboard}/charts/{chart}
  "updateTime": "A String", # Output only. Chart last update time.
  "width": 42, # The width of the chart in grid units.
}

  chartId: string, Optional. A unique ID for the new Chart. This ID will become the final component of the Chart's resource name. If no ID is specified, a server-generated ID will be used. This value should be 4-64 characters and must match the regular expression `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Configurable dashboard's widget that displays data as a chart.
  "chartType": "A String", # Output only. Chart type.
  "chartVisualizationType": "A String", # Chart visualization type.
  "createTime": "A String", # Output only. Chart create time.
  "dataSource": { # The request data for visualizing the dataset in the chart.
    "generativeInsights": { # Request that use natural language query to generate the chart. # Use natural language query to generate the chart.
      "chartCheckpoint": { # The current chart checkpoint state. # The chart checkpoint used to generate the chart.
        "revisionId": "A String", # The revision id of the chart.
        "sessionId": "A String", # The session id of the chart.
      },
      "chartConversations": [ # Output only. The chart conversations used to generate the chart.
        { # The conversation used to generate the chart.
          "conversationId": "A String", # The conversation id of the chart.
          "createTime": "A String", # The create time of the conversation.
          "messages": [ # Ordered list of messages, including user inputs and system responses.
            { # The message in the conversation.
              "createTime": "A String", # For user messages, this is the time at which the system received the message. For system messages, this is the time at which the system generated the message.
              "messageId": "A String", # The message id of the message.
              "systemMessage": { # A message from the system in response to the user. This message can also be a message from the user as historical context for multiturn conversations with the system. # A message from the system in response to the user.
                "chartSpec": { # Chart spec from LLM
                  "a_key": "", # Properties of the object.
                },
                "generatedSqlQuery": "A String", # Raw SQL from LLM, before templatization
                "textOutput": { # A text output message from the system. # A direct natural language response to the user message.
                  "texts": [ # The parts of the message.
                    "A String",
                  ],
                  "type": "A String", # The type of the text message.
                },
              },
              "userMessage": { # The user message. # A message from the user that is interacting with the system.
                "text": "A String", # A message from the user that is interacting with the system.
              },
            },
          ],
          "updateTime": "A String", # The update time of the conversation.
        },
      ],
      "chartSpec": { # Chart spec for the chart.
        "a_key": "", # Properties of the object.
      },
      "request": {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
      "sqlComparisonKey": "A String", # Optional. For charts with comparison, this key will determine the metric that will be compared between the current and another dataset.
      "sqlQuery": "A String", # SQL query used to generate the chart.
    },
    "queryMetrics": { # Request data that use the existing QueryMetrics. # Use the existing QueryMetrics to generate the chart.
      "request": {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    },
  },
  "dateRangeConfig": { # Date range configuration for dashboard charts. # Date range config applied to the chart.
    "absoluteDateRange": { # A time window for querying conversations. # An absolute date range.
      "endTime": "A String", # Required. The end time of the time window.
      "startTime": "A String", # Required. The start time of the time window.
    },
    "relativeDateRange": { # Relative date range configuration. # A relative date range.
      "quantity": "A String", # Required. The quantity of units in the past.
      "unit": "A String", # Required. The unit of time.
    },
  },
  "description": "A String", # Chart description
  "displayName": "A String", # User provided display name of the chart.
  "filter": "A String", # Filter applied to all charts in the container. Should support scope later.
  "height": 42, # The height of the chart in grid units.
  "name": "A String", # Identifier. Chart resource name. Format: projects/{project}/locations/{location}/dashboards/{dashboard}/charts/{chart}
  "updateTime": "A String", # Output only. Chart last update time.
  "width": 42, # The width of the chart in grid units.
}
delete(name, x__xgafv=None)
Deletes a Chart.

Args:
  name: string, Required. The name of the chart to delete. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}
get(name, x__xgafv=None)
Gets a Chart.

Args:
  name: string, Required. The name of the chart to get. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Configurable dashboard's widget that displays data as a chart.
  "chartType": "A String", # Output only. Chart type.
  "chartVisualizationType": "A String", # Chart visualization type.
  "createTime": "A String", # Output only. Chart create time.
  "dataSource": { # The request data for visualizing the dataset in the chart.
    "generativeInsights": { # Request that use natural language query to generate the chart. # Use natural language query to generate the chart.
      "chartCheckpoint": { # The current chart checkpoint state. # The chart checkpoint used to generate the chart.
        "revisionId": "A String", # The revision id of the chart.
        "sessionId": "A String", # The session id of the chart.
      },
      "chartConversations": [ # Output only. The chart conversations used to generate the chart.
        { # The conversation used to generate the chart.
          "conversationId": "A String", # The conversation id of the chart.
          "createTime": "A String", # The create time of the conversation.
          "messages": [ # Ordered list of messages, including user inputs and system responses.
            { # The message in the conversation.
              "createTime": "A String", # For user messages, this is the time at which the system received the message. For system messages, this is the time at which the system generated the message.
              "messageId": "A String", # The message id of the message.
              "systemMessage": { # A message from the system in response to the user. This message can also be a message from the user as historical context for multiturn conversations with the system. # A message from the system in response to the user.
                "chartSpec": { # Chart spec from LLM
                  "a_key": "", # Properties of the object.
                },
                "generatedSqlQuery": "A String", # Raw SQL from LLM, before templatization
                "textOutput": { # A text output message from the system. # A direct natural language response to the user message.
                  "texts": [ # The parts of the message.
                    "A String",
                  ],
                  "type": "A String", # The type of the text message.
                },
              },
              "userMessage": { # The user message. # A message from the user that is interacting with the system.
                "text": "A String", # A message from the user that is interacting with the system.
              },
            },
          ],
          "updateTime": "A String", # The update time of the conversation.
        },
      ],
      "chartSpec": { # Chart spec for the chart.
        "a_key": "", # Properties of the object.
      },
      "request": {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
      "sqlComparisonKey": "A String", # Optional. For charts with comparison, this key will determine the metric that will be compared between the current and another dataset.
      "sqlQuery": "A String", # SQL query used to generate the chart.
    },
    "queryMetrics": { # Request data that use the existing QueryMetrics. # Use the existing QueryMetrics to generate the chart.
      "request": {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    },
  },
  "dateRangeConfig": { # Date range configuration for dashboard charts. # Date range config applied to the chart.
    "absoluteDateRange": { # A time window for querying conversations. # An absolute date range.
      "endTime": "A String", # Required. The end time of the time window.
      "startTime": "A String", # Required. The start time of the time window.
    },
    "relativeDateRange": { # Relative date range configuration. # A relative date range.
      "quantity": "A String", # Required. The quantity of units in the past.
      "unit": "A String", # Required. The unit of time.
    },
  },
  "description": "A String", # Chart description
  "displayName": "A String", # User provided display name of the chart.
  "filter": "A String", # Filter applied to all charts in the container. Should support scope later.
  "height": 42, # The height of the chart in grid units.
  "name": "A String", # Identifier. Chart resource name. Format: projects/{project}/locations/{location}/dashboards/{dashboard}/charts/{chart}
  "updateTime": "A String", # Output only. Chart last update time.
  "width": 42, # The width of the chart in grid units.
}
list(parent, x__xgafv=None)
Lists Charts.

Args:
  parent: string, Required. The parent resource of the charts. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response of listing charts.
  "charts": [ # The charts under the parent.
    { # Configurable dashboard's widget that displays data as a chart.
      "chartType": "A String", # Output only. Chart type.
      "chartVisualizationType": "A String", # Chart visualization type.
      "createTime": "A String", # Output only. Chart create time.
      "dataSource": { # The request data for visualizing the dataset in the chart.
        "generativeInsights": { # Request that use natural language query to generate the chart. # Use natural language query to generate the chart.
          "chartCheckpoint": { # The current chart checkpoint state. # The chart checkpoint used to generate the chart.
            "revisionId": "A String", # The revision id of the chart.
            "sessionId": "A String", # The session id of the chart.
          },
          "chartConversations": [ # Output only. The chart conversations used to generate the chart.
            { # The conversation used to generate the chart.
              "conversationId": "A String", # The conversation id of the chart.
              "createTime": "A String", # The create time of the conversation.
              "messages": [ # Ordered list of messages, including user inputs and system responses.
                { # The message in the conversation.
                  "createTime": "A String", # For user messages, this is the time at which the system received the message. For system messages, this is the time at which the system generated the message.
                  "messageId": "A String", # The message id of the message.
                  "systemMessage": { # A message from the system in response to the user. This message can also be a message from the user as historical context for multiturn conversations with the system. # A message from the system in response to the user.
                    "chartSpec": { # Chart spec from LLM
                      "a_key": "", # Properties of the object.
                    },
                    "generatedSqlQuery": "A String", # Raw SQL from LLM, before templatization
                    "textOutput": { # A text output message from the system. # A direct natural language response to the user message.
                      "texts": [ # The parts of the message.
                        "A String",
                      ],
                      "type": "A String", # The type of the text message.
                    },
                  },
                  "userMessage": { # The user message. # A message from the user that is interacting with the system.
                    "text": "A String", # A message from the user that is interacting with the system.
                  },
                },
              ],
              "updateTime": "A String", # The update time of the conversation.
            },
          ],
          "chartSpec": { # Chart spec for the chart.
            "a_key": "", # Properties of the object.
          },
          "request": {
            "a_key": "", # Properties of the object. Contains field @type with type URL.
          },
          "sqlComparisonKey": "A String", # Optional. For charts with comparison, this key will determine the metric that will be compared between the current and another dataset.
          "sqlQuery": "A String", # SQL query used to generate the chart.
        },
        "queryMetrics": { # Request data that use the existing QueryMetrics. # Use the existing QueryMetrics to generate the chart.
          "request": {
            "a_key": "", # Properties of the object. Contains field @type with type URL.
          },
        },
      },
      "dateRangeConfig": { # Date range configuration for dashboard charts. # Date range config applied to the chart.
        "absoluteDateRange": { # A time window for querying conversations. # An absolute date range.
          "endTime": "A String", # Required. The end time of the time window.
          "startTime": "A String", # Required. The start time of the time window.
        },
        "relativeDateRange": { # Relative date range configuration. # A relative date range.
          "quantity": "A String", # Required. The quantity of units in the past.
          "unit": "A String", # Required. The unit of time.
        },
      },
      "description": "A String", # Chart description
      "displayName": "A String", # User provided display name of the chart.
      "filter": "A String", # Filter applied to all charts in the container. Should support scope later.
      "height": 42, # The height of the chart in grid units.
      "name": "A String", # Identifier. Chart resource name. Format: projects/{project}/locations/{location}/dashboards/{dashboard}/charts/{chart}
      "updateTime": "A String", # Output only. Chart last update time.
      "width": 42, # The width of the chart in grid units.
    },
  ],
  "nextPageToken": "A String", # The value returned by the last `ListChartsResponse`. This value indicates that this is a continuation of a prior `ListCharts` call and that the system should return the next page of data.
}
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates a Chart.

Args:
  name: string, Identifier. Chart resource name. Format: projects/{project}/locations/{location}/dashboards/{dashboard}/charts/{chart} (required)
  body: object, The request body.
    The object takes the form of:

{ # Configurable dashboard's widget that displays data as a chart.
  "chartType": "A String", # Output only. Chart type.
  "chartVisualizationType": "A String", # Chart visualization type.
  "createTime": "A String", # Output only. Chart create time.
  "dataSource": { # The request data for visualizing the dataset in the chart.
    "generativeInsights": { # Request that use natural language query to generate the chart. # Use natural language query to generate the chart.
      "chartCheckpoint": { # The current chart checkpoint state. # The chart checkpoint used to generate the chart.
        "revisionId": "A String", # The revision id of the chart.
        "sessionId": "A String", # The session id of the chart.
      },
      "chartConversations": [ # Output only. The chart conversations used to generate the chart.
        { # The conversation used to generate the chart.
          "conversationId": "A String", # The conversation id of the chart.
          "createTime": "A String", # The create time of the conversation.
          "messages": [ # Ordered list of messages, including user inputs and system responses.
            { # The message in the conversation.
              "createTime": "A String", # For user messages, this is the time at which the system received the message. For system messages, this is the time at which the system generated the message.
              "messageId": "A String", # The message id of the message.
              "systemMessage": { # A message from the system in response to the user. This message can also be a message from the user as historical context for multiturn conversations with the system. # A message from the system in response to the user.
                "chartSpec": { # Chart spec from LLM
                  "a_key": "", # Properties of the object.
                },
                "generatedSqlQuery": "A String", # Raw SQL from LLM, before templatization
                "textOutput": { # A text output message from the system. # A direct natural language response to the user message.
                  "texts": [ # The parts of the message.
                    "A String",
                  ],
                  "type": "A String", # The type of the text message.
                },
              },
              "userMessage": { # The user message. # A message from the user that is interacting with the system.
                "text": "A String", # A message from the user that is interacting with the system.
              },
            },
          ],
          "updateTime": "A String", # The update time of the conversation.
        },
      ],
      "chartSpec": { # Chart spec for the chart.
        "a_key": "", # Properties of the object.
      },
      "request": {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
      "sqlComparisonKey": "A String", # Optional. For charts with comparison, this key will determine the metric that will be compared between the current and another dataset.
      "sqlQuery": "A String", # SQL query used to generate the chart.
    },
    "queryMetrics": { # Request data that use the existing QueryMetrics. # Use the existing QueryMetrics to generate the chart.
      "request": {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    },
  },
  "dateRangeConfig": { # Date range configuration for dashboard charts. # Date range config applied to the chart.
    "absoluteDateRange": { # A time window for querying conversations. # An absolute date range.
      "endTime": "A String", # Required. The end time of the time window.
      "startTime": "A String", # Required. The start time of the time window.
    },
    "relativeDateRange": { # Relative date range configuration. # A relative date range.
      "quantity": "A String", # Required. The quantity of units in the past.
      "unit": "A String", # Required. The unit of time.
    },
  },
  "description": "A String", # Chart description
  "displayName": "A String", # User provided display name of the chart.
  "filter": "A String", # Filter applied to all charts in the container. Should support scope later.
  "height": 42, # The height of the chart in grid units.
  "name": "A String", # Identifier. Chart resource name. Format: projects/{project}/locations/{location}/dashboards/{dashboard}/charts/{chart}
  "updateTime": "A String", # Output only. Chart last update time.
  "width": 42, # The width of the chart in grid units.
}

  updateMask: string, Optional. List of fields to be updated. All possible fields can be updated by passing `*`, or a subset of the following updateable fields can be provided: * `display_name`
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Configurable dashboard's widget that displays data as a chart.
  "chartType": "A String", # Output only. Chart type.
  "chartVisualizationType": "A String", # Chart visualization type.
  "createTime": "A String", # Output only. Chart create time.
  "dataSource": { # The request data for visualizing the dataset in the chart.
    "generativeInsights": { # Request that use natural language query to generate the chart. # Use natural language query to generate the chart.
      "chartCheckpoint": { # The current chart checkpoint state. # The chart checkpoint used to generate the chart.
        "revisionId": "A String", # The revision id of the chart.
        "sessionId": "A String", # The session id of the chart.
      },
      "chartConversations": [ # Output only. The chart conversations used to generate the chart.
        { # The conversation used to generate the chart.
          "conversationId": "A String", # The conversation id of the chart.
          "createTime": "A String", # The create time of the conversation.
          "messages": [ # Ordered list of messages, including user inputs and system responses.
            { # The message in the conversation.
              "createTime": "A String", # For user messages, this is the time at which the system received the message. For system messages, this is the time at which the system generated the message.
              "messageId": "A String", # The message id of the message.
              "systemMessage": { # A message from the system in response to the user. This message can also be a message from the user as historical context for multiturn conversations with the system. # A message from the system in response to the user.
                "chartSpec": { # Chart spec from LLM
                  "a_key": "", # Properties of the object.
                },
                "generatedSqlQuery": "A String", # Raw SQL from LLM, before templatization
                "textOutput": { # A text output message from the system. # A direct natural language response to the user message.
                  "texts": [ # The parts of the message.
                    "A String",
                  ],
                  "type": "A String", # The type of the text message.
                },
              },
              "userMessage": { # The user message. # A message from the user that is interacting with the system.
                "text": "A String", # A message from the user that is interacting with the system.
              },
            },
          ],
          "updateTime": "A String", # The update time of the conversation.
        },
      ],
      "chartSpec": { # Chart spec for the chart.
        "a_key": "", # Properties of the object.
      },
      "request": {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
      "sqlComparisonKey": "A String", # Optional. For charts with comparison, this key will determine the metric that will be compared between the current and another dataset.
      "sqlQuery": "A String", # SQL query used to generate the chart.
    },
    "queryMetrics": { # Request data that use the existing QueryMetrics. # Use the existing QueryMetrics to generate the chart.
      "request": {
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    },
  },
  "dateRangeConfig": { # Date range configuration for dashboard charts. # Date range config applied to the chart.
    "absoluteDateRange": { # A time window for querying conversations. # An absolute date range.
      "endTime": "A String", # Required. The end time of the time window.
      "startTime": "A String", # Required. The start time of the time window.
    },
    "relativeDateRange": { # Relative date range configuration. # A relative date range.
      "quantity": "A String", # Required. The quantity of units in the past.
      "unit": "A String", # Required. The unit of time.
    },
  },
  "description": "A String", # Chart description
  "displayName": "A String", # User provided display name of the chart.
  "filter": "A String", # Filter applied to all charts in the container. Should support scope later.
  "height": 42, # The height of the chart in grid units.
  "name": "A String", # Identifier. Chart resource name. Format: projects/{project}/locations/{location}/dashboards/{dashboard}/charts/{chart}
  "updateTime": "A String", # Output only. Chart last update time.
  "width": 42, # The width of the chart in grid units.
}