Method: accounts.searchChangeHistoryEvents

Searches through all changes to an account or its children given the specified set of filters.

HTTP request

POST https://analyticsadmin.googleapis.com/v1alpha/{account=accounts/*}:searchChangeHistoryEvents

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
account

string

Required. The account resource for which to return change history resources. Format: accounts/{account}

Example: accounts/100

Request body

The request body contains data with the following structure:

JSON representation
{
  "property": string,
  "resourceType": [
    enum (ChangeHistoryResourceType)
  ],
  "action": [
    enum (ActionType)
  ],
  "actorEmail": [
    string
  ],
  "earliestChangeTime": string,
  "latestChangeTime": string,
  "pageSize": integer,
  "pageToken": string
}
Fields
property

string

Optional. Resource name for a child property. If set, only return changes made to this property or its child resources. Format: properties/{propertyId}

Example: properties/100

resourceType[]

enum (ChangeHistoryResourceType)

Optional. If set, only return changes if they are for a resource that matches at least one of these types.

action[]

enum (ActionType)

Optional. If set, only return changes that match one or more of these types of actions.

actorEmail[]

string

Optional. If set, only return changes if they are made by a user in this list.

earliestChangeTime

string (Timestamp format)

Optional. If set, only return changes made after this time (inclusive).

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

latestChangeTime

string (Timestamp format)

Optional. If set, only return changes made before this time (inclusive).

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

pageSize

integer

Optional. The maximum number of ChangeHistoryEvent items to return. The service may return fewer than this value, even if there are additional pages. If unspecified, at most 50 items will be returned. The maximum value is 200 (higher values will be coerced to the maximum).

pageToken

string

Optional. A page token, received from a previous accounts.searchChangeHistoryEvents call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to accounts.searchChangeHistoryEvents must match the call that provided the page token.

Response body

Response message for SearchAccounts RPC.

If successful, the response body contains data with the following structure:

JSON representation
{
  "changeHistoryEvents": [
    {
      object (ChangeHistoryEvent)
    }
  ],
  "nextPageToken": string
}
Fields
changeHistoryEvents[]

object (ChangeHistoryEvent)

Results that were accessible to the caller.

nextPageToken

string

A token, which can be sent as pageToken to retrieve the next page. If this field is omitted, there are no subsequent pages.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/analytics.edit

ChangeHistoryResourceType

Types of resources whose changes may be returned from change history.

Enums
CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED Resource type unknown or not specified.
ACCOUNT Account resource
PROPERTY Property resource
GOOGLE_SIGNALS_SETTINGS GoogleSignalsSettings resource
CONVERSION_EVENT ConversionEvent resource
MEASUREMENT_PROTOCOL_SECRET MeasurementProtocolSecret resource
CUSTOM_DIMENSION CustomDimension resource
CUSTOM_METRIC CustomMetric resource
DATA_RETENTION_SETTINGS DataRetentionSettings resource
DATA_STREAM DataStream resource
ATTRIBUTION_SETTINGS AttributionSettings resource
EXPANDED_DATA_SET ExpandedDataSet resource
CHANNEL_GROUP ChannelGroup resource
ENHANCED_MEASUREMENT_SETTINGS EnhancedMeasurementSettings resource
DATA_REDACTION_SETTINGS DataRedactionSettings resource
SKADNETWORK_CONVERSION_VALUE_SCHEMA SKAdNetworkConversionValueSchema resource
AUDIENCE Audience resource
EVENT_CREATE_RULE EventCreateRule resource
CALCULATED_METRIC CalculatedMetric resource

ActionType

Types of actions that may change a resource.

Enums
ACTION_TYPE_UNSPECIFIED Action type unknown or not specified.
CREATED Resource was created in this change.
UPDATED Resource was updated in this change.
DELETED Resource was deleted in this change.

ChangeHistoryEvent

A set of changes within a Google Analytics account or its child properties that resulted from the same cause. Common causes would be updates made in the Google Analytics UI, changes from customer support, or automatic Google Analytics system changes.

JSON representation
{
  "id": string,
  "changeTime": string,
  "actorType": enum (ActorType),
  "userActorEmail": string,
  "changesFiltered": boolean,
  "changes": [
    {
      object (ChangeHistoryChange)
    }
  ]
}
Fields
id

string

ID of this change history event. This ID is unique across Google Analytics.

changeTime

string (Timestamp format)

Time when change was made.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

actorType

enum (ActorType)

The type of actor that made this change.

userActorEmail

string

Email address of the Google account that made the change. This will be a valid email address if the actor field is set to USER, and empty otherwise. Google accounts that have been deleted will cause an error.

changesFiltered

boolean

If true, then the list of changes returned was filtered, and does not represent all changes that occurred in this event.

changes[]

object (ChangeHistoryChange)

A list of changes made in this change history event that fit the filters specified in SearchChangeHistoryEventsRequest.

ActorType

Different kinds of actors that can make changes to Google Analytics resources.

Enums
ACTOR_TYPE_UNSPECIFIED Unknown or unspecified actor type.
USER Changes made by the user specified in actorEmail.
SYSTEM Changes made by the Google Analytics system.
SUPPORT Changes made by Google Analytics support team staff.

ChangeHistoryChange

A description of a change to a single Google Analytics resource.

JSON representation
{
  "resource": string,
  "action": enum (ActionType),
  "resourceBeforeChange": {
    object (ChangeHistoryResource)
  },
  "resourceAfterChange": {
    object (ChangeHistoryResource)
  }
}
Fields
resource

string

Resource name of the resource whose changes are described by this entry.

action

enum (ActionType)

The type of action that changed this resource.

resourceBeforeChange

object (ChangeHistoryResource)

Resource contents from before the change was made. If this resource was created in this change, this field will be missing.

resourceAfterChange

object (ChangeHistoryResource)

Resource contents from after the change was made. If this resource was deleted in this change, this field will be missing.

ChangeHistoryResource

A snapshot of a resource as before or after the result of a change in change history.

JSON representation
{

  // Union field resource can be only one of the following:
  "account": {
    object (Account)
  },
  "property": {
    object (Property)
  },
  "firebaseLink": {
    object (FirebaseLink)
  },
  "googleAdsLink": {
    object (GoogleAdsLink)
  },
  "googleSignalsSettings": {
    object (GoogleSignalsSettings)
  },
  "displayVideo360AdvertiserLink": {
    object (DisplayVideo360AdvertiserLink)
  },
  "displayVideo360AdvertiserLinkProposal": {
    object (DisplayVideo360AdvertiserLinkProposal)
  },
  "conversionEvent": {
    object (ConversionEvent)
  },
  "measurementProtocolSecret": {
    object (MeasurementProtocolSecret)
  },
  "customDimension": {
    object (CustomDimension)
  },
  "customMetric": {
    object (CustomMetric)
  },
  "dataRetentionSettings": {
    object (DataRetentionSettings)
  },
  "searchAds360Link": {
    object (SearchAds360Link)
  },
  "dataStream": {
    object (DataStream)
  },
  "attributionSettings": {
    object (AttributionSettings)
  },
  "expandedDataSet": {
    object (ExpandedDataSet)
  },
  "channelGroup": {
    object (ChannelGroup)
  },
  "bigqueryLink": {
    object (BigQueryLink)
  },
  "enhancedMeasurementSettings": {
    object (EnhancedMeasurementSettings)
  },
  "dataRedactionSettings": {
    object (DataRedactionSettings)
  },
  "skadnetworkConversionValueSchema": {
    object (SKAdNetworkConversionValueSchema)
  },
  "adsenseLink": {
    object (AdSenseLink)
  },
  "audience": {
    object (Audience)
  },
  "eventCreateRule": {
    object (EventCreateRule)
  },
  "calculatedMetric": {
    object (CalculatedMetric)
  }
  // End of list of possible types for union field resource.
}
Fields

Union field resource.

resource can be only one of the following:

account

object (Account)

A snapshot of an Account resource in change history.

property

object (Property)

A snapshot of a Property resource in change history.

googleSignalsSettings

object (GoogleSignalsSettings)

A snapshot of a GoogleSignalsSettings resource in change history.

conversionEvent

object (ConversionEvent)

A snapshot of a ConversionEvent resource in change history.

measurementProtocolSecret

object (MeasurementProtocolSecret)

A snapshot of a MeasurementProtocolSecret resource in change history.

customDimension

object (CustomDimension)

A snapshot of a CustomDimension resource in change history.

customMetric

object (CustomMetric)

A snapshot of a CustomMetric resource in change history.

dataRetentionSettings

object (DataRetentionSettings)

A snapshot of a data retention settings resource in change history.

dataStream

object (DataStream)

A snapshot of a DataStream resource in change history.

attributionSettings

object (AttributionSettings)

A snapshot of AttributionSettings resource in change history.

expandedDataSet

object (ExpandedDataSet)

A snapshot of an ExpandedDataSet resource in change history.

channelGroup

object (ChannelGroup)

A snapshot of a ChannelGroup resource in change history.

enhancedMeasurementSettings

object (EnhancedMeasurementSettings)

A snapshot of EnhancedMeasurementSettings resource in change history.

dataRedactionSettings

object (DataRedactionSettings)

A snapshot of DataRedactionSettings resource in change history.

skadnetworkConversionValueSchema

object (SKAdNetworkConversionValueSchema)

A snapshot of SKAdNetworkConversionValueSchema resource in change history.

audience

object (Audience)

A snapshot of an Audience resource in change history.

eventCreateRule

object (EventCreateRule)

A snapshot of an EventCreateRule resource in change history.

calculatedMetric

object (CalculatedMetric)

A snapshot of a CalculatedMetric resource in change history.