queryUrlVisitsBreakdowns method
Returns summaries of URL visits for a given metric and breakdown dimension.
Requires a Chrome Enterprise Premium subscription. If the customer does not have this subscription, query results will be empty.
Request parameters:
customer - Required. The customer ID in the format
"customers/{customer_id}".
Value must have pattern ^customers/\[^/\]+$.
breakdown - Optional. The dimension to break down the URL visits by.
Defaults to USER.
Possible string values are:
- "URL_VISITS_BREAKDOWN_DIMENSION_UNSPECIFIED" : Unspecified breakdown dimension. Defaults to USER.
- "USER" : Breakdown by user.
- "EVENT_DOMAIN" : Breakdown by event domain.
filter - Optional. The filter to apply to the request. For syntax, see
AIP-160. Data is not available for events older than 180 days or more
recent than 48 hours ago. If event_time is not specified, results will
end 48 hours ago. Supported fields for filtering: - user -
event_domain - event_time Filtering by user or event_domain
requires the breakdown dimension to be set to the corresponding value
(e.g., you must set breakdown = USER to filter by user). Supported
operators: - = for user and event_domain. - <= for event_time.
Supported conjunctions: - AND Example: user = "testuser" AND event_time <= "2024-01-02T00:00:00Z"
fixedTimeRange - Optional. The fixed time range to return the breakdowns
for. Defaults to FIXED_TIME_RANGE_FOUR_WEEKS. Fixed time ranges are used
to allow for precomputation and optimize response times.
Possible string values are:
- "FIXED_TIME_RANGE_UNSPECIFIED" : Unspecified fixed time range. Defaults to FIXED_TIME_RANGE_FOUR_WEEKS.
- "FIXED_TIME_RANGE_FOUR_HOURS" : Four hours.
- "FIXED_TIME_RANGE_ONE_DAY" : One day.
- "FIXED_TIME_RANGE_ONE_WEEK" : One week.
- "FIXED_TIME_RANGE_FOUR_WEEKS" : Four weeks.
metric - Optional. The metric to return the breakdowns for. Defaults to
URL_VISITS_METRIC_TOTAL_SUSPICIOUS_URL_VISITS.
Possible string values are:
- "URL_VISITS_METRIC_UNSPECIFIED" : Unspecified URL visits metric. Defaults to URL_VISITS_METRIC_TOTAL_SUSPICIOUS_URL_VISITS.
- "URL_VISITS_METRIC_TOTAL_SUSPICIOUS_URL_VISITS" : The total number of suspicious URL visits. This is the sum of the high_risk_url_visits, medium_risk_url_visits, and low_risk_url_visits.
- "URL_VISITS_METRIC_HIGH_RISK_URL_VISITS" : The number of suspicious URL visits with high risk.
- "URL_VISITS_METRIC_MEDIUM_RISK_URL_VISITS" : The number of suspicious URL visits with medium risk.
- "URL_VISITS_METRIC_LOW_RISK_URL_VISITS" : The number of suspicious URL visits with low risk.
pageSize - Optional. The maximum number of breakdowns to return. The
service may return fewer than this value. If unspecified, at most 50
breakdowns will be returned. The maximum value is 1000; values above 1000
will be coerced to 1000.
pageToken - Optional. A page token, received from a previous
QueryUrlVisitsBreakdowns call. Provide this to retrieve the subsequent
page. When paginating, all other parameters provided to
QueryUrlVisitsBreakdowns must match the call that provided the page
token.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a GoogleChromeManagementVersionsV1QueryUrlVisitsBreakdownsResponse.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<GoogleChromeManagementVersionsV1QueryUrlVisitsBreakdownsResponse>
queryUrlVisitsBreakdowns(
core.String customer, {
core.String? breakdown,
core.String? filter,
core.String? fixedTimeRange,
core.String? metric,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'breakdown': ?breakdown == null ? null : [breakdown],
'filter': ?filter == null ? null : [filter],
'fixedTimeRange': ?fixedTimeRange == null ? null : [fixedTimeRange],
'metric': ?metric == null ? null : [metric],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v1/' +
core.Uri.encodeFull('$customer') +
'/enterprise/securityInsights:queryUrlVisitsBreakdowns';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleChromeManagementVersionsV1QueryUrlVisitsBreakdownsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}