【问题标题】:google admin sdk drive audit report api gives empty resultgoogle admin sdk drive audit report api 给出空结果
【发布时间】:2014-11-02 15:04:17
【问题描述】:

参考下面的文档,已将审核范围添加到客户端访问。

https://developers.google.com/admin-sdk/reports/v1/guides/manage-audit-drive

新范围:admin.reports.audit.readonly

通过 google oauthplayground,到目前为止我们得到的结果是空的

HTTP/1.1 200 OK
Content-length: 112
X-xss-protection: 1; mode=block
Content-location: https://www.googleapis.com/admin/reports/v1/activity/users/all/applications/drive
X-content-type-options: nosniff
Expires: Mon, 08 Sep 2014 05:49:14 GMT
Server: GSE
Etag: "xyz"
Cache-control: private, max-age=0, must-revalidate, no-transform
Date: Mon, 08 Sep 2014 05:49:14 GMT
X-frame-options: SAMEORIGIN
Content-type: application/json; charset=UTF-8
{ "kind": "admin#reports#activities", "etag": "\"xyz\"" }

如果我传递用户电子邮件 ID 而不是全部,则结果相同

我在这里遗漏了什么吗?需要启用任何其他配置吗?

【问题讨论】:

    标签: google-drive-api google-admin-sdk


    【解决方案1】:

    您的完整 HTTP 请求调用是什么?我打了以下几个电话,结果都成功了。

    1) 检索所有用户谷歌驱动事件 得到 https://www.googleapis.com/admin/reports/v1/activity/users/all/applications/drive

    2) 仅检索一位用户的 Google Drive 事件 获取https://www.googleapis.com/admin/reports/v1/activity/users/myuser@myuserdomain.com/applications/drive

    要记住的一点是,这些Drive Activity reports 仅适用于 Google 的 App Unlimited 版本。

    “Google 云端硬盘活动报告报告只能根据您的客户协议用于合法目的。这些报告适用于 Google Apps Unlimited 帐户。”

    如果您没有购买无限制版本,我认为这些报告将无法供您检索。

    注意:docs activity API 适用于 Google Apps for Business 和 Education 帐户

    【讨论】:

    • Thnx Emily ,我会重新检查并确认是否是这种情况。
    • Emily ,问题是关于帐户类型不是无限的。使用无限帐户我能够获取结果。不推荐使用文档活动 api n 将在 2015 年 1 月关闭,所以不能依赖.Thnx 非常感谢您的回答。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多