- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- EntityRiskScore
- EntityRiskDelta
- DetectionsCount
- EntityCountDistribution
- Try it!
Full name: projects.locations.instances.entityRiskScores.query
Queries the instance for EntityRiskScores. The API returns Risk Scores for entities which could be users, assets, resources etc in a system given the following filters:
Timestamps use RFC 3339. Read more here
- risk_window: Filter field which represents the time window over which an Entity Risk Score is computed. This could be 24 hours or 7 days. Example:
filter=risk_window.start_time >= "2023-08-10T14:20:59.950218416Z" AND risk_window.end_time <= "2023-08-17T14:20:59.950219626Z"
risk_score: Filter by risk_score in the current risk window and time window. Example:
filter=risk_score<20
risk_delta: Filter by risk_delta in the risk window and time window. Example:
filter=risk_delta>=12 AND risk_delta<=850
Risk_delta is a percentage representation of change. There are multiple cases of risk_delta calculation:- Previous risk_score was 0 (either truly 0 or non-existent) and current risk score is a non 0 number. This is a 100 percent positive delta.
- Previous risk score and current risk score are equal (eg. both 0): delta is 0 since there was no change.
- Previous risk score is higher than current score: delta is negative.
- Previous risk score is lower than current score: delta is positive.
- If risk_delta calculation yields a value > 200%, the delta is instead set to a constant value of 200%.
raw_risk_score: Filter by raw_risk_score in the current risk window and time window. Example:
filter=raw_risk_score<100
raw_risk_delta: Filter by raw_risk_delta in the risk window and time window. Example:
filter=raw_risk_delta>=5 AND raw_risk_delta<=100
detections_count: Filter by number of detections for the entity in the risk window and time window. Example:
filter=detections_count < 10
entity: Filter by details of the entity. Example:
filter=entity.metadata.entity_type="ASSET"
entity_indicator: Filter by entity indicator. The sub fields need to be explicitly requested. Examples:
filter=entity_indicator.email: "test@example.com"
filter=entity_indicator.hostname="test_hostname"
risk_score_version: Filter results by risk score version. Example:
filter=risk_score_version = "RISK_SCORE_VERSION_V0_01"
lookback_interval: Filter by the lookback interval. Example:
filter=lookback_interval.start_time >= "2023-08-10T14:20:59.950218416Z" AND lookback_interval.end_time <= "2023-08-17T14:20:59.950219626Z"
HTTP request
GET https://chronicle.googleapis.com/v1alpha/{instance}/entityRiskScores:query
Path parameters
Parameters | |
---|---|
instance |
Required. Chronicle instance this request is sent to. Format: projects/{project}/locations/{location}/instances/{instance} |
Query parameters
Parameters | |
---|---|
filter |
Filter to be applied over multiple Entity Risk Score fields. Please see API definition for usage |
orderBy |
Ordering of Entity Risk Scores. Example: |
pageSize |
The maximum number of Entity Risk Scores to return. The service may return fewer than this value. If unspecified, at most 10000 scores will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000. |
pageToken |
A page token, received from a previous |
Request body
The request body must be empty.
Response body
Response message for Querying Entity Risk Scores.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "entity_risk_scores": [ { object ( |
Fields | |
---|---|
entity_risk_scores[] |
The Risk Scores for a specific time range and filtered criteria. |
detections_counts[] |
The detections count for a specific time range and filtered criteria. |
next_page_token |
A token, which can be sent as |
entity_count_distributions[] |
Distribution of the User/Asset Entity types with a risk score for a given risk window, broken down per day. |
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.entityRiskScores.queryEntityRiskScores
For more information, see the IAM documentation.
EntityRiskScore
Entity Risk Score
JSON representation |
---|
{ "entity": { object ( |
Fields | |
---|---|
entity |
Required. Entity for which the Risk Score is computed |
risk_window |
Required. Time window against which the Entity Risk Score is computed, e.g. 24 hours 7 days etc. |
risk_score |
Normalized Risk Score for the Entity. This value is always between 0-1000 |
risk_delta |
Represents the change is risk_score for an entity between end of the previous risk window and the end of the current risk window. |
detections_count |
Number of Detections that make up the risk score within the risk window. |
first_detection_time |
First detection timestamp within the specified risk window. Empty when no detections. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
last_detection_time |
Last detection timestamp within the specified risk window. Empty when no detections. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
entity_indicator |
Indicator to the entity. |
raw_risk_score |
Raw Risk Score for the Entity. This value is unbounded. |
raw_risk_delta |
Represents the change in raw_risk_score for an entity between end of the previous risk window and the end of the current risk window. |
entity_id |
An encoded string of Most Reliable Indicator tuple (value, type, namespace). |
EntityRiskDelta
Describes the difference of a risk score between two points in time
JSON representation |
---|
{ "previous_range_end_time": string, "risk_score_delta": integer, "previous_risk_score": integer, "risk_score_numeric_delta": integer } |
Fields | |
---|---|
previous_range_end_time |
End time of the previous risk_window. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
risk_score_delta |
Normalized risk score delta. |
previous_risk_score |
Normalized risk score from previous risk window |
risk_score_numeric_delta |
Numeric change in risk score from previous to current risk window |
DetectionsCount
Describes the number of detections within a time bucket (e.g., 2h interval).
JSON representation |
---|
{
"time_bucket": {
object ( |
Fields | |
---|---|
time_bucket |
Interval representing the time bucket for which we are counting detections. |
detections_count |
Number of Detections that make up the risk score within the risk window. |
EntityCountDistribution
Counts of all User and Asset Entities that have a risk score per day.
JSON representation |
---|
{
"daily_time_bucket": {
object ( |
Fields | |
---|---|
daily_time_bucket |
Interval representing the daily time bucket |
asset_entity_count |
Count of Asset enitities that have a detection in the daily bucket |
user_entity_count |
Count of User enitities that have a detection in the daily bucket |