Close httplib2 connections.
This api is similar to GetHostStats except that the response is less verbose.
close()
Close httplib2 connections.
get(name, accuracy=None, envgroupHostname=None, filter=None, limit=None, offset=None, realtime=None, select=None, sort=None, sortby=None, timeRange=None, timeUnit=None, topk=None, tsAscending=None, tzo=None, x__xgafv=None)
This api is similar to GetHostStats except that the response is less verbose. Args: name: string, Required. The resource name for which the interactive query will be executed. Must be of the form `organizations/{organization_id}/optimizedHostStats/{dimensions}`. Dimensions let you view metrics in meaningful groupings. E.g. apiproxy, target_host. The value of dimensions should be comma separated list as shown below `organizations/{org}/optimizedHostStats/apiproxy,request_verb` (required) accuracy: string, Legacy field: not used anymore. envgroupHostname: string, Required. The hostname for which the interactive query will be executed. filter: string, Enables drill-down on specific dimension values. limit: string, This parameter is used to limit the number of result items. Default and the max value is 14400. offset: string, Use offset with limit to enable pagination of results. For example, to display results 11-20, set limit to '10' and offset to '10'. realtime: boolean, Legacy field: not used anymore. select: string, Required. The select parameter contains a comma separated list of metrics. E.g. sum(message_count),sum(error_count) sort: string, This parameter specifies if the sort order should be ascending or descending Supported values are DESC and ASC. sortby: string, Comma separated list of columns to sort the final result. timeRange: string, Required. Time interval for the interactive query. Time range is specified as start~end. E.g 04/15/2017 00:00~05/15/2017 23:59. timeUnit: string, A value of second, minute, hour, day, week, month. Time Unit specifies the granularity of metrics returned. topk: string, Take 'top k' results from results, for example, to return the top 5 results 'topk=5'. tsAscending: boolean, Lists timestamps in ascending order if set to true. Recommend setting this value to true if you are using sortby with sort=DESC. tzo: string, This parameters contains the timezone offset value. x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { "Response": { # This message type encapsulates a response format for Js Optimized Scenario. # This field wraps the stats response for Js Optimized Scenario with a Response key. E.g. { "Response": { "TimeUnit": [], "metaData": { "errors": [], "notices": [ "Source:Postgres", "Table used: edge.api.aaxgroup001.agg_api", "PG Host:ruappg08-ro.production.apigeeks.net", "query served by:80c4ebca-6a10-4a2e-8faf-c60c1ee306ca" ] }, "resultTruncated": false, "stats": { "data": [ { "identifier": { "names": [ "apiproxy" ], "values": [ "sirjee" ] }, "metric": [ { "env": "prod", "name": "sum(message_count)", "values": [ 36.0 ] }, { "env": "prod", "name": "sum(is_error)", "values": [ 36.0 ] } ] } ] } } } "TimeUnit": [ # This field contains a list of time unit values. Time unit refers to an epoch timestamp value. "A String", ], "metaData": { # This message type encapsulates additional information about query execution. # This field contains metadata information about the query executed "errors": [ # List of error messages as strings. "A String", ], "notices": [ # List of additional information such as data source, if result was truncated etc. E.g "notices": [ "Source:Postgres", "PG Host:uappg0rw.e2e.apigeeks.net", "query served by:4b64601e-40de-4eb1-bfb9-eeee7ac929ed", "Table used: edge.api.uapgroup2.agg_api" ] "A String", ], }, "resultTruncated": True or False, # This ia a boolean field to indicate if the results were truncated based on the limit parameter. "stats": { # This message type encapsulates a data node as represented below: { "identifier": { "names": [ "apiproxy" ], "values": [ "sirjee" ] }, "metric": [ { "env": "prod", "name": "sum(message_count)", "values": [ 36.0 ] } ] } OR { "env": "prod", "name": "sum(message_count)", "values": [ 36.0 ] } Depending on whether a dimension is present in the query or not the data node type can be a simple metric value or dimension identifier with list of metrics. # This field contains a stats results. "data": [ "", ], }, }, }