0

I've created lots of Google App Script scripts for Classroom API and the Admin Groups and Drive APIs but I can't seem to get started with AdminReports.

I get the message:

"AdminReports is not defined"

and I can't see it listed in the services that one can add in the scripting environment.

Is it because it's an advanced service? Is there something else that I need to do to get it up and running?

2 Answers2

1

Enable Advanced Google Services:

To use an advanced Google service, follow these instructions:

New Editor:

enter image description here


Configuration

  • Select Admin SDK API

  • Select reports_v1 as API Version

  • (Optional) Replace AdminDirectory with AdminReports

enter image description here

Ron M
  • 5,791
  • 1
  • 4
  • 16
  • Thank you. I hadn't noticed either the dropdown for version or the fact or the fact that one could simply rename the identifier. – Marc Bibaud Feb 06 '21 at 12:05
0

*From https://developers.google.com/admin-sdk/reports/reference/rest?hl=en

Service: admin.googleapis.com

To call this service, we recommend that you use the Google-provided client libraries. If your application needs to use your own libraries to call this service, use the following information when you make the API requests.


Discovery document

A Discovery Document is a machine-readable specification for describing and consuming REST APIs. It is used to build client libraries, IDE plugins, and other tools that interact with Google APIs. One service may provide multiple discovery documents. This service provides the following discovery document:


Service endpoint

A service endpoint is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:

  • https://admin.googleapis.com

REST Resource: activities

  • list: GET /admin/reports/v1/activity/users/{userKey}/applications/{applicationName} Retrieves a list of activities for a specific customer's account and application such as the Admin console application or the Google Drive application.

  • watch: POST /admin/reports/v1/activity/users/{userKey}/applications/{applicationName}/watch Start receiving notifications for account activities.


REST Resource: customerUsageReports

  • get: GET /admin/reports/v1/usage/dates/{date} Retrieves a report which is a collection of properties and statistics for a specific customer's account.

REST Resource: entityUsageReports

  • get: GET /admin/reports/v1/usage/{entityType}/{entityKey}/dates/{date} Retrieves a report which is a collection of properties and statistics for entities used by users within the account.

REST Resource: userUsageReport

  • get: GET /admin/reports/v1/usage/users/{userKey}/dates/{date} Retrieves a report which is a collection of properties and statistics for a set of users with the account.
Baby_Boy
  • 346
  • 3
  • 18