# Admin SDK API . entityUsageReports

## Instance Methods

Close httplib2 connections.

Retrieves a report which is a collection of properties and statistics for entities used by users within the account. For more information, see the Entities Usage Report guide. For more information about the entities report's parameters, see the Entities Usage parameters reference guides.

Retrieves the next page of results.

### Method Details

`close()`

    Close httplib2 connections.

`get(entityType, entityKey, date, customerId=None, filters=None, maxResults=None, pageToken=None, parameters=None, x__xgafv=None)`

    Retrieves a report which is a collection of properties and statistics for entities used by users within the account. For more information, see the Entities Usage Report guide. For more information about the entities report's parameters, see the Entities Usage parameters reference guides.

    Args:
      entityType: string, Represents the type of entity for the report. (required)
        Allowed values
          gplus_communities - Returns a report on Google+ communities.
      entityKey: string, Represents the key of the object to filter the data with. It is a string which can take the value `all` to get activity events for all users, or any other value for an app-specific entity. For details on how to obtain the `entityKey` for a particular `entityType`, see the Entities Usage parameters reference guides. (required)
      date: string, Represents the date the usage occurred. The timestamp is in the ISO 8601 format, yyyy-mm-dd. We recommend you use your account's time zone for this. (required)
      customerId: string, The unique ID of the customer to retrieve data for.
      filters: string, The `filters` query string is a comma-separated list of an application's event parameters where the parameter's value is manipulated by a relational operator. The `filters` query string includes the name of the application whose usage is returned in the report. The application values for the Entities usage report include `accounts`, `docs`, and `gmail`. Filters are in the form `[application name]:parameter name[parameter value],...`. In this example, the `<>` 'not equal to' operator is URL-encoded in the request's query string (%3C%3E): GET https://www.googleapis.com/admin/reports/v1/usage/gplus_communities/all/dates/2017-12-01 ?parameters=gplus:community_name,gplus:num_total_members &filters=gplus:num_total_members%3C%3E0 The relational operators include: - `==` - 'equal to'. - `<>` - 'not equal to'. It is URL-encoded (%3C%3E). - `<` - 'less than'. It is URL-encoded (%3C). - `<=` - 'less than or equal to'. It is URL-encoded (%3C=). - `>` - 'greater than'. It is URL-encoded (%3E). - `>=` - 'greater than or equal to'. It is URL-encoded (%3E=). Filters can only be applied to numeric parameters.
      maxResults: integer, Determines how many activity records are shown on each response page. For example, if the request sets `maxResults=1` and the report has two activities, the report has two pages. The response's `nextPageToken` property has the token to the second page.
      pageToken: string, Token to specify next page. A report with multiple pages has a `nextPageToken` property in the response. In your follow-on request getting the next page of the report, enter the `nextPageToken` value in the `pageToken` query string.
      parameters: string, The `parameters` query string is a comma-separated list of event parameters that refine a report's results. The parameter is associated with a specific application. The application values for the Entities usage report are only `gplus`. A `parameter` query string is in the CSV form of `[app_name1:param_name1], [app_name2:param_name2]...`. *Note:* The API doesn't accept multiple values of a parameter. If a particular parameter is supplied more than once in the API request, the API only accepts the last value of that request parameter. In addition, if an invalid request parameter is supplied in the API request, the API ignores that request parameter and returns the response corresponding to the remaining valid request parameters. An example of an invalid request parameter is one that does not belong to the application. If no parameters are requested, all parameters are returned.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        {
      "etag": "A String", # ETag of the resource.
      "kind": "admin#reports#usageReports", # The type of API resource. For a usage report, the value is `admin#reports#usageReports`.
      "nextPageToken": "A String", # Token to specify next page. A report with multiple pages has a `nextPageToken` property in the response. For your follow-on requests getting all of the report's pages, enter the `nextPageToken` value in the `pageToken` query string.
      "usageReports": [ # Various application parameter records.
        { # JSON template for a usage report.
          "date": "A String", # Output only. The date of the report request.
          "entity": { # Output only. Information about the type of the item.
            "customerId": "A String", # Output only. The unique identifier of the customer's account.
            "entityId": "A String", # Output only. Object key. Only relevant if entity.type = "OBJECT" Note: external-facing name of report is "Entities" rather than "Objects".
            "profileId": "A String", # Output only. The user's immutable Google Workspace profile identifier.
            "type": "A String", # Output only. The type of item. The value is `user`.
            "userEmail": "A String", # Output only. The user's email address. Only relevant if entity.type = "USER"
          },
          "etag": "A String", # ETag of the resource.
          "kind": "admin#reports#usageReport", # The type of API resource. For a usage report, the value is `admin#reports#usageReport`.
          "parameters": [ # Output only. Parameter value pairs for various applications. For the Entity Usage Report parameters and values, see [the Entity Usage parameters reference](/admin-sdk/reports/v1/reference/usage-ref-appendix-a/entities).
            {
              "boolValue": True or False, # Output only. Boolean value of the parameter.
              "datetimeValue": "A String", # The RFC 3339 formatted value of the parameter, for example 2010-10-28T10:26:35.000Z.
              "intValue": "A String", # Output only. Integer value of the parameter.
              "msgValue": [ # Output only. Nested message value of the parameter.
                {
                  "a_key": "", # Properties of the object.
                },
              ],
              "name": "A String", # The name of the parameter. For the User Usage Report parameter names, see the User Usage parameters reference.
              "stringValue": "A String", # Output only. String value of the parameter.
            },
          ],
        },
      ],
      "warnings": [ # Warnings, if any.
        {
          "code": "A String", # Machine readable code or warning type. The warning code value is `200`.
          "data": [ # Key-value pairs to give detailed information on the warning.
            {
              "key": "A String", # Key associated with a key-value pair to give detailed information on the warning.
              "value": "A String", # Value associated with a key-value pair to give detailed information on the warning.
            },
          ],
          "message": "A String", # The human readable messages for a warning are: - Data is not available warning - Sorry, data for date yyyy-mm-dd for application "`application name`" is not available. - Partial data is available warning - Data for date yyyy-mm-dd for application "`application name`" is not available right now, please try again after a few hours.
        },
      ],
    }

`get_next(previous_request, previous_response)`

    Retrieves the next page of results.

    Args:
      previous_request: The request for the previous page. (required)
      previous_response: The response from the request for the previous page. (required)

    Returns:
      A request object that you can call 'execute()' on to request the next
      page. Returns None if there are no more items in the collection.