View Source GoogleApi.Admin.Reports_v1.Api.Activities (google_api_admin v0.40.0)
API calls for all endpoints tagged Activities
.
Summary
Functions
Retrieves a list of activities for a specific customer's account and application such as the Admin console application or the Google Drive application. For more information, see the guides for administrator and Google Drive activity reports. For more information about the activity report's parameters, see the activity parameters reference guides.
Start receiving notifications for account activities. For more information, see Receiving Push Notifications.
Functions
reports_activities_list(connection, user_key, application_name, optional_params \\ [], opts \\ [])
View Source@spec reports_activities_list( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Admin.Reports_v1.Model.Activities.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Retrieves a list of activities for a specific customer's account and application such as the Admin console application or the Google Drive application. For more information, see the guides for administrator and Google Drive activity reports. For more information about the activity report's parameters, see the activity parameters reference guides.
Parameters
-
connection
(type:GoogleApi.Admin.Reports_v1.Connection.t
) - Connection to server -
user_key
(type:String.t
) - Represents the profile ID or the user email for which the data should be filtered. Can beall
for all information, oruserKey
for a user's unique Google Workspace profile ID or their primary email address. Must not be a deleted user. For a deleted user, callusers.list
in Directory API withshowDeleted=true
, then use the returnedID
as theuserKey
. -
application_name
(type:String.t
) - Application name for which the events are to be retrieved. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - 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
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:actorIpAddress
(type:String.t
) - The Internet Protocol (IP) Address of host where the event was performed. This is an additional way to filter a report's summary using the IP address of the user whose activity is being reported. This IP address may or may not reflect the user's physical location. For example, the IP address can be the user's proxy server's address or a virtual private network (VPN) address. This parameter supports both IPv4 and IPv6 address versions. -
:customerId
(type:String.t
) - The unique ID of the customer to retrieve data for. -
:endTime
(type:String.t
) - Sets the end of the range of time shown in the report. The date is in the RFC 3339 format, for example 2010-10-28T10:26:35.000Z. The default value is the approximate time of the API request. An API report has three basic time concepts: - Date of the API's request for a report: When the API created and retrieved the report. - Report's start time: The beginning of the timespan shown in the report. ThestartTime
must be before theendTime
(if specified) and the current time when the request is made, or the API returns an error. - Report's end time: The end of the timespan shown in the report. For example, the timespan of events summarized in a report can start in April and end in May. The report itself can be requested in August. If theendTime
is not specified, the report returns all activities from thestartTime
until the current time or the most recent 180 days if thestartTime
is more than 180 days in the past. -
:eventName
(type:String.t
) - The name of the event being queried by the API. EacheventName
is related to a specific Google Workspace service or feature which the API organizes into types of events. An example is the Google Calendar events in the Admin console application's reports. The Calendar Settingstype
structure has all of the CalendareventName
activities reported by the API. When an administrator changes a Calendar setting, the API reports this activity in the Calendar Settingstype
andeventName
parameters. For more information abouteventName
query strings and parameters, see the list of event names for various applications above inapplicationName
. -
:filters
(type:String.t
) - Thefilters
query string is a comma-separated list composed of event parameters manipulated by relational operators. Event parameters are in the form{parameter1 name}{relational operator}{parameter1 value},{parameter2 name}{relational operator}{parameter2 value},...
These event parameters are associated with a specificeventName
. An empty report is returned if the request's parameter doesn't belong to theeventName
. For more information about the availableeventName
fields for each application and their associated parameters, go to the ApplicationName table, then click through to the Activity Events page in the Appendix for the application you want. In the following Drive activity examples, the returned list consists of alledit
events where thedoc_id
parameter value matches the conditions defined by the relational operator. In the first example, the request returns all edited documents with adoc_id
value equal to12345
. In the second example, the report returns any edited documents where thedoc_id
value is not equal to98765
. The<>
operator is URL-encoded in the request's query string (%3C%3E
):GET...&eventName=edit&filters=doc_id==12345 GET...&eventName=edit&filters=doc_id%3C%3E98765
Afilters
query supports these relational operators:==
—'equal to'.<>
—'not equal to'. Must be URL-encoded (%3C%3E).<
—'less than'. Must be URL-encoded (%3C).<=
—'less than or equal to'. Must be URL-encoded (%3C=).>
—'greater than'. Must be URL-encoded (%3E).>=
—'greater than or equal to'. Must be URL-encoded (%3E=). Note: The API doesn't accept multiple values of the same parameter. If a parameter is supplied more than once in the API request, the API only accepts the last value of that parameter. In addition, if an invalid parameter is supplied in the API request, the API ignores that parameter and returns the response corresponding to the remaining valid parameters. If no parameters are requested, all parameters are returned. -
:groupIdFilter
(type:String.t
) - Comma separated group ids (obfuscated) on which user activities are filtered, i.e. the response will contain activities for only those users that are a part of at least one of the group ids mentioned here. Format: "id:abc123,id:xyz456" -
:maxResults
(type:integer()
) - Determines how many activity records are shown on each response page. For example, if the request setsmaxResults=1
and the report has two activities, the report has two pages. The response'snextPageToken
property has the token to the second page. ThemaxResults
query string is optional in the request. The default value is 1000. -
:orgUnitID
(type:String.t
) - ID of the organizational unit to report on. Activity records will be shown only for users who belong to the specified organizational unit. Data before Dec 17, 2018 doesn't appear in the filtered results. -
:pageToken
(type:String.t
) - The token to specify next page. A report with multiple pages has anextPageToken
property in the response. In your follow-on request getting the next page of the report, enter thenextPageToken
value in thepageToken
query string. -
:startTime
(type:String.t
) - Sets the beginning of the range of time shown in the report. The date is in the RFC 3339 format, for example 2010-10-28T10:26:35.000Z. The report returns all activities fromstartTime
untilendTime
. ThestartTime
must be before theendTime
(if specified) and the current time when the request is made, or the API returns an error.
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Admin.Reports_v1.Model.Activities{}}
on success -
{:error, info}
on failure
reports_activities_watch(connection, user_key, application_name, optional_params \\ [], opts \\ [])
View Source@spec reports_activities_watch( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Admin.Reports_v1.Model.Channel.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Start receiving notifications for account activities. For more information, see Receiving Push Notifications.
Parameters
-
connection
(type:GoogleApi.Admin.Reports_v1.Connection.t
) - Connection to server -
user_key
(type:String.t
) - Represents the profile ID or the user email for which the data should be filtered. Can beall
for all information, oruserKey
for a user's unique Google Workspace profile ID or their primary email address. Must not be a deleted user. For a deleted user, callusers.list
in Directory API withshowDeleted=true
, then use the returnedID
as theuserKey
. -
application_name
(type:String.t
) - Application name for which the events are to be retrieved. -
optional_params
(type:keyword()
) - Optional parameters-
:"$.xgafv"
(type:String.t
) - V1 error format. -
:access_token
(type:String.t
) - OAuth access token. -
:alt
(type:String.t
) - Data format for response. -
:callback
(type:String.t
) - JSONP -
:fields
(type:String.t
) - Selector specifying which fields to include in a partial response. -
:key
(type:String.t
) - 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
(type:String.t
) - OAuth 2.0 token for the current user. -
:prettyPrint
(type:boolean()
) - Returns response with indentations and line breaks. -
:quotaUser
(type:String.t
) - 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
(type:String.t
) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol
(type:String.t
) - Upload protocol for media (e.g. "raw", "multipart"). -
:actorIpAddress
(type:String.t
) - The Internet Protocol (IP) Address of host where the event was performed. This is an additional way to filter a report's summary using the IP address of the user whose activity is being reported. This IP address may or may not reflect the user's physical location. For example, the IP address can be the user's proxy server's address or a virtual private network (VPN) address. This parameter supports both IPv4 and IPv6 address versions. -
:customerId
(type:String.t
) - The unique ID of the customer to retrieve data for. -
:endTime
(type:String.t
) - Sets the end of the range of time shown in the report. The date is in the RFC 3339 format, for example 2010-10-28T10:26:35.000Z. The default value is the approximate time of the API request. An API report has three basic time concepts: - Date of the API's request for a report: When the API created and retrieved the report. - Report's start time: The beginning of the timespan shown in the report. ThestartTime
must be before theendTime
(if specified) and the current time when the request is made, or the API returns an error. - Report's end time: The end of the timespan shown in the report. For example, the timespan of events summarized in a report can start in April and end in May. The report itself can be requested in August. If theendTime
is not specified, the report returns all activities from thestartTime
until the current time or the most recent 180 days if thestartTime
is more than 180 days in the past. -
:eventName
(type:String.t
) - The name of the event being queried by the API. EacheventName
is related to a specific Google Workspace service or feature which the API organizes into types of events. An example is the Google Calendar events in the Admin console application's reports. The Calendar Settingstype
structure has all of the CalendareventName
activities reported by the API. When an administrator changes a Calendar setting, the API reports this activity in the Calendar Settingstype
andeventName
parameters. For more information abouteventName
query strings and parameters, see the list of event names for various applications above inapplicationName
. -
:filters
(type:String.t
) - Thefilters
query string is a comma-separated list composed of event parameters manipulated by relational operators. Event parameters are in the form{parameter1 name}{relational operator}{parameter1 value},{parameter2 name}{relational operator}{parameter2 value},...
These event parameters are associated with a specificeventName
. An empty report is returned if the request's parameter doesn't belong to theeventName
. For more information about the availableeventName
fields for each application and their associated parameters, go to the ApplicationName table, then click through to the Activity Events page in the Appendix for the application you want. In the following Drive activity examples, the returned list consists of alledit
events where thedoc_id
parameter value matches the conditions defined by the relational operator. In the first example, the request returns all edited documents with adoc_id
value equal to12345
. In the second example, the report returns any edited documents where thedoc_id
value is not equal to98765
. The<>
operator is URL-encoded in the request's query string (%3C%3E
):GET...&eventName=edit&filters=doc_id==12345 GET...&eventName=edit&filters=doc_id%3C%3E98765
Afilters
query supports these relational operators:==
—'equal to'.<>
—'not equal to'. Must be URL-encoded (%3C%3E).<
—'less than'. Must be URL-encoded (%3C).<=
—'less than or equal to'. Must be URL-encoded (%3C=).>
—'greater than'. Must be URL-encoded (%3E).>=
—'greater than or equal to'. Must be URL-encoded (%3E=). Note: The API doesn't accept multiple values of the same parameter. If a parameter is supplied more than once in the API request, the API only accepts the last value of that parameter. In addition, if an invalid parameter is supplied in the API request, the API ignores that parameter and returns the response corresponding to the remaining valid parameters. If no parameters are requested, all parameters are returned. -
:groupIdFilter
(type:String.t
) - Comma separated group ids (obfuscated) on which user activities are filtered, i.e. the response will contain activities for only those users that are a part of at least one of the group ids mentioned here. Format: "id:abc123,id:xyz456" -
:maxResults
(type:integer()
) - Determines how many activity records are shown on each response page. For example, if the request setsmaxResults=1
and the report has two activities, the report has two pages. The response'snextPageToken
property has the token to the second page. ThemaxResults
query string is optional in the request. The default value is 1000. -
:orgUnitID
(type:String.t
) -Deprecated
. This field is deprecated and is no longer supported. ID of the organizational unit to report on. Activity records will be shown only for users who belong to the specified organizational unit. Data before Dec 17, 2018 doesn't appear in the filtered results. -
:pageToken
(type:String.t
) - The token to specify next page. A report with multiple pages has anextPageToken
property in the response. In your follow-on request getting the next page of the report, enter thenextPageToken
value in thepageToken
query string. -
:startTime
(type:String.t
) - Sets the beginning of the range of time shown in the report. The date is in the RFC 3339 format, for example 2010-10-28T10:26:35.000Z. The report returns all activities fromstartTime
untilendTime
. ThestartTime
must be before theendTime
(if specified) and the current time when the request is made, or the API returns an error. -
:body
(type:GoogleApi.Admin.Reports_v1.Model.Channel.t
) -
-
-
opts
(type:keyword()
) - Call options
Returns
-
{:ok, %GoogleApi.Admin.Reports_v1.Model.Channel{}}
on success -
{:error, info}
on failure