Class: Google::Apis::AdminReportsV1::ReportsService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::AdminReportsV1::ReportsService
- Defined in:
- generated/google/apis/admin_reports_v1/service.rb
Overview
Admin Reports API
Fetches reports for the administrators of G Suite customers about the usage, collaboration, security, and risk for their users.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
An opaque string that represents a user for quota purposes.
-
#user_ip ⇒ String
Deprecated.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#get_customer_usage_report(date, customer_id: nil, page_token: nil, parameters: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminReportsV1::UsageReports
Retrieves a report which is a collection of properties / statistics for a specific customer.
-
#get_entity_usage_report(entity_type, entity_key, date, customer_id: nil, filters: nil, max_results: nil, page_token: nil, parameters: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminReportsV1::UsageReports
Retrieves a report which is a collection of properties / statistics for a set of objects.
-
#get_user_usage_report(user_key, date, customer_id: nil, filters: nil, max_results: nil, page_token: nil, parameters: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminReportsV1::UsageReports
Retrieves a report which is a collection of properties / statistics for a set of users.
-
#initialize ⇒ ReportsService
constructor
A new instance of ReportsService.
-
#list_activities(user_key, application_name, actor_ip_address: nil, customer_id: nil, end_time: nil, event_name: nil, filters: nil, max_results: nil, page_token: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminReportsV1::Activities
Retrieves a list of activities for a specific customer and application.
-
#stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Stop watching resources through this channel.
-
#watch_activity(user_key, application_name, channel_object = nil, actor_ip_address: nil, customer_id: nil, end_time: nil, event_name: nil, filters: nil, max_results: nil, page_token: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminReportsV1::Channel
Push changes to activities.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ ReportsService
Returns a new instance of ReportsService
50 51 52 53 |
# File 'generated/google/apis/admin_reports_v1/service.rb', line 50 def initialize super('https://www.googleapis.com/', 'admin/reports/v1/') @batch_path = 'batch/admin/reports_v1' end |
Instance Attribute Details
#key ⇒ String
Returns 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.
39 40 41 |
# File 'generated/google/apis/admin_reports_v1/service.rb', line 39 def key @key end |
#quota_user ⇒ String
Returns An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
44 45 46 |
# File 'generated/google/apis/admin_reports_v1/service.rb', line 44 def quota_user @quota_user end |
#user_ip ⇒ String
Returns Deprecated. Please use quotaUser instead.
48 49 50 |
# File 'generated/google/apis/admin_reports_v1/service.rb', line 48 def user_ip @user_ip end |
Instance Method Details
#get_customer_usage_report(date, customer_id: nil, page_token: nil, parameters: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminReportsV1::UsageReports
Retrieves a report which is a collection of properties / statistics for a specific customer.
247 248 249 250 251 252 253 254 255 256 257 258 259 |
# File 'generated/google/apis/admin_reports_v1/service.rb', line 247 def get_customer_usage_report(date, customer_id: nil, page_token: nil, parameters: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'usage/dates/{date}', ) command.response_representation = Google::Apis::AdminReportsV1::UsageReports::Representation command.response_class = Google::Apis::AdminReportsV1::UsageReports command.params['date'] = date unless date.nil? command.query['customerId'] = customer_id unless customer_id.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['parameters'] = parameters unless parameters.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_entity_usage_report(entity_type, entity_key, date, customer_id: nil, filters: nil, max_results: nil, page_token: nil, parameters: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminReportsV1::UsageReports
Retrieves a report which is a collection of properties / statistics for a set of objects.
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'generated/google/apis/admin_reports_v1/service.rb', line 299 def get_entity_usage_report(entity_type, entity_key, date, customer_id: nil, filters: nil, max_results: nil, page_token: nil, parameters: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'usage/{entityType}/{entityKey}/dates/{date}', ) command.response_representation = Google::Apis::AdminReportsV1::UsageReports::Representation command.response_class = Google::Apis::AdminReportsV1::UsageReports command.params['entityType'] = entity_type unless entity_type.nil? command.params['entityKey'] = entity_key unless entity_key.nil? command.params['date'] = date unless date.nil? command.query['customerId'] = customer_id unless customer_id.nil? command.query['filters'] = filters unless filters.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['parameters'] = parameters unless parameters.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_user_usage_report(user_key, date, customer_id: nil, filters: nil, max_results: nil, page_token: nil, parameters: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminReportsV1::UsageReports
Retrieves a report which is a collection of properties / statistics for a set of users.
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 |
# File 'generated/google/apis/admin_reports_v1/service.rb', line 354 def get_user_usage_report(user_key, date, customer_id: nil, filters: nil, max_results: nil, page_token: nil, parameters: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'usage/users/{userKey}/dates/{date}', ) command.response_representation = Google::Apis::AdminReportsV1::UsageReports::Representation command.response_class = Google::Apis::AdminReportsV1::UsageReports command.params['userKey'] = user_key unless user_key.nil? command.params['date'] = date unless date.nil? command.query['customerId'] = customer_id unless customer_id.nil? command.query['filters'] = filters unless filters.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['parameters'] = parameters unless parameters.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_activities(user_key, application_name, actor_ip_address: nil, customer_id: nil, end_time: nil, event_name: nil, filters: nil, max_results: nil, page_token: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminReportsV1::Activities
Retrieves a list of activities for a specific customer and application.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'generated/google/apis/admin_reports_v1/service.rb', line 99 def list_activities(user_key, application_name, actor_ip_address: nil, customer_id: nil, end_time: nil, event_name: nil, filters: nil, max_results: nil, page_token: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'activity/users/{userKey}/applications/{applicationName}', ) command.response_representation = Google::Apis::AdminReportsV1::Activities::Representation command.response_class = Google::Apis::AdminReportsV1::Activities command.params['userKey'] = user_key unless user_key.nil? command.params['applicationName'] = application_name unless application_name.nil? command.query['actorIpAddress'] = actor_ip_address unless actor_ip_address.nil? command.query['customerId'] = customer_id unless customer_id.nil? command.query['endTime'] = end_time unless end_time.nil? command.query['eventName'] = event_name unless event_name.nil? command.query['filters'] = filters unless filters.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['startTime'] = start_time unless start_time.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Stop watching resources through this channel
207 208 209 210 211 212 213 214 215 |
# File 'generated/google/apis/admin_reports_v1/service.rb', line 207 def stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '/admin/reports_v1/channels/stop', ) command.request_representation = Google::Apis::AdminReportsV1::Channel::Representation command.request_object = channel_object command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#watch_activity(user_key, application_name, channel_object = nil, actor_ip_address: nil, customer_id: nil, end_time: nil, event_name: nil, filters: nil, max_results: nil, page_token: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminReportsV1::Channel
Push changes to activities
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'generated/google/apis/admin_reports_v1/service.rb', line 164 def watch_activity(user_key, application_name, channel_object = nil, actor_ip_address: nil, customer_id: nil, end_time: nil, event_name: nil, filters: nil, max_results: nil, page_token: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'activity/users/{userKey}/applications/{applicationName}/watch', ) command.request_representation = Google::Apis::AdminReportsV1::Channel::Representation command.request_object = channel_object command.response_representation = Google::Apis::AdminReportsV1::Channel::Representation command.response_class = Google::Apis::AdminReportsV1::Channel command.params['userKey'] = user_key unless user_key.nil? command.params['applicationName'] = application_name unless application_name.nil? command.query['actorIpAddress'] = actor_ip_address unless actor_ip_address.nil? command.query['customerId'] = customer_id unless customer_id.nil? command.query['endTime'] = end_time unless end_time.nil? command.query['eventName'] = event_name unless event_name.nil? command.query['filters'] = filters unless filters.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['startTime'] = start_time unless start_time.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |