- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- UdmEventListOptions
- EventCountTimelineOptions
- UdmFieldAggregationsOptions
- DetectionOptions
- DetectionListOptions
- FunctionParameter
- GroupByField
- SelectedField
- FunctionType
- OrderBy
- UdmPrevalenceOptions
- UdmSearchAggregationBucketFunction
- FederationMetadata
- InstanceSelection
- FederationGroupSelection
- Stats
- ColumnData
- ColumnType
- ColumnValue
- List
- ColumnMetadata
- ColumnSort
- SearchDataSource
Full name: projects.locations.instances.legacy.legacyFetchUdmSearchView
Legacy endpoint for fetching events, filters, and histograms matching UDM search.
HTTP request
POST https://chronicle.googleapis.com/v1alpha/{instance}/legacy:legacyFetchUdmSearchView
Path parameters
Parameters | |
---|---|
instance |
Required. Chronicle instance this request is sent to. Format: projects/{project}/locations/{location}/instances/{instance} |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "baseline_query": string, "snapshot_query": string, "baseline_time_range": { object ( |
Fields | |
---|---|
baseline_query |
Required. Boolean query to search for events. You can refer to https://cloud.google.com/chronicle/docs/investigation/udm-search for the query syntax. Example: 'ip=/172.*/ AND metadata.event_type!="NETWORK_CONNECTION" AND ( target.ip = "3.225.179.73" OR target.ip = "23.47.48.70")' |
snapshot_query |
Query applied to the baseline query's events. In other words, this query is applied to the Snapshot produced from the baseline query. The |
baseline_time_range |
Required. Required, the time range to search for [inclusive start time, exclusive end time). |
snapshot_time_range |
The time range to filter for [inclusive start time, exclusive end time). This time range must be completely within |
event_list |
Parameters for the Events that will be streamed back. |
timeline |
Parameters for the EventCountTimeline that will be streamed back. |
field_aggregations |
Parameters for the Aggregated UDM fields that will be streamed back. |
case_insensitive |
If true, the search should be performed in a case-insensitive manner. |
generate_ai_overview |
Optional. If true, generate AI overview for the search results. |
return_operation_id_only |
Optional. If this field is set to true, the response will only contain the operation resource name. The actual search results (events) will be streamed back when the client invokes the |
detection_options |
Fetch alerts/detections relevant to the search result. |
stats_function_parameter |
The request to apply statistical function on filtered data. |
draft_data_access_scope |
Data access scope used to filter events. This is intended to be used by admins to preview in-development scopes. Should only be called by users with global access. If the caller does not have global access, the request will fail. |
prevalence |
Parameters to get prevalence counts on Events returned by UDM Search |
enable_poc_fast_path |
If true, search will limit max_baseline_results to 30K events and remove time-order guarantee (i.e., results may not be the most-recent events in baseline query time range). In this mode, replayed search queries are not guaranteed to yield the same results each time. This option is for poc use-cases only. |
federation_metadata |
Optional. Federation metadata for the request. If this field is populated, it implied this is a federated search. |
Response body
Depending on the parameters in ListUdmEventsV3Request, stream back some combination of UDM Events, EventCountTimeline, and UdmFieldAggregations.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "operation": string, "progress": number, "too_many_events": boolean, "too_large_response": boolean, "complete": boolean, "valid_baseline_query": boolean, "baseline_events_count": integer, "valid_snapshot_query": boolean, "query_validation_errors": [ { object ( |
Fields | |
---|---|
operation |
The name of the operation resource representing the UDM Search operation. This can be passed to The metadata type of the operation is Format: projects/{project}/locations/{location}/instances/{instance}/operations/{operation} |
progress |
Progress of the query represented as a double between 0 and 1. |
too_many_events |
If true, there are too many events to return and some have been omitted. |
too_large_response |
If true, the response to be returned to the UI is too large and some events have been omitted. |
complete |
Streaming for this response is done. There will be no additional updates. |
valid_baseline_query |
Indicates whether the request baseline_query is a valid structured query or not. If not, |
baseline_events_count |
The number of events in the baseline query. |
valid_snapshot_query |
Indicates whether the request baseline and snapshot queries are valid. If not, |
query_validation_errors[] |
Parse error for the baseline_query and/or the snapshot_query. |
runtime_errors[] |
Runtime errors. |
filtered_events_count |
The number of events in the snapshot that match the snapshot_query. This is <= |
stats_function_parameter_validation_error_message |
If the request's stats_function_parameter` is invalid, this field will contain the detailed error message. |
prevalence |
Prevalence results on Events returned by UDM Search |
stats |
Stats results when the query is for statistics |
data_sources[] |
Datasource of the query and results in case of a statistics query |
ai_overview |
AI generated overview for the search results. Only populated if the AI features are enabled for the customer and generate_ai_overview is set to true in the request. |
events |
List of UDM events. NOTE: After complete is set to true, the |
timeline |
Timeline of event counts broken into buckets. |
field_aggregations |
List of UDM fields with aggregated values. |
grouped_field_aggregations |
List of grouped fields with aggregated values. |
detections |
List of relevant detections, if detection_list.max_returned_detections was set. |
stats_function_response |
Result for statistical function. |
activity_timeline |
Timeline of event counts broken into hourly/daily buckets to identify activity. |
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 instance
resource:
chronicle.legacies.legacyFetchUdmSearchView
For more information, see the IAM documentation.
UdmEventListOptions
JSON representation |
---|
{ "max_returned_events": integer } |
Fields | |
---|---|
max_returned_events |
|
EventCountTimelineOptions
This type has no fields.
UdmFieldAggregationsOptions
JSON representation |
---|
{ "max_values_per_field": integer } |
Fields | |
---|---|
max_values_per_field |
|
DetectionOptions
JSON representation |
---|
{ "snapshot_query": string, "detection_list": { object ( |
Fields | |
---|---|
snapshot_query |
|
detection_list |
|
field_aggregations |
|
DetectionListOptions
JSON representation |
---|
{ "max_returned_detections": integer } |
Fields | |
---|---|
max_returned_detections |
|
FunctionParameter
JSON representation |
---|
{ "grouped_fields": [ { object ( |
Fields | |
---|---|
grouped_fields[] |
|
selected_fields[] |
|
orders[] |
|
max_returned_rows |
|
GroupByField
JSON representation |
---|
{ "udm_field_path": string, "to_lower_case": boolean, // Union field |
Fields | |
---|---|
udm_field_path |
|
to_lower_case |
|
Union field
|
|
resolution_in_nano_seconds |
|
cidr_prefix_length_in_bits |
|
top_n_level_domain |
|
get_registered_domain |
|
SelectedField
JSON representation |
---|
{
"udm_field_path": string,
"function_type": enum ( |
Fields | |
---|---|
udm_field_path |
|
function_type |
|
percentile |
|
FunctionType
Enums | |
---|---|
FUNCTION_TYPE_UNSPECIFIED |
|
FUNCTION_TYPE_SUM |
|
FUNCTION_TYPE_COUNT |
|
FUNCTION_TYPE_COUNT_DISTINCT |
|
FUNCTION_TYPE_AVERAGE |
|
FUNCTION_TYPE_STDDEV |
|
FUNCTION_TYPE_MIN |
|
FUNCTION_TYPE_MAX |
OrderBy
JSON representation |
---|
{ "field_index": integer, "is_descending_order": boolean } |
Fields | |
---|---|
field_index |
|
is_descending_order |
|
UdmPrevalenceOptions
JSON representation |
---|
{
"get_prevalence": boolean,
"bucket_size": {
object ( |
Fields | |
---|---|
get_prevalence |
|
bucket_size |
|
UdmSearchAggregationBucketFunction
JSON representation |
---|
{ "resolution_in_seconds": integer } |
Fields | |
---|---|
resolution_in_seconds |
|
FederationMetadata
Federation metadata definition. UI will use this to provide information about the instance and instance groups on which federated search is to be performed.
JSON representation |
---|
{ "instances": [ { object ( |
Fields | |
---|---|
instances[] |
Optional. List of instances on which federated search request is being made. |
federation_groups[] |
Optional. List of instance groups on which federated search request is being made. |
InstanceSelection
Chronicle instance on which federated search request is being made.
JSON representation |
---|
{ "instance": string } |
Fields | |
---|---|
instance |
Required. Chronicle instance name on which federated search request is being made. Format: projects/{project}/locations/{location}/instances/{instance} |
FederationGroupSelection
Chronicle federation group on which federated search request is being made.
JSON representation |
---|
{ "federation_group": string } |
Fields | |
---|---|
federation_group |
Optional. Resource name of the Federation Group. Format: projects/{project}/locations/{location}/instances/{instance}/federationGroups/{federation_group} |
Stats
LINT.IfChange(stats_data) Stats results when the query is for statistics NEXT TAG = 6;
JSON representation |
---|
{ "results": [ { object ( |
Fields | |
---|---|
results[] |
Result rows that are queried. |
data_query_expression |
Expression that represent the subset of the requested query used to filter data. The expression will be used to enable features such as drill-down from stats results to UDM events. In that case, the new query will be composed by this expression and the expression related to a stats result. |
too_many_results |
If true, there are too many results to return and some have been omitted. |
total_results |
The total number of results returned. |
sort_order[] |
Indicates the columns used for sorting and the order in which they are sorted. If no ORDER section is specified in the query, this will be empty. |
ColumnData
Represents a single column in the set of columns returned as the stats query result.
JSON representation |
---|
{ "column": string, "values": [ { object ( |
Fields | |
---|---|
column |
Used to store column names. |
values[] |
To store store column data. |
filterable |
To identify if the column can be used for filtering/drill-downs. |
filter_expression |
Expression used to compose a query for filtering/drill-downs related to the data in this column. |
column_metadata |
Metadata for the column. |
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
Value of the column based on data type
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
null_val |
True if the value is NULL. |
bool_val |
Boolean value. |
bytes_val |
Bytes value. A base64-encoded string. |
double_val |
Double value. |
int64_val |
Integer value (signed). |
uint64_val |
Un-signed integer value. |
string_val |
String value. Enum values are returned as strings. |
timestamp_val |
Timestamp values. 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: |
date_val |
Date values. |
proto_val |
For any proto values that are not any of the above. An object containing fields of an arbitrary type. An additional field |
List
Store list of values in a column.
JSON representation |
---|
{
"values": [
{
object ( |
Fields | |
---|---|
values[] |
List of values in one cell of the column. |
ColumnMetadata
LINT.IfChange(column_metadata) Metadata for a column.
JSON representation |
---|
{ "column": string, "field_path": string, "function_name_used": string, "function_module": string } |
Fields | |
---|---|
column |
Name of the column. |
field_path |
Field path of the column. eg: "udm.principal.hostname" |
function_name_used |
Function name of the column. eg: "ARRAY_IGNORE_NULLS_LIMIT", this corresponds to array function. |
function_module |
Module name of the column. |
ColumnSort
Contains the column name and which direction the column is sorted (ascending or descenging).
JSON representation |
---|
{ "name": string, "descending": boolean } |
Fields | |
---|---|
name |
Name of the column. |
descending |
Whether the column is sorted in descending order (ascending by default); |
SearchDataSource
Data source for stats results in LegacyFetchUdmSearchViewResponse Equivalent to dashboard API LINT.IfChange(data_sources)
Enums | |
---|---|
SEARCH_DATA_SOURCE_UNSPECIFIED |
Unspecified data source. |
SEARCH_UDM |
Events |
SEARCH_ENTITY |
Entities |
SEARCH_RULE_DETECTIONS |
To be used for detections data source. |
SEARCH_RULESETS |
To be used for ruleset with detections datasource. |