🛠️ Google Admin SDK API

Number of APIs: 6

Google Admin API Overview with Qodex Collection

The Google Admin API allows administrators to manage their Google Workspace services and view reports on user activity and security. The API covers a broad range of functionalities including managing users, devices, groups, and settings, as well as providing detailed reports and insights into how the services are used.

Technical Concepts

User Key

  • What is a User Key?: A unique identifier for a user within the Google Workspace, used in API calls to specify which user's data to manage or report on.

Application Name

  • What is an Application Name?: Refers to the specific Google Workspace application (like Gmail, Drive, etc.) for which activity reports are being requested.

Obtaining Access Tokens

To use the Google Admin API, you need an OAuth 2.0 token:

  1. Google Developer Console: Go to the Google Developer Console, create a new project, and enable the Google Admin API.

  2. OAuth Consent Screen: Configure the OAuth consent screen with the necessary scopes.

  3. Credentials: Generate credentials (OAuth client ID).

Scopes

The Google Admin API uses scopes to define the level of access required by the application:

ScopeDescription
https://www.googleapis.com/auth/admin.reports.audit.readonlyRead-only access to audit reports.
https://www.googleapis.com/auth/admin.reports.usage.readonlyRead-only access to usage reports.

Common Parameters

ParameterDescriptionExample Value
userKeyThe unique identifier for the user.{{userKey}}
applicationNameThe name of the Google Workspace application.'gmail'
dateDate for which the report or data is requested.'2024-04-15'

For a detailed guide and more examples, please refer to our Developer Portal.

  1. reports-Activities - List Activities GET {{baseUrl}}/admin/reports/v1/activity/users/:userKey/applications/:applicationName?actorIpAddress=do&customerId=do&endTime=do&eventName=do&filters=do&maxResults=41679878&orgUnitID=do&pageToken=do&startTime=do&groupIdFilter=do&access_token=do&alt=json&callback=do&fields=do&key=do&oauth_token=do&prettyPrint=true&quotaUser=do&upload_protocol=do&uploadType=do&$.xgafv=2

  2. reports-Activities - Watch Activites POST {{baseUrl}}/admin/reports/v1/activity/users/:userKey/applications/:applicationName/watch?actorIpAddress=do&customerId=do&endTime=do&eventName=do&filters=do&maxResults=41679878&orgUnitID=do&pageToken=do&startTime=do&groupIdFilter=do&access_token=do&alt=json&callback=do&fields=do&key=do&oauth_token=do&prettyPrint=true&quotaUser=do&upload_protocol=do&uploadType=do&$.xgafv=2

  3. reports-usage - Customer Usage Reports GET {{baseUrl}}/admin/reports/v1/usage/dates/:date

  4. reports-usage - Get Usage Reports GET {{baseUrl}}/admin/reports/v1/usage/:entityType/:entityKey/dates/:date

  5. reports-usage - Get User Usage Report GET {{baseUrl}}/admin/reports/v1/usage/users/:userKey/dates/:date

  6. Stop Watching Channels POST {{baseUrl}}/admin/reports_v1/channels/stop?access_token=do&alt=json&callback=do&fields=do&key=do&oauth_token=do&prettyPrint=true&quotaUser=do&upload_protocol=do&uploadType=do&$.xgafv=2