| 1 |
<html><body> |
| 2 |
<style> |
| 3 |
|
| 4 |
body, h1, h2, h3, div, span, p, pre, a { |
| 5 |
margin: 0; |
| 6 |
padding: 0; |
| 7 |
border: 0; |
| 8 |
font-weight: inherit; |
| 9 |
font-style: inherit; |
| 10 |
font-size: 100%; |
| 11 |
font-family: inherit; |
| 12 |
vertical-align: baseline; |
| 13 |
} |
| 14 |
|
| 15 |
body { |
| 16 |
font-size: 13px; |
| 17 |
padding: 1em; |
| 18 |
} |
| 19 |
|
| 20 |
h1 { |
| 21 |
font-size: 26px; |
| 22 |
margin-bottom: 1em; |
| 23 |
} |
| 24 |
|
| 25 |
h2 { |
| 26 |
font-size: 24px; |
| 27 |
margin-bottom: 1em; |
| 28 |
} |
| 29 |
|
| 30 |
h3 { |
| 31 |
font-size: 20px; |
| 32 |
margin-bottom: 1em; |
| 33 |
margin-top: 1em; |
| 34 |
} |
| 35 |
|
| 36 |
pre, code { |
| 37 |
line-height: 1.5; |
| 38 |
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 |
} |
| 40 |
|
| 41 |
pre { |
| 42 |
margin-top: 0.5em; |
| 43 |
} |
| 44 |
|
| 45 |
h1, h2, h3, p { |
| 46 |
font-family: Arial, sans serif; |
| 47 |
} |
| 48 |
|
| 49 |
h1, h2, h3 { |
| 50 |
border-bottom: solid #CCC 1px; |
| 51 |
} |
| 52 |
|
| 53 |
.toc_element { |
| 54 |
margin-top: 0.5em; |
| 55 |
} |
| 56 |
|
| 57 |
.firstline { |
| 58 |
margin-left: 2 em; |
| 59 |
} |
| 60 |
|
| 61 |
.method { |
| 62 |
margin-top: 1em; |
| 63 |
border: solid 1px #CCC; |
| 64 |
padding: 1em; |
| 65 |
background: #EEE; |
| 66 |
} |
| 67 |
|
| 68 |
.details { |
| 69 |
font-weight: bold; |
| 70 |
font-size: 14px; |
| 71 |
} |
| 72 |
|
| 73 |
</style> |
| 74 |
|
| 75 |
<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> |
| 76 |
<h2>Instance Methods</h2> |
| 77 |
<p class="toc_element"> |
| 78 |
<code><a href="#close">close()</a></code></p> |
| 79 |
<p class="firstline">Close httplib2 connections.</p> |
| 80 |
<p class="toc_element"> |
| 81 |
<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> |
| 82 |
<p class="firstline">Similar to GetStats except that the response is less verbose.</p> |
| 83 |
<h3>Method Details</h3> |
| 84 |
<div class="method"> |
| 85 |
<code class="details" id="close">close()</code> |
| 86 |
<pre>Close httplib2 connections.</pre> |
| 87 |
</div> |
| 88 |
|
| 89 |
<div class="method"> |
| 90 |
<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> |
| 91 |
<pre>Similar to GetStats except that the response is less verbose. |
| 92 |
|
| 93 |
Args: |
| 94 |
name: string, Required. Resource name for which the interactive query will be executed. Use the following format in your request: `organizations/{org}/environments/{env}/optimizedStats/{dimensions}` Dimensions let you view metrics in meaningful groupings, such as `apiproxy`, `target_host`. The value of `dimensions` should be a comma-separated list as shown below: `organizations/{org}/environments/{env}/optimizedStats/apiproxy,request_verb` (required) |
| 95 |
accuracy: string, No longer used by Apigee. Supported for backwards compatibility. |
| 96 |
aggTable: string, Table name used to query custom aggregate tables. If this parameter is skipped, then Apigee will try to retrieve the data from fact tables which will be expensive. |
| 97 |
filter: string, Filter that enables you to drill-down on specific dimension values. |
| 98 |
limit: string, Maximum number of result items to return. |
| 99 |
offset: string, Offset value. Use `offset` with `limit` to enable pagination of results. For example, to display results 11-20, set limit to `10` and offset to `10`. |
| 100 |
realtime: boolean, No longer used by Apigee. Supported for backwards compatibility. |
| 101 |
select: string, Required. Comma-separated list of metrics. For example: `sum(message_count),sum(error_count)` |
| 102 |
sonar: boolean, Routes the query to API Monitoring for the last hour. |
| 103 |
sort: string, Flag that specifies whether the sort order should be ascending or descending. Valid values include `DESC` and `ASC`. |
| 104 |
sortby: string, Comma-separated list of metrics to sort the final result. |
| 105 |
timeRange: string, Required. Time interval for the interactive query. Time range is specified in GMT as `start~end`. For example: `04/15/2017 00:00~05/15/2017 23:59` |
| 106 |
timeUnit: string, Granularity of metrics returned. Valid values include: `second`, `minute`, `hour`, `day`, `week`, or `month`. |
| 107 |
topk: string, Top number of results to return. For example, to return the top 5 results, set `topk=5`. |
| 108 |
tsAscending: boolean, Flag that specifies whether to list timestamps in ascending (`true`) or descending (`false`) order. Apigee recommends setting this value to `true` if you are using `sortby` with `sort=DESC`. |
| 109 |
tzo: string, Timezone offset value. |
| 110 |
x__xgafv: string, V1 error format. |
| 111 |
Allowed values |
| 112 |
1 - v1 error format |
| 113 |
2 - v2 error format |
| 114 |
|
| 115 |
Returns: |
| 116 |
An object of the form: |
| 117 |
|
| 118 |
{ # Encapsulates a response format for JavaScript Optimized Scenario. |
| 119 |
"Response": { # Encapsulates a response format for JavaScript Optimized Scenario. # 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 ] } ] } ] } } }``` |
| 120 |
"TimeUnit": [ # List of time unit values. Time unit refers to an epoch timestamp value. |
| 121 |
"A String", |
| 122 |
], |
| 123 |
"metaData": { # Encapsulates additional information about query execution. # Metadata information about the query executed. |
| 124 |
"errors": [ # List of error messages as strings. |
| 125 |
"A String", |
| 126 |
], |
| 127 |
"notices": [ # List of additional information such as data source, if result was truncated. For example: ``` "notices": [ "Source:Postgres", "PG Host:uappg0rw.e2e.apigeeks.net", "query served by:4b64601e-40de-4eb1-bfb9-eeee7ac929ed", "Table used: edge.api.uapgroup2.agg_api" ]``` |
| 128 |
"A String", |
| 129 |
], |
| 130 |
}, |
| 131 |
"resultTruncated": True or False, # Boolean flag that indicates whether the results were truncated based on the limit parameter. |
| 132 |
"stats": { # 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. # `stats` results. |
| 133 |
"data": [ # List of data values. |
| 134 |
"", |
| 135 |
], |
| 136 |
}, |
| 137 |
}, |
| 138 |
}</pre> |
| 139 |
</div> |
| 140 |
|
| 141 |
</body></html> |