0

I want to use Reports API - ADMIN SDK User Usage Google Docs Parameter named "num_docs_shared_outside_domain" which is used to retrieve Number of Docs that are not public or visible to anyone with link, but explicitly are shared either with users or groups outside the domain up to the date of the report according to this link https://developers.google.com/admin-sdk/reports/v1/reference/usage-ref-appendix-a/users-docs

But can anyone say me how to use this Parameter? I have already authenticate my service account to use Reports API ADMIN SDK. Now next step is to use this option.

Poonam Gokani
  • 375
  • 1
  • 4
  • 13

1 Answers1

1

You can try this out in the API Explorer to see what the parameters would look like. With Python, the API call might look something like:

service.userUsageReport().get(userKey='all',
                              date='2013-12-02',
                              parameters='docs:num_docs_shared_outside_domain').execute()

if you remove the parameters field entirely, you'll get all of the results from the user usage report, including the parameters simply makes things more efficient (and presumably faster) by limiting the results to that single parameter.

Jay Lee
  • 13,415
  • 3
  • 28
  • 59
  • Hi thanks @Jay Lee. I have already tried the API Explorer before posting answer but don't know why it always return error.Please inform if you know Can we retrieve for date range like from 01-05-2013 to today. – Poonam Gokani Dec 05 '13 at 06:54
  • what error? No, the report returns the number of documents that were shared at the given date, you can however retrieve the numbers for two different dates with two API requests and use that to get a difference. – Jay Lee Dec 05 '13 at 23:09
  • Ok Thanks, In short we can not retrieve number of document shared between two dates for each date we have to make individual request. – Poonam Gokani Dec 06 '13 at 04:59