blob: 1bce087ab5456c470f9fb886c28b433397a486ac [file] [log] [blame]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="apigee_v1.html">Apigee API</a> . <a href="apigee_v1.organizations.html">organizations</a> . <a href="apigee_v1.organizations.environments.html">environments</a> . <a href="apigee_v1.organizations.environments.optimizedStats.html">optimizedStats</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#get">get(name, accuracy=None, aggTable=None, filter=None, limit=None, offset=None, realtime=None, select=None, sonar=None, sort=None, sortby=None, timeRange=None, timeUnit=None, topk=None, tsAscending=None, tzo=None, x__xgafv=None)</a></code></p>
<p class="firstline">This api is similar to GetStats except that the response is less verbose. In the current scheme, a query parameter _optimized instructs Edge Analytics to change the response but since this behavior is not possible with protocol buffer and since this parameter is predominantly used by Edge UI, we are introducing a separate api.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
<div class="method">
<code class="details" id="get">get(name, accuracy=None, aggTable=None, filter=None, limit=None, offset=None, realtime=None, select=None, sonar=None, sort=None, sortby=None, timeRange=None, timeUnit=None, topk=None, tsAscending=None, tzo=None, x__xgafv=None)</code>
<pre>This api is similar to GetStats except that the response is less verbose. In the current scheme, a query parameter _optimized instructs Edge Analytics to change the response but since this behavior is not possible with protocol buffer and since this parameter is predominantly used by Edge UI, we are introducing a separate api.
Args:
name: string, Required. The resource name for which the interactive query will be executed. Must be of the form `organizations/{organization_id}/environments/{environment_id/optimizedStats/{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}/environments/{env}/optimizedStats/apiproxy,request_verb` (required)
accuracy: string, Legacy field: not used anymore.
aggTable: string, If customers want to query custom aggregate tables, then this parameter can be used to specify the table name. If this parameter is skipped, then Edge Query will try to retrieve the data from fact tables which will be expensive.
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 &#x27;10&#x27; and offset to &#x27;10&#x27;.
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)
sonar: boolean, This parameter routes the query to api monitoring service for last hour.
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 &#x27;top k&#x27; results from results, for example, to return the top 5 results &#x27;topk=5&#x27;.
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:
{
&quot;Response&quot;: { # 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. { &quot;Response&quot;: { &quot;TimeUnit&quot;: [], &quot;metaData&quot;: { &quot;errors&quot;: [], &quot;notices&quot;: [ &quot;Source:Postgres&quot;, &quot;Table used: edge.api.aaxgroup001.agg_api&quot;, &quot;PG Host:ruappg08-ro.production.apigeeks.net&quot;, &quot;query served by:80c4ebca-6a10-4a2e-8faf-c60c1ee306ca&quot; ] }, &quot;resultTruncated&quot;: false, &quot;stats&quot;: { &quot;data&quot;: [ { &quot;identifier&quot;: { &quot;names&quot;: [ &quot;apiproxy&quot; ], &quot;values&quot;: [ &quot;sirjee&quot; ] }, &quot;metric&quot;: [ { &quot;env&quot;: &quot;prod&quot;, &quot;name&quot;: &quot;sum(message_count)&quot;, &quot;values&quot;: [ 36.0 ] }, { &quot;env&quot;: &quot;prod&quot;, &quot;name&quot;: &quot;sum(is_error)&quot;, &quot;values&quot;: [ 36.0 ] } ] } ] } } }
&quot;TimeUnit&quot;: [ # This field contains a list of time unit values. Time unit refers to an epoch timestamp value.
&quot;A String&quot;,
],
&quot;metaData&quot;: { # This message type encapsulates additional information about query execution. # This field contains metadata information about the query executed
&quot;errors&quot;: [ # List of error messages as strings.
&quot;A String&quot;,
],
&quot;notices&quot;: [ # List of additional information such as data source, if result was truncated etc. E.g &quot;notices&quot;: [ &quot;Source:Postgres&quot;, &quot;PG Host:uappg0rw.e2e.apigeeks.net&quot;, &quot;query served by:4b64601e-40de-4eb1-bfb9-eeee7ac929ed&quot;, &quot;Table used: edge.api.uapgroup2.agg_api&quot; ]
&quot;A String&quot;,
],
},
&quot;resultTruncated&quot;: True or False, # This ia a boolean field to indicate if the results were truncated based on the limit parameter.
&quot;stats&quot;: { # This message type encapsulates a data node as represented below: { &quot;identifier&quot;: { &quot;names&quot;: [ &quot;apiproxy&quot; ], &quot;values&quot;: [ &quot;sirjee&quot; ] }, &quot;metric&quot;: [ { &quot;env&quot;: &quot;prod&quot;, &quot;name&quot;: &quot;sum(message_count)&quot;, &quot;values&quot;: [ 36.0 ] } ] } OR { &quot;env&quot;: &quot;prod&quot;, &quot;name&quot;: &quot;sum(message_count)&quot;, &quot;values&quot;: [ 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.
&quot;data&quot;: [
&quot;&quot;,
],
},
},
}</pre>
</div>
</body></html>