# BeyondCorp API . projects . locations . insights

## Instance Methods

Close httplib2 connections.

Gets the value for a selected particular insight based on the provided filters. Use the organization level path for fetching at org level and project level path for fetching the insight value specific to a particular project.

Retrieves the next page of results.

Gets the value for a selected particular insight with default configuration. The default aggregation level is 'DAILY' and no grouping will be applied or default grouping if applicable. The data will be returned for recent 7 days starting the day before. The insight data size will be limited to 50 rows. Use the organization level path for fetching at org level and project level path for fetching the insight value specific to a particular project. Setting the `view` to `BASIC` will only return the metadata for the insight.

Lists for all the available insights that could be fetched from the system. Allows to filter using category. Setting the `view` to `BASIC` will let you iterate over the list of insight metadatas.

Retrieves the next page of results.

### Method Details

`close()`

    Close httplib2 connections.

`configuredInsight(insight, aggregation=None, customGrouping_fieldFilter=None, customGrouping_groupFields=None, endTime=None, fieldFilter=None, group=None, pageSize=None, pageToken=None, startTime=None, x__xgafv=None)`

    Gets the value for a selected particular insight based on the provided filters. Use the organization level path for fetching at org level and project level path for fetching the insight value specific to a particular project.

    Args:
      insight: string, Required. The resource name of the insight using the form: `organizations/{organization_id}/locations/{location_id}/insights/{insight_id}` `projects/{project_id}/locations/{location_id}/insights/{insight_id}`. (required)
      aggregation: string, Required. Aggregation type. Available aggregation could be fetched by calling insight list and get APIs in `BASIC` view.
        Allowed values
          AGGREGATION_UNSPECIFIED - Unspecified.
          HOURLY - Insight should be aggregated at hourly level.
          DAILY - Insight should be aggregated at daily level.
          WEEKLY - Insight should be aggregated at weekly level.
          MONTHLY - Insight should be aggregated at monthly level.
          CUSTOM_DATE_RANGE - Insight should be aggregated at the custom date range passed in as the start and end time in the request.
      customGrouping_fieldFilter: string, Optional. Filterable parameters to be added to the grouping clause. Available fields could be fetched by calling insight list and get APIs in `BASIC` view. `=` is the only comparison operator supported. `AND` is the only logical operator supported. Usage: field_filter="fieldName1=fieldVal1 AND fieldName2=fieldVal2". NOTE: Only `AND` conditions are allowed. NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for the filtering the corresponding fields in this filter field. (These expressions are based on the filter language described at https://google.aip.dev/160).
      customGrouping_groupFields: string, Required. Fields to be used for grouping. NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for declaring the fields to be grouped-by here. (repeated)
      endTime: string, Required. Ending time for the duration for which insight is to be pulled.
      fieldFilter: string, Optional. Other filterable/configurable parameters as applicable to the selected insight. Available fields could be fetched by calling insight list and get APIs in `BASIC` view. `=` is the only comparison operator supported. `AND` is the only logical operator supported. Usage: field_filter="fieldName1=fieldVal1 AND fieldName2=fieldVal2". NOTE: Only `AND` conditions are allowed. NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for the filtering the corresponding fields in this filter field. (These expressions are based on the filter language described at https://google.aip.dev/160).
      group: string, Optional. Group id of the available groupings for the insight. Available groupings could be fetched by calling insight list and get APIs in `BASIC` view.
      pageSize: integer, Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
      pageToken: string, Optional. Used to fetch the page represented by the token. Fetches the first page when not set.
      startTime: string, Required. Starting time for the duration for which insight is to be pulled.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # The response for the configured insight.
      "appliedConfig": { # The configuration that was applied to generate the result. # Output only. Applied insight config to generate the result data rows.
        "aggregation": "A String", # Output only. Aggregation type applied.
        "customGrouping": { # Customised grouping option that allows setting the group_by fields and also the filters togather for a configured insight request. # Output only. Customised grouping applied.
          "fieldFilter": "A String", # Optional. Filterable parameters to be added to the grouping clause. Available fields could be fetched by calling insight list and get APIs in `BASIC` view. `=` is the only comparison operator supported. `AND` is the only logical operator supported. Usage: field_filter="fieldName1=fieldVal1 AND fieldName2=fieldVal2". NOTE: Only `AND` conditions are allowed. NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for the filtering the corresponding fields in this filter field. (These expressions are based on the filter language described at https://google.aip.dev/160).
          "groupFields": [ # Required. Fields to be used for grouping. NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for declaring the fields to be grouped-by here.
            "A String",
          ],
        },
        "endTime": "A String", # Output only. Ending time for the duration for which insight was pulled.
        "fieldFilter": "A String", # Output only. Filters applied.
        "group": "A String", # Output only. Group id of the grouping applied.
        "startTime": "A String", # Output only. Starting time for the duration for which insight was pulled.
      },
      "nextPageToken": "A String", # Output only. Next page token to be fetched. Set to empty or NULL if there are no more pages available.
      "rows": [ # Output only. Result rows returned containing the required value(s) for configured insight.
        { # Row of the fetch response consisting of a set of entries.
          "fieldValues": [ # Output only. Columns/entries/key-vals in the result.
            { # Column or key value pair from the request as part of key to use in query or a single pair of the fetch response.
              "displayName": "A String", # Output only. Name of the field.
              "filterAlias": "A String", # Output only. Field name to be used in filter while requesting configured insight filtered on this field.
              "id": "A String", # Output only. Field id.
              "value": "A String", # Output only. Value of the field in string format. Acceptable values are strings or numbers.
            },
          ],
        },
      ],
    }

`configuredInsight_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.

`get(name, view=None, x__xgafv=None)`

    Gets the value for a selected particular insight with default configuration. The default aggregation level is 'DAILY' and no grouping will be applied or default grouping if applicable. The data will be returned for recent 7 days starting the day before. The insight data size will be limited to 50 rows. Use the organization level path for fetching at org level and project level path for fetching the insight value specific to a particular project. Setting the `view` to `BASIC` will only return the metadata for the insight.

    Args:
      name: string, Required. The resource name of the insight using the form: `organizations/{organization_id}/locations/{location_id}/insights/{insight_id}` `projects/{project_id}/locations/{location_id}/insights/{insight_id}` (required)
      view: string, Required. Metadata only or full data view.
        Allowed values
          INSIGHT_VIEW_UNSPECIFIED - The default / unset value. The API will default to the BASIC view.
          BASIC - Include basic metadata about the insight, but not the insight data. This is the default value (for both ListInsights and GetInsight).
          FULL - Include everything.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # The Insight object with configuration that was returned and actual list of records.
      "appliedConfig": { # The configuration that was applied to generate the result. # Output only. Applied insight config to generate the result data rows.
        "aggregation": "A String", # Output only. Aggregation type applied.
        "customGrouping": { # Customised grouping option that allows setting the group_by fields and also the filters togather for a configured insight request. # Output only. Customised grouping applied.
          "fieldFilter": "A String", # Optional. Filterable parameters to be added to the grouping clause. Available fields could be fetched by calling insight list and get APIs in `BASIC` view. `=` is the only comparison operator supported. `AND` is the only logical operator supported. Usage: field_filter="fieldName1=fieldVal1 AND fieldName2=fieldVal2". NOTE: Only `AND` conditions are allowed. NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for the filtering the corresponding fields in this filter field. (These expressions are based on the filter language described at https://google.aip.dev/160).
          "groupFields": [ # Required. Fields to be used for grouping. NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for declaring the fields to be grouped-by here.
            "A String",
          ],
        },
        "endTime": "A String", # Output only. Ending time for the duration for which insight was pulled.
        "fieldFilter": "A String", # Output only. Filters applied.
        "group": "A String", # Output only. Group id of the grouping applied.
        "startTime": "A String", # Output only. Starting time for the duration for which insight was pulled.
      },
      "metadata": { # Insight filters, groupings and aggregations that can be applied for the insight. Examples: aggregations, groups, field filters. # Output only. Metadata for the Insight.
        "aggregations": [ # Output only. List of aggregation types available for insight.
          "A String",
        ],
        "category": "A String", # Output only. Category of the insight.
        "displayName": "A String", # Output only. Common name of the insight.
        "fields": [ # Output only. List of fields available for insight.
          { # Field metadata. Commonly understandable name and description for the field. Multiple such fields constitute the Insight.
            "description": "A String", # Output only. Description of the field.
            "displayName": "A String", # Output only. Name of the field.
            "filterAlias": "A String", # Output only. Field name to be used in filter while requesting configured insight filtered on this field.
            "filterable": True or False, # Output only. Indicates whether the field can be used for filtering.
            "groupable": True or False, # Output only. Indicates whether the field can be used for grouping in custom grouping request.
            "id": "A String", # Output only. Field id for which this is the metadata.
          },
        ],
        "groups": [ # Output only. List of groupings available for insight.
          "A String",
        ],
        "subCategory": "A String", # Output only. Sub-Category of the insight.
        "type": "A String", # Output only. Type of the insight. It is metadata describing whether the insight is a metric (e.g. count) or a report (e.g. list, status).
      },
      "name": "A String", # Output only. The insight resource name. e.g. `organizations/{organization_id}/locations/{location_id}/insights/{insight_id}` OR `projects/{project_id}/locations/{location_id}/insights/{insight_id}`.
      "rows": [ # Output only. Result rows returned containing the required value(s).
        { # Row of the fetch response consisting of a set of entries.
          "fieldValues": [ # Output only. Columns/entries/key-vals in the result.
            { # Column or key value pair from the request as part of key to use in query or a single pair of the fetch response.
              "displayName": "A String", # Output only. Name of the field.
              "filterAlias": "A String", # Output only. Field name to be used in filter while requesting configured insight filtered on this field.
              "id": "A String", # Output only. Field id.
              "value": "A String", # Output only. Value of the field in string format. Acceptable values are strings or numbers.
            },
          ],
        },
      ],
    }

`list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, view=None, x__xgafv=None)`

    Lists for all the available insights that could be fetched from the system. Allows to filter using category. Setting the `view` to `BASIC` will let you iterate over the list of insight metadatas.

    Args:
      parent: string, Required. The resource name of InsightMetadata using the form: `organizations/{organization_id}/locations/{location}` `projects/{project_id}/locations/{location_id}` (required)
      filter: string, Optional. Filter expression to restrict the insights returned. Supported filter fields: * `type` * `category` * `subCategory` Examples: * "category = application AND type = count" * "category = application AND subCategory = iap" * "type = status" Allowed values: * type: [count, latency, status, list] * category: [application, device, request, security] * subCategory: [iap, webprotect] NOTE: Only equality based comparison is allowed. Only `AND` conjunction is allowed. NOTE: The 'AND' in the filter field needs to be in capital letters only. NOTE: Just filtering on `subCategory` is not allowed. It should be passed in with the parent `category` too. (These expressions are based on the filter language described at https://google.aip.dev/160).
      orderBy: string, Optional. Hint for how to order the results. This is currently ignored.
      pageSize: integer, Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. NOTE: Default page size is 50.
      pageToken: string, Optional. A token identifying a page of results the server should return.
      view: string, Required. List only metadata or full data.
        Allowed values
          INSIGHT_VIEW_UNSPECIFIED - The default / unset value. The API will default to the BASIC view.
          BASIC - Include basic metadata about the insight, but not the insight data. This is the default value (for both ListInsights and GetInsight).
          FULL - Include everything.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # The response for the list of insights.
      "insights": [ # Output only. List of all insights.
        { # The Insight object with configuration that was returned and actual list of records.
          "appliedConfig": { # The configuration that was applied to generate the result. # Output only. Applied insight config to generate the result data rows.
            "aggregation": "A String", # Output only. Aggregation type applied.
            "customGrouping": { # Customised grouping option that allows setting the group_by fields and also the filters togather for a configured insight request. # Output only. Customised grouping applied.
              "fieldFilter": "A String", # Optional. Filterable parameters to be added to the grouping clause. Available fields could be fetched by calling insight list and get APIs in `BASIC` view. `=` is the only comparison operator supported. `AND` is the only logical operator supported. Usage: field_filter="fieldName1=fieldVal1 AND fieldName2=fieldVal2". NOTE: Only `AND` conditions are allowed. NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for the filtering the corresponding fields in this filter field. (These expressions are based on the filter language described at https://google.aip.dev/160).
              "groupFields": [ # Required. Fields to be used for grouping. NOTE: Use the `filter_alias` from `Insight.Metadata.Field` message for declaring the fields to be grouped-by here.
                "A String",
              ],
            },
            "endTime": "A String", # Output only. Ending time for the duration for which insight was pulled.
            "fieldFilter": "A String", # Output only. Filters applied.
            "group": "A String", # Output only. Group id of the grouping applied.
            "startTime": "A String", # Output only. Starting time for the duration for which insight was pulled.
          },
          "metadata": { # Insight filters, groupings and aggregations that can be applied for the insight. Examples: aggregations, groups, field filters. # Output only. Metadata for the Insight.
            "aggregations": [ # Output only. List of aggregation types available for insight.
              "A String",
            ],
            "category": "A String", # Output only. Category of the insight.
            "displayName": "A String", # Output only. Common name of the insight.
            "fields": [ # Output only. List of fields available for insight.
              { # Field metadata. Commonly understandable name and description for the field. Multiple such fields constitute the Insight.
                "description": "A String", # Output only. Description of the field.
                "displayName": "A String", # Output only. Name of the field.
                "filterAlias": "A String", # Output only. Field name to be used in filter while requesting configured insight filtered on this field.
                "filterable": True or False, # Output only. Indicates whether the field can be used for filtering.
                "groupable": True or False, # Output only. Indicates whether the field can be used for grouping in custom grouping request.
                "id": "A String", # Output only. Field id for which this is the metadata.
              },
            ],
            "groups": [ # Output only. List of groupings available for insight.
              "A String",
            ],
            "subCategory": "A String", # Output only. Sub-Category of the insight.
            "type": "A String", # Output only. Type of the insight. It is metadata describing whether the insight is a metric (e.g. count) or a report (e.g. list, status).
          },
          "name": "A String", # Output only. The insight resource name. e.g. `organizations/{organization_id}/locations/{location_id}/insights/{insight_id}` OR `projects/{project_id}/locations/{location_id}/insights/{insight_id}`.
          "rows": [ # Output only. Result rows returned containing the required value(s).
            { # Row of the fetch response consisting of a set of entries.
              "fieldValues": [ # Output only. Columns/entries/key-vals in the result.
                { # Column or key value pair from the request as part of key to use in query or a single pair of the fetch response.
                  "displayName": "A String", # Output only. Name of the field.
                  "filterAlias": "A String", # Output only. Field name to be used in filter while requesting configured insight filtered on this field.
                  "id": "A String", # Output only. Field id.
                  "value": "A String", # Output only. Value of the field in string format. Acceptable values are strings or numbers.
                },
              ],
            },
          ],
        },
      ],
      "nextPageToken": "A String", # Output only. Next page token to be fetched. Set to empty or NULL if there are no more pages available.
    }

`list_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.