list method
Gets a list of user events within a time range, with potential filtering.
The method does not list unjoined user events. Unjoined user event definition: when a user event is ingested from Recommendations AI User Event APIs, the catalog item included in the user event is connected with the current catalog. If a catalog item of the ingested event is not in the current catalog, it could lead to degraded model quality. This is called an unjoined event.
Request parameters:
parent
- Required. The parent eventStore resource name, such as
projects / * /locations / * /catalogs/default_catalog/eventStores/default_event_store
.
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/catalogs/\[^/\]+/eventStores/\[^/\]+$
.
filter
- Optional. Filtering expression to specify restrictions over
returned events. This is a sequence of terms, where each term applies some
kind of a restriction to the returned user events. Use this expression to
restrict results to a specific time range, or filter events by eventType.
eg: eventTime > "2012-04-23T18:25:43.511Z" eventsMissingCatalogItems
eventTime<"2012-04-23T18:25:43.511Z" eventType=search We expect only 3
types of fields: * eventTime: this can be specified a maximum of 2 times,
once with a less than operator and once with a greater than operator. The
eventTime restrict should result in one contiguous valid eventTime range.
- eventType: only 1 eventType restriction can be specified. * eventsMissingCatalogItems: specififying this will restrict results to events for which catalog items were not found in the catalog. The default behavior is to return only those events for which catalog items were found. Some examples of valid filters expressions: * Example 1: eventTime
"2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z" * Example 2: eventTime > "2012-04-23T18:25:43.511Z" eventType = detail-page-view * Example 3: eventsMissingCatalogItems eventType = search eventTime < "2018-04-23T18:30:43.511Z" * Example 4: eventTime > "2012-04-23T18:25:43.511Z" * Example 5: eventType = search * Example 6: eventsMissingCatalogItems
pageSize
- Optional. Maximum number of results to return per page. If
zero, the service will choose a reasonable default.
pageToken
- Optional. The previous
ListUserEventsResponse.next_page_token.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleCloudRecommendationengineV1beta1ListUserEventsResponse.
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<GoogleCloudRecommendationengineV1beta1ListUserEventsResponse>
list(
core.String parent, {
core.String? filter,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final _queryParams = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final _url = 'v1beta1/' + core.Uri.encodeFull('$parent') + '/userEvents';
final _response = await _requester.request(
_url,
'GET',
queryParams: _queryParams,
);
return GoogleCloudRecommendationengineV1beta1ListUserEventsResponse
.fromJson(_response as core.Map<core.String, core.dynamic>);
}