WIP(3-api): Prelim write and query API reference with compatibility description
parent
a72528814e
commit
d9224d82c0
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
title: InfluxDB 3 API
|
||||
description: >
|
||||
InfluxDB 3 Enterprise APIs provide a programmatic interface for interactions with
|
||||
InfluxDB, such as writing and querying data, as well as backward compatibility for
|
||||
InfluxDB v1 and v2 write and query workloads.
|
||||
menu:
|
||||
influxdb3_enterprise:
|
||||
parent: Reference
|
||||
name: InfluxDB 3 API
|
||||
weight: 104
|
||||
influxdb3/enterprise/tags: [api]
|
||||
source: /shared/v3-api-reference/api/_index.md
|
||||
---
|
||||
|
||||
<!--
|
||||
The content of this page is at /shared/v3-api-reference/api/_index.md
|
||||
-->
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
title: InfluxDB Flight API
|
||||
description: >
|
||||
The InfluxDB 3 Enterprise Flight APIs provide a programmatic
|
||||
interface for InfluxDB 3 client libraries and third-party Flight SQL clients
|
||||
to query data stored in an InfluxDB database.
|
||||
menu:
|
||||
influxdb3_enterprise:
|
||||
parent: Reference
|
||||
name: InfluxDB HTTP API
|
||||
weight: 104
|
||||
influxdb3/enterprise/tags: [api]
|
||||
---
|
||||
|
||||
<!--
|
||||
The content of this page is at /shared/v3-api-reference/api/http-api.md
|
||||
-->
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
title: InfluxDB HTTP API
|
||||
description: >
|
||||
The InfluxDB 3 Enterprise HTTP API provides a programmatic interface for interactions with
|
||||
InfluxDB, such as writing and querying data, as well as compatibility with
|
||||
InfluxDB v1 and v2 workloads.
|
||||
menu:
|
||||
influxdb3_enterprise:
|
||||
parent: Reference
|
||||
name: InfluxDB HTTP API
|
||||
weight: 104
|
||||
influxdb3/enterprise/tags: [api]
|
||||
---
|
||||
|
||||
<!--
|
||||
The content of this page is at /shared/v3-api-reference/api/http-api.md
|
||||
-->
|
|
@ -0,0 +1,4 @@
|
|||
<!--Allow shortcode-->
|
||||
{{% product-name %}} APIs provide a programmatic interface for interactions with
|
||||
InfluxDB, such as writing and querying data, as well as backward compatibility for
|
||||
InfluxDB v1 and v2 workloads.
|
|
@ -0,0 +1,9 @@
|
|||
<!-- Allow shortcode -->
|
||||
The Flight SQL and InfluxDB "native" Flight APIs provide programmatic query interfaces
|
||||
to InfluxDB 3 that use the Flight+gRPC protocol to retrieve data in [Arrow in-memory format](https://arrow.apache.org/docs/format/Columnar.html).
|
||||
InfluxDB 3 client libraries and third-party Flight clients integrate with your
|
||||
application code and use Flight APIs to query data stored in an InfluxDB 3 database.
|
||||
|
||||
InfluxDB 3 client libraries use the InfluxDB native Flight API.
|
||||
Third-party Flight clients, such as [Apache Arrow Python bindings](https://arrow.apache.org/docs/python/index.html) use
|
||||
the Flight SQL.
|
|
@ -0,0 +1,96 @@
|
|||
The {{% product-name %}} HTTP API provides a programmatic interface for interactions with
|
||||
InfluxDB, such as writing and querying data, as well as compatibility with
|
||||
InfluxDB v1 and v2 workloads.
|
||||
|
||||
## InfluxDB 3 write API endpoints
|
||||
|
||||
{{% api-endpoint endpoint="http://{{< influxdb/host >}}/api/v3/write" method="post" %}}
|
||||
|
||||
### Request parameters
|
||||
|
||||
- `request body`: Line protocol data
|
||||
|
||||
## InfluxDB 3 query API endpoints
|
||||
|
||||
{{% api-endpoint endpoint="http://{{< influxdb/host >}}/api/v3/query_sql" method="post" %}}
|
||||
|
||||
### Request parameters
|
||||
|
||||
- `db`: The name of the database to query
|
||||
- `q`: The query text
|
||||
|
||||
#### Query using SQL
|
||||
|
||||
{{% api-endpoint endpoint="http://{{< influxdb/host >}}/api/v3/query_influxql" method="post" %}}
|
||||
|
||||
{{% code-tabs-wrapper %}}
|
||||
{{% code-tabs %}}
|
||||
[Query string](#)
|
||||
[JSON](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
{{% code-placeholders "DATABASE_NAME|SQL_QUERY" %}}
|
||||
```bash
|
||||
curl "http://{{< influxdb/host >}}/api/v3/query_sql?db=DATABASE_NAME&q=SQL_QUERY"
|
||||
```
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
```bash
|
||||
curl http://{{< influxdb/host >}}/api/v3/query_sql
|
||||
--data '{"db": "DATABASE_NAME", "q": "SQL_QUERY"}
|
||||
```
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tabs-wrapper %}}
|
||||
|
||||
#### Query using InfluxQL
|
||||
|
||||
{{% api-endpoint endpoint="http://{{< influxdb/host >}}/api/v3/query_influxql" method="post" %}}
|
||||
|
||||
{{% code-tabs-wrapper %}}
|
||||
{{% code-tabs %}}
|
||||
[Query string](#)
|
||||
[JSON](#)
|
||||
{{% /code-tabs %}}
|
||||
{{% code-tab-content %}}
|
||||
{{% code-placeholders "DATABASE_NAME|INFLUXQL_QUERY" %}}
|
||||
```bash
|
||||
curl "http://{{< influxdb/host >}}/api/v3/query_sql?db=DATABASE_NAME&q=INFLUXQL_QUERY"
|
||||
```
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tab-content %}}
|
||||
```bash
|
||||
curl http://{{< influxdb/host >}}/api/v3/query_sql
|
||||
--data '{"db": "DATABASE_NAME", "q": "INFLUXQL_QUERY"}
|
||||
```
|
||||
{{% /code-tab-content %}}
|
||||
{{% code-tabs-wrapper %}}
|
||||
|
||||
### InfluxDB v1 compatibility API
|
||||
|
||||
{{% product-name %}} provides the following HTTP API endpoints that work with
|
||||
InfluxDB 1.x client libraries and third-party integrations:
|
||||
|
||||
Write line protocol to an InfluxDB 3 database using the v1-compatible endpoint:
|
||||
|
||||
{{% api-endpoint endpoint="http://{{< influxdb/host >}}/write" method="post" %}}
|
||||
|
||||
#### Request parameters
|
||||
|
||||
- `request body`: Line protocol data
|
||||
|
||||
Query data from an InfluxDB 3 database using the v1-compatible endpoint:
|
||||
|
||||
{{% api-endpoint endpoint="http://{{< influxdb/host >}}/query" method="post" %}}
|
||||
|
||||
### InfluxDB v2 compatibility
|
||||
|
||||
{{% product-name %}} provides an InfluxDB v2-compatible endpoint for writing
|
||||
data to an InfluxDB 3 database.
|
||||
The endpoint is compatible with v2 clients--for example, using Telegraf's InfluxDB v2 input plugin to write line protocol to an
|
||||
InfluxDB 3 database.
|
||||
|
||||
{{% api-endpoint endpoint="http://{{< influxdb/host >}}/api/v2/write" method="post" %}}
|
||||
|
||||
#### Request parameters
|
||||
|
||||
- `request body`: Line protocol data
|
Loading…
Reference in New Issue