runAccessReport method
- GoogleAnalyticsAdminV1betaRunAccessReportRequest request,
- String entity, {
- String? $fields,
Returns a customized report of data access records.
The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. The property must be in Google Analytics 360. This method is only available to Administrators. These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase & Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see searchChangeHistoryEvents.
request
- The metadata request object.
Request parameters:
entity
- The Data Access Report supports requesting at the property
level or account level. If requested at the account level, Data Access
Reports include all access for all properties under that account. To
request at the property level, entity should be for example
'properties/123' if "123" is your GA4 property ID. To request at the
account level, entity should be for example 'accounts/1234' if "1234" is
your GA4 Account ID.
Value must have pattern ^properties/\[^/\]+$
.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleAnalyticsAdminV1betaRunAccessReportResponse.
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<GoogleAnalyticsAdminV1betaRunAccessReportResponse>
runAccessReport(
GoogleAnalyticsAdminV1betaRunAccessReportRequest request,
core.String entity, {
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ =
'v1beta/' + core.Uri.encodeFull('$entity') + ':runAccessReport';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return GoogleAnalyticsAdminV1betaRunAccessReportResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}