问题
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.
Thanks Al
回答1:
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
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.
Hope this helps!
来源:https://stackoverflow.com/questions/39377882/google-drive-admin-sdk-not-returning-results