Activities: watch

Requires authorization

Start receiving notifications for account activities. For more information, see Receiving Push Notifications.

Request

HTTP request

POST https://www.googleapis.com/admin/reports/v1/activity/users/userKey/applications/applicationName/watch

Parameters

Parameter name Value Description
Required parameters
applicationName string Application name for which the events are to be retrieved.
userKey string Represents the profile id or the user email for which the data should be filtered. When 'all' is specified as the userKey, it returns activity events for all users.
Optional parameters
eventName string Name of the event being queried.
filters string Event parameters in the form [parameter1 name][operator][parameter1 value],[parameter2 name][operator][parameter2 value],...

Authorization

This request requires authorization with at least one of the following scopes (read more about authentication and authorization).

Scope
https://www.googleapis.com/auth/admin.reports.audit.readonly

Request body

In the request body, supply data with the following structure:

{
  "id": string,
  "token": string,
  "expiration": long,
  "type": string,
  "address": string,
  "payload": boolean,
  "params": {
    "ttl": string
  }
}
Property name Value Description Notes
id string A UUID or similar unique string that identifies this channel.
token string An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
expiration long Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
type string The type of delivery mechanism used for this channel. The value should be set to "web_hook".
address string The address where notifications are delivered for this channel.
payload boolean A Boolean value to indicate whether payload is wanted. Optional.
params object Additional parameters controlling delivery channel behavior. Optional.
params.ttl string Specifies the time-to-live in seconds for the notification channel. The default is 21,600 seconds. Optional.

Response

If successful, this method returns a response body with the following structure:

{
  "kind": "api#channel",
  "id": string,
  "resourceId": string,
  "resourceUri": string,
  "token": string,
  "expiration": long
}
Property name Value Description Notes
kind string Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel".
id string A UUID or similar unique string that identifies this channel.
resourceId string An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
resourceUri string A version-specific identifier for the watched resource.
token string An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
expiration long Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.

Send feedback about...

Reports API
Reports API
Need help? Visit our support page.