Interface QueryService


public interface QueryService
  • Method Details

    • getQuerySuggestions

      @GET("api/v2/query/suggestions") retrofit2.Call<FluxSuggestions> getQuerySuggestions(@Header("Zap-Trace-Span") String zapTraceSpan)
      Retrieve query suggestions
      Parameters:
      zapTraceSpan - OpenTracing span context (optional)
      Returns:
      Call<FluxSuggestions>
    • getQuerySuggestionsName

      @GET("api/v2/query/suggestions/{name}") retrofit2.Call<FluxSuggestion> getQuerySuggestionsName(@Path("name") String name, @Header("Zap-Trace-Span") String zapTraceSpan)
      Retrieve query suggestions for a branching suggestion
      Parameters:
      name - The name of the branching suggestion. (required)
      zapTraceSpan - OpenTracing span context (optional)
      Returns:
      Call<FluxSuggestion>
    • postQuery

      @Headers("Content-Type:application/json") @POST("api/v2/query") retrofit2.Call<String> postQuery(@Header("Zap-Trace-Span") String zapTraceSpan, @Header("Accept-Encoding") String acceptEncoding, @Header("Content-Type") String contentType, @Query("org") String org, @Query("orgID") String orgID, @Body Query query)
      Query data Retrieves data from InfluxDB buckets. To query data, you need the following: - **organization** – _See [View organizations](https://docs.influxdata.com/influxdb/v2.1/organizations/view-orgs/#view-your-organization-id) for instructions on viewing your organization ID._ - **API token** – _See [View tokens](https://docs.influxdata.com/influxdb/v2.1/security/tokens/view-tokens/) for instructions on viewing your API token._ - **InfluxDB URL** – _See [InfluxDB URLs](https://docs.influxdata.com/influxdb/v2.1/reference/urls/)_. - **Flux query** – _See [Flux](https://docs.influxdata.com/flux/v0.x/)._ For more information and examples, see [Query with the InfluxDB API](https://docs.influxdata.com/influxdb/v2.1/query-data/execute-queries/influx-api/).
      Parameters:
      zapTraceSpan - OpenTracing span context (optional)
      acceptEncoding - Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
      contentType - (optional)
      org - Name of the organization executing the query. Accepts either the ID or Name. If you provide both `orgID` and `org`, `org` takes precedence. (optional)
      orgID - ID of the organization executing the query. If you provide both `orgID` and `org`, `org` takes precedence. (optional)
      query - Flux query or specification to execute (optional)
      Returns:
      Call<String>
    • postQueryResponseBody

      @POST("api/v2/query") @Streaming retrofit2.Call<okhttp3.ResponseBody> postQueryResponseBody(@Header("Zap-Trace-Span") String zapTraceSpan, @Header("Accept-Encoding") String acceptEncoding, @Header("Content-Type") String contentType, @Query("org") String org, @Query("orgID") String orgID, @Body Query query)
      Query data Retrieves data from InfluxDB buckets. To query data, you need the following: - **organization** – _See [View organizations](https://docs.influxdata.com/influxdb/v2.1/organizations/view-orgs/#view-your-organization-id) for instructions on viewing your organization ID._ - **API token** – _See [View tokens](https://docs.influxdata.com/influxdb/v2.1/security/tokens/view-tokens/) for instructions on viewing your API token._ - **InfluxDB URL** – _See [InfluxDB URLs](https://docs.influxdata.com/influxdb/v2.1/reference/urls/)_. - **Flux query** – _See [Flux](https://docs.influxdata.com/flux/v0.x/)._ For more information and examples, see [Query with the InfluxDB API](https://docs.influxdata.com/influxdb/v2.1/query-data/execute-queries/influx-api/).
      Parameters:
      zapTraceSpan - OpenTracing span context (optional)
      acceptEncoding - Indicates the content encoding (usually a compression algorithm) that the client can understand. (optional, default to identity)
      contentType - (optional)
      org - Name of the organization executing the query. Accepts either the ID or Name. If you provide both `orgID` and `org`, `org` takes precedence. (optional)
      orgID - ID of the organization executing the query. If you provide both `orgID` and `org`, `org` takes precedence. (optional)
      query - Flux query or specification to execute (optional)
      Returns:
      Call<ResponseBody>
    • postQueryAnalyze

      @Headers("Content-Type:application/json") @POST("api/v2/query/analyze") retrofit2.Call<AnalyzeQueryResponse> postQueryAnalyze(@Header("Zap-Trace-Span") String zapTraceSpan, @Header("Content-Type") String contentType, @Body Query query)
      Analyze a Flux query
      Parameters:
      zapTraceSpan - OpenTracing span context (optional)
      contentType - (optional)
      query - Flux query to analyze (optional)
      Returns:
      Call<AnalyzeQueryResponse>
    • postQueryAst

      @Headers("Content-Type:application/json") @POST("api/v2/query/ast") retrofit2.Call<ASTResponse> postQueryAst(@Header("Zap-Trace-Span") String zapTraceSpan, @Header("Content-Type") String contentType, @Body LanguageRequest languageRequest)
      Generate an Abstract Syntax Tree (AST) from a query Analyzes flux query and generates a query specification.
      Parameters:
      zapTraceSpan - OpenTracing span context (optional)
      contentType - (optional)
      languageRequest - Analyzed Flux query to generate abstract syntax tree. (optional)
      Returns:
      Call<ASTResponse>