U wâ’i ¥ã@s8dZddlmZddlZddlmZGdd„deƒZdS)a InfluxDB OSS API Service. The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech é)Úabsolute_importN)Ú _BaseServicecsÂeZdZdZd-‡fdd„ Zdd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dd„Z dd„Z dd„Z dd„Zdd„Zdd„Zdd„Zdd „Zd!d"„Zd#d$„Zd%d&„Zd'd(„Zd)d*„Zd+d,„Z‡ZS).Ú QueryServicez‹NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. Ncstƒ |¡dS)z.QueryService - a operation defined in OpenAPI.N)ÚsuperÚ__init__)ÚselfÚ api_client©Ú __class__©úV/opt/alt/python38/lib/python3.8/site-packages/influxdb_client/service/query_service.pyrszQueryService.__init__cKs2d|d<| d¡r|jf|ŽS|jf|Ž}|SdS)aList Flux query suggestions. Lists Flux query suggestions. Each suggestion contains a [Flux function](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) name and parameters. Use this endpoint to retrieve a list of Flux query suggestions used in the InfluxDB Flux Query Builder. #### Limitations - When writing a query, avoid using `_functionName()` helper functions exposed by this endpoint. Helper function names have an underscore (`_`) prefix and aren't meant to be used directly in queries--for example: - To sort on a column and keep the top n records, use the `top(n, columns=["_value"], tables=<-)` function instead of the `_sortLimit` helper function. `top` uses `_sortLimit`. #### Related Guides - [List of all Flux functions](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_query_suggestions(async_req=True) >>> result = thread.get() :param async_req bool :param str zap_trace_span: OpenTracing span context :return: FluxSuggestions If the method is called asynchronously, returns the request thread. TÚ_return_http_data_onlyÚ async_reqN)ÚgetÚ$get_query_suggestions_with_http_info©rÚkwargsÚdatar r r Úget_query_suggestions s    z"QueryService.get_query_suggestionscKsd|jf|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d S) a%List Flux query suggestions. Lists Flux query suggestions. Each suggestion contains a [Flux function](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) name and parameters. Use this endpoint to retrieve a list of Flux query suggestions used in the InfluxDB Flux Query Builder. #### Limitations - When writing a query, avoid using `_functionName()` helper functions exposed by this endpoint. Helper function names have an underscore (`_`) prefix and aren't meant to be used directly in queries--for example: - To sort on a column and keep the top n records, use the `top(n, columns=["_value"], tables=<-)` function instead of the `_sortLimit` helper function. `top` uses `_sortLimit`. #### Related Guides - [List of all Flux functions](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_query_suggestions_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param str zap_trace_span: OpenTracing span context :return: FluxSuggestions If the method is called asynchronously, returns the request thread. ú/api/v2/query/suggestionsÚGETÚFluxSuggestionsrr Ú_preload_contentTÚ_request_timeoutÚ urlopen_kwN© ÚbodyZ post_paramsÚfilesZ response_typeZ auth_settingsrr rrZcollection_formatsr©Ú_get_query_suggestions_preparerÚcall_apir©rrÚlocal_var_paramsÚ path_paramsÚ query_paramsÚ header_paramsÚ body_paramsr r r r6s( ÿ   ñz1QueryService.get_query_suggestions_with_http_infocËsj|jf|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d Id HS) acList Flux query suggestions. Lists Flux query suggestions. Each suggestion contains a [Flux function](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) name and parameters. Use this endpoint to retrieve a list of Flux query suggestions used in the InfluxDB Flux Query Builder. #### Limitations - When writing a query, avoid using `_functionName()` helper functions exposed by this endpoint. Helper function names have an underscore (`_`) prefix and aren't meant to be used directly in queries--for example: - To sort on a column and keep the top n records, use the `top(n, columns=["_value"], tables=<-)` function instead of the `_sortLimit` helper function. `top` uses `_sortLimit`. #### Related Guides - [List of all Flux functions](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) This method makes an asynchronous HTTP request. :param async_req bool :param str zap_trace_span: OpenTracing span context :return: FluxSuggestions If the method is called asynchronously, returns the request thread. rrrrr rTrrNrrr!r r r Úget_query_suggestions_asyncYs( ÿ   ñz(QueryService.get_query_suggestions_asynccKs`tƒ}dg}| d||¡i}g}i}d|kr:|d|d<d}|j ddg¡|d<|||||fS)NÚzap_trace_spanrúZap-Trace-Spanúapplication/jsonz text/htmlÚAccept)ÚlocalsÚ_check_operation_paramsrÚselect_header_accept©rrr"Ú all_paramsr#r$r%r&r r r rys ÿz+QueryService._get_query_suggestions_preparecKs6d|d<| d¡r |j|f|ŽS|j|f|Ž}|SdS)aòRetrieve a query suggestion for a branching suggestion. Retrieves a query suggestion that contains the name and parameters of the requested function. Use this endpoint to pass a branching suggestion (a Flux function name) and retrieve the parameters of the requested function. #### Limitations - Use `/api/v2/query/suggestions/{name}` (without a trailing slash). `/api/v2/query/suggestions/{name}/` (note the trailing slash) results in a HTTP `301 Moved Permanently` status. - The function `name` must exist and must be spelled correctly. #### Related Guides - [List of all Flux functions](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_query_suggestions_name(name, async_req=True) >>> result = thread.get() :param async_req bool :param str name: A [Flux function](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) name. (required) :param str zap_trace_span: OpenTracing span context :return: FluxSuggestion If the method is called asynchronously, returns the request thread. Tr rN)rÚ)get_query_suggestions_name_with_http_info)rÚnamerrr r r Úget_query_suggestions_nameŽs  z'QueryService.get_query_suggestions_namecKsf|j|f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d S) aRetrieve a query suggestion for a branching suggestion. Retrieves a query suggestion that contains the name and parameters of the requested function. Use this endpoint to pass a branching suggestion (a Flux function name) and retrieve the parameters of the requested function. #### Limitations - Use `/api/v2/query/suggestions/{name}` (without a trailing slash). `/api/v2/query/suggestions/{name}/` (note the trailing slash) results in a HTTP `301 Moved Permanently` status. - The function `name` must exist and must be spelled correctly. #### Related Guides - [List of all Flux functions](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_query_suggestions_name_with_http_info(name, async_req=True) >>> result = thread.get() :param async_req bool :param str name: A [Flux function](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) name. (required) :param str zap_trace_span: OpenTracing span context :return: FluxSuggestion If the method is called asynchronously, returns the request thread. ú /api/v2/query/suggestions/{name}rÚFluxSuggestionrr rTrrNr©Ú#_get_query_suggestions_name_preparerr r©rr2rr"r#r$r%r&r r r r1¥s( ÿ   ñz6QueryService.get_query_suggestions_name_with_http_infocËsl|j|f|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d Id HS) a4Retrieve a query suggestion for a branching suggestion. Retrieves a query suggestion that contains the name and parameters of the requested function. Use this endpoint to pass a branching suggestion (a Flux function name) and retrieve the parameters of the requested function. #### Limitations - Use `/api/v2/query/suggestions/{name}` (without a trailing slash). `/api/v2/query/suggestions/{name}/` (note the trailing slash) results in a HTTP `301 Moved Permanently` status. - The function `name` must exist and must be spelled correctly. #### Related Guides - [List of all Flux functions](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) This method makes an asynchronous HTTP request. :param async_req bool :param str name: A [Flux function](https://docs.influxdata.com/flux/v0.x/stdlib/all-functions/) name. (required) :param str zap_trace_span: OpenTracing span context :return: FluxSuggestion If the method is called asynchronously, returns the request thread. r4rr5rr rTrrNrr6r8r r r Ú get_query_suggestions_name_asyncÉs( ÿ   ñz-QueryService.get_query_suggestions_name_asyncc Kstƒ}ddg}| d||¡d|ks0|ddkr8tdƒ‚i}d|krP|d|d<g}i}d|krl|d|d<d}|j dg¡|d<|||||fS)Nr2r(r3zOMissing the required parameter `name` when calling `get_query_suggestions_name`r)r*r+)r,r-Ú ValueErrorrr.) rr2rr"r0r#r$r%r&r r r r7ês& ÿ  ÿz0QueryService._get_query_suggestions_name_preparecKs2d|d<| d¡r|jf|ŽS|jf|Ž}|SdS)asQuery data. Retrieves data from buckets. Use this endpoint to send a Flux query request and retrieve data from a bucket. #### Rate limits (with InfluxDB Cloud) `read` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Query with the InfluxDB API](https://docs.influxdata.com/influxdb/latest/query-data/execute-queries/influx-api/) - [Get started with Flux](https://docs.influxdata.com/flux/v0.x/get-started/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_query(async_req=True) >>> result = thread.get() :param async_req bool :param str zap_trace_span: OpenTracing span context :param str accept_encoding: The content encoding (usually a compression algorithm) that the client can understand. :param str content_type: :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. :param Query query: Flux query or specification to execute :return: str If the method is called asynchronously, returns the request thread. Tr rN)rÚpost_query_with_http_inforr r r Ú post_querys    zQueryService.post_querycKsd|jf|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d S) a‚Query data. Retrieves data from buckets. Use this endpoint to send a Flux query request and retrieve data from a bucket. #### Rate limits (with InfluxDB Cloud) `read` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Query with the InfluxDB API](https://docs.influxdata.com/influxdb/latest/query-data/execute-queries/influx-api/) - [Get started with Flux](https://docs.influxdata.com/flux/v0.x/get-started/) This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_query_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param str zap_trace_span: OpenTracing span context :param str accept_encoding: The content encoding (usually a compression algorithm) that the client can understand. :param str content_type: :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. :param Query query: Flux query or specification to execute :return: str If the method is called asynchronously, returns the request thread. ú /api/v2/queryÚPOSTÚstrrr rTrrNr©Ú_post_query_preparerr rr!r r r r; s( ÿ   ñz&QueryService.post_query_with_http_infocËsj|jf|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d Id HS) aËQuery data. Retrieves data from buckets. Use this endpoint to send a Flux query request and retrieve data from a bucket. #### Rate limits (with InfluxDB Cloud) `read` rate limits apply. For more information, see [limits and adjustable quotas](https://docs.influxdata.com/influxdb/cloud/account-management/limits/). #### Related guides - [Query with the InfluxDB API](https://docs.influxdata.com/influxdb/latest/query-data/execute-queries/influx-api/) - [Get started with Flux](https://docs.influxdata.com/flux/v0.x/get-started/) This method makes an asynchronous HTTP request. :param async_req bool :param str zap_trace_span: OpenTracing span context :param str accept_encoding: The content encoding (usually a compression algorithm) that the client can understand. :param str content_type: :param str org: An organization name or ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. :param str org_id: An organization ID. #### InfluxDB Cloud - Doesn't use the `org` parameter or `orgID` parameter. - Queries the bucket in the organization associated with the authorization (API token). #### InfluxDB OSS - Requires either the `org` parameter or `orgID` parameter. - Queries the bucket in the specified organization. :param Query query: Flux query or specification to execute :return: str If the method is called asynchronously, returns the request thread. r=r>r?rr rTrrNrr@r!r r r Úpost_query_asyncHs( ÿ   ñzQueryService.post_query_asynccKsêtƒ}ddddddg}| d||¡i}g}d|krF| d|df¡d|kr`| d|df¡i}d|krx|d|d <d|krŒ|d|d <d|kr |d|d <d}d|kr´|d}|j d d g¡|d<|j d dg¡|d <|||||fS)Nr(Úaccept_encodingÚ content_typeÚorgZorg_idÚqueryr<ZorgIDr)zAccept-Encodingú Content-Typezapplication/csvr*r+zapplication/vnd.flux)r,r-Úappendrr.Úselect_header_content_typer/r r r rAms4   ÿÿz QueryService._post_query_preparecKs2d|d<| d¡r|jf|ŽS|jf|Ž}|SdS)agAnalyze a Flux query. Analyzes a [Flux query](https://docs.influxdata.com/flux/v0.x/) for syntax errors and returns the list of errors. In the following sample query, `from()` is missing the property key. ```json { "query": "from(: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")", "type": "flux" } ``` If you pass this in a request to the `/api/v2/analyze` endpoint, InfluxDB returns an `errors` list that contains an error object for the missing key. #### Limitations - The endpoint doesn't validate values in the query--for example: - The following sample query has correct syntax, but contains an incorrect `from()` property key: ```json { "query": "from(foo: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")", "type": "flux" } ``` If you pass this in a request to the `/api/v2/analyze` endpoint, InfluxDB returns an empty `errors` list. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_query_analyze(async_req=True) >>> result = thread.get() :param async_req bool :param str zap_trace_span: OpenTracing span context :param str content_type: :param Query query: Flux query to analyze :return: AnalyzeQueryResponse If the method is called asynchronously, returns the request thread. Tr rN)rÚ!post_query_analyze_with_http_inforr r r Úpost_query_analyzes    zQueryService.post_query_analyzecKsd|jf|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d S) avAnalyze a Flux query. Analyzes a [Flux query](https://docs.influxdata.com/flux/v0.x/) for syntax errors and returns the list of errors. In the following sample query, `from()` is missing the property key. ```json { "query": "from(: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")", "type": "flux" } ``` If you pass this in a request to the `/api/v2/analyze` endpoint, InfluxDB returns an `errors` list that contains an error object for the missing key. #### Limitations - The endpoint doesn't validate values in the query--for example: - The following sample query has correct syntax, but contains an incorrect `from()` property key: ```json { "query": "from(foo: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")", "type": "flux" } ``` If you pass this in a request to the `/api/v2/analyze` endpoint, InfluxDB returns an empty `errors` list. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_query_analyze_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param str zap_trace_span: OpenTracing span context :param str content_type: :param Query query: Flux query to analyze :return: AnalyzeQueryResponse If the method is called asynchronously, returns the request thread. ú/api/v2/query/analyzer>ÚAnalyzeQueryResponserr rTrrNr©Ú_post_query_analyze_preparerr rr!r r r rJ¨s( ÿ   ñz.QueryService.post_query_analyze_with_http_infocËsj|jf|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d Id HS) a·Analyze a Flux query. Analyzes a [Flux query](https://docs.influxdata.com/flux/v0.x/) for syntax errors and returns the list of errors. In the following sample query, `from()` is missing the property key. ```json { "query": "from(: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")", "type": "flux" } ``` If you pass this in a request to the `/api/v2/analyze` endpoint, InfluxDB returns an `errors` list that contains an error object for the missing key. #### Limitations - The endpoint doesn't validate values in the query--for example: - The following sample query has correct syntax, but contains an incorrect `from()` property key: ```json { "query": "from(foo: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")", "type": "flux" } ``` If you pass this in a request to the `/api/v2/analyze` endpoint, InfluxDB returns an empty `errors` list. This method makes an asynchronous HTTP request. :param async_req bool :param str zap_trace_span: OpenTracing span context :param str content_type: :param Query query: Flux query to analyze :return: AnalyzeQueryResponse If the method is called asynchronously, returns the request thread. rLr>rMrr rTrrNrrNr!r r r Úpost_query_analyze_asyncÍs( ÿ   ñz%QueryService.post_query_analyze_asynccKs˜tƒ}dddg}| d||¡i}g}i}d|kr>|d|d<d|krR|d|d<d}d|krf|d}|j dg¡|d<|j dg¡|d<|||||fS) Nr(rDrFrKr)rGr*r+©r,r-rr.rIr/r r r rOïs(   ÿÿz(QueryService._post_query_analyze_preparecKs2d|d<| d¡r|jf|ŽS|jf|Ž}|SdS)aìGenerate a query Abstract Syntax Tree (AST). Analyzes a Flux query and returns a complete package source [Abstract Syntax Tree (AST)](https://docs.influxdata.com/influxdb/latest/reference/glossary/#abstract-syntax-tree-ast) for the query. Use this endpoint for deep query analysis such as debugging unexpected query results. A Flux query AST provides a semantic, tree-like representation with contextual information about the query. The AST illustrates how the query is distributed into different components for execution. #### Limitations - The endpoint doesn't validate values in the query--for example: The following sample Flux query has correct syntax, but contains an incorrect `from()` property key: ```js from(foo: "iot_center") |> range(start: -90d) |> filter(fn: (r) => r._measurement == "environment") ``` The following sample JSON shows how to pass the query in the request body: ```js from(foo: "iot_center") |> range(start: -90d) |> filter(fn: (r) => r._measurement == "environment") ``` The following code sample shows how to pass the query as JSON in the request body: ```json { "query": "from(foo: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")" } ``` Passing this to `/api/v2/query/ast` will return a successful response with a generated AST. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_query_ast(async_req=True) >>> result = thread.get() :param async_req bool :param str zap_trace_span: OpenTracing span context :param str content_type: :param LanguageRequest language_request: The Flux query to analyze. :return: ASTResponse If the method is called asynchronously, returns the request thread. Tr rN)rÚpost_query_ast_with_http_inforr r r Úpost_query_ast s    zQueryService.post_query_astcKsd|jf|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d S) aûGenerate a query Abstract Syntax Tree (AST). Analyzes a Flux query and returns a complete package source [Abstract Syntax Tree (AST)](https://docs.influxdata.com/influxdb/latest/reference/glossary/#abstract-syntax-tree-ast) for the query. Use this endpoint for deep query analysis such as debugging unexpected query results. A Flux query AST provides a semantic, tree-like representation with contextual information about the query. The AST illustrates how the query is distributed into different components for execution. #### Limitations - The endpoint doesn't validate values in the query--for example: The following sample Flux query has correct syntax, but contains an incorrect `from()` property key: ```js from(foo: "iot_center") |> range(start: -90d) |> filter(fn: (r) => r._measurement == "environment") ``` The following sample JSON shows how to pass the query in the request body: ```js from(foo: "iot_center") |> range(start: -90d) |> filter(fn: (r) => r._measurement == "environment") ``` The following code sample shows how to pass the query as JSON in the request body: ```json { "query": "from(foo: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")" } ``` Passing this to `/api/v2/query/ast` will return a successful response with a generated AST. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.post_query_ast_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param str zap_trace_span: OpenTracing span context :param str content_type: :param LanguageRequest language_request: The Flux query to analyze. :return: ASTResponse If the method is called asynchronously, returns the request thread. ú/api/v2/query/astr>Ú ASTResponserr rTrrNr©Ú_post_query_ast_preparerr rr!r r r rR$s( ÿ   ñz*QueryService.post_query_ast_with_http_infocËsj|jf|Ž\}}}}}|jjdd||||gidg| d¡| d¡| dd¡| d¡i| d d ¡d Id HS) a@Generate a query Abstract Syntax Tree (AST). Analyzes a Flux query and returns a complete package source [Abstract Syntax Tree (AST)](https://docs.influxdata.com/influxdb/latest/reference/glossary/#abstract-syntax-tree-ast) for the query. Use this endpoint for deep query analysis such as debugging unexpected query results. A Flux query AST provides a semantic, tree-like representation with contextual information about the query. The AST illustrates how the query is distributed into different components for execution. #### Limitations - The endpoint doesn't validate values in the query--for example: The following sample Flux query has correct syntax, but contains an incorrect `from()` property key: ```js from(foo: "iot_center") |> range(start: -90d) |> filter(fn: (r) => r._measurement == "environment") ``` The following sample JSON shows how to pass the query in the request body: ```js from(foo: "iot_center") |> range(start: -90d) |> filter(fn: (r) => r._measurement == "environment") ``` The following code sample shows how to pass the query as JSON in the request body: ```json { "query": "from(foo: \\"iot_center\\")\\ |> range(start: -90d)\\ |> filter(fn: (r) => r._measurement == \\"environment\\")" } ``` Passing this to `/api/v2/query/ast` will return a successful response with a generated AST. This method makes an asynchronous HTTP request. :param async_req bool :param str zap_trace_span: OpenTracing span context :param str content_type: :param LanguageRequest language_request: The Flux query to analyze. :return: ASTResponse If the method is called asynchronously, returns the request thread. rTr>rUrr rTrrNrrVr!r r r Úpost_query_ast_asyncIs( ÿ   ñz!QueryService.post_query_ast_asynccKs˜tƒ}dddg}| d||¡i}g}i}d|kr>|d|d<d|krR|d|d<d}d|krf|d}|j dg¡|d<|j dg¡|d<|||||fS) Nr(rDZlanguage_requestrSr)rGr*r+rQr/r r r rWks(   ÿÿz$QueryService._post_query_ast_prepare)N)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrr'rr3r1r9r7r<r;rBrArKrJrPrOrSrRrXrWÚ __classcell__r r r r rs,# $!(%#%"%"r)r\Ú __future__rÚreZ%influxdb_client.service._base_servicerrr r r r Ús