# Orígenes de Consulta para InfluxQL y Flux en InfluxDB 2.x

InfluxDB 2.x soporta dos lenguajes de consulta: **InfluxQL** (el clásico de InfluxDB 1.x) y **Flux** (el lenguaje moderno y recomendado). Sin embargo, no todas las interfaces permiten ambos lenguajes.

### **Tabla comparativa** <a href="#undefined" id="undefined"></a>

| **Herramienta/Interfaz**                  | **InfluxQL**                                        | **Flux**                               | **Notas**                                                                              |
| ----------------------------------------- | --------------------------------------------------- | -------------------------------------- | -------------------------------------------------------------------------------------- |
| **Interfaz Web (UI)**                     | ❌ No disponible                                     | ✔️ Sí, nativo                          | La UI solo permite consultas en Flux, no en InfluxQL.                                  |
| **CLI (`influx` o `influx v1 shell`)**    | ✔️ Sí, usando `influx v1 shell` o CLI antigua       | ✔️ Sí, usando comandos modernos        | El CLI moderno soporta ambos, pero la shell específica (`v1 shell`) es para InfluxQL.  |
| **API HTTP/REST**                         | ✔️ Sí, usando endpoint de compatibilidad (`/query`) | ✔️ Sí, usando endpoint `/api/v2/query` | InfluxQL requiere el endpoint de compatibilidad; Flux usa el endpoint nativo de la v2. |
| **Librerías cliente**                     | ✔️ Sí, si la librería soporta InfluxQL              | ✔️ Sí, si la librería soporta Flux     | Depende de la librería y su versión; muchas modernas priorizan Flux.                   |
| **Grafana y otras herramientas externas** | ✔️ Sí, si se configura con InfluxQL                 | ✔️ Sí, si se configura con Flux        | Grafana permite elegir el lenguaje según el datasource configurado.                    |

***

### **Resumen** <a href="#undefined" id="undefined"></a>

* **InfluxQL**: Aunque InfluxDB 2.x está orientado a Flux, mantiene compatibilidad con InfluxQL a través de la CLI (`influx v1 shell`), la API de compatibilidad y algunas librerías cliente y herramientas externas. **No se puede usar InfluxQL desde la interfaz web**.
* **Flux**: Es el lenguaje recomendado y nativo en InfluxDB 2.x. Se puede usar desde la interfaz web, CLI, API, librerías cliente modernas y herramientas externas como Grafana.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://darioaplicano.gitbook.io/influxdb2.x/sesion-1/guion-de-la-sesion/documentacion/introduccion-a-influxdb-y-bases-de-datos-de-series-temporales/diferencias-entre-influxql-flux-y-sql/origenes-de-consulta-para-influxql-y-flux-en-influxdb-2.x.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
