Skip to content

Usage of gmail application in Admin Reports v1 API fails #2645

@vaughnw128

Description

@vaughnw128

Hello! I'm currently working with the google-api-python-client for pulling audit logs related to Gsuite admin data. As it so happens, it seems pulling gmail data with the google-api-python-client is not currently possible. It's hard to tell for me whether this is intentionally not added for the time being, or if it's something that is a bug. This API is accessible via cURL and can be hit pretty easily in a similar fashion to the other API endpoints, but is missing from the client. I see that gmail doesn't exist currently in the discovery doc, both on the API and in the client library. However, this option seems to be available when querying in the API explorer:

Image

When disabling some verification snippets in discovery.py I was able to get it to work intermittently, but only intermittently. Is this something that could possibly updated easily to allow for this capability?

Environment details

  • OS type and version: MacOS Sequoia Version 15.6 (24G84)
  • Python version: Python 3.12
  • pip version: N/A -- using uv
  • google-api-python-client version: 2.179.0

Steps to reproduce

  1. Request the gmail applicationName for the admin reports_v1 activities.list() endpoint.

Code example

service = build("admin", "reports_v1", credentials=credentials)

results = (
    service.activities()
    .list(userKey="all", applicationName="gmail", maxResults=10)
    .execute()
)

print(results)

Stack trace

TypeError: Parameter "applicationName" value "gmail" does not match the pattern "(access_transparency)|(admin)|(calendar)|(chat)|(chrome)|(context_aware_access)|(data_studio)|(drive)|(gcp)|(gplus)|(groups)|(groups_enterprise)|(jamboard)|(keep)|(login)|(meet)|(mobile)|(rules)|(saml)|(token)|(user_accounts)|(vault)|(gemini_in_workspace_apps)"

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions