Method: projects.alerts.enumerateFacets

alerts.enumerateFacets returns the facets and the number of alerts that meet the filter criteria and have that value for each facet.

HTTP request


GET https://threatintelligence.googleapis.com/v1beta/{parent=projects/*}/alerts:enumerateFacets

The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. Parent of the alerts.

Query parameters

Parameters
filter

string

Optional. Filter on what alerts will be enumerated.

Request body

The request body must be empty.

Response body

Response message for alerts.enumerateFacets.

If successful, the response body contains data with the following structure:

JSON representation
{
  "facets": [
    {
      object (Facet)
    }
  ]
}
Fields
facets[]

object (Facet)

List of facets and the counts.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

Facet

Facet represents a sub element of a resource for filtering. The results from this method are used to populate the filterable facets in the UI.

JSON representation
{
  "facet": string,
  "facetCounts": [
    {
      object (FacetCount)
    }
  ],
  "facetType": string,
  "minValue": string,
  "maxValue": string,
  "totalCount": string
}
Fields
facet

string

Name of the facet. This is also the string that needs to be used in the filtering expression.

facetCounts[]

object (FacetCount)

List of counts for the facet (if categorical).

facetType

string

The type of the facet. Options include "string", "int", "float", "bool", "enum", "timestamp", "user" and are useful to show the right sort of UI controls when building a AIP-160 style filtering string.

minValue

string

Min value of the facet stringified based on type. This is only populated for facets that have a clear ordering, for types like enum it will be left empty. Timestamps will be formatted using RFC3339.

maxValue

string

Max value of the facet stringified based on type. Will be populated and formatted the same as minValue.

totalCount

string (int64 format)

Total number of records that contain this facet with ANY value.

FacetCount

FacetCount represents a count of records with each facet value.

JSON representation
{
  "value": string,
  "count": integer
}
Fields
value

string

Value of the facet stringified. Timestamps will be formatted using RFC3339.

count

integer

Count of records with the value.