- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- ColumnData
- ColumnType
- ColumnValue
- ValueMetadata
- InAppLink
- List
- ColumnMetadata
- TimestampMetadata
- QueryRuntimeError
- ErrorSeverity
- QueryRuntimeErrorMetadata
- MetadataKey
- WarningReason
- Try it!
Full name: projects.locations.instances.dashboardQueries.execute
Execute a query and return the data.
HTTP request
Path parameters
Parameters | |
---|---|
parent |
Required. The parent, under which to run this dashboardQuery. Format: projects/{project}/locations/{region}/instances/{instance} |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "query": { object ( |
Fields | |
---|---|
query |
Required. The query to execute and get results back for. QueryID or 'query', 'input.time_window' fields will be used. Use 'nativeDashboard' and 'dashboardChart' fields if it is an in-dashboard query. |
filters[] |
Optional. Dashboard level filters other than query string. |
clearCache |
Optional. When true, the backend would read from the database, rather than fetching data directly from the cache. |
usePreviousTimeRange |
Optional. When true, the backend will execute the query against the previous time range of the query. |
Response body
Response message for executing a dashboard query.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "results": [ { object ( |
Fields | |
---|---|
results[] |
Result rows that are queried. |
dataSources[] |
Datasource of the query and results. |
lastBackendCacheRefreshedTime |
Optional. Last time the cache was refreshed. This would be used by the UI to show the last updated time. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
timeWindow |
Time window against which query was executed. |
queryRuntimeErrors[] |
Runtime errors |
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 permission on the parent
resource:
chronicle.dashboardQueries.execute
For more information, see the IAM documentation.
ColumnData
JSON representation |
---|
{ "column": string, "values": [ { object ( |
Fields | |
---|---|
column |
Used to store column names. |
values[] |
To store column data. |
metadata |
To store column metadata. |
ColumnType
Singular vs list of values in a column.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
value |
Single value in a column. |
list |
List of values in a column e.g. IPs |
ColumnValue
LINT.IfChange(stats_data) Value of the column based on data type.
JSON representation |
---|
{ "metadata": { object ( |
Fields | |
---|---|
metadata |
|
Union field
|
|
nullVal |
True if the value is NULL. |
boolVal |
Boolean value. |
bytesVal |
Bytes value. A base64-encoded string. |
doubleVal |
Double value. |
int64Val |
Integer value (signed). |
uint64Val |
Un-signed integer value. |
stringVal |
String value. Enum values are returned as strings. |
timestampVal |
Timestamp values. Does not handle Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
dateVal |
Date values. |
protoVal |
For any proto values that are not any of the above. An object containing fields of an arbitrary type. An additional field |
ValueMetadata
JSON representation |
---|
{
"links": [
{
object ( |
Fields | |
---|---|
links[] |
"Auto" generated In-app links. |
fieldPaths[] |
|
timestampVal |
Timestamp value to store the timestamp for the case of the date and time data type. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
InAppLink
In app linking start
JSON representation |
---|
{ "url": string, "label": string, "iconUrl": string } |
Fields | |
---|---|
url |
URL to redirect to. |
label |
Label for the link. |
iconUrl |
Icon url for the link. |
List
Store list of values in a column.
JSON representation |
---|
{
"values": [
{
object ( |
Fields | |
---|---|
values[] |
|
ColumnMetadata
Metadata of the column.
JSON representation |
---|
{ "column": string, "fieldPath": string, "functionName": string, "functionModule": string, "dataSource": enum ( |
Fields | |
---|---|
column |
Name of the column. |
fieldPath |
Field path of the queried field, if any. |
functionName |
Name of the function used to query the field, if any. |
functionModule |
Module of the function used to query the field, if any. |
dataSource |
Data source queried. |
timestampMetadata |
Timestamp Metadata |
longitude |
Whether the column is a longitude field. |
latitude |
Whether the column is a latitude field. |
selected |
Whether the column is selected in the final response. |
unselected |
Whether the column is unselected in the final response. |
TimestampMetadata
Metadata of the timestamp column.
JSON representation |
---|
{ "timeFormat": string, "timeZone": string, "timeGranularity": string, "isSortable": boolean, "isInterpolable": boolean } |
Fields | |
---|---|
timeFormat |
Time format of the timestamp column. |
timeZone |
Time zone of the timestamp column. |
timeGranularity |
Time granularity of the timestamp column. |
isSortable |
Whether the timestamp column is sortable in UI. |
isInterpolable |
Whether the timestamp column is interpolable in UI. |
QueryRuntimeError
Runtime error for a dashboard query.
JSON representation |
---|
{ "errorTitle": string, "errorDescription": string, "errorSeverity": enum ( |
Fields | |
---|---|
errorTitle |
Short Description of the error. |
errorDescription |
Error message |
errorSeverity |
Severity of the error. |
metadata[] |
Metadata for the error. |
warningReason |
Reason for the error. |
ErrorSeverity
Based on ErrorSeverity, UI will choose to format the error differently.
Enums | |
---|---|
ERROR_SEVERITY_UNSPECIFIED |
Severity is unknown. |
WARNING |
Severity is warning. |
SEVERE |
Error is severe. |
QueryRuntimeErrorMetadata
Metadata for the error.
JSON representation |
---|
{
"key": enum ( |
Fields | |
---|---|
key |
Metadata key. |
value |
Metadata value. |
MetadataKey
Metadata enum to identify the metadata key.
Enums | |
---|---|
METADATA_KEY_UNSPECIFIED |
Key is unknown. |
ROW_LIMIT |
Key is row limit. |
WarningReason
Warning reason.
Enums | |
---|---|
WARNING_REASON_UNSPECIFIED |
Reason is unknown. |
ROW_LIMIT_EXCEEDED |
Reason is row limit exceeded. |
DEFAULT_ROW_LIMIT_EXCEEDED |
Reason is default row limit exceeded. |
CURATED_QUERY_DEFAULT_ROW_LIMIT_EXCEEDED |
Reason is curated query default row limit exceeded. |