properties

POST /v1beta/properties/{propertiesId}:runAccessReport

Changed on

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. Reports may be requested for any property, but dimensions that aren't related to quota can only be requested on Google Analytics 360 properties. This method is only available to Administrators. These data access records include GA UI Reporting, GA UI Explorations, GA 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. To give your feedback on this API, complete the Google Analytics Access Reports feedback form.

Request

  • Base URL
    https://analyticsadmin.googleapis.com
  • Auth
    • OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/analytics.edit
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/analytics.edit
    • or OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/analytics.readonly
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/analytics.readonly

Path parameters

propertiesId, string required

Query parameters

$.xgafv, '1' | '2'

V1 error format.

access_token, string

OAuth access token.

alt, 'json' | 'media' | 'proto'

Data format for response.

callback, string

JSONP

fields, string

Selector specifying which fields to include in a partial response.

key, string

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

oauth_token, string

OAuth 2.0 token for the current user.

prettyPrint, boolean

Returns response with indentations and line breaks.

quotaUser, string

Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

uploadType, string

Legacy upload protocol for media (e.g. "media", "multipart").

upload_protocol, string

Upload protocol for media (e.g. "raw", "multipart").

Request body

GoogleAnalyticsAdminV1betaRunAccessReportRequest required

The request for a Data Access Record Report.

dateRanges, GoogleAnalyticsAdminV1betaAccessDateRange[]

Date ranges of access records to read. If multiple date ranges are requested, each response row will contain a zero based date range index. If two date ranges overlap, the access records for the overlapping days is included in the response rows for both date ranges. Requests are allowed up to 2 date ranges.

dimensionFilter, GoogleAnalyticsAdminV1betaAccessFilterExpression

Expresses dimension or metric filters. The fields in the same expression need to be either all dimensions or all metrics.

dimensions, GoogleAnalyticsAdminV1betaAccessDimension[]

The dimensions requested and displayed in the response. Requests are allowed up to 9 dimensions.

expandGroups, boolean

Optional. Decides whether to return the users within user groups. This field works only when include_all_users is set to true. If true, it will return all users with access to the specified property or account. If false, only the users with direct access will be returned.

includeAllUsers, boolean

Optional. Determines whether to include users who have never made an API call in the response. If true, all users with access to the specified property or account are included in the response, regardless of whether they have made an API call or not. If false, only the users who have made an API call will be included.

limit, string int64

The number of rows to return. If unspecified, 10,000 rows are returned. The API returns a maximum of 100,000 rows per request, no matter how many you ask for. limit must be positive. The API may return fewer rows than the requested limit, if there aren't as many remaining rows as the limit. For instance, there are fewer than 300 possible values for the dimension country, so when reporting on only country, you can't get more than 300 rows, even if you set limit to a higher value. To learn more about this pagination parameter, see Pagination.

metricFilter, GoogleAnalyticsAdminV1betaAccessFilterExpression

Expresses dimension or metric filters. The fields in the same expression need to be either all dimensions or all metrics.

metrics, GoogleAnalyticsAdminV1betaAccessMetric[]

The metrics requested and displayed in the response. Requests are allowed up to 10 metrics.

offset, string int64

The row count of the start row. The first row is counted as row 0. If offset is unspecified, it is treated as 0. If offset is zero, then this method will return the first page of results with limit entries. To learn more about this pagination parameter, see Pagination.

orderBys, GoogleAnalyticsAdminV1betaAccessOrderBy[]

Specifies how rows are ordered in the response.

returnEntityQuota, boolean

Toggles whether to return the current state of this Analytics Property's quota. Quota is returned in AccessQuota. For account-level requests, this field must be false.

timeZone, string

This request's time zone if specified. If unspecified, the property's time zone is used. The request's time zone is used to interpret the start & end dates of the report. Formatted as strings from the IANA Time Zone database (https://www.iana.org/time-zones); for example "America/New_York" or "Asia/Tokyo".

Response

Successful response

GoogleAnalyticsAdminV1betaRunAccessReportResponse required

The customized Data Access Record Report response.

dimensionHeaders, GoogleAnalyticsAdminV1betaAccessDimensionHeader[]

The header for a column in the report that corresponds to a specific dimension. The number of DimensionHeaders and ordering of DimensionHeaders matches the dimensions present in rows.

metricHeaders, GoogleAnalyticsAdminV1betaAccessMetricHeader[]

The header for a column in the report that corresponds to a specific metric. The number of MetricHeaders and ordering of MetricHeaders matches the metrics present in rows.

quota, GoogleAnalyticsAdminV1betaAccessQuota

Current state of all quotas for this Analytics property. If any quota for a property is exhausted, all requests to that property will return Resource Exhausted errors.

rowCount, integer

The total number of rows in the query result. rowCount is independent of the number of rows returned in the response, the limit request parameter, and the offset request parameter. For example if a query returns 175 rows and includes limit of 50 in the API request, the response will contain rowCount of 175 but only 50 rows. To learn more about this pagination parameter, see Pagination.

rows, GoogleAnalyticsAdminV1betaAccessRow[]

Rows of dimension value combinations and metric values in the report.

Changes

    • info

      the security scope https://www.googleapis.com/auth/analytics.edit was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/analytics.edit was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/analytics.readonly was removed from the endpoint's security scheme Oauth2

    1 more change in this revision