Google Apps Admin Audit API (Deprecated)

Notice
The Google Apps Admin Audit API has been officially deprecated as of May 15, 2013. It has been replaced by the Admin SDK’s Reports API. The Google Apps Admin Audit API will continue to work until November 15, 2013.

Google Apps Admin Audit APIUsage Limits

Limits and quotas protect the Google infrastructure from an automated process that uses the Admin Audit API in an inappropriate way. Excessive requests from an API might result from a harmless typo, or may result from an inefficiently designed system that makes needless API calls. Regardless of the cause, blocking traffic from a specific source once it reaches a certain level is necessary for the overall health of the Google Apps system. It ensures that one developer's actions cannot negatively impact the larger community.

In the unlikely event that your API request fails, you'll receive an HTTP status code response. A status code of 403 has error information about incorrect input, and an HTTP status code of 503 has error information indicating which API quotas have been exceeded. These responses allow your custom application to detect these errors and take appropriate action.

If your requests need to be completed in a fixed period of time, send your requests in parallel or use multiple threads in your Java or C# application. For example, break your requests by month or another time period. Breaking the Admin Audit requests by user does not optimize your overall execution. In the case of threads, try starting with 10 threads, one thread per user email. Note, the thread recommendation has trade-offs and is not useful for all API situations. If the number of requests gets too high, quota errors will occur.

For all errors that are time based (maximum of N things for N seconds per thread), especially the 503 status code errors, we recommend your code catch the exception and, using an exponential backoff algorithm, wait for a small delay before retrying the failed call. An Audit Audit API example for one thread is to wait 5 seconds and retry the failed call. If the request is successful, repeat this pattern for the other threads. If the second request is not successful, your application should scale back on the frequency of the request until a call is successful. For example, increase the initial 5 second delay to 10 seconds and retry your failed call again. Also, decide on a retry limit. For example retry a request 5 to 7 times with different delay times before your application returns an error to the user.

API Quota Categories Quotas
Account name, maximum size The name should be no more than 128 characters.
Account description, maximum size This property value may be an empty string if no description has been entered. If entered, the description should be no more than 512 characters.
Activity report, maximum time period The maximum time period for an activity report is the last 180 days.
Admin Audit API, enablement The Provisioning API has to be enabled before making calls to the Admin Audit API. In your control panel, go to the Users and groups tab's Settings page and enable the Provisioning API. Save your changes.
Authentication token Valid for 24 hours. The error is '401 token expired'.
Data format, default The default data format is JSON. The API also supports the Atom format.
Date formats Convert all dates to the Coordinated Universal TIme (UTC) format before using them with the Enterprise Audit API. See an example UTC converter.
maxResults The number of change events listed in each page of the API's report is from 1 to 1000 events. The default is 1000 events.
Unauthorized requests We don't allow any unauthorized requests to the API. When using OAuth 1.0, a request is considered unauthorized if the Developer Console key query parameter is not specified.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.