action influxdata_post_query_ast { label: "Generate an Abstract Syntax Tree (AST) from a query" description: "Analyzes flux query and generates a query specification." provider: influxdata method: POST path: "/query/ast" encoding: json input: { type: "object" properties: { "Content-Type": { type: "string" enum: ["application/json"] } query: { type: "string" description: "Flux query script to be analyzed" } } required: ["query"] additionalProperties: false } output: { type: "object" description: "Contains the AST for the supplied Flux query" properties: { ast: { type: "object" description: "Represents a complete package source tree." properties: { files: { type: "array" description: "Package files" items: { type: "object" description: "Represents a source from a single file" properties: { body: { type: "array" description: "List of Flux statements" items: { type: "object" } } imports: { type: "array" description: "A list of package imports" items: { type: "object" description: "Declares a package import" properties: { as: { type: "object" description: "A valid Flux identifier" properties: { name: { type: "string" } type: { type: "string" description: "Type of AST node" } } } path: { type: "object" description: "Expressions begin and end with double quote marks" properties: { type: { type: "object" additionalProperties: true } value: { type: "string" } } } type: { type: "object" additionalProperties: true } } } } name: { type: "string" description: "The name of the file." } package: { type: "object" description: "Defines a package identifier" properties: { name: { type: "object" additionalProperties: true } type: { type: "object" additionalProperties: true } } } type: { type: "object" additionalProperties: true } } } } package: { type: "string" description: "Package name" } path: { type: "string" description: "Package import path" } type: { type: "object" additionalProperties: true } } } } } }