REST Resource: organizations.environments.optimizedStats

Resource: OptimizedStats

JSON representation
{
  "Response": {
    object (OptimizedStatsResponse)
  }
}
Fields
Response

object (OptimizedStatsResponse)

Wraps the stats response for JavaScript Optimized Scenario with a response key. For example:

{ "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 ] } ] } ] } } }

OptimizedStatsResponse

Encapsulates a response format for JavaScript Optimized Scenario.

JSON representation
{
  "TimeUnit": [
    string
  ],
  "metaData": {
    object (Metadata)
  },
  "resultTruncated": boolean,
  "stats": {
    object (OptimizedStatsNode)
  }
}
Fields
TimeUnit[]

string (int64 format)

List of time unit values. Time unit refers to an epoch timestamp value.

metaData

object (Metadata)

Metadata information about the query executed.

resultTruncated

boolean

Boolean flag that indicates whether the results were truncated based on the limit parameter.

stats

object (OptimizedStatsNode)

stats results.

OptimizedStatsNode

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.

JSON representation
{
  "data": array
}
Fields
data

array (ListValue format)

Methods

get

Similar to GetStats except that the response is less verbose.