google admin sdk drive audit report api给出空结果

时间:2014-09-09 08:56:13

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

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

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而不是所有

,则结果相同

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

1 个答案:

答案 0 :(得分:1)

您的完整HTTP请求呼叫是什么?我做了以下几个电话,结果都很成功。

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

2)仅检索一个用户google驱动器事件 获取https://www.googleapis.com/admin/reports/v1/activity/users/myuser@myuserdomain.com/applications/drive

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

“根据您的客户协议,Google云端硬盘活动报告报告仅可用于合法用途。这些报告适用于Google Apps无限帐户。”

如果您尚未购买无限制版本,我认为您无法获取报告。

注意:Google Apps for Business和教育帐户可以使用docs activity API