# Apigee API . organizations . environments . securityStats

## Instance Methods

Close httplib2 connections.

Retrieve security statistics as tabular rows.

Retrieves the next page of results.

Retrieve security statistics as a collection of time series.

Retrieves the next page of results.

### Method Details

`close()`

    Close httplib2 connections.

`queryTabularStats(orgenv, body=None, x__xgafv=None)`

    Retrieve security statistics as tabular rows.

    Args:
      orgenv: string, Required. Should be of the form organizations//environments/. (required)
      body: object, The request body.
        The object takes the form of:

    { # Request payload representing the query to be run for fetching security statistics as rows.
      "dimensions": [ # Required. List of dimension names to group the aggregations by.
        "A String",
      ],
      "filter": "A String", # Filter further on specific dimension values. Follows the same grammar as custom report's filter expressions. Example, apiproxy eq 'foobar'. https://cloud.google.com/apigee/docs/api-platform/analytics/analytics-reference#filters
      "metrics": [ # Required. List of metrics and their aggregations.
        { # The optionally aggregated metric to query with its ordering.
          "aggregation": "A String", # Aggregation function associated with the metric.
          "name": "A String", # Name of the metric
          "order": "A String", # Ordering for this aggregation in the result. For time series this is ignored since the ordering of points depends only on the timestamp, not the values.
        },
      ],
      "pageSize": 42, # Page size represents the number of rows.
      "pageToken": "A String", # Identifies a sequence of rows.
      "timeRange": { # Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time. # Time range for the stats.
        "endTime": "A String", # Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.
        "startTime": "A String", # Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.
      },
    }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Encapsulates two kinds of stats that are results of the dimensions and aggregations requested. - Tabular rows. - Time series data. Example of tabular rows, Represents security stats results as a row of flat values.
      "columns": [ # Column names corresponding to the same order as the inner values in the stats field.
        "A String",
      ],
      "nextPageToken": "A String", # Next page token.
      "values": [ # Resultant rows from the executed query.
        [
          "",
        ],
      ],
    }

`queryTabularStats_next()`

    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.

`queryTimeSeriesStats(orgenv, body=None, x__xgafv=None)`

    Retrieve security statistics as a collection of time series.

    Args:
      orgenv: string, Required. Should be of the form organizations//environments/. (required)
      body: object, The request body.
        The object takes the form of:

    { # QueryTimeSeriesStatsRequest represents a query that returns a collection of time series sequences grouped by their values.
      "dimensions": [ # List of dimension names to group the aggregations by. If no dimensions are passed, a single trend line representing the requested metric aggregations grouped by environment is returned.
        "A String",
      ],
      "filter": "A String", # Filter further on specific dimension values. Follows the same grammar as custom report's filter expressions. Example, apiproxy eq 'foobar'. https://cloud.google.com/apigee/docs/api-platform/analytics/analytics-reference#filters
      "metrics": [ # Required. List of metrics and their aggregations.
        { # The optionally aggregated metric to query with its ordering.
          "aggregation": "A String", # Aggregation function associated with the metric.
          "name": "A String", # Name of the metric
          "order": "A String", # Ordering for this aggregation in the result. For time series this is ignored since the ordering of points depends only on the timestamp, not the values.
        },
      ],
      "pageSize": 42, # Page size represents the number of time series sequences, one per unique set of dimensions and their values.
      "pageToken": "A String", # Page token stands for a specific collection of time series sequences.
      "timeRange": { # Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time. # Required. Time range for the stats.
        "endTime": "A String", # Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.
        "startTime": "A String", # Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.
      },
      "timestampOrder": "A String", # Order the sequences in increasing or decreasing order of timestamps. Default is descending order of timestamps (latest first).
      "windowSize": "A String", # Time buckets to group the stats by.
    }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Represents security stats result as a collection of time series sequences.
      "columns": [ # Column names corresponding to the same order as the inner values in the stats field.
        "A String",
      ],
      "nextPageToken": "A String", # Next page token.
      "values": [ # Results of the query returned as a JSON array.
        { # A sequence of time series.
          "dimensions": { # Map of dimensions and their values that uniquely identifies a time series sequence.
            "a_key": "A String",
          },
          "points": [ # List of points. First value of each inner list is a timestamp.
            [
              "",
            ],
          ],
        },
      ],
    }

`queryTimeSeriesStats_next()`

    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.