Google云端硬盘管理员SDK未返回结果 [英] Google Drive admin sdk not returning results

查看:133
本文介绍了Google云端硬盘管理员SDK未返回结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们刚刚将Google云端硬盘帐户升级为无限制.我正在尝试通过调用https://www.googleapis.com/admin/reports/v1/activity/users/all/applications/drive

We just upgraded our google drive account to unlimited. I'm trying to get google drive activity by calling: https://www.googleapis.com/admin/reports/v1/activity/users/all/applications/drive

即使我知道已经进行了上载和下载以及其他活动,但我始终会收到以下请求正文响应.我究竟做错了什么?

Even though I know there has been upload and download and other activity I always get the following request body response. What am I doing wrong?

{
 "kind": "admin#reports#activities",
 "etag": "\"K7weO5KXLrPU3p64O3h2OrP24p0/Vx72S7w5bR8cVoa6z9PWL7D5sM0\""
}

注释:将帐户升级为无限制帐户后,我没有获得新的凭据.我以为升级后我的访问令牌仍然可以使用.

note I didn't get new credentials after I upgraded the account to unlimited. I assumed my access token still works after the upgrade.

谢谢 铝

推荐答案

我认为您的URI请求不足且范围太广,因此您得到了几乎为空的JSON响应.试试这个更具体的报告Drive的API请求 :

I think your URI request is lacking and is too broad so you got an almost empty JSON response. Try this more specific Reports API requests for Drive:

//fetch 25 of your accont's Drive events
GET https://www.googleapis.com/admin/reports/v1/activity/users/all
/applications/drive?maxResults=25

以下示例获取过去180天内客户所有云端硬盘事件的报告. customerId指定要为其检索报告的客户.

The following example gets a report on all of a customer's Drive events for the past 180 days. The customerId specifies which customer the report is to be retrieved for.

GET https://www.googleapis.com/admin/reports/v1/activity/users/all
/applications/drive?customerId=ABC123xyz

以下示例检索由特定用户完成的帐户所有更改的报告

The following example retrieves a report on all changes for an account done by a specific user

GET https://www.googleapis.com/admin/reports/v1/activity/users/liz@example.com
/applications/drive

您可以在给定的链接中阅读更多内容.

You can read more of that in the given link.

您也可以在试用"部分,然后填写适用的参数.

You can also give this a go in the Try-it section and fill-in the parameters that apply.

希望这会有所帮助!

这篇关于Google云端硬盘管理员SDK未返回结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆