Debian Codegraph @

docs/dyn/apigee_v1.organizations.environments.queries.html

raw
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.queries.html">queries</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="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
82 <p class="firstline">Submit a query to be processed in the background. If the submission of the query succeeds, the API returns a 201 status and an ID that refer to the query. In addition to the HTTP status 201, the `state` of "enqueued" means that the request succeeded.</p>
83 <p class="toc_element">
84 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
85 <p class="firstline">Get query status If the query is still in progress, the `state` is set to "running" After the query has completed successfully, `state` is set to "completed"</p>
86 <p class="toc_element">
87 <code><a href="#getResult">getResult(name, x__xgafv=None)</a></code></p>
88 <p class="firstline">After the query is completed, use this API to retrieve the results. If the request succeeds, and there is a non-zero result set, the result is downloaded to the client as a zipped JSON file. The name of the downloaded file will be: OfflineQueryResult-.zip Example: `OfflineQueryResult-9cfc0d85-0f30-46d6-ae6f-318d0cb961bd.zip`</p>
89 <p class="toc_element">
90 <code><a href="#getResulturl">getResulturl(name, x__xgafv=None)</a></code></p>
91 <p class="firstline">After the query is completed, use this API to retrieve the results. If the request succeeds, and there is a non-zero result set, the result is sent to the client as a list of urls to JSON files.</p>
92 <p class="toc_element">
93 <code><a href="#list">list(parent, dataset=None, from=None, inclQueriesWithoutReport=None, status=None, submittedBy=None, to=None, x__xgafv=None)</a></code></p>
94 <p class="firstline">Return a list of Asynchronous Queries</p>
95 <h3>Method Details</h3>
96 <div class="method">
97 <code class="details" id="close">close()</code>
98 <pre>Close httplib2 connections.</pre>
99 </div>
100
101 <div class="method">
102 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
103 <pre>Submit a query to be processed in the background. If the submission of the query succeeds, the API returns a 201 status and an ID that refer to the query. In addition to the HTTP status 201, the `state` of &quot;enqueued&quot; means that the request succeeded.
104
105 Args:
106 parent: string, Required. The parent resource name. Must be of the form `organizations/{org}/environments/{env}`. (required)
107 body: object, The request body.
108 The object takes the form of:
109
110 {
111 &quot;csvDelimiter&quot;: &quot;A String&quot;, # Delimiter used in the CSV file, if `outputFormat` is set to `csv`. Defaults to the `,` (comma) character. Supported delimiter characters include comma (`,`), pipe (`|`), and tab (`\t`).
112 &quot;dimensions&quot;: [ # A list of dimensions. https://docs.apigee.com/api-platform/analytics/analytics-reference#dimensions
113 &quot;A String&quot;,
114 ],
115 &quot;envgroupHostname&quot;: &quot;A String&quot;, # Hostname needs to be specified if query intends to run at host level. This field is only allowed when query is submitted by CreateHostAsyncQuery where analytics data will be grouped by organization and hostname.
116 &quot;filter&quot;: &quot;A String&quot;, # Boolean expression that can be used to filter data. Filter expressions can be combined using AND/OR terms and should be fully parenthesized to avoid ambiguity. See Analytics metrics, dimensions, and filters reference https://docs.apigee.com/api-platform/analytics/analytics-reference for more information on the fields available to filter on. For more information on the tokens that you use to build filter expressions, see Filter expression syntax. https://docs.apigee.com/api-platform/analytics/asynch-reports-api#filter-expression-syntax
117 &quot;groupByTimeUnit&quot;: &quot;A String&quot;, # Time unit used to group the result set. Valid values include: second, minute, hour, day, week, or month. If a query includes groupByTimeUnit, then the result is an aggregation based on the specified time unit and the resultant timestamp does not include milliseconds precision. If a query omits groupByTimeUnit, then the resultant timestamp includes milliseconds precision.
118 &quot;limit&quot;: 42, # Maximum number of rows that can be returned in the result.
119 &quot;metrics&quot;: [ # A list of Metrics.
120 { # More info about Metric: https://docs.apigee.com/api-platform/analytics/analytics-reference#metrics
121 &quot;alias&quot;: &quot;A String&quot;, # Alias for the metric. Alias will be used to replace metric name in query results.
122 &quot;function&quot;: &quot;A String&quot;, # Aggregation function: avg, min, max, or sum.
123 &quot;name&quot;: &quot;A String&quot;, # Required. Metric name.
124 &quot;operator&quot;: &quot;A String&quot;, # One of `+`, `-`, `/`, `%`, `*`.
125 &quot;value&quot;: &quot;A String&quot;, # Operand value should be provided when operator is set.
126 },
127 ],
128 &quot;name&quot;: &quot;A String&quot;, # Asynchronous Query Name.
129 &quot;outputFormat&quot;: &quot;A String&quot;, # Valid values include: `csv` or `json`. Defaults to `json`. Note: Configure the delimiter for CSV output using the csvDelimiter property.
130 &quot;reportDefinitionId&quot;: &quot;A String&quot;, # Asynchronous Report ID.
131 &quot;timeRange&quot;: &quot;&quot;, # Required. Time range for the query. Can use the following predefined strings to specify the time range: `last60minutes` `last24hours` `last7days` Or, specify the timeRange as a structure describing start and end timestamps in the ISO format: yyyy-mm-ddThh:mm:ssZ. Example: &quot;timeRange&quot;: { &quot;start&quot;: &quot;2018-07-29T00:13:00Z&quot;, &quot;end&quot;: &quot;2018-08-01T00:18:00Z&quot; }
132 }
133
134 x__xgafv: string, V1 error format.
135 Allowed values
136 1 - v1 error format
137 2 - v2 error format
138
139 Returns:
140 An object of the form:
141
142 {
143 &quot;created&quot;: &quot;A String&quot;, # Creation time of the query.
144 &quot;envgroupHostname&quot;: &quot;A String&quot;, # Hostname is available only when query is executed at host level.
145 &quot;error&quot;: &quot;A String&quot;, # Error is set when query fails.
146 &quot;executionTime&quot;: &quot;A String&quot;, # ExecutionTime is available only after the query is completed.
147 &quot;name&quot;: &quot;A String&quot;, # Asynchronous Query Name.
148 &quot;queryParams&quot;: { # Contains information like metrics, dimenstions etc of the AsyncQuery.
149 &quot;dimensions&quot;: [ # Dimensions of the AsyncQuery.
150 &quot;A String&quot;,
151 ],
152 &quot;endTimestamp&quot;: &quot;A String&quot;, # End timestamp of the query range.
153 &quot;metrics&quot;: [ # Metrics of the AsyncQuery. Example: [&quot;name:message_count,func:sum,alias:sum_message_count&quot;]
154 &quot;A String&quot;,
155 ],
156 &quot;outputFormat&quot;: &quot;A String&quot;, # Output format.
157 &quot;startTimestamp&quot;: &quot;A String&quot;, # Start timestamp of the query range.
158 &quot;timeUnit&quot;: &quot;A String&quot;, # Query GroupBy time unit.
159 },
160 &quot;reportDefinitionId&quot;: &quot;A String&quot;, # Asynchronous Report ID.
161 &quot;result&quot;: { # Result is available only after the query is completed.
162 &quot;expires&quot;: &quot;A String&quot;, # Query result will be unaccessable after this time.
163 &quot;self&quot;: &quot;A String&quot;, # Self link of the query results. Example: `/organizations/myorg/environments/myenv/queries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd/result` or following format if query is running at host level: `/organizations/myorg/hostQueries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd/result`
164 },
165 &quot;resultFileSize&quot;: &quot;A String&quot;, # ResultFileSize is available only after the query is completed.
166 &quot;resultRows&quot;: &quot;A String&quot;, # ResultRows is available only after the query is completed.
167 &quot;self&quot;: &quot;A String&quot;, # Self link of the query. Example: `/organizations/myorg/environments/myenv/queries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd` or following format if query is running at host level: `/organizations/myorg/hostQueries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd`
168 &quot;state&quot;: &quot;A String&quot;, # Query state could be &quot;enqueued&quot;, &quot;running&quot;, &quot;completed&quot;, &quot;failed&quot;.
169 &quot;updated&quot;: &quot;A String&quot;, # Last updated timestamp for the query.
170 }</pre>
171 </div>
172
173 <div class="method">
174 <code class="details" id="get">get(name, x__xgafv=None)</code>
175 <pre>Get query status If the query is still in progress, the `state` is set to &quot;running&quot; After the query has completed successfully, `state` is set to &quot;completed&quot;
176
177 Args:
178 name: string, Required. Name of the asynchronous query to get. Must be of the form `organizations/{org}/environments/{env}/queries/{queryId}`. (required)
179 x__xgafv: string, V1 error format.
180 Allowed values
181 1 - v1 error format
182 2 - v2 error format
183
184 Returns:
185 An object of the form:
186
187 {
188 &quot;created&quot;: &quot;A String&quot;, # Creation time of the query.
189 &quot;envgroupHostname&quot;: &quot;A String&quot;, # Hostname is available only when query is executed at host level.
190 &quot;error&quot;: &quot;A String&quot;, # Error is set when query fails.
191 &quot;executionTime&quot;: &quot;A String&quot;, # ExecutionTime is available only after the query is completed.
192 &quot;name&quot;: &quot;A String&quot;, # Asynchronous Query Name.
193 &quot;queryParams&quot;: { # Contains information like metrics, dimenstions etc of the AsyncQuery.
194 &quot;dimensions&quot;: [ # Dimensions of the AsyncQuery.
195 &quot;A String&quot;,
196 ],
197 &quot;endTimestamp&quot;: &quot;A String&quot;, # End timestamp of the query range.
198 &quot;metrics&quot;: [ # Metrics of the AsyncQuery. Example: [&quot;name:message_count,func:sum,alias:sum_message_count&quot;]
199 &quot;A String&quot;,
200 ],
201 &quot;outputFormat&quot;: &quot;A String&quot;, # Output format.
202 &quot;startTimestamp&quot;: &quot;A String&quot;, # Start timestamp of the query range.
203 &quot;timeUnit&quot;: &quot;A String&quot;, # Query GroupBy time unit.
204 },
205 &quot;reportDefinitionId&quot;: &quot;A String&quot;, # Asynchronous Report ID.
206 &quot;result&quot;: { # Result is available only after the query is completed.
207 &quot;expires&quot;: &quot;A String&quot;, # Query result will be unaccessable after this time.
208 &quot;self&quot;: &quot;A String&quot;, # Self link of the query results. Example: `/organizations/myorg/environments/myenv/queries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd/result` or following format if query is running at host level: `/organizations/myorg/hostQueries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd/result`
209 },
210 &quot;resultFileSize&quot;: &quot;A String&quot;, # ResultFileSize is available only after the query is completed.
211 &quot;resultRows&quot;: &quot;A String&quot;, # ResultRows is available only after the query is completed.
212 &quot;self&quot;: &quot;A String&quot;, # Self link of the query. Example: `/organizations/myorg/environments/myenv/queries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd` or following format if query is running at host level: `/organizations/myorg/hostQueries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd`
213 &quot;state&quot;: &quot;A String&quot;, # Query state could be &quot;enqueued&quot;, &quot;running&quot;, &quot;completed&quot;, &quot;failed&quot;.
214 &quot;updated&quot;: &quot;A String&quot;, # Last updated timestamp for the query.
215 }</pre>
216 </div>
217
218 <div class="method">
219 <code class="details" id="getResult">getResult(name, x__xgafv=None)</code>
220 <pre>After the query is completed, use this API to retrieve the results. If the request succeeds, and there is a non-zero result set, the result is downloaded to the client as a zipped JSON file. The name of the downloaded file will be: OfflineQueryResult-.zip Example: `OfflineQueryResult-9cfc0d85-0f30-46d6-ae6f-318d0cb961bd.zip`
221
222 Args:
223 name: string, Required. Name of the asynchronous query result to get. Must be of the form `organizations/{org}/environments/{env}/queries/{queryId}/result`. (required)
224 x__xgafv: string, V1 error format.
225 Allowed values
226 1 - v1 error format
227 2 - v2 error format
228
229 Returns:
230 An object of the form:
231
232 { # Message that represents an arbitrary HTTP body. It should only be used for payload formats that can&#x27;t be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.
233 &quot;contentType&quot;: &quot;A String&quot;, # The HTTP Content-Type header value specifying the content type of the body.
234 &quot;data&quot;: &quot;A String&quot;, # The HTTP request/response body as raw binary.
235 &quot;extensions&quot;: [ # Application specific response metadata. Must be set in the first response for streaming APIs.
236 {
237 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
238 },
239 ],
240 }</pre>
241 </div>
242
243 <div class="method">
244 <code class="details" id="getResulturl">getResulturl(name, x__xgafv=None)</code>
245 <pre>After the query is completed, use this API to retrieve the results. If the request succeeds, and there is a non-zero result set, the result is sent to the client as a list of urls to JSON files.
246
247 Args:
248 name: string, Required. Name of the asynchronous query result to get. Must be of the form `organizations/{org}/environments/{env}/queries/{queryId}/resulturl`. (required)
249 x__xgafv: string, V1 error format.
250 Allowed values
251 1 - v1 error format
252 2 - v2 error format
253
254 Returns:
255 An object of the form:
256
257 { # The response for GetAsyncQueryResultUrl
258 &quot;urls&quot;: [ # The list of Signed URLs generated by the CreateAsyncQuery request
259 { # A Signed URL and the relevant metadata associated with it.
260 &quot;md5&quot;: &quot;A String&quot;, # The MD5 Hash of the JSON data
261 &quot;sizeBytes&quot;: &quot;A String&quot;, # The size of the returned file in bytes
262 &quot;uri&quot;: &quot;A String&quot;, # The signed URL of the JSON data. Will be of the form `https://storage.googleapis.com/example-bucket/cat.jpeg?X-Goog-Algorithm= GOOG4-RSA-SHA256&amp;X-Goog-Credential=example%40example-project.iam.gserviceaccount .com%2F20181026%2Fus-central1%2Fstorage%2Fgoog4_request&amp;X-Goog-Date=20181026T18 1309Z&amp;X-Goog-Expires=900&amp;X-Goog-SignedHeaders=host&amp;X-Goog-Signature=247a2aa45f16 9edf4d187d54e7cc46e4731b1e6273242c4f4c39a1d2507a0e58706e25e3a85a7dbb891d62afa849 6def8e260c1db863d9ace85ff0a184b894b117fe46d1225c82f2aa19efd52cf21d3e2022b3b868dc c1aca2741951ed5bf3bb25a34f5e9316a2841e8ff4c530b22ceaa1c5ce09c7cbb5732631510c2058 0e61723f5594de3aea497f195456a2ff2bdd0d13bad47289d8611b6f9cfeef0c46c91a455b94e90a 66924f722292d21e24d31dcfb38ce0c0f353ffa5a9756fc2a9f2b40bc2113206a81e324fc4fd6823 a29163fa845c8ae7eca1fcf6e5bb48b3200983c56c5ca81fffb151cca7402beddfc4a76b13344703 2ea7abedc098d2eb14a7`
263 },
264 ],
265 }</pre>
266 </div>
267
268 <div class="method">
269 <code class="details" id="list">list(parent, dataset=None, from=None, inclQueriesWithoutReport=None, status=None, submittedBy=None, to=None, x__xgafv=None)</code>
270 <pre>Return a list of Asynchronous Queries
271
272 Args:
273 parent: string, Required. The parent resource name. Must be of the form `organizations/{org}/environments/{env}`. (required)
274 dataset: string, Filter response list by dataset. Example: `api`, `mint`
275 from: string, Filter response list by returning asynchronous queries that created after this date time. Time must be in ISO date-time format like &#x27;2011-12-03T10:15:30Z&#x27;.
276 inclQueriesWithoutReport: string, Flag to include asynchronous queries that don&#x27;t have a report denifition.
277 status: string, Filter response list by asynchronous query status.
278 submittedBy: string, Filter response list by user who submitted queries.
279 to: string, Filter response list by returning asynchronous queries that created before this date time. Time must be in ISO date-time format like &#x27;2011-12-03T10:16:30Z&#x27;.
280 x__xgafv: string, V1 error format.
281 Allowed values
282 1 - v1 error format
283 2 - v2 error format
284
285 Returns:
286 An object of the form:
287
288 { # The response for ListAsyncQueries.
289 &quot;queries&quot;: [ # The asynchronous queries belong to requested resource name.
290 {
291 &quot;created&quot;: &quot;A String&quot;, # Creation time of the query.
292 &quot;envgroupHostname&quot;: &quot;A String&quot;, # Hostname is available only when query is executed at host level.
293 &quot;error&quot;: &quot;A String&quot;, # Error is set when query fails.
294 &quot;executionTime&quot;: &quot;A String&quot;, # ExecutionTime is available only after the query is completed.
295 &quot;name&quot;: &quot;A String&quot;, # Asynchronous Query Name.
296 &quot;queryParams&quot;: { # Contains information like metrics, dimenstions etc of the AsyncQuery.
297 &quot;dimensions&quot;: [ # Dimensions of the AsyncQuery.
298 &quot;A String&quot;,
299 ],
300 &quot;endTimestamp&quot;: &quot;A String&quot;, # End timestamp of the query range.
301 &quot;metrics&quot;: [ # Metrics of the AsyncQuery. Example: [&quot;name:message_count,func:sum,alias:sum_message_count&quot;]
302 &quot;A String&quot;,
303 ],
304 &quot;outputFormat&quot;: &quot;A String&quot;, # Output format.
305 &quot;startTimestamp&quot;: &quot;A String&quot;, # Start timestamp of the query range.
306 &quot;timeUnit&quot;: &quot;A String&quot;, # Query GroupBy time unit.
307 },
308 &quot;reportDefinitionId&quot;: &quot;A String&quot;, # Asynchronous Report ID.
309 &quot;result&quot;: { # Result is available only after the query is completed.
310 &quot;expires&quot;: &quot;A String&quot;, # Query result will be unaccessable after this time.
311 &quot;self&quot;: &quot;A String&quot;, # Self link of the query results. Example: `/organizations/myorg/environments/myenv/queries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd/result` or following format if query is running at host level: `/organizations/myorg/hostQueries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd/result`
312 },
313 &quot;resultFileSize&quot;: &quot;A String&quot;, # ResultFileSize is available only after the query is completed.
314 &quot;resultRows&quot;: &quot;A String&quot;, # ResultRows is available only after the query is completed.
315 &quot;self&quot;: &quot;A String&quot;, # Self link of the query. Example: `/organizations/myorg/environments/myenv/queries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd` or following format if query is running at host level: `/organizations/myorg/hostQueries/9cfc0d85-0f30-46d6-ae6f-318d0cb961bd`
316 &quot;state&quot;: &quot;A String&quot;, # Query state could be &quot;enqueued&quot;, &quot;running&quot;, &quot;completed&quot;, &quot;failed&quot;.
317 &quot;updated&quot;: &quot;A String&quot;, # Last updated timestamp for the query.
318 },
319 ],
320 }</pre>
321 </div>
322
323 </body></html>