---
title: "POST /sources/{id}/queries"
method: POST
path: "/sources/{id}/queries"
tags: ["sources", "queries"]
---

# POST /sources/{id}/queries

`POST /sources/{id}/queries`

Used to analyze queries for structure`

## Path parameters

- `id` string, required

## Request body

- Queries
  - `queries` Query[]
    - `query` string — InfluxQL statement to be analyzed

## Response `200`

Result of the analysis of the query.

- QueriesResponse
  - `queries` QueryResponse[]
    - `query` string — InfluxQL statement to be analyzed
    - `queryConfig` QueryConfig
      - `id` string
      - `database` string, required
      - `measurement` string, required
      - `retentionPolicy` string, required
      - `areTagsAccepted` boolean, required
      - `rawText` string
      - `tags` object, required
      - `groupBy` object, required
        - `time` string, required
        - `tags` string[], required
      - `fields` Field[], required
        - `value` string, required — value is the value of the field. Meaning of the value is implied by the `type` key
        - `type` 'func' | 'field' | 'integer' | 'number' | 'regex' | 'wildcard', required — type describes the field type. func is a function; field is a field reference
        - `alias` string — Alias overrides the field name in the returned response. Applies only if type is `func`
        - `args` Field[] — Args are the arguments to the function
      - `range` object
        - `lower` string, required
        - `upper` string, required

## Other responses

- `404` — Data source id does not exist.
- `default` — Unexpected internal server error

---

[API](https://skmtc.net/influxdata/apis/chronograf.md) · [All operations](https://skmtc.net/influxdata/apis/chronograf/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/influxdata/chronograf/versions/ce55d963b4ac/schema)
