Class: Google::Apis::AdminReportsV1::ReportsService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::AdminReportsV1::ReportsService
- Defined in:
- lib/google/apis/admin_reports_v1/service.rb
Overview
Admin SDK API
Admin SDK lets administrators of enterprise domains to view and manage resources like user, groups etc. It also provides audit and usage reports of domain.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://admin.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#get_customer_usage_report(date, customer_id: nil, page_token: nil, parameters: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminReportsV1::UsageReports
Retrieves a report which is a collection of properties and statistics for a specific customer's account.
-
#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, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminReportsV1::UsageReports
Retrieves a report which is a collection of properties and statistics for entities used by users within the account.
-
#get_user_usage_report(user_key, date, customer_id: nil, filters: nil, group_id_filter: nil, max_results: nil, org_unit_id: nil, page_token: nil, parameters: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminReportsV1::UsageReports
Retrieves a report which is a collection of properties and statistics for a set of users with the account.
-
#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, group_id_filter: nil, max_results: nil, org_unit_id: nil, page_token: nil, start_time: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminReportsV1::Activities
Retrieves a list of activities for a specific customer's account and application such as the Admin console application or the Google Drive application.
-
#stop_channel(channel_object = nil, fields: nil, quota_user: 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, group_id_filter: nil, max_results: nil, org_unit_id: nil, page_token: nil, start_time: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminReportsV1::Channel
Start receiving notifications for account activities.
Constructor Details
#initialize ⇒ ReportsService
Returns a new instance of ReportsService.
49 50 51 52 53 54 |
# File 'lib/google/apis/admin_reports_v1/service.rb', line 49 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-admin_reports_v1', client_version: Google::Apis::AdminReportsV1::GEM_VERSION) @batch_path = 'batch' 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.
42 43 44 |
# File 'lib/google/apis/admin_reports_v1/service.rb', line 42 def key @key end |
#quota_user ⇒ String
Returns 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.
47 48 49 |
# File 'lib/google/apis/admin_reports_v1/service.rb', line 47 def quota_user @quota_user end |
Instance Method Details
#get_customer_usage_report(date, customer_id: nil, page_token: nil, parameters: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminReportsV1::UsageReports
Retrieves a report which is a collection of properties and statistics for a specific customer's account. For more information, see the Customers Usage Report guide. For more information about the customer report's parameters, see the Customers Usage parameters reference guides.
406 407 408 409 410 411 412 413 414 415 416 417 |
# File 'lib/google/apis/admin_reports_v1/service.rb', line 406 def get_customer_usage_report(date, customer_id: nil, page_token: nil, parameters: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'admin/reports/v1/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? 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, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminReportsV1::UsageReports
Retrieves a report which is a collection of properties and statistics for entities used by users within the account. For more information, see the Entities Usage Report guide. For more information about the entities report's parameters, see the Entities Usage parameters reference guides.
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 |
# File 'lib/google/apis/admin_reports_v1/service.rb', line 492 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, options: nil, &block) command = make_simple_command(:get, 'admin/reports/v1/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? execute_or_queue_command(command, &block) end |
#get_user_usage_report(user_key, date, customer_id: nil, filters: nil, group_id_filter: nil, max_results: nil, org_unit_id: nil, page_token: nil, parameters: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminReportsV1::UsageReports
Retrieves a report which is a collection of properties and statistics for a set of users with the account. For more information, see the User Usage Report guide. For more information about the user report's parameters, see the Users Usage parameters reference guides.
589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 |
# File 'lib/google/apis/admin_reports_v1/service.rb', line 589 def get_user_usage_report(user_key, date, customer_id: nil, filters: nil, group_id_filter: nil, max_results: nil, org_unit_id: nil, page_token: nil, parameters: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'admin/reports/v1/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['groupIdFilter'] = group_id_filter unless group_id_filter.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['orgUnitID'] = org_unit_id unless org_unit_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? 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, group_id_filter: nil, max_results: nil, org_unit_id: nil, page_token: nil, start_time: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminReportsV1::Activities
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.
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/google/apis/admin_reports_v1/service.rb', line 172 def list_activities(user_key, application_name, actor_ip_address: nil, customer_id: nil, end_time: nil, event_name: nil, filters: nil, group_id_filter: nil, max_results: nil, org_unit_id: nil, page_token: nil, start_time: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'admin/reports/v1/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['groupIdFilter'] = group_id_filter unless group_id_filter.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['orgUnitID'] = org_unit_id unless org_unit_id.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? execute_or_queue_command(command, &block) end |
#stop_channel(channel_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Stop watching resources through this channel.
350 351 352 353 354 355 356 357 |
# File 'lib/google/apis/admin_reports_v1/service.rb', line 350 def stop_channel(channel_object = nil, fields: nil, quota_user: 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? 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, group_id_filter: nil, max_results: nil, org_unit_id: nil, page_token: nil, start_time: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdminReportsV1::Channel
Start receiving notifications for account activities. For more information, see Receiving Push Notifications.
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 |
# File 'lib/google/apis/admin_reports_v1/service.rb', line 308 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, group_id_filter: nil, max_results: nil, org_unit_id: nil, page_token: nil, start_time: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'admin/reports/v1/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['groupIdFilter'] = group_id_filter unless group_id_filter.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['orgUnitID'] = org_unit_id unless org_unit_id.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? execute_or_queue_command(command, &block) end |