feat(api): Add RapiDoc Mini component for API operation pages
The feature is shippable, but needs a few small fixes and we'll need to update or alias all API docs links for Core and Ent3. - Add rapidoc-mini.ts TypeScript component with CDN loading and theme sync - Add api-operation layout for standalone operation pages - Add rapidoc-mini.html partial for reusable RapiDoc rendering - Add rapidoc-custom.css for RapiDoc style overrides - Register rapidoc-mini component in main.js - Add article data for cloud-dedicated and clustered products - Update API reference Cypress testsworktree-2025-12-30T19-16-55
parent
da990a3252
commit
f6de23b5ec
|
|
@ -90,33 +90,20 @@ tags:
|
|||
|
||||
- [Manage the Distinct Value Cache](/influxdb3/core/admin/distinct-value-cache/)
|
||||
- [Manage the Last Value Cache](/influxdb3/core/admin/last-value-cache/)
|
||||
- name: Compatibility endpoints
|
||||
- name: Migrate from InfluxDB v1 or v2
|
||||
x-traitTag: true
|
||||
description: |
|
||||
InfluxDB 3 provides compatibility endpoints for InfluxDB 1.x and InfluxDB 2.x workloads and clients.
|
||||
Migrate your existing InfluxDB v1 or v2 workloads to InfluxDB 3.
|
||||
|
||||
### Write data using v1- or v2-compatible endpoints
|
||||
InfluxDB 3 provides compatibility endpoints that work with InfluxDB 1.x and 2.x client libraries and tools.
|
||||
Operations marked with <span class="api-compat-badge api-compat-badge--v1">v1</span> or <span class="api-compat-badge api-compat-badge--v2">v2</span> badges are compatible with the respective InfluxDB version.
|
||||
|
||||
- [`/api/v2/write` endpoint](#operation/PostV2Write)
|
||||
for InfluxDB v2 clients and when you bring existing InfluxDB v2 write workloads to InfluxDB 3.
|
||||
- [`/write` endpoint](#operation/PostV1Write) for InfluxDB v1 clients and when you bring existing InfluxDB v1 write workloads to InfluxDB 3.
|
||||
### Migration guides
|
||||
|
||||
For new workloads, use the [`/api/v3/write_lp` endpoint](#operation/PostWriteLP).
|
||||
|
||||
All endpoints accept the same line protocol format.
|
||||
|
||||
### Query data
|
||||
|
||||
Use the HTTP [`/query`](#operation/GetV1ExecuteQuery) endpoint for InfluxDB v1 clients and v1 query workloads using InfluxQL.
|
||||
|
||||
For new workloads, use one of the following:
|
||||
|
||||
- HTTP [`/api/v3/query_sql` endpoint](#operation/GetExecuteQuerySQL) for new query workloads using SQL.
|
||||
- HTTP [`/api/v3/query_influxql` endpoint](#operation/GetExecuteInfluxQLQuery) for new query workloads using InfluxQL.
|
||||
- Flight SQL and InfluxDB 3 _Flight+gRPC_ APIs for querying with SQL or InfluxQL. For more information about using Flight APIs, see [InfluxDB 3 client libraries](https://github.com/InfluxCommunity?q=influxdb3&type=public&language=&sort=).
|
||||
|
||||
### Server information
|
||||
|
||||
Server information endpoints such as `/health` and `metrics` are compatible with InfluxDB 1.x and InfluxDB 2.x clients.
|
||||
- [Migrate from InfluxDB v1](/influxdb3/core/guides/migrate/influxdb-1x/) - For users migrating from InfluxDB 1.x
|
||||
- [Migrate from InfluxDB v2](/influxdb3/core/guides/migrate/influxdb-2x/) - For users migrating from InfluxDB 2.x or Cloud
|
||||
- [Use compatibility APIs to write data](/influxdb3/core/write-data/http-api/compatibility-apis/) - v1 and v2 write endpoints
|
||||
- [Use the v1 HTTP query API](/influxdb3/core/query-data/execute-queries/influxdb-v1-api/) - InfluxQL queries via HTTP
|
||||
- name: Database
|
||||
description: Manage databases
|
||||
- description: |
|
||||
|
|
@ -340,7 +327,6 @@ paths:
|
|||
'413':
|
||||
description: Request entity too large.
|
||||
tags:
|
||||
- Compatibility endpoints
|
||||
- Write data
|
||||
x-influxdata-guides:
|
||||
- title: Use compatibility APIs to write data
|
||||
|
|
@ -429,7 +415,6 @@ paths:
|
|||
'413':
|
||||
description: Request entity too large.
|
||||
tags:
|
||||
- Compatibility endpoints
|
||||
- Write data
|
||||
x-influxdata-guides:
|
||||
- title: Use compatibility APIs to write data
|
||||
|
|
@ -852,7 +837,6 @@ paths:
|
|||
description: Unprocessable entity.
|
||||
tags:
|
||||
- Query data
|
||||
- Compatibility endpoints
|
||||
x-influxdata-guides:
|
||||
- title: Use the InfluxDB v1 HTTP query API and InfluxQL to query data
|
||||
href: /influxdb3/core/query-data/execute-queries/influxdb-v1-api/
|
||||
|
|
@ -970,7 +954,6 @@ paths:
|
|||
description: Unprocessable entity.
|
||||
tags:
|
||||
- Query data
|
||||
- Compatibility endpoints
|
||||
x-influxdata-guides:
|
||||
- title: Use the InfluxDB v1 HTTP query API and InfluxQL to query data
|
||||
href: /influxdb3/core/query-data/execute-queries/influxdb-v1-api/
|
||||
|
|
@ -999,7 +982,6 @@ paths:
|
|||
description: Service is unavailable.
|
||||
tags:
|
||||
- Server information
|
||||
- Compatibility endpoints
|
||||
/ping:
|
||||
get:
|
||||
operationId: GetPing
|
||||
|
|
@ -2693,10 +2675,10 @@ x-tagGroups:
|
|||
tags:
|
||||
- Quick start
|
||||
- Authentication
|
||||
- Migrate from InfluxDB v1 or v2
|
||||
- Cache data
|
||||
- Common parameters
|
||||
- Response codes
|
||||
- Compatibility endpoints
|
||||
- Database
|
||||
- Processing engine
|
||||
- Server information
|
||||
|
|
|
|||
|
|
@ -5,18 +5,15 @@ info:
|
|||
The InfluxDB HTTP API for InfluxDB 3 Enterprise provides a programmatic interface for
|
||||
interacting with InfluxDB 3 Enterprise databases and resources.
|
||||
Use this API to:
|
||||
|
||||
- Write data to InfluxDB 3 Enterprise databases
|
||||
- Query data using SQL or InfluxQL
|
||||
- Process data using Processing engine plugins
|
||||
- Manage databases, tables, and Processing engine triggers
|
||||
- Perform administrative tasks and access system information
|
||||
|
||||
The API includes endpoints under the following paths:
|
||||
- `/api/v3`: InfluxDB 3 Enterprise native endpoints
|
||||
- `/`: Compatibility endpoints for InfluxDB v1 workloads and clients
|
||||
- `/api/v2/write`: Compatibility endpoint for InfluxDB v2 workloads and clients
|
||||
|
||||
<!-- TODO: verify where to host the spec that users can download.
|
||||
This documentation is generated from the
|
||||
[InfluxDB OpenAPI specification](https://raw.githubusercontent.com/influxdata/).
|
||||
|
|
@ -47,96 +44,65 @@ tags:
|
|||
- name: Authentication
|
||||
description: |
|
||||
Depending on your workflow, use one of the following schemes to authenticate to the InfluxDB 3 API:
|
||||
|
||||
| Authentication scheme | Works with |
|
||||
|:----------------------|:-----------|
|
||||
| Bearer authentication | All endpoints |
|
||||
| Token authentication | v1, v2 endpoints |
|
||||
| Basic authentication | v1 endpoints |
|
||||
| Querystring authentication | v1 endpoints |
|
||||
|
||||
See the **Security Schemes** section below for details on each authentication method.
|
||||
x-traitTag: true
|
||||
- name: Cache data
|
||||
description: |
|
||||
Manage the in-memory cache.
|
||||
|
||||
#### Distinct Value Cache
|
||||
|
||||
The Distinct Value Cache (DVC) lets you cache distinct
|
||||
values of one or more columns in a table, improving the performance of
|
||||
queries that return distinct tag and field values.
|
||||
|
||||
The DVC is an in-memory cache that stores distinct values for specific columns
|
||||
in a table. When you create an DVC, you can specify what columns' distinct
|
||||
values to cache, the maximum number of distinct value combinations to cache, and
|
||||
the maximum age of cached values. A DVC is associated with a table, which can
|
||||
have multiple DVCs.
|
||||
|
||||
#### Last value cache
|
||||
|
||||
The Last Value Cache (LVC) lets you cache the most recent
|
||||
values for specific fields in a table, improving the performance of queries that
|
||||
return the most recent value of a field for specific series or the last N values
|
||||
of a field.
|
||||
|
||||
The LVC is an in-memory cache that stores the last N number of values for
|
||||
specific fields of series in a table. When you create an LVC, you can specify
|
||||
what fields to cache, what tags to use to identify each series, and the
|
||||
number of values to cache for each unique series.
|
||||
An LVC is associated with a table, which can have multiple LVCs.
|
||||
|
||||
#### Related guides
|
||||
|
||||
- [Manage the Distinct Value Cache](/influxdb3/enterprise/admin/distinct-value-cache/)
|
||||
- [Manage the Last Value Cache](/influxdb3/enterprise/admin/last-value-cache/)
|
||||
- name: Compatibility endpoints
|
||||
- name: Migrate from InfluxDB v1 or v2
|
||||
x-traitTag: true
|
||||
description: |
|
||||
InfluxDB 3 provides compatibility endpoints for InfluxDB 1.x and InfluxDB 2.x workloads and clients.
|
||||
|
||||
### Write data using v1- or v2-compatible endpoints
|
||||
|
||||
- [`/api/v2/write` endpoint](#operation/PostV2Write)
|
||||
for InfluxDB v2 clients and when you bring existing InfluxDB v2 write workloads to InfluxDB 3.
|
||||
- [`/write` endpoint](#operation/PostV1Write) for InfluxDB v1 clients and when you bring existing InfluxDB v1 write workloads to InfluxDB 3.
|
||||
|
||||
For new workloads, use the [`/api/v3/write_lp` endpoint](#operation/PostWriteLP).
|
||||
|
||||
All endpoints accept the same line protocol format.
|
||||
|
||||
### Query data
|
||||
|
||||
Use the HTTP [`/query`](#operation/GetV1ExecuteQuery) endpoint for InfluxDB v1 clients and v1 query workloads using InfluxQL.
|
||||
|
||||
For new workloads, use one of the following:
|
||||
|
||||
- HTTP [`/api/v3/query_sql` endpoint](#operation/GetExecuteQuerySQL) for new query workloads using SQL.
|
||||
- HTTP [`/api/v3/query_influxql` endpoint](#operation/GetExecuteInfluxQLQuery) for new query workloads using InfluxQL.
|
||||
- Flight SQL and InfluxDB 3 _Flight+gRPC_ APIs for querying with SQL or InfluxQL. For more information about using Flight APIs, see [InfluxDB 3 client libraries](https://github.com/InfluxCommunity?q=influxdb3&type=public&language=&sort=).
|
||||
|
||||
### Server information
|
||||
|
||||
Server information endpoints such as `/health` and `metrics` are compatible with InfluxDB 1.x and InfluxDB 2.x clients.
|
||||
Migrate your existing InfluxDB v1 or v2 workloads to InfluxDB 3.
|
||||
InfluxDB 3 provides compatibility endpoints that work with InfluxDB 1.x and 2.x client libraries and tools.
|
||||
Operations marked with <span class="api-compat-badge api-compat-badge--v1">v1</span> or <span class="api-compat-badge api-compat-badge--v2">v2</span> badges are compatible with the respective InfluxDB version.
|
||||
### Migration guides
|
||||
- [Migrate from InfluxDB v1](/influxdb3/enterprise/guides/migrate/influxdb-1x/) - For users migrating from InfluxDB 1.x
|
||||
- [Migrate from InfluxDB v2](/influxdb3/enterprise/guides/migrate/influxdb-2x/) - For users migrating from InfluxDB 2.x or Cloud
|
||||
- [Use compatibility APIs to write data](/influxdb3/enterprise/write-data/http-api/compatibility-apis/) - v1 and v2 write endpoints
|
||||
- [Use the v1 HTTP query API](/influxdb3/enterprise/query-data/execute-queries/influxdb-v1-api/) - InfluxQL queries via HTTP
|
||||
- name: Database
|
||||
description: Manage databases
|
||||
- description: |
|
||||
Most InfluxDB API endpoints require parameters in the request--for example, specifying the database to use.
|
||||
|
||||
### Common parameters
|
||||
|
||||
The following table shows common parameters used by many InfluxDB API endpoints.
|
||||
Many endpoints may require other parameters in the query string or in the
|
||||
request body that perform functions specific to those endpoints.
|
||||
|
||||
| Query parameter | Value type | Description |
|
||||
|:------------------------ |:--------------------- |:-------------------------------------------|
|
||||
| `db` | string | The database name |
|
||||
|
||||
InfluxDB HTTP API endpoints use standard HTTP request and response headers.
|
||||
The following table shows common headers used by many InfluxDB API endpoints.
|
||||
Some endpoints may use other headers that perform functions more specific to those endpoints--for example,
|
||||
the write endpoints accept the `Content-Encoding` header to indicate that line protocol is compressed in the request body.
|
||||
|
||||
| Header | Value type | Description |
|
||||
|:------------------------ |:--------------------- |:-------------------------------------------|
|
||||
| `Accept` | string | The content type that the client can understand. |
|
||||
|
|
@ -148,40 +114,31 @@ tags:
|
|||
- name: Processing engine
|
||||
description: |
|
||||
Manage Processing engine triggers, test plugins, and send requests to trigger On Request plugins.
|
||||
|
||||
InfluxDB 3 Enterprise provides the InfluxDB 3 processing engine, an embedded Python VM that can dynamically load and trigger Python plugins in response to events in your database.
|
||||
Use Processing engine plugins and triggers to run code and perform tasks for different database events.
|
||||
|
||||
To get started with the processing engine, see the [Processing engine and Python plugins](/influxdb3/enterprise/processing-engine/) guide.
|
||||
- name: Query data
|
||||
description: Query data using SQL or InfluxQL
|
||||
- name: Quick start
|
||||
description: |
|
||||
1. [Create an admin token](#section/Authentication) to authorize API requests.
|
||||
|
||||
```bash
|
||||
curl -X POST "http://localhost:8181/api/v3/configure/token/admin"
|
||||
```
|
||||
2. [Check the status](#section/Server-information) of the InfluxDB server.
|
||||
|
||||
```bash
|
||||
curl "http://localhost:8181/health" \
|
||||
--header "Authorization: Bearer ADMIN_TOKEN"
|
||||
```
|
||||
|
||||
3. [Write data](#operation/PostWriteLP) to InfluxDB.
|
||||
|
||||
```bash
|
||||
curl "http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto"
|
||||
--header "Authorization: Bearer ADMIN_TOKEN" \
|
||||
--data-raw "home,room=Kitchen temp=72.0
|
||||
home,room=Living\ room temp=71.5"
|
||||
```
|
||||
|
||||
If all data is written, the response is `204 No Content`.
|
||||
|
||||
4. [Query data](#operation/GetExecuteQuerySQL) from InfluxDB.
|
||||
|
||||
```bash
|
||||
curl -G "http://localhost:8181/api/v3/query_sql" \
|
||||
--header "Authorization: Bearer ADMIN_TOKEN" \
|
||||
|
|
@ -191,7 +148,6 @@ tags:
|
|||
```
|
||||
|
||||
Output:
|
||||
|
||||
```jsonl
|
||||
{"room":"Living room","temp":71.5,"time":"2025-02-25T20:19:34.984098"}
|
||||
```
|
||||
|
|
@ -207,12 +163,9 @@ tags:
|
|||
- name: Write data
|
||||
description: |
|
||||
Write data to InfluxDB 3 using line protocol format.
|
||||
|
||||
#### Timestamp precision across write APIs
|
||||
|
||||
InfluxDB 3 provides multiple write endpoints for compatibility with different InfluxDB versions.
|
||||
The following table compares timestamp precision support across v1, v2, and v3 write APIs:
|
||||
|
||||
| Precision | v1 (`/write`) | v2 (`/api/v2/write`) | v3 (`/api/v3/write_lp`) |
|
||||
|-----------|---------------|----------------------|-------------------------|
|
||||
| **Auto detection** | ❌ No | ❌ No | ✅ `auto` (default) |
|
||||
|
|
@ -223,7 +176,6 @@ tags:
|
|||
| **Minutes** | ✅ `m` | ❌ No | ❌ No |
|
||||
| **Hours** | ✅ `h` | ❌ No | ❌ No |
|
||||
| **Default** | Nanosecond | Nanosecond | **Auto** (guessed) |
|
||||
|
||||
All timestamps are stored internally as nanoseconds.
|
||||
paths:
|
||||
/write:
|
||||
|
|
@ -300,7 +252,6 @@ paths:
|
|||
description: |
|
||||
Bad request. Some (a _partial write_) or all of the data from the batch was rejected and not written.
|
||||
If a partial write occurred, then some points from the batch are written and queryable.
|
||||
|
||||
The response body:
|
||||
- indicates if a partial write occurred or all data was rejected.
|
||||
- contains details about the [rejected points](/influxdb3/enterprise/write-data/troubleshoot/#troubleshoot-rejected-points), up to 100 points.
|
||||
|
|
@ -340,7 +291,6 @@ paths:
|
|||
'413':
|
||||
description: Request entity too large.
|
||||
tags:
|
||||
- Compatibility endpoints
|
||||
- Write data
|
||||
x-influxdata-guides:
|
||||
- title: Use compatibility APIs to write data
|
||||
|
|
@ -429,7 +379,6 @@ paths:
|
|||
'413':
|
||||
description: Request entity too large.
|
||||
tags:
|
||||
- Compatibility endpoints
|
||||
- Write data
|
||||
x-influxdata-guides:
|
||||
- title: Use compatibility APIs to write data
|
||||
|
|
@ -440,31 +389,22 @@ paths:
|
|||
summary: Write line protocol
|
||||
description: |
|
||||
Writes line protocol to the specified database.
|
||||
|
||||
This is the native InfluxDB 3 Enterprise write endpoint that provides enhanced control
|
||||
over write behavior with advanced parameters for high-performance and fault-tolerant operations.
|
||||
|
||||
Use this endpoint to send data in [line protocol](/influxdb3/enterprise/reference/syntax/line-protocol/) format to InfluxDB.
|
||||
Use query parameters to specify options for writing data.
|
||||
|
||||
#### Features
|
||||
|
||||
- **Partial writes**: Use `accept_partial=true` to allow partial success when some lines in a batch fail
|
||||
- **Asynchronous writes**: Use `no_sync=true` to skip waiting for WAL synchronization, allowing faster response times but sacrificing durability guarantees
|
||||
- **Flexible precision**: Automatic timestamp precision detection with `precision=auto` (default)
|
||||
|
||||
#### Auto precision detection
|
||||
|
||||
When you use `precision=auto` or omit the precision parameter, InfluxDB 3 automatically detects
|
||||
the timestamp precision based on the magnitude of the timestamp value:
|
||||
|
||||
- Timestamps < 5e9 → Second precision (multiplied by 1,000,000,000 to convert to nanoseconds)
|
||||
- Timestamps < 5e12 → Millisecond precision (multiplied by 1,000,000)
|
||||
- Timestamps < 5e15 → Microsecond precision (multiplied by 1,000)
|
||||
- Larger timestamps → Nanosecond precision (no conversion needed)
|
||||
|
||||
#### Related
|
||||
|
||||
- [Use the InfluxDB v3 write_lp API to write data](/influxdb3/enterprise/write-data/http-api/v3-write-lp/)
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/dbWriteParam'
|
||||
|
|
@ -748,9 +688,7 @@ paths:
|
|||
required: false
|
||||
description: |
|
||||
The content type that the client can understand.
|
||||
|
||||
If `text/csv` is specified, the `Content-type` response header is `application/csv` and the response is formatted as CSV.
|
||||
|
||||
Returns an error if the format is invalid or non-UTF8.
|
||||
- in: query
|
||||
name: chunked
|
||||
|
|
@ -829,7 +767,6 @@ paths:
|
|||
description: |
|
||||
The content type of the response.
|
||||
Default is `application/json`.
|
||||
|
||||
If the `Accept` request header is `application/csv` or `text/csv`, the `Content-type` response header is `application/csv`
|
||||
and the response is formatted as CSV.
|
||||
schema:
|
||||
|
|
@ -852,7 +789,6 @@ paths:
|
|||
description: Unprocessable entity.
|
||||
tags:
|
||||
- Query data
|
||||
- Compatibility endpoints
|
||||
x-influxdata-guides:
|
||||
- title: Use the InfluxDB v1 HTTP query API and InfluxQL to query data
|
||||
href: /influxdb3/enterprise/query-data/execute-queries/influxdb-v1-api/
|
||||
|
|
@ -889,14 +825,12 @@ paths:
|
|||
epoch:
|
||||
description: |
|
||||
A unix timestamp precision.
|
||||
|
||||
- `h` for hours
|
||||
- `m` for minutes
|
||||
- `s` for seconds
|
||||
- `ms` for milliseconds
|
||||
- `u` or `µ` for microseconds
|
||||
- `ns` for nanoseconds
|
||||
|
||||
Formats timestamps as [unix (epoch) timestamps](/influxdb3/enterprise/reference/glossary/#unix-timestamp) with the specified precision
|
||||
instead of [RFC3339 timestamps](/influxdb3/enterprise/reference/glossary/#rfc3339-timestamp) with nanosecond precision.
|
||||
enum:
|
||||
|
|
@ -927,9 +861,7 @@ paths:
|
|||
required: false
|
||||
description: |
|
||||
The content type that the client can understand.
|
||||
|
||||
If `text/csv` is specified, the `Content-type` response header is `application/csv` and the response is formatted as CSV.
|
||||
|
||||
Returns an error if the format is invalid or non-UTF8.
|
||||
responses:
|
||||
'200':
|
||||
|
|
@ -947,7 +879,6 @@ paths:
|
|||
description: |
|
||||
The content type of the response.
|
||||
Default is `application/json`.
|
||||
|
||||
If the `Accept` request header is `application/csv` or `text/csv`, the `Content-type` response header is `application/csv`
|
||||
and the response is formatted as CSV.
|
||||
schema:
|
||||
|
|
@ -970,7 +901,6 @@ paths:
|
|||
description: Unprocessable entity.
|
||||
tags:
|
||||
- Query data
|
||||
- Compatibility endpoints
|
||||
x-influxdata-guides:
|
||||
- title: Use the InfluxDB v1 HTTP query API and InfluxQL to query data
|
||||
href: /influxdb3/enterprise/query-data/execute-queries/influxdb-v1-api/
|
||||
|
|
@ -999,7 +929,6 @@ paths:
|
|||
description: Service is unavailable.
|
||||
tags:
|
||||
- Server information
|
||||
- Compatibility endpoints
|
||||
/ping:
|
||||
get:
|
||||
operationId: GetPing
|
||||
|
|
@ -1097,9 +1026,7 @@ paths:
|
|||
Schedule the database for hard deletion at the specified time.
|
||||
If not provided, the database will be soft deleted.
|
||||
Use ISO 8601 date-time format (for example, "2025-12-31T23:59:59Z").
|
||||
|
||||
#### Deleting a database cannot be undone
|
||||
|
||||
Deleting a database is a destructive action.
|
||||
Once a database is deleted, data stored in that database cannot be recovered.
|
||||
responses:
|
||||
|
|
@ -1157,9 +1084,7 @@ paths:
|
|||
Soft deletes a table.
|
||||
The table is scheduled for deletion and unavailable for querying.
|
||||
Use the `hard_delete_at` parameter to schedule a hard deletion.
|
||||
|
||||
#### Deleting a table cannot be undone
|
||||
|
||||
Deleting a table is a destructive action.
|
||||
Once a table is deleted, data stored in that table cannot be recovered.
|
||||
parameters:
|
||||
|
|
@ -1281,7 +1206,6 @@ paths:
|
|||
'400':
|
||||
description: |
|
||||
Bad request.
|
||||
|
||||
The server responds with status `400` if the request would overwrite an existing cache with a different configuration.
|
||||
delete:
|
||||
operationId: DeleteConfigureDistinctCache
|
||||
|
|
@ -1374,9 +1298,7 @@ paths:
|
|||
summary: Create processing engine trigger
|
||||
description: |
|
||||
Creates a processing engine trigger with the specified plugin file and trigger specification.
|
||||
|
||||
### Related guides
|
||||
|
||||
- [Processing engine and Python plugins](/influxdb3/enterprise/plugins/)
|
||||
requestBody:
|
||||
required: true
|
||||
|
|
@ -1591,11 +1513,8 @@ paths:
|
|||
summary: Install plugin packages
|
||||
description: |
|
||||
Installs the specified Python packages into the processing engine plugin environment.
|
||||
|
||||
This endpoint is synchronous and blocks until the packages are installed.
|
||||
|
||||
### Related guides
|
||||
|
||||
- [Processing engine and Python plugins](/influxdb3/enterprise/plugins/)
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/ContentType'
|
||||
|
|
@ -1641,11 +1560,8 @@ paths:
|
|||
summary: Install plugin requirements
|
||||
description: |
|
||||
Installs requirements from a requirements file (also known as a "pip requirements file") into the processing engine plugin environment.
|
||||
|
||||
This endpoint is synchronous and blocks until the requirements are installed.
|
||||
|
||||
### Related
|
||||
|
||||
- [Processing engine and Python plugins](/influxdb3/enterprise/plugins/)
|
||||
- [Python requirements file format](https://pip.pypa.io/en/stable/reference/requirements-file-format/)
|
||||
parameters:
|
||||
|
|
@ -1725,13 +1641,10 @@ paths:
|
|||
- name: request_path
|
||||
description: |
|
||||
The path configured in the request trigger specification for the plugin.
|
||||
|
||||
For example, if you define a trigger with the following:
|
||||
|
||||
```json
|
||||
trigger_specification: "request:hello-world"
|
||||
```
|
||||
|
||||
then, the HTTP API exposes the following plugin endpoint:
|
||||
|
||||
```
|
||||
|
|
@ -1747,13 +1660,10 @@ paths:
|
|||
description: |
|
||||
Executes the On Request processing engine plugin specified in the trigger's `plugin_filename`.
|
||||
The request can include request headers, query string parameters, and a request body, which InfluxDB passes to the plugin.
|
||||
|
||||
An On Request plugin implements the following signature:
|
||||
|
||||
```python
|
||||
def process_request(influxdb3_local, query_parameters, request_headers, request_body, args=None)
|
||||
```
|
||||
|
||||
The response depends on the plugin implementation.
|
||||
responses:
|
||||
'200':
|
||||
|
|
@ -1774,13 +1684,10 @@ paths:
|
|||
description: |
|
||||
Executes the On Request processing engine plugin specified in the trigger's `plugin_filename`.
|
||||
The request can include request headers, query string parameters, and a request body, which InfluxDB passes to the plugin.
|
||||
|
||||
An On Request plugin implements the following signature:
|
||||
|
||||
```python
|
||||
def process_request(influxdb3_local, query_parameters, request_headers, request_body, args=None)
|
||||
```
|
||||
|
||||
The response depends on the plugin implementation.
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/ContentType'
|
||||
|
|
@ -1811,7 +1718,6 @@ paths:
|
|||
description: |
|
||||
Creates a resource (fine-grained permissions) token.
|
||||
A resource token is a token that has access to specific resources in the system.
|
||||
|
||||
This endpoint is only available in InfluxDB 3 Enterprise.
|
||||
responses:
|
||||
'201':
|
||||
|
|
@ -2032,7 +1938,6 @@ components:
|
|||
type: string
|
||||
description: |
|
||||
The name of the database.
|
||||
|
||||
If you provide a query that specifies the database, you can omit the 'db' parameter from your request.
|
||||
accept_partial:
|
||||
name: accept_partial
|
||||
|
|
@ -2187,9 +2092,7 @@ components:
|
|||
description: |
|
||||
Content coding.
|
||||
Use `gzip` for compressed data or `identity` for unmodified, uncompressed data.
|
||||
|
||||
#### Multi-member gzip support
|
||||
|
||||
InfluxDB 3 supports multi-member gzip payloads (concatenated gzip files per [RFC 1952](https://www.rfc-editor.org/rfc/rfc1952)).
|
||||
This allows you to:
|
||||
- Concatenate multiple gzip files and send them in a single request
|
||||
|
|
@ -2227,9 +2130,7 @@ components:
|
|||
default: false
|
||||
description: |
|
||||
Acknowledges a successful write without waiting for WAL persistence.
|
||||
|
||||
#### Related
|
||||
|
||||
- [Use the HTTP API and client libraries to write data](/influxdb3/enterprise/write-data/api-client-libraries/)
|
||||
- [Data durability](/influxdb3/enterprise/reference/internals/durability/)
|
||||
PrecisionWriteCompatibility:
|
||||
|
|
@ -2252,7 +2153,6 @@ components:
|
|||
type: string
|
||||
description: |
|
||||
The precision for unix timestamps in the line protocol batch.
|
||||
|
||||
Supported values:
|
||||
- `auto` (default): Automatically detects precision based on timestamp magnitude
|
||||
- `nanosecond`: Nanoseconds
|
||||
|
|
@ -2434,7 +2334,6 @@ components:
|
|||
The path and filename of the plugin to execute--for example,
|
||||
`schedule.py` or `endpoints/report.py`.
|
||||
The path can be absolute or relative to the `--plugins-dir` directory configured when starting InfluxDB 3.
|
||||
|
||||
The plugin file must implement the trigger interface associated with the trigger's specification.
|
||||
node_spec:
|
||||
$ref: '#/components/schemas/ApiNodeSpec'
|
||||
|
|
@ -2448,12 +2347,9 @@ components:
|
|||
trigger_specification:
|
||||
description: |
|
||||
Specifies when and how the processing engine trigger should be invoked.
|
||||
|
||||
## Supported trigger specifications:
|
||||
|
||||
### Cron-based scheduling
|
||||
Format: `cron:CRON_EXPRESSION`
|
||||
|
||||
Uses extended (6-field) cron format (second minute hour day_of_month month day_of_week):
|
||||
```
|
||||
┌───────────── second (0-59)
|
||||
|
|
@ -2469,10 +2365,8 @@ components:
|
|||
- `cron:0 0 6 * * 1-5` - Every weekday at 6:00 AM
|
||||
- `cron:0 30 14 * * 5` - Every Friday at 2:30 PM
|
||||
- `cron:0 0 0 1 * *` - First day of every month at midnight
|
||||
|
||||
### Interval-based scheduling
|
||||
Format: `every:DURATION`
|
||||
|
||||
Supported durations: `s` (seconds), `m` (minutes), `h` (hours), `d` (days), `w` (weeks), `M` (months), `y` (years):
|
||||
- `every:30s` - Every 30 seconds
|
||||
- `every:5m` - Every 5 minutes
|
||||
|
|
@ -2481,16 +2375,12 @@ components:
|
|||
- `every:1w` - Every week
|
||||
- `every:1M` - Every month
|
||||
- `every:1y` - Every year
|
||||
|
||||
**Maximum interval**: 1 year
|
||||
|
||||
### Table-based triggers
|
||||
- `all_tables` - Triggers on write events to any table in the database
|
||||
- `table:TABLE_NAME` - Triggers on write events to a specific table
|
||||
|
||||
### On-demand triggers
|
||||
Format: `request:REQUEST_PATH`
|
||||
|
||||
Creates an HTTP endpoint `/api/v3/engine/REQUEST_PATH` for manual invocation:
|
||||
- `request:hello-world` - Creates endpoint `/api/v3/engine/hello-world`
|
||||
- `request:data-export` - Creates endpoint `/api/v3/engine/data-export`
|
||||
|
|
@ -2815,7 +2705,6 @@ components:
|
|||
BadRequest:
|
||||
description: |
|
||||
Request failed. Possible reasons:
|
||||
|
||||
- Invalid database name
|
||||
- Malformed request body
|
||||
- Invalid timestamp precision
|
||||
|
|
@ -2853,34 +2742,24 @@ components:
|
|||
scheme: basic
|
||||
description: |
|
||||
Use the `Authorization` header with the `Basic` scheme to authenticate v1 API requests.
|
||||
|
||||
Works with v1 compatibility [`/write`](#operation/PostV1Write) and [`/query`](#operation/GetV1Query) endpoints in InfluxDB 3.
|
||||
|
||||
When authenticating requests, InfluxDB 3 checks that the `password` part of the decoded credential is an authorized token
|
||||
and ignores the `username` part of the decoded credential.
|
||||
|
||||
### Syntax
|
||||
|
||||
```http
|
||||
Authorization: Basic <base64-encoded [USERNAME]:AUTH_TOKEN>
|
||||
```
|
||||
|
||||
### Example
|
||||
|
||||
```bash
|
||||
curl "http://localhost:8181/write?db=DATABASE_NAME&precision=s" \
|
||||
--user "":"AUTH_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary 'home,room=kitchen temp=72 1641024000'
|
||||
```
|
||||
|
||||
Replace the following:
|
||||
|
||||
- **`DATABASE_NAME`**: your InfluxDB 3 Enterprise database
|
||||
- **`AUTH_TOKEN`**: an admin token or database token authorized for the database
|
||||
|
||||
#### Related guides
|
||||
|
||||
- [Authenticate v1 API requests](/influxdb3/enterprise/guides/api-compatibility/v1/)
|
||||
- [Manage tokens](/influxdb3/enterprise/admin/tokens/)
|
||||
QuerystringAuthentication:
|
||||
|
|
@ -2889,32 +2768,23 @@ components:
|
|||
name: u=&p=
|
||||
description: |
|
||||
Use InfluxDB 1.x API parameters to provide credentials through the query string for v1 API requests.
|
||||
|
||||
Querystring authentication works with v1-compatible [`/write`](#operation/PostV1Write) and [`/query`](#operation/GetV1Query) endpoints.
|
||||
|
||||
When authenticating requests, InfluxDB 3 checks that the `p` (_password_) query parameter is an authorized token
|
||||
and ignores the `u` (_username_) query parameter.
|
||||
|
||||
### Syntax
|
||||
|
||||
```http
|
||||
https://localhost:8181/query/?[u=any]&p=AUTH_TOKEN
|
||||
https://localhost:8181/write/?[u=any]&p=AUTH_TOKEN
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```bash
|
||||
curl "http://localhost:8181/write?db=DATABASE_NAME&precision=s&p=AUTH_TOKEN" \
|
||||
--header "Content-type: text/plain; charset=utf-8" \
|
||||
--data-binary 'home,room=kitchen temp=72 1641024000'
|
||||
```
|
||||
|
||||
Replace the following:
|
||||
|
||||
- **`DATABASE_NAME`**: your InfluxDB 3 Enterprise database
|
||||
- **`AUTH_TOKEN`**: an admin token or database token authorized for the database
|
||||
|
||||
```bash
|
||||
#######################################
|
||||
# Use an InfluxDB 1.x compatible username and password
|
||||
|
|
@ -2923,20 +2793,15 @@ components:
|
|||
# Use authentication query parameters:
|
||||
# ?p=AUTH_TOKEN
|
||||
#######################################
|
||||
|
||||
curl --get "http://localhost:8181/query" \
|
||||
--data-urlencode "p=AUTH_TOKEN" \
|
||||
--data-urlencode "db=DATABASE_NAME" \
|
||||
--data-urlencode "q=SELECT * FROM MEASUREMENT"
|
||||
```
|
||||
|
||||
Replace the following:
|
||||
|
||||
- **`DATABASE_NAME`**: the database to query
|
||||
- **`AUTH_TOKEN`**: a database token with sufficient permissions to the database
|
||||
|
||||
#### Related guides
|
||||
|
||||
- [Authenticate v1 API requests](/influxdb3/enterprise/guides/api-compatibility/v1/)
|
||||
- [Manage tokens](/influxdb3/enterprise/admin/tokens/)
|
||||
BearerAuthentication:
|
||||
|
|
@ -2944,23 +2809,16 @@ components:
|
|||
scheme: bearer
|
||||
bearerFormat: JWT
|
||||
description: |
|
||||
|
||||
Use the OAuth Bearer authentication
|
||||
scheme to provide an authorization token to InfluxDB 3.
|
||||
|
||||
Bearer authentication works with all endpoints.
|
||||
|
||||
In your API requests, send an `Authorization` header.
|
||||
For the header value, provide the word `Bearer` followed by a space and a database token.
|
||||
|
||||
### Syntax
|
||||
|
||||
```http
|
||||
Authorization: Bearer AUTH_TOKEN
|
||||
```
|
||||
|
||||
### Example
|
||||
|
||||
```bash
|
||||
curl http://localhost:8181/api/v3/query_influxql \
|
||||
--header "Authorization: Bearer AUTH_TOKEN"
|
||||
|
|
@ -2968,34 +2826,25 @@ components:
|
|||
TokenAuthentication:
|
||||
description: |
|
||||
Use InfluxDB v2 Token authentication to provide an authorization token to InfluxDB 3.
|
||||
|
||||
The v2 Token scheme works with v1 and v2 compatibility endpoints in InfluxDB 3.
|
||||
|
||||
In your API requests, send an `Authorization` header.
|
||||
For the header value, provide the word `Token` followed by a space and a database token.
|
||||
The word `Token` is case-sensitive.
|
||||
|
||||
### Syntax
|
||||
|
||||
```http
|
||||
Authorization: Token AUTH_TOKEN
|
||||
```
|
||||
|
||||
### Example
|
||||
|
||||
```sh
|
||||
########################################################
|
||||
# Use the Token authentication scheme with /api/v2/write
|
||||
# to write data.
|
||||
########################################################
|
||||
|
||||
curl --request post "http://localhost:8181/api/v2/write?bucket=DATABASE_NAME&precision=s" \
|
||||
--header "Authorization: Token AUTH_TOKEN" \
|
||||
--data-binary 'home,room=kitchen temp=72 1463683075'
|
||||
```
|
||||
|
||||
### Related guides
|
||||
|
||||
- [Manage tokens](/influxdb3/enterprise/admin/tokens/)
|
||||
in: header
|
||||
name: Authorization
|
||||
|
|
@ -3008,7 +2857,7 @@ x-tagGroups:
|
|||
- Cache data
|
||||
- Common parameters
|
||||
- Response codes
|
||||
- Compatibility endpoints
|
||||
- Migrate from InfluxDB v1 or v2
|
||||
- Database
|
||||
- Processing engine
|
||||
- Server information
|
||||
|
|
|
|||
|
|
@ -111,6 +111,21 @@ function execCommand(command, description) {
|
|||
process.exit(1);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Generate a clean static directory name from a product key.
|
||||
* Handles the influxdb3_* products to avoid redundant 'influxdb-influxdb3' prefixes.
|
||||
*
|
||||
* @param productKey - Product identifier (e.g., 'cloud-v2', 'influxdb3_core')
|
||||
* @returns Clean directory name (e.g., 'influxdb-cloud-v2', 'influxdb3-core')
|
||||
*/
|
||||
function getStaticDirName(productKey) {
|
||||
// For influxdb3_* products, convert underscore to hyphen and don't add prefix
|
||||
if (productKey.startsWith('influxdb3_')) {
|
||||
return productKey.replace('_', '-');
|
||||
}
|
||||
// For other products, add 'influxdb-' prefix
|
||||
return `influxdb-${productKey}`;
|
||||
}
|
||||
/**
|
||||
* Generate Hugo data files from OpenAPI specification
|
||||
*
|
||||
|
|
@ -372,6 +387,104 @@ ${yaml.dump(frontmatter)}---
|
|||
console.log(
|
||||
`✓ Generated ${data.articles.length} tag-based content pages in ${contentPath}`
|
||||
);
|
||||
// Generate individual operation pages for standalone URLs
|
||||
generateOperationPages({
|
||||
articlesPath,
|
||||
contentPath,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Convert API path to URL-safe slug
|
||||
*
|
||||
* Transforms an API path like "/api/v3/write_lp" to a URL-friendly format.
|
||||
* Removes leading slash and uses the path as-is (underscores are URL-safe).
|
||||
*
|
||||
* @param apiPath - The API path (e.g., "/write", "/api/v3/write_lp")
|
||||
* @returns URL-safe path slug (e.g., "write", "api/v3/write_lp")
|
||||
*/
|
||||
function apiPathToSlug(apiPath) {
|
||||
// Remove leading slash, keep underscores (they're URL-safe)
|
||||
return apiPath.replace(/^\//, '');
|
||||
}
|
||||
/**
|
||||
* Generate standalone Hugo content pages for each API operation
|
||||
*
|
||||
* Creates individual pages at path-based URLs like /api/write/post/
|
||||
* for each operation, using RapiDoc Mini with tag-level specs.
|
||||
*
|
||||
* @param options - Generation options
|
||||
*/
|
||||
function generateOperationPages(options) {
|
||||
const { articlesPath, contentPath } = options;
|
||||
const yaml = require('js-yaml');
|
||||
const articlesFile = path.join(articlesPath, 'articles.yml');
|
||||
if (!fs.existsSync(articlesFile)) {
|
||||
console.warn(`⚠️ Articles file not found: ${articlesFile}`);
|
||||
return;
|
||||
}
|
||||
// Read articles data
|
||||
const articlesContent = fs.readFileSync(articlesFile, 'utf8');
|
||||
const data = yaml.load(articlesContent);
|
||||
if (!data.articles || !Array.isArray(data.articles)) {
|
||||
console.warn(`⚠️ No articles found in ${articlesFile}`);
|
||||
return;
|
||||
}
|
||||
let operationCount = 0;
|
||||
// Process each article (tag) and generate pages for its operations
|
||||
for (const article of data.articles) {
|
||||
// Skip conceptual articles (they don't have operations)
|
||||
if (article.fields.isConceptual) {
|
||||
continue;
|
||||
}
|
||||
const operations = article.fields.operations || [];
|
||||
const tagSpecFile = article.fields.staticFilePath;
|
||||
const tagName = article.fields.tag || article.fields.name || '';
|
||||
for (const op of operations) {
|
||||
// Build operation page path: api/{path}/{method}/
|
||||
// e.g., /write -> api/write/post/
|
||||
// e.g., /api/v3/write_lp -> api/api/v3/write_lp/post/
|
||||
const pathSlug = apiPathToSlug(op.path);
|
||||
const method = op.method.toLowerCase();
|
||||
const operationDir = path.join(contentPath, 'api', pathSlug, method);
|
||||
const operationFile = path.join(operationDir, '_index.md');
|
||||
// Create directory if needed
|
||||
if (!fs.existsSync(operationDir)) {
|
||||
fs.mkdirSync(operationDir, { recursive: true });
|
||||
}
|
||||
// Build frontmatter
|
||||
const title = op.summary || `${op.method} ${op.path}`;
|
||||
const frontmatter = {
|
||||
title,
|
||||
description: `API reference for ${op.method} ${op.path}`,
|
||||
type: 'api-operation',
|
||||
layout: 'operation',
|
||||
// RapiDoc Mini configuration
|
||||
specFile: tagSpecFile,
|
||||
matchPaths: `${method} ${op.path}`,
|
||||
// Operation metadata
|
||||
operationId: op.operationId,
|
||||
method: op.method,
|
||||
apiPath: op.path,
|
||||
tag: tagName,
|
||||
};
|
||||
// Add compatibility version if present
|
||||
if (op.compatVersion) {
|
||||
frontmatter.compatVersion = op.compatVersion;
|
||||
}
|
||||
// Add related links from operation's externalDocs
|
||||
if (op.externalDocs?.url) {
|
||||
frontmatter.related = [op.externalDocs.url];
|
||||
}
|
||||
const pageContent = `---
|
||||
${yaml.dump(frontmatter)}---
|
||||
`;
|
||||
fs.writeFileSync(operationFile, pageContent);
|
||||
operationCount++;
|
||||
}
|
||||
}
|
||||
console.log(
|
||||
`✓ Generated ${operationCount} operation pages in ${contentPath}/api/`
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Product configurations for all InfluxDB editions
|
||||
|
|
@ -457,12 +570,10 @@ function processProduct(productKey, config) {
|
|||
console.log(`Processing ${config.description || productKey}`);
|
||||
console.log('='.repeat(80));
|
||||
const staticPath = path.join(DOCS_ROOT, 'static/openapi');
|
||||
const staticSpecPath = path.join(staticPath, `influxdb-${productKey}.yml`);
|
||||
const staticJsonSpecPath = path.join(
|
||||
staticPath,
|
||||
`influxdb-${productKey}.json`
|
||||
);
|
||||
const staticPathsPath = path.join(staticPath, `influxdb-${productKey}/paths`);
|
||||
const staticDirName = getStaticDirName(productKey);
|
||||
const staticSpecPath = path.join(staticPath, `${staticDirName}.yml`);
|
||||
const staticJsonSpecPath = path.join(staticPath, `${staticDirName}.json`);
|
||||
const staticPathsPath = path.join(staticPath, `${staticDirName}/paths`);
|
||||
const articlesPath = path.join(
|
||||
DOCS_ROOT,
|
||||
`data/article_data/influxdb/${productKey}`
|
||||
|
|
@ -510,10 +621,7 @@ function processProduct(productKey, config) {
|
|||
// Step 5: Generate Hugo data from OpenAPI spec
|
||||
if (config.useTagBasedGeneration) {
|
||||
// Tag-based generation: group operations by OpenAPI tag
|
||||
const staticTagsPath = path.join(
|
||||
staticPath,
|
||||
`influxdb-${productKey}/tags`
|
||||
);
|
||||
const staticTagsPath = path.join(staticPath, `${staticDirName}/tags`);
|
||||
console.log(`\n📋 Using tag-based generation for ${productKey}...`);
|
||||
openapiPathsToHugo.generateHugoDataByTag({
|
||||
specFile: config.specFile,
|
||||
|
|
|
|||
|
|
@ -598,6 +598,22 @@ function createArticleDataForTag(openapi, operations, tagMeta) {
|
|||
if (tagMeta?.description) {
|
||||
article.fields.tagDescription = tagMeta.description;
|
||||
}
|
||||
// Aggregate unique externalDocs URLs from operations into article-level related
|
||||
// This populates Hugo frontmatter `related` field for "Related content" links
|
||||
const relatedUrls = new Set();
|
||||
// First check tag-level externalDocs
|
||||
if (tagMeta?.externalDocs?.url) {
|
||||
relatedUrls.add(tagMeta.externalDocs.url);
|
||||
}
|
||||
// Then aggregate from operations
|
||||
operations.forEach((op) => {
|
||||
if (op.externalDocs?.url) {
|
||||
relatedUrls.add(op.externalDocs.url);
|
||||
}
|
||||
});
|
||||
if (relatedUrls.size > 0) {
|
||||
article.fields.related = Array.from(relatedUrls);
|
||||
}
|
||||
return article;
|
||||
}
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -36,6 +36,13 @@ interface OperationMeta {
|
|||
path: string;
|
||||
summary: string;
|
||||
tags: string[];
|
||||
/** Compatibility version (v1 or v2) for migration context */
|
||||
compatVersion?: string;
|
||||
/** External documentation link */
|
||||
externalDocs?: {
|
||||
description: string;
|
||||
url: string;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -88,6 +95,22 @@ function execCommand(command: string, description?: string): void {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a clean static directory name from a product key.
|
||||
* Handles the influxdb3_* products to avoid redundant 'influxdb-influxdb3' prefixes.
|
||||
*
|
||||
* @param productKey - Product identifier (e.g., 'cloud-v2', 'influxdb3_core')
|
||||
* @returns Clean directory name (e.g., 'influxdb-cloud-v2', 'influxdb3-core')
|
||||
*/
|
||||
function getStaticDirName(productKey: string): string {
|
||||
// For influxdb3_* products, convert underscore to hyphen and don't add prefix
|
||||
if (productKey.startsWith('influxdb3_')) {
|
||||
return productKey.replace('_', '-');
|
||||
}
|
||||
// For other products, add 'influxdb-' prefix
|
||||
return `influxdb-${productKey}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate Hugo data files from OpenAPI specification
|
||||
*
|
||||
|
|
@ -456,6 +479,144 @@ ${yaml.dump(frontmatter)}---
|
|||
console.log(
|
||||
`✓ Generated ${data.articles.length} tag-based content pages in ${contentPath}`
|
||||
);
|
||||
|
||||
// Generate individual operation pages for standalone URLs
|
||||
generateOperationPages({
|
||||
articlesPath,
|
||||
contentPath,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Options for generating operation pages
|
||||
*/
|
||||
interface GenerateOperationPagesOptions {
|
||||
/** Path to the articles data directory */
|
||||
articlesPath: string;
|
||||
/** Output path for generated content pages */
|
||||
contentPath: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert API path to URL-safe slug
|
||||
*
|
||||
* Transforms an API path like "/api/v3/write_lp" to a URL-friendly format.
|
||||
* Removes leading slash and uses the path as-is (underscores are URL-safe).
|
||||
*
|
||||
* @param apiPath - The API path (e.g., "/write", "/api/v3/write_lp")
|
||||
* @returns URL-safe path slug (e.g., "write", "api/v3/write_lp")
|
||||
*/
|
||||
function apiPathToSlug(apiPath: string): string {
|
||||
// Remove leading slash, keep underscores (they're URL-safe)
|
||||
return apiPath.replace(/^\//, '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate standalone Hugo content pages for each API operation
|
||||
*
|
||||
* Creates individual pages at path-based URLs like /api/write/post/
|
||||
* for each operation, using RapiDoc Mini with tag-level specs.
|
||||
*
|
||||
* @param options - Generation options
|
||||
*/
|
||||
function generateOperationPages(options: GenerateOperationPagesOptions): void {
|
||||
const { articlesPath, contentPath } = options;
|
||||
const yaml = require('js-yaml');
|
||||
const articlesFile = path.join(articlesPath, 'articles.yml');
|
||||
|
||||
if (!fs.existsSync(articlesFile)) {
|
||||
console.warn(`⚠️ Articles file not found: ${articlesFile}`);
|
||||
return;
|
||||
}
|
||||
|
||||
// Read articles data
|
||||
const articlesContent = fs.readFileSync(articlesFile, 'utf8');
|
||||
const data = yaml.load(articlesContent) as {
|
||||
articles: Array<{
|
||||
path: string;
|
||||
fields: {
|
||||
name?: string;
|
||||
title?: string;
|
||||
tag?: string;
|
||||
isConceptual?: boolean;
|
||||
staticFilePath?: string;
|
||||
operations?: OperationMeta[];
|
||||
related?: string[];
|
||||
};
|
||||
}>;
|
||||
};
|
||||
|
||||
if (!data.articles || !Array.isArray(data.articles)) {
|
||||
console.warn(`⚠️ No articles found in ${articlesFile}`);
|
||||
return;
|
||||
}
|
||||
|
||||
let operationCount = 0;
|
||||
|
||||
// Process each article (tag) and generate pages for its operations
|
||||
for (const article of data.articles) {
|
||||
// Skip conceptual articles (they don't have operations)
|
||||
if (article.fields.isConceptual) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const operations = article.fields.operations || [];
|
||||
const tagSpecFile = article.fields.staticFilePath;
|
||||
const tagName = article.fields.tag || article.fields.name || '';
|
||||
|
||||
for (const op of operations) {
|
||||
// Build operation page path: api/{path}/{method}/
|
||||
// e.g., /write -> api/write/post/
|
||||
// e.g., /api/v3/write_lp -> api/api/v3/write_lp/post/
|
||||
const pathSlug = apiPathToSlug(op.path);
|
||||
const method = op.method.toLowerCase();
|
||||
const operationDir = path.join(contentPath, 'api', pathSlug, method);
|
||||
const operationFile = path.join(operationDir, '_index.md');
|
||||
|
||||
// Create directory if needed
|
||||
if (!fs.existsSync(operationDir)) {
|
||||
fs.mkdirSync(operationDir, { recursive: true });
|
||||
}
|
||||
|
||||
// Build frontmatter
|
||||
const title = op.summary || `${op.method} ${op.path}`;
|
||||
const frontmatter: Record<string, unknown> = {
|
||||
title,
|
||||
description: `API reference for ${op.method} ${op.path}`,
|
||||
type: 'api-operation',
|
||||
layout: 'operation',
|
||||
// RapiDoc Mini configuration
|
||||
specFile: tagSpecFile,
|
||||
matchPaths: `${method} ${op.path}`,
|
||||
// Operation metadata
|
||||
operationId: op.operationId,
|
||||
method: op.method,
|
||||
apiPath: op.path,
|
||||
tag: tagName,
|
||||
};
|
||||
|
||||
// Add compatibility version if present
|
||||
if (op.compatVersion) {
|
||||
frontmatter.compatVersion = op.compatVersion;
|
||||
}
|
||||
|
||||
// Add related links from operation's externalDocs
|
||||
if (op.externalDocs?.url) {
|
||||
frontmatter.related = [op.externalDocs.url];
|
||||
}
|
||||
|
||||
const pageContent = `---
|
||||
${yaml.dump(frontmatter)}---
|
||||
`;
|
||||
|
||||
fs.writeFileSync(operationFile, pageContent);
|
||||
operationCount++;
|
||||
}
|
||||
}
|
||||
|
||||
console.log(
|
||||
`✓ Generated ${operationCount} operation pages in ${contentPath}/api/`
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -543,12 +704,10 @@ function processProduct(productKey: string, config: ProductConfig): void {
|
|||
console.log('='.repeat(80));
|
||||
|
||||
const staticPath = path.join(DOCS_ROOT, 'static/openapi');
|
||||
const staticSpecPath = path.join(staticPath, `influxdb-${productKey}.yml`);
|
||||
const staticJsonSpecPath = path.join(
|
||||
staticPath,
|
||||
`influxdb-${productKey}.json`
|
||||
);
|
||||
const staticPathsPath = path.join(staticPath, `influxdb-${productKey}/paths`);
|
||||
const staticDirName = getStaticDirName(productKey);
|
||||
const staticSpecPath = path.join(staticPath, `${staticDirName}.yml`);
|
||||
const staticJsonSpecPath = path.join(staticPath, `${staticDirName}.json`);
|
||||
const staticPathsPath = path.join(staticPath, `${staticDirName}/paths`);
|
||||
const articlesPath = path.join(
|
||||
DOCS_ROOT,
|
||||
`data/article_data/influxdb/${productKey}`
|
||||
|
|
@ -602,10 +761,7 @@ function processProduct(productKey: string, config: ProductConfig): void {
|
|||
// Step 5: Generate Hugo data from OpenAPI spec
|
||||
if (config.useTagBasedGeneration) {
|
||||
// Tag-based generation: group operations by OpenAPI tag
|
||||
const staticTagsPath = path.join(
|
||||
staticPath,
|
||||
`influxdb-${productKey}/tags`
|
||||
);
|
||||
const staticTagsPath = path.join(staticPath, `${staticDirName}/tags`);
|
||||
console.log(`\n📋 Using tag-based generation for ${productKey}...`);
|
||||
openapiPathsToHugo.generateHugoDataByTag({
|
||||
specFile: config.specFile,
|
||||
|
|
|
|||
|
|
@ -922,6 +922,26 @@ function createArticleDataForTag(
|
|||
article.fields.tagDescription = tagMeta.description;
|
||||
}
|
||||
|
||||
// Aggregate unique externalDocs URLs from operations into article-level related
|
||||
// This populates Hugo frontmatter `related` field for "Related content" links
|
||||
const relatedUrls = new Set<string>();
|
||||
|
||||
// First check tag-level externalDocs
|
||||
if (tagMeta?.externalDocs?.url) {
|
||||
relatedUrls.add(tagMeta.externalDocs.url);
|
||||
}
|
||||
|
||||
// Then aggregate from operations
|
||||
operations.forEach((op) => {
|
||||
if (op.externalDocs?.url) {
|
||||
relatedUrls.add(op.externalDocs.url);
|
||||
}
|
||||
});
|
||||
|
||||
if (relatedUrls.size > 0) {
|
||||
article.fields.related = Array.from(relatedUrls);
|
||||
}
|
||||
|
||||
return article;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,334 @@
|
|||
/**
|
||||
* RapiDoc Mini Component
|
||||
*
|
||||
* Initializes RapiDoc Mini web component for single API operation rendering.
|
||||
* Features:
|
||||
* - Dynamic CDN loading (memoized across instances)
|
||||
* - Theme synchronization with Hugo theme system
|
||||
* - Multiple instance support (no hardcoded IDs)
|
||||
* - Cleanup function for proper teardown
|
||||
*
|
||||
* Usage:
|
||||
* <div data-component="rapidoc-mini"
|
||||
* data-spec-url="/path/to/spec.yml"
|
||||
* data-match-paths="post /write">
|
||||
* </div>
|
||||
*/
|
||||
|
||||
import { getPreference } from '../services/local-storage.js';
|
||||
|
||||
interface ComponentOptions {
|
||||
component: HTMLElement;
|
||||
}
|
||||
|
||||
interface ThemeConfig {
|
||||
theme: 'light' | 'dark';
|
||||
bgColor: string;
|
||||
textColor: string;
|
||||
primaryColor: string;
|
||||
navBgColor: string;
|
||||
navTextColor: string;
|
||||
navHoverBgColor: string;
|
||||
navHoverTextColor: string;
|
||||
}
|
||||
|
||||
type CleanupFn = () => void;
|
||||
|
||||
// Use full RapiDoc for proper auth tooltip behavior (mini version has limited features)
|
||||
const RAPIDOC_CDN = 'https://unpkg.com/rapidoc/dist/rapidoc-min.js';
|
||||
const RAPIDOC_ELEMENT = 'rapi-doc';
|
||||
|
||||
// Memoization: track script loading state
|
||||
let scriptLoadPromise: Promise<void> | null = null;
|
||||
|
||||
/**
|
||||
* Load RapiDoc Mini script from CDN (memoized)
|
||||
*/
|
||||
function loadRapiDocScript(timeout = 10000): Promise<void> {
|
||||
// Return existing promise if already loading
|
||||
if (scriptLoadPromise) {
|
||||
return scriptLoadPromise;
|
||||
}
|
||||
|
||||
// Check if custom element already registered
|
||||
if (customElements.get(RAPIDOC_ELEMENT)) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
scriptLoadPromise = new Promise((resolve, reject) => {
|
||||
// Check if script tag already exists
|
||||
const existing = Array.from(document.scripts).find(
|
||||
(s) => s.src && s.src.includes('rapidoc')
|
||||
);
|
||||
|
||||
if (existing && customElements.get(RAPIDOC_ELEMENT)) {
|
||||
return resolve();
|
||||
}
|
||||
|
||||
const script = document.createElement('script');
|
||||
script.type = 'module';
|
||||
script.src = RAPIDOC_CDN;
|
||||
|
||||
script.onload = () => {
|
||||
// Poll for custom element registration
|
||||
const startTime = Date.now();
|
||||
const pollInterval = setInterval(() => {
|
||||
if (customElements.get(RAPIDOC_ELEMENT)) {
|
||||
clearInterval(pollInterval);
|
||||
resolve();
|
||||
} else if (Date.now() - startTime > timeout) {
|
||||
clearInterval(pollInterval);
|
||||
reject(new Error('RapiDoc Mini custom element not registered'));
|
||||
}
|
||||
}, 50);
|
||||
};
|
||||
|
||||
script.onerror = () => {
|
||||
scriptLoadPromise = null; // Reset on error for retry
|
||||
reject(new Error(`Failed to load RapiDoc Mini from ${RAPIDOC_CDN}`));
|
||||
};
|
||||
|
||||
document.head.appendChild(script);
|
||||
});
|
||||
|
||||
return scriptLoadPromise;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current theme from localStorage
|
||||
*/
|
||||
function getTheme(): 'dark' | 'light' {
|
||||
const theme = getPreference('theme');
|
||||
return theme === 'dark' ? 'dark' : 'light';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get theme configuration for RapiDoc Mini
|
||||
* Colors matched to Hugo theme SCSS variables:
|
||||
* - Dark: _theme-dark.scss
|
||||
* - Light: _theme-light.scss
|
||||
*/
|
||||
function getThemeConfig(isDark: boolean): ThemeConfig {
|
||||
return isDark
|
||||
? {
|
||||
theme: 'dark',
|
||||
bgColor: '#14141F', // $grey10 ($article-bg in dark theme)
|
||||
textColor: '#D4D7DD', // $g15-platinum ($article-text in dark theme)
|
||||
primaryColor: '#00A3FF', // $b-pool ($article-link)
|
||||
navBgColor: '#07070E', // $grey5 ($body-bg in dark theme)
|
||||
navTextColor: '#D4D7DD', // $g15-platinum ($nav-item)
|
||||
navHoverBgColor: '#00A3FF', // $b-pool
|
||||
navHoverTextColor: '#FFFFFF', // $g20-white
|
||||
}
|
||||
: {
|
||||
theme: 'light',
|
||||
bgColor: '#FFFFFF', // $g20-white ($article-bg in light theme)
|
||||
textColor: '#020a47', // $br-dark-blue ($article-text in light theme)
|
||||
primaryColor: '#00A3FF', // $b-pool ($article-link)
|
||||
navBgColor: '#f3f4fb', // $body-bg in light theme
|
||||
navTextColor: '#757888', // $g9-mountain ($nav-item)
|
||||
navHoverBgColor: '#BF2FE5', // $br-magenta ($nav-item-hover)
|
||||
navHoverTextColor: '#FFFFFF', // $g20-white
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply theme attributes to RapiDoc Mini element
|
||||
*/
|
||||
function applyTheme(element: HTMLElement): void {
|
||||
const isDark = getTheme() === 'dark';
|
||||
const config = getThemeConfig(isDark);
|
||||
|
||||
// Core theme colors
|
||||
element.setAttribute('theme', config.theme);
|
||||
element.setAttribute('bg-color', config.bgColor);
|
||||
element.setAttribute('text-color', config.textColor);
|
||||
element.setAttribute('primary-color', config.primaryColor);
|
||||
|
||||
// Navigation colors (for any internal nav elements)
|
||||
element.setAttribute('nav-bg-color', config.navBgColor);
|
||||
element.setAttribute('nav-text-color', config.navTextColor);
|
||||
element.setAttribute('nav-hover-bg-color', config.navHoverBgColor);
|
||||
element.setAttribute('nav-hover-text-color', config.navHoverTextColor);
|
||||
|
||||
// Accent color - prevent green defaults
|
||||
element.setAttribute('nav-accent-color', config.primaryColor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create RapiDoc Mini element with configuration
|
||||
*/
|
||||
function createRapiDocElement(
|
||||
specUrl: string,
|
||||
matchPaths?: string
|
||||
): HTMLElement {
|
||||
const element = document.createElement(RAPIDOC_ELEMENT);
|
||||
|
||||
// Core attributes
|
||||
element.setAttribute('spec-url', specUrl);
|
||||
if (matchPaths) {
|
||||
element.setAttribute('match-paths', matchPaths);
|
||||
}
|
||||
|
||||
// Typography - match docs theme fonts
|
||||
element.setAttribute(
|
||||
'regular-font',
|
||||
'Proxima Nova, -apple-system, BlinkMacSystemFont, sans-serif'
|
||||
);
|
||||
element.setAttribute(
|
||||
'mono-font',
|
||||
'IBM Plex Mono, Monaco, Consolas, monospace'
|
||||
);
|
||||
element.setAttribute('font-size', 'default'); // Match surrounding content size
|
||||
|
||||
// Layout - use 'read' style for proper auth element layout
|
||||
element.setAttribute('layout', 'column');
|
||||
element.setAttribute('render-style', 'read');
|
||||
element.setAttribute('show-header', 'false');
|
||||
element.setAttribute('allow-server-selection', 'false');
|
||||
|
||||
// Schema display - use 'table' style to reduce parameter indentation
|
||||
element.setAttribute('schema-style', 'table');
|
||||
element.setAttribute('default-schema-tab', 'schema');
|
||||
element.setAttribute('paths-expanded', 'true');
|
||||
element.setAttribute('schema-expand-level', '1');
|
||||
|
||||
// Interactivity
|
||||
element.setAttribute('allow-try', 'true');
|
||||
element.setAttribute('fill-request-fields-with-example', 'true');
|
||||
|
||||
// Reduce excessive spacing
|
||||
element.setAttribute('use-path-in-nav-bar', 'false');
|
||||
element.setAttribute('show-info', 'false');
|
||||
|
||||
// Authentication display - allow-authentication enables proper layout
|
||||
element.setAttribute('allow-authentication', 'true');
|
||||
element.setAttribute('show-components', 'false');
|
||||
|
||||
// Custom CSS for internal style overrides (table layout, etc.)
|
||||
element.setAttribute('css-file', '/css/rapidoc-custom.css');
|
||||
|
||||
// Override method colors to use theme primary color instead of green
|
||||
element.setAttribute('post-color', '#00A3FF'); // $b-pool instead of green
|
||||
element.setAttribute('get-color', '#00A3FF');
|
||||
element.setAttribute('put-color', '#9394FF'); // $br-galaxy
|
||||
element.setAttribute('delete-color', '#BF3D5E'); // $r-ruby
|
||||
element.setAttribute('patch-color', '#9394FF');
|
||||
|
||||
// Apply initial theme
|
||||
applyTheme(element);
|
||||
|
||||
return element;
|
||||
}
|
||||
|
||||
/**
|
||||
* Watch for theme changes and update RapiDoc element
|
||||
*/
|
||||
function watchThemeChanges(container: HTMLElement): CleanupFn {
|
||||
let currentElement: HTMLElement | null =
|
||||
container.querySelector(RAPIDOC_ELEMENT);
|
||||
|
||||
const handleThemeChange = (): void => {
|
||||
if (currentElement) {
|
||||
applyTheme(currentElement);
|
||||
}
|
||||
};
|
||||
|
||||
// Watch stylesheet changes (Hugo theme.js enables/disables stylesheets)
|
||||
const styleObserver = new MutationObserver((mutations) => {
|
||||
for (const mutation of mutations) {
|
||||
if (
|
||||
mutation.type === 'attributes' &&
|
||||
mutation.target instanceof HTMLLinkElement &&
|
||||
mutation.target.title?.includes('theme')
|
||||
) {
|
||||
handleThemeChange();
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const head = document.querySelector('head');
|
||||
if (head) {
|
||||
styleObserver.observe(head, {
|
||||
attributes: true,
|
||||
attributeFilter: ['disabled'],
|
||||
subtree: true,
|
||||
});
|
||||
}
|
||||
|
||||
// Watch localStorage changes from other tabs
|
||||
const storageHandler = (event: StorageEvent): void => {
|
||||
if (event.key === 'influxdata_docs_preferences' && event.newValue) {
|
||||
try {
|
||||
const prefs = JSON.parse(event.newValue);
|
||||
if (prefs.theme) {
|
||||
handleThemeChange();
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('[RapiDoc Mini] Failed to parse preferences:', error);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
window.addEventListener('storage', storageHandler);
|
||||
|
||||
// Return cleanup function
|
||||
return (): void => {
|
||||
styleObserver.disconnect();
|
||||
window.removeEventListener('storage', storageHandler);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Show error message in container
|
||||
*/
|
||||
function showError(container: HTMLElement, message: string): void {
|
||||
container.innerHTML = `
|
||||
<div class="api-operation-error">
|
||||
<p><strong>Error loading API documentation</strong></p>
|
||||
<p>${message}</p>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize RapiDoc Mini component
|
||||
*/
|
||||
export default async function RapiDocMini({
|
||||
component,
|
||||
}: ComponentOptions): Promise<CleanupFn | void> {
|
||||
try {
|
||||
// Get configuration from data attributes
|
||||
const specUrl = component.dataset.specUrl;
|
||||
const matchPaths = component.dataset.matchPaths;
|
||||
|
||||
if (!specUrl) {
|
||||
console.error('[RapiDoc Mini] No data-spec-url attribute provided');
|
||||
showError(component, 'No API specification configured.');
|
||||
return;
|
||||
}
|
||||
|
||||
// Load RapiDoc Mini from CDN (memoized)
|
||||
try {
|
||||
await loadRapiDocScript();
|
||||
} catch (error) {
|
||||
console.error('[RapiDoc Mini] Failed to load from CDN:', error);
|
||||
showError(
|
||||
component,
|
||||
'Failed to load API viewer. Please refresh the page.'
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
// Create and append RapiDoc Mini element
|
||||
const rapiDocElement = createRapiDocElement(specUrl, matchPaths);
|
||||
component.appendChild(rapiDocElement);
|
||||
|
||||
// Watch for theme changes and return cleanup function
|
||||
return watchThemeChanges(component);
|
||||
} catch (error) {
|
||||
console.error('[RapiDoc Mini] Component initialization error:', error);
|
||||
showError(component, 'API viewer failed to initialize.');
|
||||
}
|
||||
}
|
||||
|
|
@ -49,6 +49,7 @@ import ThemeSwitch from './theme-switch.js';
|
|||
import ApiScalar from './components/api-scalar.ts';
|
||||
import ApiTabs from './components/api-tabs.ts';
|
||||
import ApiToc from './components/api-toc.ts';
|
||||
import RapiDocMini from './components/rapidoc-mini.ts';
|
||||
|
||||
/**
|
||||
* Component Registry
|
||||
|
|
@ -83,6 +84,7 @@ const componentRegistry = {
|
|||
'api-scalar': ApiScalar,
|
||||
'api-tabs': ApiTabs,
|
||||
'api-toc': ApiToc,
|
||||
'rapidoc-mini': RapiDocMini,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -117,11 +117,11 @@
|
|||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
|
||||
&--get { background-color: $gr-rainforest; color: #fff; }
|
||||
&--post { background-color: $b-ocean; color: #fff; }
|
||||
&--put { background-color: $br-galaxy; color: #fff; }
|
||||
&--patch { background-color: $y-thunder; color: rgba($g5-pepper, 0.75); }
|
||||
&--delete { background-color: $r-curacao; color: #fff; }
|
||||
&--get { background-color: $b-pool; color: #fff; } // #00A3FF - bright brand blue
|
||||
&--post { background-color: $gr-rainforest; color: #fff; } // #34BB55 - bright brand green
|
||||
&--put { background-color: $y-pineapple; color: #fff; } // #FFB94A - bright yellow (distinct from red)
|
||||
&--patch { background-color: $br-new-purple; color: #fff; } // #9b2aff - distinctive brand purple
|
||||
&--delete { background-color: $r-curacao; color: #fff; } // #F95F53 - bright brand red
|
||||
}
|
||||
|
||||
.api-path {
|
||||
|
|
@ -183,12 +183,14 @@
|
|||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
margin-top: 0.15rem;
|
||||
border: 2px solid;
|
||||
background-color: transparent;
|
||||
|
||||
&--get { background-color: $gr-rainforest; color: #fff; }
|
||||
&--post { background-color: $b-ocean; color: #fff; }
|
||||
&--put { background-color: $br-galaxy; color: #fff; }
|
||||
&--patch { background-color: $y-thunder; color: rgba($g5-pepper, 0.75); }
|
||||
&--delete { background-color: $r-curacao; color: #fff; }
|
||||
&--get { border-color: $b-pool; color: $b-pool; } // #00A3FF - bright brand blue
|
||||
&--post { border-color: $gr-rainforest; color: $gr-rainforest; } // #34BB55 - bright brand green
|
||||
&--put { border-color: $y-pineapple; color: $y-pineapple; } // #FFB94A - bright yellow (distinct from red)
|
||||
&--patch { border-color: $br-new-purple; color: $br-new-purple; } // #9b2aff - distinctive brand purple
|
||||
&--delete { border-color: $r-curacao; color: $r-curacao; } // #F95F53 - bright brand red
|
||||
}
|
||||
|
||||
// API path in monospace
|
||||
|
|
@ -208,6 +210,27 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Overview/Description section
|
||||
.api-description {
|
||||
margin: 2rem 0;
|
||||
color: $article-text !important; // Override any inherited black color
|
||||
|
||||
h2 {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
// Ensure description text is visible and readable
|
||||
p, ul, ol, pre, code {
|
||||
color: $article-text !important;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
// Also ensure direct text nodes use correct color
|
||||
& > * {
|
||||
color: $article-text !important;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////// API Navigation in Sidebar ///////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -395,11 +418,11 @@
|
|||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
|
||||
&--get { background-color: $gr-rainforest; color: #fff; }
|
||||
&--post { background-color: $b-ocean; color: #fff; }
|
||||
&--put { background-color: $br-galaxy; color: #fff; }
|
||||
&--patch { background-color: $y-thunder; color: rgba($g5-pepper, 0.75); }
|
||||
&--delete { background-color: $r-curacao; color: #fff; }
|
||||
&--get { background-color: $b-pool; color: #fff; } // #00A3FF - bright brand blue
|
||||
&--post { background-color: $gr-rainforest; color: #fff; } // #34BB55 - bright brand green
|
||||
&--put { background-color: $y-pineapple; color: #fff; } // #FFB94A - bright yellow (distinct from red)
|
||||
&--patch { background-color: $br-new-purple; color: #fff; } // #9b2aff - distinctive brand purple
|
||||
&--delete { background-color: $r-curacao; color: #fff; } // #F95F53 - bright brand red
|
||||
}
|
||||
|
||||
.api-path {
|
||||
|
|
|
|||
|
|
@ -273,12 +273,15 @@
|
|||
text-transform: uppercase;
|
||||
flex-shrink: 0;
|
||||
line-height: 1;
|
||||
border: 2px solid;
|
||||
background-color: transparent;
|
||||
|
||||
&--get { background: #61affe; color: white; }
|
||||
&--post { background: #49cc90; color: white; }
|
||||
&--put { background: #fca130; color: white; }
|
||||
&--delete { background: #f93e3e; color: white; }
|
||||
&--patch { background: #50e3c2; color: white; }
|
||||
// Using lighter InfluxData brand colors - bordered style for readability
|
||||
&--get { border-color: $b-pool; color: $b-pool; } // #00A3FF - bright brand blue
|
||||
&--post { border-color: $gr-rainforest; color: $gr-rainforest; } // #34BB55 - bright brand green
|
||||
&--put { border-color: $y-pineapple; color: $y-pineapple; } // #FFB94A - bright yellow (distinct from red)
|
||||
&--delete { border-color: $r-curacao; color: $r-curacao; } // #F95F53 - bright brand red
|
||||
&--patch { border-color: $br-new-purple; color: $br-new-purple; } // #9b2aff - distinctive brand purple
|
||||
}
|
||||
|
||||
// Compatibility version badge (v1 or v2)
|
||||
|
|
|
|||
|
|
@ -273,3 +273,159 @@ describe('API reference 3-column layout', () => {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* RapiDoc Mini Component Tests
|
||||
* Tests the api-operation shortcode and RapiDoc Mini component behavior
|
||||
*/
|
||||
describe('RapiDoc Mini component', () => {
|
||||
// Operation pages use RapiDoc Mini for single operation rendering
|
||||
const operationPages = [
|
||||
'/influxdb3/core/api/write/post/',
|
||||
'/influxdb3/core/api/api/v3/write_lp/post/',
|
||||
];
|
||||
|
||||
operationPages.forEach((page) => {
|
||||
describe(`Operation page ${page}`, () => {
|
||||
beforeEach(() => {
|
||||
cy.intercept('GET', '**', (req) => {
|
||||
req.continue((res) => {
|
||||
if (res.headers['content-type']?.includes('text/html')) {
|
||||
res.body = res.body.replace(
|
||||
/data-user-analytics-fingerprint-enabled="true"/,
|
||||
'data-user-analytics-fingerprint-enabled="false"'
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
cy.visit(page);
|
||||
});
|
||||
|
||||
describe('Component initialization', () => {
|
||||
it('renders rapidoc-mini component container', () => {
|
||||
cy.get('[data-component="rapidoc-mini"]').should('exist');
|
||||
});
|
||||
|
||||
it('has data-spec-url attribute', () => {
|
||||
cy.get('[data-component="rapidoc-mini"]')
|
||||
.should('have.attr', 'data-spec-url')
|
||||
.and('match', /\.ya?ml$/);
|
||||
});
|
||||
|
||||
it('has data-match-paths attribute', () => {
|
||||
cy.get('[data-component="rapidoc-mini"]')
|
||||
.should('have.attr', 'data-match-paths')
|
||||
.and('match', /^(get|post|put|patch|delete)\s+\//i);
|
||||
});
|
||||
|
||||
it('includes machine-readable spec links', () => {
|
||||
cy.get('link[rel="alternate"][type="application/x-yaml"]').should(
|
||||
'exist'
|
||||
);
|
||||
cy.get('link[rel="alternate"][type="application/json"]').should(
|
||||
'exist'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('RapiDoc element creation', () => {
|
||||
it('creates rapi-doc-mini custom element', () => {
|
||||
// Wait for component to initialize and create the element
|
||||
cy.get('rapi-doc-mini', { timeout: 10000 }).should('exist');
|
||||
});
|
||||
|
||||
it('rapi-doc-mini has spec-url attribute', () => {
|
||||
cy.get('rapi-doc-mini', { timeout: 10000 })
|
||||
.should('have.attr', 'spec-url')
|
||||
.and('match', /\.ya?ml$/);
|
||||
});
|
||||
|
||||
it('rapi-doc-mini has theme attributes', () => {
|
||||
cy.get('rapi-doc-mini', { timeout: 10000 }).should(
|
||||
'have.attr',
|
||||
'theme'
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('api-operation shortcode on example page', () => {
|
||||
beforeEach(() => {
|
||||
cy.intercept('GET', '**', (req) => {
|
||||
req.continue((res) => {
|
||||
if (res.headers['content-type']?.includes('text/html')) {
|
||||
res.body = res.body.replace(
|
||||
/data-user-analytics-fingerprint-enabled="true"/,
|
||||
'data-user-analytics-fingerprint-enabled="false"'
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
cy.visit('/example/');
|
||||
});
|
||||
|
||||
describe('Multiple instances', () => {
|
||||
it('renders multiple rapidoc-mini containers', () => {
|
||||
cy.get('[data-component="rapidoc-mini"]').should(
|
||||
'have.length.at.least',
|
||||
2
|
||||
);
|
||||
});
|
||||
|
||||
it('each instance has unique match-paths', () => {
|
||||
cy.get('[data-component="rapidoc-mini"]').then(($containers) => {
|
||||
const matchPaths = [];
|
||||
$containers.each((_, el) => {
|
||||
const path = el.getAttribute('data-match-paths');
|
||||
expect(matchPaths).to.not.include(path);
|
||||
matchPaths.push(path);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it('each instance creates its own rapi-doc-mini element', () => {
|
||||
cy.get('rapi-doc-mini', { timeout: 10000 }).should(
|
||||
'have.length.at.least',
|
||||
2
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('Theme synchronization', () => {
|
||||
beforeEach(() => {
|
||||
cy.intercept('GET', '**', (req) => {
|
||||
req.continue((res) => {
|
||||
if (res.headers['content-type']?.includes('text/html')) {
|
||||
res.body = res.body.replace(
|
||||
/data-user-analytics-fingerprint-enabled="true"/,
|
||||
'data-user-analytics-fingerprint-enabled="false"'
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
cy.visit('/influxdb3/core/api/write/post/');
|
||||
});
|
||||
|
||||
it('applies light theme by default', () => {
|
||||
cy.get('rapi-doc-mini', { timeout: 10000 })
|
||||
.should('have.attr', 'theme')
|
||||
.and('match', /light|dark/);
|
||||
});
|
||||
|
||||
it('rapi-doc-mini has background color attribute', () => {
|
||||
cy.get('rapi-doc-mini', { timeout: 10000 }).should(
|
||||
'have.attr',
|
||||
'bg-color'
|
||||
);
|
||||
});
|
||||
|
||||
it('rapi-doc-mini has text color attribute', () => {
|
||||
cy.get('rapi-doc-mini', { timeout: 10000 }).should(
|
||||
'have.attr',
|
||||
'text-color'
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"articles": [
|
||||
{
|
||||
"path": "api/accounts/{accountId}/clusters",
|
||||
"fields": {
|
||||
"name": "/accounts/{accountId}/clusters",
|
||||
"describes": [
|
||||
"/accounts/{accountId}/clusters/{clusterId}/databases",
|
||||
"/accounts/{accountId}/clusters/{clusterId}/databases/{databaseName}",
|
||||
"/accounts/{accountId}/clusters/{clusterId}/databases/{databaseName}/tables",
|
||||
"/accounts/{accountId}/clusters/{clusterId}/tokens",
|
||||
"/accounts/{accountId}/clusters/{clusterId}/tokens/{tokenId}"
|
||||
],
|
||||
"menuName": "/accounts/{accountId}/clusters",
|
||||
"title": "/accounts/{accountId}/clusters",
|
||||
"tags": [
|
||||
"accounts-{accountId}",
|
||||
"clusters"
|
||||
],
|
||||
"apiTags": [
|
||||
"Databases",
|
||||
"Tables",
|
||||
"Database tokens"
|
||||
],
|
||||
"source": "static/openapi/influxdb-cloud-dedicated/paths/openapi-accounts-{accountId}-clusters.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-cloud-dedicated/paths/openapi-accounts-{accountId}-clusters.yaml"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
"articles": [
|
||||
{
|
||||
"path": "api/databases/{databaseName}/tables",
|
||||
"fields": {
|
||||
"name": "/databases/{databaseName}/tables",
|
||||
"describes": [
|
||||
"/databases/{databaseName}/tables"
|
||||
],
|
||||
"menuName": "/databases/{databaseName}/tables",
|
||||
"title": "/databases/{databaseName}/tables",
|
||||
"tags": [
|
||||
"databases-{databaseName}",
|
||||
"tables"
|
||||
],
|
||||
"apiTags": [
|
||||
"Tables"
|
||||
],
|
||||
"source": "static/openapi/influxdb-clustered/paths/openapi-databases-{databaseName}-tables.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-clustered/paths/openapi-databases-{databaseName}-tables.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "api/databases",
|
||||
"fields": {
|
||||
"name": "/databases",
|
||||
"describes": [
|
||||
"/databases",
|
||||
"/databases/{databaseName}"
|
||||
],
|
||||
"menuName": "/databases",
|
||||
"title": "/databases",
|
||||
"tags": [
|
||||
"",
|
||||
"databases"
|
||||
],
|
||||
"apiTags": [
|
||||
"Databases"
|
||||
],
|
||||
"source": "static/openapi/influxdb-clustered/paths/openapi-databases.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-clustered/paths/openapi-databases.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "api/tokens",
|
||||
"fields": {
|
||||
"name": "/tokens",
|
||||
"describes": [
|
||||
"/tokens",
|
||||
"/tokens/{tokenId}"
|
||||
],
|
||||
"menuName": "/tokens",
|
||||
"title": "/tokens",
|
||||
"tags": [
|
||||
"",
|
||||
"tokens"
|
||||
],
|
||||
"apiTags": [
|
||||
"Database tokens"
|
||||
],
|
||||
"source": "static/openapi/influxdb-clustered/paths/openapi-tokens.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-clustered/paths/openapi-tokens.yaml"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -58,8 +58,8 @@
|
|||
}
|
||||
],
|
||||
"tagDescription": "Depending on your workflow, use one of the following schemes to authenticate to the InfluxDB 3 API:\n\n| Authentication scheme | Works with |\n|:----------------------|:-----------|\n| Bearer authentication | All endpoints |\n| Token authentication | v1, v2 endpoints |\n| Basic authentication | v1 endpoints |\n| Querystring authentication | v1 endpoints |\n\nSee the **Security Schemes** section below for details on each authentication method.\n",
|
||||
"source": "static/openapi/influxdb-influxdb3_core/tags/tags/ref-authentication.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_core/tags/tags/ref-authentication.yaml"
|
||||
"source": "static/openapi/influxdb3-core/tags/tags/ref-authentication.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-core/tags/tags/ref-authentication.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -118,101 +118,8 @@
|
|||
}
|
||||
],
|
||||
"tagDescription": "Manage the in-memory cache.\n\n#### Distinct Value Cache\n\nThe Distinct Value Cache (DVC) lets you cache distinct\nvalues of one or more columns in a table, improving the performance of\nqueries that return distinct tag and field values. \n\nThe DVC is an in-memory cache that stores distinct values for specific columns\nin a table. When you create an DVC, you can specify what columns' distinct\nvalues to cache, the maximum number of distinct value combinations to cache, and\nthe maximum age of cached values. A DVC is associated with a table, which can\nhave multiple DVCs.\n\n#### Last value cache\n\nThe Last Value Cache (LVC) lets you cache the most recent\nvalues for specific fields in a table, improving the performance of queries that\nreturn the most recent value of a field for specific series or the last N values\nof a field.\n\nThe LVC is an in-memory cache that stores the last N number of values for\nspecific fields of series in a table. When you create an LVC, you can specify\nwhat fields to cache, what tags to use to identify each series, and the\nnumber of values to cache for each unique series.\nAn LVC is associated with a table, which can have multiple LVCs.\n\n#### Related guides\n\n- [Manage the Distinct Value Cache](/influxdb3/core/admin/distinct-value-cache/)\n- [Manage the Last Value Cache](/influxdb3/core/admin/last-value-cache/)\n",
|
||||
"source": "static/openapi/influxdb-influxdb3_core/tags/tags/ref-cache-data.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_core/tags/tags/ref-cache-data.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "api/compatibility-endpoints",
|
||||
"fields": {
|
||||
"name": "Compatibility endpoints",
|
||||
"describes": [
|
||||
"/write",
|
||||
"/api/v2/write",
|
||||
"/query",
|
||||
"/api/v1/health"
|
||||
],
|
||||
"title": "Compatibility endpoints",
|
||||
"description": "InfluxDB 3 provides compatibility endpoints for InfluxDB 1.x and InfluxDB 2.x workloads and clients.\n\n### Write data using v1- or v2-compatible endpoints\n\n- [`/api/v2/write` endpoint](#operation/PostV2Write)\n for InfluxDB v2 clients and when you bring existing InfluxDB v2 write workloads to InfluxDB 3.\n- [`/write` endpoint](#operation/PostV1Write) for InfluxDB v1 clients and when you bring existing InfluxDB v1 write workloads to InfluxDB 3.\n\nFor new workloads, use the [`/api/v3/write_lp` endpoint](#operation/PostWriteLP).\n\nAll endpoints accept the same line protocol format.\n\n### Query data\n\nUse the HTTP [`/query`](#operation/GetV1ExecuteQuery) endpoint for InfluxDB v1 clients and v1 query workloads using InfluxQL.\n\nFor new workloads, use one of the following:\n\n- HTTP [`/api/v3/query_sql` endpoint](#operation/GetExecuteQuerySQL) for new query workloads using SQL.\n- HTTP [`/api/v3/query_influxql` endpoint](#operation/GetExecuteInfluxQLQuery) for new query workloads using InfluxQL.\n- Flight SQL and InfluxDB 3 _Flight+gRPC_ APIs for querying with SQL or InfluxQL. For more information about using Flight APIs, see [InfluxDB 3 client libraries](https://github.com/InfluxCommunity?q=influxdb3&type=public&language=&sort=).\n\n### Server information\n\nServer information endpoints such as `/health` and `metrics` are compatible with InfluxDB 1.x and InfluxDB 2.x clients.\n",
|
||||
"tag": "Compatibility endpoints",
|
||||
"isConceptual": false,
|
||||
"menuGroup": "Compatibility",
|
||||
"operations": [
|
||||
{
|
||||
"operationId": "PostV1Write",
|
||||
"method": "POST",
|
||||
"path": "/write",
|
||||
"summary": "Write line protocol (v1-compatible)",
|
||||
"tags": [
|
||||
"Compatibility endpoints",
|
||||
"Write data"
|
||||
],
|
||||
"compatVersion": "v1",
|
||||
"externalDocs": {
|
||||
"description": "Use compatibility APIs to write data",
|
||||
"url": "/influxdb3/core/write-data/http-api/compatibility-apis/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"operationId": "PostV2Write",
|
||||
"method": "POST",
|
||||
"path": "/api/v2/write",
|
||||
"summary": "Write line protocol (v2-compatible)",
|
||||
"tags": [
|
||||
"Compatibility endpoints",
|
||||
"Write data"
|
||||
],
|
||||
"compatVersion": "v2",
|
||||
"externalDocs": {
|
||||
"description": "Use compatibility APIs to write data",
|
||||
"url": "/influxdb3/core/write-data/http-api/compatibility-apis/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"operationId": "GetV1ExecuteQuery",
|
||||
"method": "GET",
|
||||
"path": "/query",
|
||||
"summary": "Execute InfluxQL query (v1-compatible)",
|
||||
"tags": [
|
||||
"Query data",
|
||||
"Compatibility endpoints"
|
||||
],
|
||||
"compatVersion": "v1",
|
||||
"externalDocs": {
|
||||
"description": "Use the InfluxDB v1 HTTP query API and InfluxQL to query data",
|
||||
"url": "/influxdb3/core/query-data/execute-queries/influxdb-v1-api/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"operationId": "PostExecuteV1Query",
|
||||
"method": "POST",
|
||||
"path": "/query",
|
||||
"summary": "Execute InfluxQL query (v1-compatible)",
|
||||
"tags": [
|
||||
"Query data",
|
||||
"Compatibility endpoints"
|
||||
],
|
||||
"compatVersion": "v1",
|
||||
"externalDocs": {
|
||||
"description": "Use the InfluxDB v1 HTTP query API and InfluxQL to query data",
|
||||
"url": "/influxdb3/core/query-data/execute-queries/influxdb-v1-api/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"operationId": "GetHealthV1",
|
||||
"method": "GET",
|
||||
"path": "/api/v1/health",
|
||||
"summary": "Health check (v1-compatible)",
|
||||
"tags": [
|
||||
"Server information",
|
||||
"Compatibility endpoints"
|
||||
],
|
||||
"compatVersion": "v1"
|
||||
}
|
||||
],
|
||||
"tagDescription": "InfluxDB 3 provides compatibility endpoints for InfluxDB 1.x and InfluxDB 2.x workloads and clients.\n\n### Write data using v1- or v2-compatible endpoints\n\n- [`/api/v2/write` endpoint](#operation/PostV2Write)\n for InfluxDB v2 clients and when you bring existing InfluxDB v2 write workloads to InfluxDB 3.\n- [`/write` endpoint](#operation/PostV1Write) for InfluxDB v1 clients and when you bring existing InfluxDB v1 write workloads to InfluxDB 3.\n\nFor new workloads, use the [`/api/v3/write_lp` endpoint](#operation/PostWriteLP).\n\nAll endpoints accept the same line protocol format.\n\n### Query data\n\nUse the HTTP [`/query`](#operation/GetV1ExecuteQuery) endpoint for InfluxDB v1 clients and v1 query workloads using InfluxQL.\n\nFor new workloads, use one of the following:\n\n- HTTP [`/api/v3/query_sql` endpoint](#operation/GetExecuteQuerySQL) for new query workloads using SQL.\n- HTTP [`/api/v3/query_influxql` endpoint](#operation/GetExecuteInfluxQLQuery) for new query workloads using InfluxQL.\n- Flight SQL and InfluxDB 3 _Flight+gRPC_ APIs for querying with SQL or InfluxQL. For more information about using Flight APIs, see [InfluxDB 3 client libraries](https://github.com/InfluxCommunity?q=influxdb3&type=public&language=&sort=).\n\n### Server information\n\nServer information endpoints such as `/health` and `metrics` are compatible with InfluxDB 1.x and InfluxDB 2.x clients.\n",
|
||||
"source": "static/openapi/influxdb-influxdb3_core/tags/tags/ref-compatibility-endpoints.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_core/tags/tags/ref-compatibility-endpoints.yaml"
|
||||
"source": "static/openapi/influxdb3-core/tags/tags/ref-cache-data.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-core/tags/tags/ref-cache-data.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -267,8 +174,8 @@
|
|||
}
|
||||
],
|
||||
"tagDescription": "Manage databases",
|
||||
"source": "static/openapi/influxdb-influxdb3_core/tags/tags/ref-database.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_core/tags/tags/ref-database.yaml"
|
||||
"source": "static/openapi/influxdb3-core/tags/tags/ref-database.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-core/tags/tags/ref-database.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -283,8 +190,24 @@
|
|||
"menuGroup": "Concepts",
|
||||
"operations": [],
|
||||
"tagDescription": "Most InfluxDB API endpoints require parameters in the request--for example, specifying the database to use.\n\n### Common parameters\n\nThe following table shows common parameters used by many InfluxDB API endpoints.\nMany endpoints may require other parameters in the query string or in the\nrequest body that perform functions specific to those endpoints.\n\n| Query parameter | Value type | Description |\n|:------------------------ |:--------------------- |:-------------------------------------------|\n| `db` | string | The database name |\n\nInfluxDB HTTP API endpoints use standard HTTP request and response headers.\nThe following table shows common headers used by many InfluxDB API endpoints.\nSome endpoints may use other headers that perform functions more specific to those endpoints--for example,\nthe write endpoints accept the `Content-Encoding` header to indicate that line protocol is compressed in the request body.\n\n| Header | Value type | Description |\n|:------------------------ |:--------------------- |:-------------------------------------------|\n| `Accept` | string | The content type that the client can understand. |\n| `Authorization` | string | The authorization scheme and credential. |\n| `Content-Length` | integer | The size of the entity-body, in bytes. |\n| `Content-Type` | string | The format of the data in the request body. |\n",
|
||||
"source": "static/openapi/influxdb-influxdb3_core/tags/tags/ref-headers-and-parameters.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_core/tags/tags/ref-headers-and-parameters.yaml"
|
||||
"source": "static/openapi/influxdb3-core/tags/tags/ref-headers-and-parameters.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-core/tags/tags/ref-headers-and-parameters.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "api/migrate-from-influxdb-v1-or-v2",
|
||||
"fields": {
|
||||
"name": "Migrate from InfluxDB v1 or v2",
|
||||
"describes": [],
|
||||
"title": "Migrate from InfluxDB v1 or v2",
|
||||
"description": "Migrate your existing InfluxDB v1 or v2 workloads to InfluxDB 3.\n\nInfluxDB 3 provides compatibility endpoints that work with InfluxDB 1.x and 2.x client libraries and tools.\nOperations marked with <span class=\"api-compat-badge api-compat-badge--v1\">v1</span> or <span class=\"api-compat-badge api-compat-badge--v2\">v2</span> badges are compatible with the respective InfluxDB version.\n\n### Migration guides\n\n- [Migrate from InfluxDB v1](/influxdb3/core/guides/migrate/influxdb-1x/) - For users migrating from InfluxDB 1.x\n- [Migrate from InfluxDB v2](/influxdb3/core/guides/migrate/influxdb-2x/) - For users migrating from InfluxDB 2.x or Cloud\n- [Use compatibility APIs to write data](/influxdb3/core/write-data/http-api/compatibility-apis/) - v1 and v2 write endpoints\n- [Use the v1 HTTP query API](/influxdb3/core/query-data/execute-queries/influxdb-v1-api/) - InfluxQL queries via HTTP\n",
|
||||
"tag": "Migrate from InfluxDB v1 or v2",
|
||||
"isConceptual": true,
|
||||
"menuGroup": "Other",
|
||||
"operations": [],
|
||||
"tagDescription": "Migrate your existing InfluxDB v1 or v2 workloads to InfluxDB 3.\n\nInfluxDB 3 provides compatibility endpoints that work with InfluxDB 1.x and 2.x client libraries and tools.\nOperations marked with <span class=\"api-compat-badge api-compat-badge--v1\">v1</span> or <span class=\"api-compat-badge api-compat-badge--v2\">v2</span> badges are compatible with the respective InfluxDB version.\n\n### Migration guides\n\n- [Migrate from InfluxDB v1](/influxdb3/core/guides/migrate/influxdb-1x/) - For users migrating from InfluxDB 1.x\n- [Migrate from InfluxDB v2](/influxdb3/core/guides/migrate/influxdb-2x/) - For users migrating from InfluxDB 2.x or Cloud\n- [Use compatibility APIs to write data](/influxdb3/core/write-data/http-api/compatibility-apis/) - v1 and v2 write endpoints\n- [Use the v1 HTTP query API](/influxdb3/core/query-data/execute-queries/influxdb-v1-api/) - InfluxQL queries via HTTP\n",
|
||||
"source": "static/openapi/influxdb3-core/tags/tags/ref-migrate-from-influxdb-v1-or-v2.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-core/tags/tags/ref-migrate-from-influxdb-v1-or-v2.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -419,8 +342,8 @@
|
|||
}
|
||||
],
|
||||
"tagDescription": "Manage Processing engine triggers, test plugins, and send requests to trigger On Request plugins.\n\nInfluxDB 3 Core provides the InfluxDB 3 processing engine, an embedded Python VM that can dynamically load and trigger Python plugins in response to events in your database.\nUse Processing engine plugins and triggers to run code and perform tasks for different database events.\n\nTo get started with the processing engine, see the [Processing engine and Python plugins](/influxdb3/core/processing-engine/) guide.\n",
|
||||
"source": "static/openapi/influxdb-influxdb3_core/tags/tags/ref-processing-engine.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_core/tags/tags/ref-processing-engine.yaml"
|
||||
"source": "static/openapi/influxdb3-core/tags/tags/ref-processing-engine.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-core/tags/tags/ref-processing-engine.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -480,8 +403,7 @@
|
|||
"path": "/query",
|
||||
"summary": "Execute InfluxQL query (v1-compatible)",
|
||||
"tags": [
|
||||
"Query data",
|
||||
"Compatibility endpoints"
|
||||
"Query data"
|
||||
],
|
||||
"compatVersion": "v1",
|
||||
"externalDocs": {
|
||||
|
|
@ -495,8 +417,7 @@
|
|||
"path": "/query",
|
||||
"summary": "Execute InfluxQL query (v1-compatible)",
|
||||
"tags": [
|
||||
"Query data",
|
||||
"Compatibility endpoints"
|
||||
"Query data"
|
||||
],
|
||||
"compatVersion": "v1",
|
||||
"externalDocs": {
|
||||
|
|
@ -506,8 +427,11 @@
|
|||
}
|
||||
],
|
||||
"tagDescription": "Query data using SQL or InfluxQL",
|
||||
"source": "static/openapi/influxdb-influxdb3_core/tags/tags/ref-query-data.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_core/tags/tags/ref-query-data.yaml"
|
||||
"related": [
|
||||
"/influxdb3/core/query-data/execute-queries/influxdb-v1-api/"
|
||||
],
|
||||
"source": "static/openapi/influxdb3-core/tags/tags/ref-query-data.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-core/tags/tags/ref-query-data.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -522,8 +446,8 @@
|
|||
"menuGroup": "Concepts",
|
||||
"operations": [],
|
||||
"tagDescription": "1. [Create an admin token](#section/Authentication) to authorize API requests.\n\n ```bash\n curl -X POST \"http://localhost:8181/api/v3/configure/token/admin\"\n ```\n2. [Check the status](#section/Server-information) of the InfluxDB server.\n\n ```bash\n curl \"http://localhost:8181/health\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\"\n ```\n\n3. [Write data](#operation/PostWriteLP) to InfluxDB.\n\n ```bash\n curl \"http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto\"\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-raw \"home,room=Kitchen temp=72.0\n home,room=Living\\ room temp=71.5\"\n ```\n\n If all data is written, the response is `204 No Content`.\n\n4. [Query data](#operation/GetExecuteQuerySQL) from InfluxDB.\n\n ```bash\n curl -G \"http://localhost:8181/api/v3/query_sql\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-urlencode \"db=sensors\" \\\n --data-urlencode \"q=SELECT * FROM home WHERE room='Living room'\" \\\n --data-urlencode \"format=jsonl\"\n ```\n \n Output:\n\n ```jsonl\n {\"room\":\"Living room\",\"temp\":71.5,\"time\":\"2025-02-25T20:19:34.984098\"}\n ```\n \nFor more information about using InfluxDB 3 Core, see the [Get started](/influxdb3/core/get-started/) guide.\n",
|
||||
"source": "static/openapi/influxdb-influxdb3_core/tags/tags/ref-quick-start.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_core/tags/tags/ref-quick-start.yaml"
|
||||
"source": "static/openapi/influxdb3-core/tags/tags/ref-quick-start.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-core/tags/tags/ref-quick-start.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -557,8 +481,7 @@
|
|||
"path": "/api/v1/health",
|
||||
"summary": "Health check (v1-compatible)",
|
||||
"tags": [
|
||||
"Server information",
|
||||
"Compatibility endpoints"
|
||||
"Server information"
|
||||
],
|
||||
"compatVersion": "v1"
|
||||
},
|
||||
|
|
@ -582,8 +505,8 @@
|
|||
}
|
||||
],
|
||||
"tagDescription": "Retrieve server metrics, status, and version information",
|
||||
"source": "static/openapi/influxdb-influxdb3_core/tags/tags/ref-server-information.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_core/tags/tags/ref-server-information.yaml"
|
||||
"source": "static/openapi/influxdb3-core/tags/tags/ref-server-information.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-core/tags/tags/ref-server-information.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -661,8 +584,8 @@
|
|||
}
|
||||
],
|
||||
"tagDescription": "Manage table schemas and data",
|
||||
"source": "static/openapi/influxdb-influxdb3_core/tags/tags/ref-table.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_core/tags/tags/ref-table.yaml"
|
||||
"source": "static/openapi/influxdb3-core/tags/tags/ref-table.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-core/tags/tags/ref-table.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -723,8 +646,8 @@
|
|||
}
|
||||
],
|
||||
"tagDescription": "Manage tokens for authentication and authorization",
|
||||
"source": "static/openapi/influxdb-influxdb3_core/tags/tags/ref-token.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_core/tags/tags/ref-token.yaml"
|
||||
"source": "static/openapi/influxdb3-core/tags/tags/ref-token.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-core/tags/tags/ref-token.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -748,7 +671,6 @@
|
|||
"path": "/write",
|
||||
"summary": "Write line protocol (v1-compatible)",
|
||||
"tags": [
|
||||
"Compatibility endpoints",
|
||||
"Write data"
|
||||
],
|
||||
"compatVersion": "v1",
|
||||
|
|
@ -763,7 +685,6 @@
|
|||
"path": "/api/v2/write",
|
||||
"summary": "Write line protocol (v2-compatible)",
|
||||
"tags": [
|
||||
"Compatibility endpoints",
|
||||
"Write data"
|
||||
],
|
||||
"compatVersion": "v2",
|
||||
|
|
@ -783,8 +704,11 @@
|
|||
}
|
||||
],
|
||||
"tagDescription": "Write data to InfluxDB 3 using line protocol format.\n\n#### Timestamp precision across write APIs\n\nInfluxDB 3 provides multiple write endpoints for compatibility with different InfluxDB versions.\nThe following table compares timestamp precision support across v1, v2, and v3 write APIs:\n\n| Precision | v1 (`/write`) | v2 (`/api/v2/write`) | v3 (`/api/v3/write_lp`) |\n|-----------|---------------|----------------------|-------------------------|\n| **Auto detection** | ❌ No | ❌ No | ✅ `auto` (default) |\n| **Seconds** | ✅ `s` | ✅ `s` | ✅ `second` |\n| **Milliseconds** | ✅ `ms` | ✅ `ms` | ✅ `millisecond` |\n| **Microseconds** | ✅ `u` or `µ` | ✅ `us` | ✅ `microsecond` |\n| **Nanoseconds** | ✅ `ns` | ✅ `ns` | ✅ `nanosecond` |\n| **Minutes** | ✅ `m` | ❌ No | ❌ No |\n| **Hours** | ✅ `h` | ❌ No | ❌ No |\n| **Default** | Nanosecond | Nanosecond | **Auto** (guessed) |\n\nAll timestamps are stored internally as nanoseconds.\n",
|
||||
"source": "static/openapi/influxdb-influxdb3_core/tags/tags/ref-write-data.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_core/tags/tags/ref-write-data.yaml"
|
||||
"related": [
|
||||
"/influxdb3/core/write-data/http-api/compatibility-apis/"
|
||||
],
|
||||
"source": "static/openapi/influxdb3-core/tags/tags/ref-write-data.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-core/tags/tags/ref-write-data.yaml"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ articles:
|
|||
|
||||
See the **Security Schemes** section below for details on each
|
||||
authentication method.
|
||||
source: static/openapi/influxdb-influxdb3_core/tags/tags/ref-authentication.yaml
|
||||
staticFilePath: /openapi/influxdb-influxdb3_core/tags/tags/ref-authentication.yaml
|
||||
source: static/openapi/influxdb3-core/tags/tags/ref-authentication.yaml
|
||||
staticFilePath: /openapi/influxdb3-core/tags/tags/ref-authentication.yaml
|
||||
- path: api/cache-data
|
||||
fields:
|
||||
name: Cache data
|
||||
|
|
@ -247,175 +247,8 @@ articles:
|
|||
Cache](/influxdb3/core/admin/distinct-value-cache/)
|
||||
|
||||
- [Manage the Last Value Cache](/influxdb3/core/admin/last-value-cache/)
|
||||
source: static/openapi/influxdb-influxdb3_core/tags/tags/ref-cache-data.yaml
|
||||
staticFilePath: /openapi/influxdb-influxdb3_core/tags/tags/ref-cache-data.yaml
|
||||
- path: api/compatibility-endpoints
|
||||
fields:
|
||||
name: Compatibility endpoints
|
||||
describes:
|
||||
- /write
|
||||
- /api/v2/write
|
||||
- /query
|
||||
- /api/v1/health
|
||||
title: Compatibility endpoints
|
||||
description: >
|
||||
InfluxDB 3 provides compatibility endpoints for InfluxDB 1.x and
|
||||
InfluxDB 2.x workloads and clients.
|
||||
|
||||
|
||||
### Write data using v1- or v2-compatible endpoints
|
||||
|
||||
|
||||
- [`/api/v2/write` endpoint](#operation/PostV2Write)
|
||||
for InfluxDB v2 clients and when you bring existing InfluxDB v2 write workloads to InfluxDB 3.
|
||||
- [`/write` endpoint](#operation/PostV1Write) for InfluxDB v1 clients
|
||||
and when you bring existing InfluxDB v1 write workloads to InfluxDB 3.
|
||||
|
||||
|
||||
For new workloads, use the [`/api/v3/write_lp`
|
||||
endpoint](#operation/PostWriteLP).
|
||||
|
||||
|
||||
All endpoints accept the same line protocol format.
|
||||
|
||||
|
||||
### Query data
|
||||
|
||||
|
||||
Use the HTTP [`/query`](#operation/GetV1ExecuteQuery) endpoint for
|
||||
InfluxDB v1 clients and v1 query workloads using InfluxQL.
|
||||
|
||||
|
||||
For new workloads, use one of the following:
|
||||
|
||||
|
||||
- HTTP [`/api/v3/query_sql` endpoint](#operation/GetExecuteQuerySQL) for
|
||||
new query workloads using SQL.
|
||||
|
||||
- HTTP [`/api/v3/query_influxql`
|
||||
endpoint](#operation/GetExecuteInfluxQLQuery) for new query workloads
|
||||
using InfluxQL.
|
||||
|
||||
- Flight SQL and InfluxDB 3 _Flight+gRPC_ APIs for querying with SQL or
|
||||
InfluxQL. For more information about using Flight APIs, see [InfluxDB 3
|
||||
client
|
||||
libraries](https://github.com/InfluxCommunity?q=influxdb3&type=public&language=&sort=).
|
||||
|
||||
|
||||
### Server information
|
||||
|
||||
|
||||
Server information endpoints such as `/health` and `metrics` are
|
||||
compatible with InfluxDB 1.x and InfluxDB 2.x clients.
|
||||
tag: Compatibility endpoints
|
||||
isConceptual: false
|
||||
menuGroup: Compatibility
|
||||
operations:
|
||||
- operationId: PostV1Write
|
||||
method: POST
|
||||
path: /write
|
||||
summary: Write line protocol (v1-compatible)
|
||||
tags:
|
||||
- Compatibility endpoints
|
||||
- Write data
|
||||
compatVersion: v1
|
||||
externalDocs:
|
||||
description: Use compatibility APIs to write data
|
||||
url: /influxdb3/core/write-data/http-api/compatibility-apis/
|
||||
- operationId: PostV2Write
|
||||
method: POST
|
||||
path: /api/v2/write
|
||||
summary: Write line protocol (v2-compatible)
|
||||
tags:
|
||||
- Compatibility endpoints
|
||||
- Write data
|
||||
compatVersion: v2
|
||||
externalDocs:
|
||||
description: Use compatibility APIs to write data
|
||||
url: /influxdb3/core/write-data/http-api/compatibility-apis/
|
||||
- operationId: GetV1ExecuteQuery
|
||||
method: GET
|
||||
path: /query
|
||||
summary: Execute InfluxQL query (v1-compatible)
|
||||
tags:
|
||||
- Query data
|
||||
- Compatibility endpoints
|
||||
compatVersion: v1
|
||||
externalDocs:
|
||||
description: Use the InfluxDB v1 HTTP query API and InfluxQL to query data
|
||||
url: /influxdb3/core/query-data/execute-queries/influxdb-v1-api/
|
||||
- operationId: PostExecuteV1Query
|
||||
method: POST
|
||||
path: /query
|
||||
summary: Execute InfluxQL query (v1-compatible)
|
||||
tags:
|
||||
- Query data
|
||||
- Compatibility endpoints
|
||||
compatVersion: v1
|
||||
externalDocs:
|
||||
description: Use the InfluxDB v1 HTTP query API and InfluxQL to query data
|
||||
url: /influxdb3/core/query-data/execute-queries/influxdb-v1-api/
|
||||
- operationId: GetHealthV1
|
||||
method: GET
|
||||
path: /api/v1/health
|
||||
summary: Health check (v1-compatible)
|
||||
tags:
|
||||
- Server information
|
||||
- Compatibility endpoints
|
||||
compatVersion: v1
|
||||
tagDescription: >
|
||||
InfluxDB 3 provides compatibility endpoints for InfluxDB 1.x and
|
||||
InfluxDB 2.x workloads and clients.
|
||||
|
||||
|
||||
### Write data using v1- or v2-compatible endpoints
|
||||
|
||||
|
||||
- [`/api/v2/write` endpoint](#operation/PostV2Write)
|
||||
for InfluxDB v2 clients and when you bring existing InfluxDB v2 write workloads to InfluxDB 3.
|
||||
- [`/write` endpoint](#operation/PostV1Write) for InfluxDB v1 clients
|
||||
and when you bring existing InfluxDB v1 write workloads to InfluxDB 3.
|
||||
|
||||
|
||||
For new workloads, use the [`/api/v3/write_lp`
|
||||
endpoint](#operation/PostWriteLP).
|
||||
|
||||
|
||||
All endpoints accept the same line protocol format.
|
||||
|
||||
|
||||
### Query data
|
||||
|
||||
|
||||
Use the HTTP [`/query`](#operation/GetV1ExecuteQuery) endpoint for
|
||||
InfluxDB v1 clients and v1 query workloads using InfluxQL.
|
||||
|
||||
|
||||
For new workloads, use one of the following:
|
||||
|
||||
|
||||
- HTTP [`/api/v3/query_sql` endpoint](#operation/GetExecuteQuerySQL) for
|
||||
new query workloads using SQL.
|
||||
|
||||
- HTTP [`/api/v3/query_influxql`
|
||||
endpoint](#operation/GetExecuteInfluxQLQuery) for new query workloads
|
||||
using InfluxQL.
|
||||
|
||||
- Flight SQL and InfluxDB 3 _Flight+gRPC_ APIs for querying with SQL or
|
||||
InfluxQL. For more information about using Flight APIs, see [InfluxDB 3
|
||||
client
|
||||
libraries](https://github.com/InfluxCommunity?q=influxdb3&type=public&language=&sort=).
|
||||
|
||||
|
||||
### Server information
|
||||
|
||||
|
||||
Server information endpoints such as `/health` and `metrics` are
|
||||
compatible with InfluxDB 1.x and InfluxDB 2.x clients.
|
||||
source: >-
|
||||
static/openapi/influxdb-influxdb3_core/tags/tags/ref-compatibility-endpoints.yaml
|
||||
staticFilePath: >-
|
||||
/openapi/influxdb-influxdb3_core/tags/tags/ref-compatibility-endpoints.yaml
|
||||
source: static/openapi/influxdb3-core/tags/tags/ref-cache-data.yaml
|
||||
staticFilePath: /openapi/influxdb3-core/tags/tags/ref-cache-data.yaml
|
||||
- path: api/database
|
||||
fields:
|
||||
name: Database
|
||||
|
|
@ -453,8 +286,8 @@ articles:
|
|||
tags:
|
||||
- Database
|
||||
tagDescription: Manage databases
|
||||
source: static/openapi/influxdb-influxdb3_core/tags/tags/ref-database.yaml
|
||||
staticFilePath: /openapi/influxdb-influxdb3_core/tags/tags/ref-database.yaml
|
||||
source: static/openapi/influxdb3-core/tags/tags/ref-database.yaml
|
||||
staticFilePath: /openapi/influxdb3-core/tags/tags/ref-database.yaml
|
||||
- path: api/headers-and-parameters
|
||||
fields:
|
||||
name: Headers and parameters
|
||||
|
|
@ -576,10 +409,83 @@ articles:
|
|||
|
||||
| `Content-Type` | string | The format of the
|
||||
data in the request body. |
|
||||
source: static/openapi/influxdb3-core/tags/tags/ref-headers-and-parameters.yaml
|
||||
staticFilePath: /openapi/influxdb3-core/tags/tags/ref-headers-and-parameters.yaml
|
||||
- path: api/migrate-from-influxdb-v1-or-v2
|
||||
fields:
|
||||
name: Migrate from InfluxDB v1 or v2
|
||||
describes: []
|
||||
title: Migrate from InfluxDB v1 or v2
|
||||
description: >
|
||||
Migrate your existing InfluxDB v1 or v2 workloads to InfluxDB 3.
|
||||
|
||||
|
||||
InfluxDB 3 provides compatibility endpoints that work with InfluxDB 1.x
|
||||
and 2.x client libraries and tools.
|
||||
|
||||
Operations marked with <span class="api-compat-badge
|
||||
api-compat-badge--v1">v1</span> or <span class="api-compat-badge
|
||||
api-compat-badge--v2">v2</span> badges are compatible with the
|
||||
respective InfluxDB version.
|
||||
|
||||
|
||||
### Migration guides
|
||||
|
||||
|
||||
- [Migrate from InfluxDB
|
||||
v1](/influxdb3/core/guides/migrate/influxdb-1x/) - For users migrating
|
||||
from InfluxDB 1.x
|
||||
|
||||
- [Migrate from InfluxDB
|
||||
v2](/influxdb3/core/guides/migrate/influxdb-2x/) - For users migrating
|
||||
from InfluxDB 2.x or Cloud
|
||||
|
||||
- [Use compatibility APIs to write
|
||||
data](/influxdb3/core/write-data/http-api/compatibility-apis/) - v1 and
|
||||
v2 write endpoints
|
||||
|
||||
- [Use the v1 HTTP query
|
||||
API](/influxdb3/core/query-data/execute-queries/influxdb-v1-api/) -
|
||||
InfluxQL queries via HTTP
|
||||
tag: Migrate from InfluxDB v1 or v2
|
||||
isConceptual: true
|
||||
menuGroup: Other
|
||||
operations: []
|
||||
tagDescription: >
|
||||
Migrate your existing InfluxDB v1 or v2 workloads to InfluxDB 3.
|
||||
|
||||
|
||||
InfluxDB 3 provides compatibility endpoints that work with InfluxDB 1.x
|
||||
and 2.x client libraries and tools.
|
||||
|
||||
Operations marked with <span class="api-compat-badge
|
||||
api-compat-badge--v1">v1</span> or <span class="api-compat-badge
|
||||
api-compat-badge--v2">v2</span> badges are compatible with the
|
||||
respective InfluxDB version.
|
||||
|
||||
|
||||
### Migration guides
|
||||
|
||||
|
||||
- [Migrate from InfluxDB
|
||||
v1](/influxdb3/core/guides/migrate/influxdb-1x/) - For users migrating
|
||||
from InfluxDB 1.x
|
||||
|
||||
- [Migrate from InfluxDB
|
||||
v2](/influxdb3/core/guides/migrate/influxdb-2x/) - For users migrating
|
||||
from InfluxDB 2.x or Cloud
|
||||
|
||||
- [Use compatibility APIs to write
|
||||
data](/influxdb3/core/write-data/http-api/compatibility-apis/) - v1 and
|
||||
v2 write endpoints
|
||||
|
||||
- [Use the v1 HTTP query
|
||||
API](/influxdb3/core/query-data/execute-queries/influxdb-v1-api/) -
|
||||
InfluxQL queries via HTTP
|
||||
source: >-
|
||||
static/openapi/influxdb-influxdb3_core/tags/tags/ref-headers-and-parameters.yaml
|
||||
static/openapi/influxdb3-core/tags/tags/ref-migrate-from-influxdb-v1-or-v2.yaml
|
||||
staticFilePath: >-
|
||||
/openapi/influxdb-influxdb3_core/tags/tags/ref-headers-and-parameters.yaml
|
||||
/openapi/influxdb3-core/tags/tags/ref-migrate-from-influxdb-v1-or-v2.yaml
|
||||
- path: api/processing-engine
|
||||
fields:
|
||||
name: Processing engine
|
||||
|
|
@ -701,9 +607,8 @@ articles:
|
|||
|
||||
To get started with the processing engine, see the [Processing engine
|
||||
and Python plugins](/influxdb3/core/processing-engine/) guide.
|
||||
source: >-
|
||||
static/openapi/influxdb-influxdb3_core/tags/tags/ref-processing-engine.yaml
|
||||
staticFilePath: /openapi/influxdb-influxdb3_core/tags/tags/ref-processing-engine.yaml
|
||||
source: static/openapi/influxdb3-core/tags/tags/ref-processing-engine.yaml
|
||||
staticFilePath: /openapi/influxdb3-core/tags/tags/ref-processing-engine.yaml
|
||||
- path: api/query-data
|
||||
fields:
|
||||
name: Query data
|
||||
|
|
@ -747,7 +652,6 @@ articles:
|
|||
summary: Execute InfluxQL query (v1-compatible)
|
||||
tags:
|
||||
- Query data
|
||||
- Compatibility endpoints
|
||||
compatVersion: v1
|
||||
externalDocs:
|
||||
description: Use the InfluxDB v1 HTTP query API and InfluxQL to query data
|
||||
|
|
@ -758,14 +662,15 @@ articles:
|
|||
summary: Execute InfluxQL query (v1-compatible)
|
||||
tags:
|
||||
- Query data
|
||||
- Compatibility endpoints
|
||||
compatVersion: v1
|
||||
externalDocs:
|
||||
description: Use the InfluxDB v1 HTTP query API and InfluxQL to query data
|
||||
url: /influxdb3/core/query-data/execute-queries/influxdb-v1-api/
|
||||
tagDescription: Query data using SQL or InfluxQL
|
||||
source: static/openapi/influxdb-influxdb3_core/tags/tags/ref-query-data.yaml
|
||||
staticFilePath: /openapi/influxdb-influxdb3_core/tags/tags/ref-query-data.yaml
|
||||
related:
|
||||
- /influxdb3/core/query-data/execute-queries/influxdb-v1-api/
|
||||
source: static/openapi/influxdb3-core/tags/tags/ref-query-data.yaml
|
||||
staticFilePath: /openapi/influxdb3-core/tags/tags/ref-query-data.yaml
|
||||
- path: api/quick-start
|
||||
fields:
|
||||
name: Quick start
|
||||
|
|
@ -863,8 +768,8 @@ articles:
|
|||
|
||||
For more information about using InfluxDB 3 Core, see the [Get
|
||||
started](/influxdb3/core/get-started/) guide.
|
||||
source: static/openapi/influxdb-influxdb3_core/tags/tags/ref-quick-start.yaml
|
||||
staticFilePath: /openapi/influxdb-influxdb3_core/tags/tags/ref-quick-start.yaml
|
||||
source: static/openapi/influxdb3-core/tags/tags/ref-quick-start.yaml
|
||||
staticFilePath: /openapi/influxdb3-core/tags/tags/ref-quick-start.yaml
|
||||
- path: api/server-information
|
||||
fields:
|
||||
name: Server information
|
||||
|
|
@ -891,7 +796,6 @@ articles:
|
|||
summary: Health check (v1-compatible)
|
||||
tags:
|
||||
- Server information
|
||||
- Compatibility endpoints
|
||||
compatVersion: v1
|
||||
- operationId: GetPing
|
||||
method: GET
|
||||
|
|
@ -906,9 +810,8 @@ articles:
|
|||
tags:
|
||||
- Server information
|
||||
tagDescription: Retrieve server metrics, status, and version information
|
||||
source: >-
|
||||
static/openapi/influxdb-influxdb3_core/tags/tags/ref-server-information.yaml
|
||||
staticFilePath: /openapi/influxdb-influxdb3_core/tags/tags/ref-server-information.yaml
|
||||
source: static/openapi/influxdb3-core/tags/tags/ref-server-information.yaml
|
||||
staticFilePath: /openapi/influxdb3-core/tags/tags/ref-server-information.yaml
|
||||
- path: api/table
|
||||
fields:
|
||||
name: Table
|
||||
|
|
@ -963,8 +866,8 @@ articles:
|
|||
- Cache data
|
||||
- Table
|
||||
tagDescription: Manage table schemas and data
|
||||
source: static/openapi/influxdb-influxdb3_core/tags/tags/ref-table.yaml
|
||||
staticFilePath: /openapi/influxdb-influxdb3_core/tags/tags/ref-table.yaml
|
||||
source: static/openapi/influxdb3-core/tags/tags/ref-table.yaml
|
||||
staticFilePath: /openapi/influxdb3-core/tags/tags/ref-table.yaml
|
||||
- path: api/token
|
||||
fields:
|
||||
name: Token
|
||||
|
|
@ -1008,8 +911,8 @@ articles:
|
|||
- Authentication
|
||||
- Token
|
||||
tagDescription: Manage tokens for authentication and authorization
|
||||
source: static/openapi/influxdb-influxdb3_core/tags/tags/ref-token.yaml
|
||||
staticFilePath: /openapi/influxdb-influxdb3_core/tags/tags/ref-token.yaml
|
||||
source: static/openapi/influxdb3-core/tags/tags/ref-token.yaml
|
||||
staticFilePath: /openapi/influxdb3-core/tags/tags/ref-token.yaml
|
||||
- path: api/write-data
|
||||
fields:
|
||||
name: Write data
|
||||
|
|
@ -1064,7 +967,6 @@ articles:
|
|||
path: /write
|
||||
summary: Write line protocol (v1-compatible)
|
||||
tags:
|
||||
- Compatibility endpoints
|
||||
- Write data
|
||||
compatVersion: v1
|
||||
externalDocs:
|
||||
|
|
@ -1075,7 +977,6 @@ articles:
|
|||
path: /api/v2/write
|
||||
summary: Write line protocol (v2-compatible)
|
||||
tags:
|
||||
- Compatibility endpoints
|
||||
- Write data
|
||||
compatVersion: v2
|
||||
externalDocs:
|
||||
|
|
@ -1124,5 +1025,7 @@ articles:
|
|||
|
||||
|
||||
All timestamps are stored internally as nanoseconds.
|
||||
source: static/openapi/influxdb-influxdb3_core/tags/tags/ref-write-data.yaml
|
||||
staticFilePath: /openapi/influxdb-influxdb3_core/tags/tags/ref-write-data.yaml
|
||||
related:
|
||||
- /influxdb3/core/write-data/http-api/compatibility-apis/
|
||||
source: static/openapi/influxdb3-core/tags/tags/ref-write-data.yaml
|
||||
staticFilePath: /openapi/influxdb3-core/tags/tags/ref-write-data.yaml
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
"/api/v3/configure/token/named_admin"
|
||||
],
|
||||
"title": "Authentication",
|
||||
"description": "Depending on your workflow, use one of the following schemes to authenticate to the InfluxDB 3 API:\n\n| Authentication scheme | Works with |\n|:----------------------|:-----------|\n| Bearer authentication | All endpoints |\n| Token authentication | v1, v2 endpoints |\n| Basic authentication | v1 endpoints |\n| Querystring authentication | v1 endpoints |\n\nSee the **Security Schemes** section below for details on each authentication method.\n",
|
||||
"description": "Depending on your workflow, use one of the following schemes to authenticate to the InfluxDB 3 API:\n| Authentication scheme | Works with |\n|:----------------------|:-----------|\n| Bearer authentication | All endpoints |\n| Token authentication | v1, v2 endpoints |\n| Basic authentication | v1 endpoints |\n| Querystring authentication | v1 endpoints |\nSee the **Security Schemes** section below for details on each authentication method.\n",
|
||||
"tag": "Authentication",
|
||||
"isConceptual": true,
|
||||
"menuGroup": "Concepts",
|
||||
|
|
@ -68,9 +68,9 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"tagDescription": "Depending on your workflow, use one of the following schemes to authenticate to the InfluxDB 3 API:\n\n| Authentication scheme | Works with |\n|:----------------------|:-----------|\n| Bearer authentication | All endpoints |\n| Token authentication | v1, v2 endpoints |\n| Basic authentication | v1 endpoints |\n| Querystring authentication | v1 endpoints |\n\nSee the **Security Schemes** section below for details on each authentication method.\n",
|
||||
"source": "static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-authentication.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-authentication.yaml"
|
||||
"tagDescription": "Depending on your workflow, use one of the following schemes to authenticate to the InfluxDB 3 API:\n| Authentication scheme | Works with |\n|:----------------------|:-----------|\n| Bearer authentication | All endpoints |\n| Token authentication | v1, v2 endpoints |\n| Basic authentication | v1 endpoints |\n| Querystring authentication | v1 endpoints |\nSee the **Security Schemes** section below for details on each authentication method.\n",
|
||||
"source": "static/openapi/influxdb3-enterprise/tags/tags/ref-authentication.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-enterprise/tags/tags/ref-authentication.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -82,7 +82,7 @@
|
|||
"/api/v3/configure/last_cache"
|
||||
],
|
||||
"title": "Cache data",
|
||||
"description": "Manage the in-memory cache.\n\n#### Distinct Value Cache\n\nThe Distinct Value Cache (DVC) lets you cache distinct\nvalues of one or more columns in a table, improving the performance of\nqueries that return distinct tag and field values. \n\nThe DVC is an in-memory cache that stores distinct values for specific columns\nin a table. When you create an DVC, you can specify what columns' distinct\nvalues to cache, the maximum number of distinct value combinations to cache, and\nthe maximum age of cached values. A DVC is associated with a table, which can\nhave multiple DVCs.\n\n#### Last value cache\n\nThe Last Value Cache (LVC) lets you cache the most recent\nvalues for specific fields in a table, improving the performance of queries that\nreturn the most recent value of a field for specific series or the last N values\nof a field.\n\nThe LVC is an in-memory cache that stores the last N number of values for\nspecific fields of series in a table. When you create an LVC, you can specify\nwhat fields to cache, what tags to use to identify each series, and the\nnumber of values to cache for each unique series.\nAn LVC is associated with a table, which can have multiple LVCs.\n\n#### Related guides\n\n- [Manage the Distinct Value Cache](/influxdb3/enterprise/admin/distinct-value-cache/)\n- [Manage the Last Value Cache](/influxdb3/enterprise/admin/last-value-cache/)\n",
|
||||
"description": "Manage the in-memory cache.\n#### Distinct Value Cache\nThe Distinct Value Cache (DVC) lets you cache distinct\nvalues of one or more columns in a table, improving the performance of\nqueries that return distinct tag and field values. \nThe DVC is an in-memory cache that stores distinct values for specific columns\nin a table. When you create an DVC, you can specify what columns' distinct\nvalues to cache, the maximum number of distinct value combinations to cache, and\nthe maximum age of cached values. A DVC is associated with a table, which can\nhave multiple DVCs.\n#### Last value cache\nThe Last Value Cache (LVC) lets you cache the most recent\nvalues for specific fields in a table, improving the performance of queries that\nreturn the most recent value of a field for specific series or the last N values\nof a field.\nThe LVC is an in-memory cache that stores the last N number of values for\nspecific fields of series in a table. When you create an LVC, you can specify\nwhat fields to cache, what tags to use to identify each series, and the\nnumber of values to cache for each unique series.\nAn LVC is associated with a table, which can have multiple LVCs.\n#### Related guides\n- [Manage the Distinct Value Cache](/influxdb3/enterprise/admin/distinct-value-cache/)\n- [Manage the Last Value Cache](/influxdb3/enterprise/admin/last-value-cache/)\n",
|
||||
"tag": "Cache data",
|
||||
"isConceptual": false,
|
||||
"menuGroup": "Data Operations",
|
||||
|
|
@ -128,102 +128,9 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"tagDescription": "Manage the in-memory cache.\n\n#### Distinct Value Cache\n\nThe Distinct Value Cache (DVC) lets you cache distinct\nvalues of one or more columns in a table, improving the performance of\nqueries that return distinct tag and field values. \n\nThe DVC is an in-memory cache that stores distinct values for specific columns\nin a table. When you create an DVC, you can specify what columns' distinct\nvalues to cache, the maximum number of distinct value combinations to cache, and\nthe maximum age of cached values. A DVC is associated with a table, which can\nhave multiple DVCs.\n\n#### Last value cache\n\nThe Last Value Cache (LVC) lets you cache the most recent\nvalues for specific fields in a table, improving the performance of queries that\nreturn the most recent value of a field for specific series or the last N values\nof a field.\n\nThe LVC is an in-memory cache that stores the last N number of values for\nspecific fields of series in a table. When you create an LVC, you can specify\nwhat fields to cache, what tags to use to identify each series, and the\nnumber of values to cache for each unique series.\nAn LVC is associated with a table, which can have multiple LVCs.\n\n#### Related guides\n\n- [Manage the Distinct Value Cache](/influxdb3/enterprise/admin/distinct-value-cache/)\n- [Manage the Last Value Cache](/influxdb3/enterprise/admin/last-value-cache/)\n",
|
||||
"source": "static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-cache-data.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-cache-data.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "api/compatibility-endpoints",
|
||||
"fields": {
|
||||
"name": "Compatibility endpoints",
|
||||
"describes": [
|
||||
"/write",
|
||||
"/api/v2/write",
|
||||
"/query",
|
||||
"/api/v1/health"
|
||||
],
|
||||
"title": "Compatibility endpoints",
|
||||
"description": "InfluxDB 3 provides compatibility endpoints for InfluxDB 1.x and InfluxDB 2.x workloads and clients.\n\n### Write data using v1- or v2-compatible endpoints\n\n- [`/api/v2/write` endpoint](#operation/PostV2Write)\n for InfluxDB v2 clients and when you bring existing InfluxDB v2 write workloads to InfluxDB 3.\n- [`/write` endpoint](#operation/PostV1Write) for InfluxDB v1 clients and when you bring existing InfluxDB v1 write workloads to InfluxDB 3.\n\nFor new workloads, use the [`/api/v3/write_lp` endpoint](#operation/PostWriteLP).\n\nAll endpoints accept the same line protocol format.\n\n### Query data\n\nUse the HTTP [`/query`](#operation/GetV1ExecuteQuery) endpoint for InfluxDB v1 clients and v1 query workloads using InfluxQL.\n\nFor new workloads, use one of the following:\n\n- HTTP [`/api/v3/query_sql` endpoint](#operation/GetExecuteQuerySQL) for new query workloads using SQL.\n- HTTP [`/api/v3/query_influxql` endpoint](#operation/GetExecuteInfluxQLQuery) for new query workloads using InfluxQL.\n- Flight SQL and InfluxDB 3 _Flight+gRPC_ APIs for querying with SQL or InfluxQL. For more information about using Flight APIs, see [InfluxDB 3 client libraries](https://github.com/InfluxCommunity?q=influxdb3&type=public&language=&sort=).\n\n### Server information\n\nServer information endpoints such as `/health` and `metrics` are compatible with InfluxDB 1.x and InfluxDB 2.x clients.\n",
|
||||
"tag": "Compatibility endpoints",
|
||||
"isConceptual": false,
|
||||
"menuGroup": "Compatibility",
|
||||
"operations": [
|
||||
{
|
||||
"operationId": "PostV1Write",
|
||||
"method": "POST",
|
||||
"path": "/write",
|
||||
"summary": "Write line protocol (v1-compatible)",
|
||||
"tags": [
|
||||
"Compatibility endpoints",
|
||||
"Write data"
|
||||
],
|
||||
"compatVersion": "v1",
|
||||
"externalDocs": {
|
||||
"description": "Use compatibility APIs to write data",
|
||||
"url": "/influxdb3/enterprise/write-data/http-api/compatibility-apis/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"operationId": "PostV2Write",
|
||||
"method": "POST",
|
||||
"path": "/api/v2/write",
|
||||
"summary": "Write line protocol (v2-compatible)",
|
||||
"tags": [
|
||||
"Compatibility endpoints",
|
||||
"Write data"
|
||||
],
|
||||
"compatVersion": "v2",
|
||||
"externalDocs": {
|
||||
"description": "Use compatibility APIs to write data",
|
||||
"url": "/influxdb3/enterprise/write-data/http-api/compatibility-apis/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"operationId": "GetV1ExecuteQuery",
|
||||
"method": "GET",
|
||||
"path": "/query",
|
||||
"summary": "Execute InfluxQL query (v1-compatible)",
|
||||
"tags": [
|
||||
"Query data",
|
||||
"Compatibility endpoints"
|
||||
],
|
||||
"compatVersion": "v1",
|
||||
"externalDocs": {
|
||||
"description": "Use the InfluxDB v1 HTTP query API and InfluxQL to query data",
|
||||
"url": "/influxdb3/enterprise/query-data/execute-queries/influxdb-v1-api/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"operationId": "PostExecuteV1Query",
|
||||
"method": "POST",
|
||||
"path": "/query",
|
||||
"summary": "Execute InfluxQL query (v1-compatible)",
|
||||
"tags": [
|
||||
"Query data",
|
||||
"Compatibility endpoints"
|
||||
],
|
||||
"compatVersion": "v1",
|
||||
"externalDocs": {
|
||||
"description": "Use the InfluxDB v1 HTTP query API and InfluxQL to query data",
|
||||
"url": "/influxdb3/enterprise/query-data/execute-queries/influxdb-v1-api/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"operationId": "GetHealthV1",
|
||||
"method": "GET",
|
||||
"path": "/api/v1/health",
|
||||
"summary": "Health check (v1-compatible)",
|
||||
"tags": [
|
||||
"Server information",
|
||||
"Compatibility endpoints"
|
||||
],
|
||||
"compatVersion": "v1"
|
||||
}
|
||||
],
|
||||
"tagDescription": "InfluxDB 3 provides compatibility endpoints for InfluxDB 1.x and InfluxDB 2.x workloads and clients.\n\n### Write data using v1- or v2-compatible endpoints\n\n- [`/api/v2/write` endpoint](#operation/PostV2Write)\n for InfluxDB v2 clients and when you bring existing InfluxDB v2 write workloads to InfluxDB 3.\n- [`/write` endpoint](#operation/PostV1Write) for InfluxDB v1 clients and when you bring existing InfluxDB v1 write workloads to InfluxDB 3.\n\nFor new workloads, use the [`/api/v3/write_lp` endpoint](#operation/PostWriteLP).\n\nAll endpoints accept the same line protocol format.\n\n### Query data\n\nUse the HTTP [`/query`](#operation/GetV1ExecuteQuery) endpoint for InfluxDB v1 clients and v1 query workloads using InfluxQL.\n\nFor new workloads, use one of the following:\n\n- HTTP [`/api/v3/query_sql` endpoint](#operation/GetExecuteQuerySQL) for new query workloads using SQL.\n- HTTP [`/api/v3/query_influxql` endpoint](#operation/GetExecuteInfluxQLQuery) for new query workloads using InfluxQL.\n- Flight SQL and InfluxDB 3 _Flight+gRPC_ APIs for querying with SQL or InfluxQL. For more information about using Flight APIs, see [InfluxDB 3 client libraries](https://github.com/InfluxCommunity?q=influxdb3&type=public&language=&sort=).\n\n### Server information\n\nServer information endpoints such as `/health` and `metrics` are compatible with InfluxDB 1.x and InfluxDB 2.x clients.\n",
|
||||
"source": "static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-compatibility-endpoints.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-compatibility-endpoints.yaml"
|
||||
"tagDescription": "Manage the in-memory cache.\n#### Distinct Value Cache\nThe Distinct Value Cache (DVC) lets you cache distinct\nvalues of one or more columns in a table, improving the performance of\nqueries that return distinct tag and field values. \nThe DVC is an in-memory cache that stores distinct values for specific columns\nin a table. When you create an DVC, you can specify what columns' distinct\nvalues to cache, the maximum number of distinct value combinations to cache, and\nthe maximum age of cached values. A DVC is associated with a table, which can\nhave multiple DVCs.\n#### Last value cache\nThe Last Value Cache (LVC) lets you cache the most recent\nvalues for specific fields in a table, improving the performance of queries that\nreturn the most recent value of a field for specific series or the last N values\nof a field.\nThe LVC is an in-memory cache that stores the last N number of values for\nspecific fields of series in a table. When you create an LVC, you can specify\nwhat fields to cache, what tags to use to identify each series, and the\nnumber of values to cache for each unique series.\nAn LVC is associated with a table, which can have multiple LVCs.\n#### Related guides\n- [Manage the Distinct Value Cache](/influxdb3/enterprise/admin/distinct-value-cache/)\n- [Manage the Last Value Cache](/influxdb3/enterprise/admin/last-value-cache/)\n",
|
||||
"source": "static/openapi/influxdb3-enterprise/tags/tags/ref-cache-data.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-enterprise/tags/tags/ref-cache-data.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -288,8 +195,8 @@
|
|||
}
|
||||
],
|
||||
"tagDescription": "Manage databases",
|
||||
"source": "static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-database.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-database.yaml"
|
||||
"source": "static/openapi/influxdb3-enterprise/tags/tags/ref-database.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-enterprise/tags/tags/ref-database.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -298,14 +205,30 @@
|
|||
"name": "Headers and parameters",
|
||||
"describes": [],
|
||||
"title": "Headers and parameters",
|
||||
"description": "Most InfluxDB API endpoints require parameters in the request--for example, specifying the database to use.\n\n### Common parameters\n\nThe following table shows common parameters used by many InfluxDB API endpoints.\nMany endpoints may require other parameters in the query string or in the\nrequest body that perform functions specific to those endpoints.\n\n| Query parameter | Value type | Description |\n|:------------------------ |:--------------------- |:-------------------------------------------|\n| `db` | string | The database name |\n\nInfluxDB HTTP API endpoints use standard HTTP request and response headers.\nThe following table shows common headers used by many InfluxDB API endpoints.\nSome endpoints may use other headers that perform functions more specific to those endpoints--for example,\nthe write endpoints accept the `Content-Encoding` header to indicate that line protocol is compressed in the request body.\n\n| Header | Value type | Description |\n|:------------------------ |:--------------------- |:-------------------------------------------|\n| `Accept` | string | The content type that the client can understand. |\n| `Authorization` | string | The authorization scheme and credential. |\n| `Content-Length` | integer | The size of the entity-body, in bytes. |\n| `Content-Type` | string | The format of the data in the request body. |\n",
|
||||
"description": "Most InfluxDB API endpoints require parameters in the request--for example, specifying the database to use.\n### Common parameters\nThe following table shows common parameters used by many InfluxDB API endpoints.\nMany endpoints may require other parameters in the query string or in the\nrequest body that perform functions specific to those endpoints.\n| Query parameter | Value type | Description |\n|:------------------------ |:--------------------- |:-------------------------------------------|\n| `db` | string | The database name |\nInfluxDB HTTP API endpoints use standard HTTP request and response headers.\nThe following table shows common headers used by many InfluxDB API endpoints.\nSome endpoints may use other headers that perform functions more specific to those endpoints--for example,\nthe write endpoints accept the `Content-Encoding` header to indicate that line protocol is compressed in the request body.\n| Header | Value type | Description |\n|:------------------------ |:--------------------- |:-------------------------------------------|\n| `Accept` | string | The content type that the client can understand. |\n| `Authorization` | string | The authorization scheme and credential. |\n| `Content-Length` | integer | The size of the entity-body, in bytes. |\n| `Content-Type` | string | The format of the data in the request body. |\n",
|
||||
"tag": "Headers and parameters",
|
||||
"isConceptual": true,
|
||||
"menuGroup": "Concepts",
|
||||
"operations": [],
|
||||
"tagDescription": "Most InfluxDB API endpoints require parameters in the request--for example, specifying the database to use.\n\n### Common parameters\n\nThe following table shows common parameters used by many InfluxDB API endpoints.\nMany endpoints may require other parameters in the query string or in the\nrequest body that perform functions specific to those endpoints.\n\n| Query parameter | Value type | Description |\n|:------------------------ |:--------------------- |:-------------------------------------------|\n| `db` | string | The database name |\n\nInfluxDB HTTP API endpoints use standard HTTP request and response headers.\nThe following table shows common headers used by many InfluxDB API endpoints.\nSome endpoints may use other headers that perform functions more specific to those endpoints--for example,\nthe write endpoints accept the `Content-Encoding` header to indicate that line protocol is compressed in the request body.\n\n| Header | Value type | Description |\n|:------------------------ |:--------------------- |:-------------------------------------------|\n| `Accept` | string | The content type that the client can understand. |\n| `Authorization` | string | The authorization scheme and credential. |\n| `Content-Length` | integer | The size of the entity-body, in bytes. |\n| `Content-Type` | string | The format of the data in the request body. |\n",
|
||||
"source": "static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-headers-and-parameters.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-headers-and-parameters.yaml"
|
||||
"tagDescription": "Most InfluxDB API endpoints require parameters in the request--for example, specifying the database to use.\n### Common parameters\nThe following table shows common parameters used by many InfluxDB API endpoints.\nMany endpoints may require other parameters in the query string or in the\nrequest body that perform functions specific to those endpoints.\n| Query parameter | Value type | Description |\n|:------------------------ |:--------------------- |:-------------------------------------------|\n| `db` | string | The database name |\nInfluxDB HTTP API endpoints use standard HTTP request and response headers.\nThe following table shows common headers used by many InfluxDB API endpoints.\nSome endpoints may use other headers that perform functions more specific to those endpoints--for example,\nthe write endpoints accept the `Content-Encoding` header to indicate that line protocol is compressed in the request body.\n| Header | Value type | Description |\n|:------------------------ |:--------------------- |:-------------------------------------------|\n| `Accept` | string | The content type that the client can understand. |\n| `Authorization` | string | The authorization scheme and credential. |\n| `Content-Length` | integer | The size of the entity-body, in bytes. |\n| `Content-Type` | string | The format of the data in the request body. |\n",
|
||||
"source": "static/openapi/influxdb3-enterprise/tags/tags/ref-headers-and-parameters.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-enterprise/tags/tags/ref-headers-and-parameters.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "api/migrate-from-influxdb-v1-or-v2",
|
||||
"fields": {
|
||||
"name": "Migrate from InfluxDB v1 or v2",
|
||||
"describes": [],
|
||||
"title": "Migrate from InfluxDB v1 or v2",
|
||||
"description": "Migrate your existing InfluxDB v1 or v2 workloads to InfluxDB 3.\nInfluxDB 3 provides compatibility endpoints that work with InfluxDB 1.x and 2.x client libraries and tools.\nOperations marked with <span class=\"api-compat-badge api-compat-badge--v1\">v1</span> or <span class=\"api-compat-badge api-compat-badge--v2\">v2</span> badges are compatible with the respective InfluxDB version.\n### Migration guides\n- [Migrate from InfluxDB v1](/influxdb3/enterprise/guides/migrate/influxdb-1x/) - For users migrating from InfluxDB 1.x\n- [Migrate from InfluxDB v2](/influxdb3/enterprise/guides/migrate/influxdb-2x/) - For users migrating from InfluxDB 2.x or Cloud\n- [Use compatibility APIs to write data](/influxdb3/enterprise/write-data/http-api/compatibility-apis/) - v1 and v2 write endpoints\n- [Use the v1 HTTP query API](/influxdb3/enterprise/query-data/execute-queries/influxdb-v1-api/) - InfluxQL queries via HTTP\n",
|
||||
"tag": "Migrate from InfluxDB v1 or v2",
|
||||
"isConceptual": true,
|
||||
"menuGroup": "Other",
|
||||
"operations": [],
|
||||
"tagDescription": "Migrate your existing InfluxDB v1 or v2 workloads to InfluxDB 3.\nInfluxDB 3 provides compatibility endpoints that work with InfluxDB 1.x and 2.x client libraries and tools.\nOperations marked with <span class=\"api-compat-badge api-compat-badge--v1\">v1</span> or <span class=\"api-compat-badge api-compat-badge--v2\">v2</span> badges are compatible with the respective InfluxDB version.\n### Migration guides\n- [Migrate from InfluxDB v1](/influxdb3/enterprise/guides/migrate/influxdb-1x/) - For users migrating from InfluxDB 1.x\n- [Migrate from InfluxDB v2](/influxdb3/enterprise/guides/migrate/influxdb-2x/) - For users migrating from InfluxDB 2.x or Cloud\n- [Use compatibility APIs to write data](/influxdb3/enterprise/write-data/http-api/compatibility-apis/) - v1 and v2 write endpoints\n- [Use the v1 HTTP query API](/influxdb3/enterprise/query-data/execute-queries/influxdb-v1-api/) - InfluxQL queries via HTTP\n",
|
||||
"source": "static/openapi/influxdb3-enterprise/tags/tags/ref-migrate-from-influxdb-v1-or-v2.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-enterprise/tags/tags/ref-migrate-from-influxdb-v1-or-v2.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -325,7 +248,7 @@
|
|||
"/api/v3/plugins/directory"
|
||||
],
|
||||
"title": "Processing engine",
|
||||
"description": "Manage Processing engine triggers, test plugins, and send requests to trigger On Request plugins.\n\nInfluxDB 3 Enterprise provides the InfluxDB 3 processing engine, an embedded Python VM that can dynamically load and trigger Python plugins in response to events in your database.\nUse Processing engine plugins and triggers to run code and perform tasks for different database events.\n\nTo get started with the processing engine, see the [Processing engine and Python plugins](/influxdb3/enterprise/processing-engine/) guide.\n",
|
||||
"description": "Manage Processing engine triggers, test plugins, and send requests to trigger On Request plugins.\nInfluxDB 3 Enterprise provides the InfluxDB 3 processing engine, an embedded Python VM that can dynamically load and trigger Python plugins in response to events in your database.\nUse Processing engine plugins and triggers to run code and perform tasks for different database events.\nTo get started with the processing engine, see the [Processing engine and Python plugins](/influxdb3/enterprise/processing-engine/) guide.\n",
|
||||
"tag": "Processing engine",
|
||||
"isConceptual": false,
|
||||
"menuGroup": "Processing Engine",
|
||||
|
|
@ -439,9 +362,9 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"tagDescription": "Manage Processing engine triggers, test plugins, and send requests to trigger On Request plugins.\n\nInfluxDB 3 Enterprise provides the InfluxDB 3 processing engine, an embedded Python VM that can dynamically load and trigger Python plugins in response to events in your database.\nUse Processing engine plugins and triggers to run code and perform tasks for different database events.\n\nTo get started with the processing engine, see the [Processing engine and Python plugins](/influxdb3/enterprise/processing-engine/) guide.\n",
|
||||
"source": "static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-processing-engine.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-processing-engine.yaml"
|
||||
"tagDescription": "Manage Processing engine triggers, test plugins, and send requests to trigger On Request plugins.\nInfluxDB 3 Enterprise provides the InfluxDB 3 processing engine, an embedded Python VM that can dynamically load and trigger Python plugins in response to events in your database.\nUse Processing engine plugins and triggers to run code and perform tasks for different database events.\nTo get started with the processing engine, see the [Processing engine and Python plugins](/influxdb3/enterprise/processing-engine/) guide.\n",
|
||||
"source": "static/openapi/influxdb3-enterprise/tags/tags/ref-processing-engine.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-enterprise/tags/tags/ref-processing-engine.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -501,8 +424,7 @@
|
|||
"path": "/query",
|
||||
"summary": "Execute InfluxQL query (v1-compatible)",
|
||||
"tags": [
|
||||
"Query data",
|
||||
"Compatibility endpoints"
|
||||
"Query data"
|
||||
],
|
||||
"compatVersion": "v1",
|
||||
"externalDocs": {
|
||||
|
|
@ -516,8 +438,7 @@
|
|||
"path": "/query",
|
||||
"summary": "Execute InfluxQL query (v1-compatible)",
|
||||
"tags": [
|
||||
"Query data",
|
||||
"Compatibility endpoints"
|
||||
"Query data"
|
||||
],
|
||||
"compatVersion": "v1",
|
||||
"externalDocs": {
|
||||
|
|
@ -527,8 +448,11 @@
|
|||
}
|
||||
],
|
||||
"tagDescription": "Query data using SQL or InfluxQL",
|
||||
"source": "static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-query-data.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-query-data.yaml"
|
||||
"related": [
|
||||
"/influxdb3/enterprise/query-data/execute-queries/influxdb-v1-api/"
|
||||
],
|
||||
"source": "static/openapi/influxdb3-enterprise/tags/tags/ref-query-data.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-enterprise/tags/tags/ref-query-data.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -537,14 +461,14 @@
|
|||
"name": "Quick start",
|
||||
"describes": [],
|
||||
"title": "Quick start",
|
||||
"description": "1. [Create an admin token](#section/Authentication) to authorize API requests.\n\n ```bash\n curl -X POST \"http://localhost:8181/api/v3/configure/token/admin\"\n ```\n2. [Check the status](#section/Server-information) of the InfluxDB server.\n\n ```bash\n curl \"http://localhost:8181/health\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\"\n ```\n\n3. [Write data](#operation/PostWriteLP) to InfluxDB.\n\n ```bash\n curl \"http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto\"\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-raw \"home,room=Kitchen temp=72.0\n home,room=Living\\ room temp=71.5\"\n ```\n\n If all data is written, the response is `204 No Content`.\n\n4. [Query data](#operation/GetExecuteQuerySQL) from InfluxDB.\n\n ```bash\n curl -G \"http://localhost:8181/api/v3/query_sql\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-urlencode \"db=sensors\" \\\n --data-urlencode \"q=SELECT * FROM home WHERE room='Living room'\" \\\n --data-urlencode \"format=jsonl\"\n ```\n \n Output:\n\n ```jsonl\n {\"room\":\"Living room\",\"temp\":71.5,\"time\":\"2025-02-25T20:19:34.984098\"}\n ```\n \nFor more information about using InfluxDB 3 Enterprise, see the [Get started](/influxdb3/enterprise/get-started/) guide.\n",
|
||||
"description": "1. [Create an admin token](#section/Authentication) to authorize API requests.\n ```bash\n curl -X POST \"http://localhost:8181/api/v3/configure/token/admin\"\n ```\n2. [Check the status](#section/Server-information) of the InfluxDB server.\n ```bash\n curl \"http://localhost:8181/health\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\"\n ```\n3. [Write data](#operation/PostWriteLP) to InfluxDB.\n ```bash\n curl \"http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto\"\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-raw \"home,room=Kitchen temp=72.0\n home,room=Living\\ room temp=71.5\"\n ```\n If all data is written, the response is `204 No Content`.\n4. [Query data](#operation/GetExecuteQuerySQL) from InfluxDB.\n ```bash\n curl -G \"http://localhost:8181/api/v3/query_sql\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-urlencode \"db=sensors\" \\\n --data-urlencode \"q=SELECT * FROM home WHERE room='Living room'\" \\\n --data-urlencode \"format=jsonl\"\n ```\n \n Output:\n ```jsonl\n {\"room\":\"Living room\",\"temp\":71.5,\"time\":\"2025-02-25T20:19:34.984098\"}\n ```\n \nFor more information about using InfluxDB 3 Enterprise, see the [Get started](/influxdb3/enterprise/get-started/) guide.\n",
|
||||
"tag": "Quick start",
|
||||
"isConceptual": true,
|
||||
"menuGroup": "Concepts",
|
||||
"operations": [],
|
||||
"tagDescription": "1. [Create an admin token](#section/Authentication) to authorize API requests.\n\n ```bash\n curl -X POST \"http://localhost:8181/api/v3/configure/token/admin\"\n ```\n2. [Check the status](#section/Server-information) of the InfluxDB server.\n\n ```bash\n curl \"http://localhost:8181/health\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\"\n ```\n\n3. [Write data](#operation/PostWriteLP) to InfluxDB.\n\n ```bash\n curl \"http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto\"\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-raw \"home,room=Kitchen temp=72.0\n home,room=Living\\ room temp=71.5\"\n ```\n\n If all data is written, the response is `204 No Content`.\n\n4. [Query data](#operation/GetExecuteQuerySQL) from InfluxDB.\n\n ```bash\n curl -G \"http://localhost:8181/api/v3/query_sql\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-urlencode \"db=sensors\" \\\n --data-urlencode \"q=SELECT * FROM home WHERE room='Living room'\" \\\n --data-urlencode \"format=jsonl\"\n ```\n \n Output:\n\n ```jsonl\n {\"room\":\"Living room\",\"temp\":71.5,\"time\":\"2025-02-25T20:19:34.984098\"}\n ```\n \nFor more information about using InfluxDB 3 Enterprise, see the [Get started](/influxdb3/enterprise/get-started/) guide.\n",
|
||||
"source": "static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-quick-start.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-quick-start.yaml"
|
||||
"tagDescription": "1. [Create an admin token](#section/Authentication) to authorize API requests.\n ```bash\n curl -X POST \"http://localhost:8181/api/v3/configure/token/admin\"\n ```\n2. [Check the status](#section/Server-information) of the InfluxDB server.\n ```bash\n curl \"http://localhost:8181/health\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\"\n ```\n3. [Write data](#operation/PostWriteLP) to InfluxDB.\n ```bash\n curl \"http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto\"\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-raw \"home,room=Kitchen temp=72.0\n home,room=Living\\ room temp=71.5\"\n ```\n If all data is written, the response is `204 No Content`.\n4. [Query data](#operation/GetExecuteQuerySQL) from InfluxDB.\n ```bash\n curl -G \"http://localhost:8181/api/v3/query_sql\" \\\n --header \"Authorization: Bearer ADMIN_TOKEN\" \\\n --data-urlencode \"db=sensors\" \\\n --data-urlencode \"q=SELECT * FROM home WHERE room='Living room'\" \\\n --data-urlencode \"format=jsonl\"\n ```\n \n Output:\n ```jsonl\n {\"room\":\"Living room\",\"temp\":71.5,\"time\":\"2025-02-25T20:19:34.984098\"}\n ```\n \nFor more information about using InfluxDB 3 Enterprise, see the [Get started](/influxdb3/enterprise/get-started/) guide.\n",
|
||||
"source": "static/openapi/influxdb3-enterprise/tags/tags/ref-quick-start.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-enterprise/tags/tags/ref-quick-start.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -579,8 +503,7 @@
|
|||
"path": "/api/v1/health",
|
||||
"summary": "Health check (v1-compatible)",
|
||||
"tags": [
|
||||
"Server information",
|
||||
"Compatibility endpoints"
|
||||
"Server information"
|
||||
],
|
||||
"compatVersion": "v1"
|
||||
},
|
||||
|
|
@ -613,8 +536,8 @@
|
|||
}
|
||||
],
|
||||
"tagDescription": "Retrieve server metrics, status, and version information",
|
||||
"source": "static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-server-information.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-server-information.yaml"
|
||||
"source": "static/openapi/influxdb3-enterprise/tags/tags/ref-server-information.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-enterprise/tags/tags/ref-server-information.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -701,8 +624,8 @@
|
|||
}
|
||||
],
|
||||
"tagDescription": "Manage table schemas and data",
|
||||
"source": "static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-table.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-table.yaml"
|
||||
"source": "static/openapi/influxdb3-enterprise/tags/tags/ref-table.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-enterprise/tags/tags/ref-table.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -774,8 +697,8 @@
|
|||
}
|
||||
],
|
||||
"tagDescription": "Manage tokens for authentication and authorization",
|
||||
"source": "static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-token.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-token.yaml"
|
||||
"source": "static/openapi/influxdb3-enterprise/tags/tags/ref-token.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-enterprise/tags/tags/ref-token.yaml"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -788,7 +711,7 @@
|
|||
"/api/v3/write_lp"
|
||||
],
|
||||
"title": "Write data",
|
||||
"description": "Write data to InfluxDB 3 using line protocol format.\n\n#### Timestamp precision across write APIs\n\nInfluxDB 3 provides multiple write endpoints for compatibility with different InfluxDB versions.\nThe following table compares timestamp precision support across v1, v2, and v3 write APIs:\n\n| Precision | v1 (`/write`) | v2 (`/api/v2/write`) | v3 (`/api/v3/write_lp`) |\n|-----------|---------------|----------------------|-------------------------|\n| **Auto detection** | ❌ No | ❌ No | ✅ `auto` (default) |\n| **Seconds** | ✅ `s` | ✅ `s` | ✅ `second` |\n| **Milliseconds** | ✅ `ms` | ✅ `ms` | ✅ `millisecond` |\n| **Microseconds** | ✅ `u` or `µ` | ✅ `us` | ✅ `microsecond` |\n| **Nanoseconds** | ✅ `ns` | ✅ `ns` | ✅ `nanosecond` |\n| **Minutes** | ✅ `m` | ❌ No | ❌ No |\n| **Hours** | ✅ `h` | ❌ No | ❌ No |\n| **Default** | Nanosecond | Nanosecond | **Auto** (guessed) |\n\nAll timestamps are stored internally as nanoseconds.\n",
|
||||
"description": "Write data to InfluxDB 3 using line protocol format.\n#### Timestamp precision across write APIs\nInfluxDB 3 provides multiple write endpoints for compatibility with different InfluxDB versions.\nThe following table compares timestamp precision support across v1, v2, and v3 write APIs:\n| Precision | v1 (`/write`) | v2 (`/api/v2/write`) | v3 (`/api/v3/write_lp`) |\n|-----------|---------------|----------------------|-------------------------|\n| **Auto detection** | ❌ No | ❌ No | ✅ `auto` (default) |\n| **Seconds** | ✅ `s` | ✅ `s` | ✅ `second` |\n| **Milliseconds** | ✅ `ms` | ✅ `ms` | ✅ `millisecond` |\n| **Microseconds** | ✅ `u` or `µ` | ✅ `us` | ✅ `microsecond` |\n| **Nanoseconds** | ✅ `ns` | ✅ `ns` | ✅ `nanosecond` |\n| **Minutes** | ✅ `m` | ❌ No | ❌ No |\n| **Hours** | ✅ `h` | ❌ No | ❌ No |\n| **Default** | Nanosecond | Nanosecond | **Auto** (guessed) |\nAll timestamps are stored internally as nanoseconds.\n",
|
||||
"tag": "Write data",
|
||||
"isConceptual": false,
|
||||
"menuGroup": "Data Operations",
|
||||
|
|
@ -799,7 +722,6 @@
|
|||
"path": "/write",
|
||||
"summary": "Write line protocol (v1-compatible)",
|
||||
"tags": [
|
||||
"Compatibility endpoints",
|
||||
"Write data"
|
||||
],
|
||||
"compatVersion": "v1",
|
||||
|
|
@ -814,7 +736,6 @@
|
|||
"path": "/api/v2/write",
|
||||
"summary": "Write line protocol (v2-compatible)",
|
||||
"tags": [
|
||||
"Compatibility endpoints",
|
||||
"Write data"
|
||||
],
|
||||
"compatVersion": "v2",
|
||||
|
|
@ -833,9 +754,12 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"tagDescription": "Write data to InfluxDB 3 using line protocol format.\n\n#### Timestamp precision across write APIs\n\nInfluxDB 3 provides multiple write endpoints for compatibility with different InfluxDB versions.\nThe following table compares timestamp precision support across v1, v2, and v3 write APIs:\n\n| Precision | v1 (`/write`) | v2 (`/api/v2/write`) | v3 (`/api/v3/write_lp`) |\n|-----------|---------------|----------------------|-------------------------|\n| **Auto detection** | ❌ No | ❌ No | ✅ `auto` (default) |\n| **Seconds** | ✅ `s` | ✅ `s` | ✅ `second` |\n| **Milliseconds** | ✅ `ms` | ✅ `ms` | ✅ `millisecond` |\n| **Microseconds** | ✅ `u` or `µ` | ✅ `us` | ✅ `microsecond` |\n| **Nanoseconds** | ✅ `ns` | ✅ `ns` | ✅ `nanosecond` |\n| **Minutes** | ✅ `m` | ❌ No | ❌ No |\n| **Hours** | ✅ `h` | ❌ No | ❌ No |\n| **Default** | Nanosecond | Nanosecond | **Auto** (guessed) |\n\nAll timestamps are stored internally as nanoseconds.\n",
|
||||
"source": "static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-write-data.yaml",
|
||||
"staticFilePath": "/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-write-data.yaml"
|
||||
"tagDescription": "Write data to InfluxDB 3 using line protocol format.\n#### Timestamp precision across write APIs\nInfluxDB 3 provides multiple write endpoints for compatibility with different InfluxDB versions.\nThe following table compares timestamp precision support across v1, v2, and v3 write APIs:\n| Precision | v1 (`/write`) | v2 (`/api/v2/write`) | v3 (`/api/v3/write_lp`) |\n|-----------|---------------|----------------------|-------------------------|\n| **Auto detection** | ❌ No | ❌ No | ✅ `auto` (default) |\n| **Seconds** | ✅ `s` | ✅ `s` | ✅ `second` |\n| **Milliseconds** | ✅ `ms` | ✅ `ms` | ✅ `millisecond` |\n| **Microseconds** | ✅ `u` or `µ` | ✅ `us` | ✅ `microsecond` |\n| **Nanoseconds** | ✅ `ns` | ✅ `ns` | ✅ `nanosecond` |\n| **Minutes** | ✅ `m` | ❌ No | ❌ No |\n| **Hours** | ✅ `h` | ❌ No | ❌ No |\n| **Default** | Nanosecond | Nanosecond | **Auto** (guessed) |\nAll timestamps are stored internally as nanoseconds.\n",
|
||||
"related": [
|
||||
"/influxdb3/enterprise/write-data/http-api/compatibility-apis/"
|
||||
],
|
||||
"source": "static/openapi/influxdb3-enterprise/tags/tags/ref-write-data.yaml",
|
||||
"staticFilePath": "/openapi/influxdb3-enterprise/tags/tags/ref-write-data.yaml"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ articles:
|
|||
Depending on your workflow, use one of the following schemes to
|
||||
authenticate to the InfluxDB 3 API:
|
||||
|
||||
|
||||
| Authentication scheme | Works with |
|
||||
|
||||
|:----------------------|:-----------|
|
||||
|
|
@ -26,7 +25,6 @@ articles:
|
|||
|
||||
| Querystring authentication | v1 endpoints |
|
||||
|
||||
|
||||
See the **Security Schemes** section below for details on each
|
||||
authentication method.
|
||||
tag: Authentication
|
||||
|
|
@ -72,7 +70,6 @@ articles:
|
|||
Depending on your workflow, use one of the following schemes to
|
||||
authenticate to the InfluxDB 3 API:
|
||||
|
||||
|
||||
| Authentication scheme | Works with |
|
||||
|
||||
|:----------------------|:-----------|
|
||||
|
|
@ -85,12 +82,10 @@ articles:
|
|||
|
||||
| Querystring authentication | v1 endpoints |
|
||||
|
||||
|
||||
See the **Security Schemes** section below for details on each
|
||||
authentication method.
|
||||
source: >-
|
||||
static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-authentication.yaml
|
||||
staticFilePath: /openapi/influxdb-influxdb3_enterprise/tags/tags/ref-authentication.yaml
|
||||
source: static/openapi/influxdb3-enterprise/tags/tags/ref-authentication.yaml
|
||||
staticFilePath: /openapi/influxdb3-enterprise/tags/tags/ref-authentication.yaml
|
||||
- path: api/cache-data
|
||||
fields:
|
||||
name: Cache data
|
||||
|
|
@ -101,17 +96,14 @@ articles:
|
|||
description: >
|
||||
Manage the in-memory cache.
|
||||
|
||||
|
||||
#### Distinct Value Cache
|
||||
|
||||
|
||||
The Distinct Value Cache (DVC) lets you cache distinct
|
||||
|
||||
values of one or more columns in a table, improving the performance of
|
||||
|
||||
queries that return distinct tag and field values.
|
||||
|
||||
|
||||
The DVC is an in-memory cache that stores distinct values for specific
|
||||
columns
|
||||
|
||||
|
|
@ -126,10 +118,8 @@ articles:
|
|||
|
||||
have multiple DVCs.
|
||||
|
||||
|
||||
#### Last value cache
|
||||
|
||||
|
||||
The Last Value Cache (LVC) lets you cache the most recent
|
||||
|
||||
values for specific fields in a table, improving the performance of
|
||||
|
|
@ -140,7 +130,6 @@ articles:
|
|||
|
||||
of a field.
|
||||
|
||||
|
||||
The LVC is an in-memory cache that stores the last N number of values
|
||||
for
|
||||
|
||||
|
|
@ -153,10 +142,8 @@ articles:
|
|||
|
||||
An LVC is associated with a table, which can have multiple LVCs.
|
||||
|
||||
|
||||
#### Related guides
|
||||
|
||||
|
||||
- [Manage the Distinct Value
|
||||
Cache](/influxdb3/enterprise/admin/distinct-value-cache/)
|
||||
|
||||
|
|
@ -197,17 +184,14 @@ articles:
|
|||
tagDescription: >
|
||||
Manage the in-memory cache.
|
||||
|
||||
|
||||
#### Distinct Value Cache
|
||||
|
||||
|
||||
The Distinct Value Cache (DVC) lets you cache distinct
|
||||
|
||||
values of one or more columns in a table, improving the performance of
|
||||
|
||||
queries that return distinct tag and field values.
|
||||
|
||||
|
||||
The DVC is an in-memory cache that stores distinct values for specific
|
||||
columns
|
||||
|
||||
|
|
@ -222,10 +206,8 @@ articles:
|
|||
|
||||
have multiple DVCs.
|
||||
|
||||
|
||||
#### Last value cache
|
||||
|
||||
|
||||
The Last Value Cache (LVC) lets you cache the most recent
|
||||
|
||||
values for specific fields in a table, improving the performance of
|
||||
|
|
@ -236,7 +218,6 @@ articles:
|
|||
|
||||
of a field.
|
||||
|
||||
|
||||
The LVC is an in-memory cache that stores the last N number of values
|
||||
for
|
||||
|
||||
|
|
@ -249,185 +230,15 @@ articles:
|
|||
|
||||
An LVC is associated with a table, which can have multiple LVCs.
|
||||
|
||||
|
||||
#### Related guides
|
||||
|
||||
|
||||
- [Manage the Distinct Value
|
||||
Cache](/influxdb3/enterprise/admin/distinct-value-cache/)
|
||||
|
||||
- [Manage the Last Value
|
||||
Cache](/influxdb3/enterprise/admin/last-value-cache/)
|
||||
source: >-
|
||||
static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-cache-data.yaml
|
||||
staticFilePath: /openapi/influxdb-influxdb3_enterprise/tags/tags/ref-cache-data.yaml
|
||||
- path: api/compatibility-endpoints
|
||||
fields:
|
||||
name: Compatibility endpoints
|
||||
describes:
|
||||
- /write
|
||||
- /api/v2/write
|
||||
- /query
|
||||
- /api/v1/health
|
||||
title: Compatibility endpoints
|
||||
description: >
|
||||
InfluxDB 3 provides compatibility endpoints for InfluxDB 1.x and
|
||||
InfluxDB 2.x workloads and clients.
|
||||
|
||||
|
||||
### Write data using v1- or v2-compatible endpoints
|
||||
|
||||
|
||||
- [`/api/v2/write` endpoint](#operation/PostV2Write)
|
||||
for InfluxDB v2 clients and when you bring existing InfluxDB v2 write workloads to InfluxDB 3.
|
||||
- [`/write` endpoint](#operation/PostV1Write) for InfluxDB v1 clients
|
||||
and when you bring existing InfluxDB v1 write workloads to InfluxDB 3.
|
||||
|
||||
|
||||
For new workloads, use the [`/api/v3/write_lp`
|
||||
endpoint](#operation/PostWriteLP).
|
||||
|
||||
|
||||
All endpoints accept the same line protocol format.
|
||||
|
||||
|
||||
### Query data
|
||||
|
||||
|
||||
Use the HTTP [`/query`](#operation/GetV1ExecuteQuery) endpoint for
|
||||
InfluxDB v1 clients and v1 query workloads using InfluxQL.
|
||||
|
||||
|
||||
For new workloads, use one of the following:
|
||||
|
||||
|
||||
- HTTP [`/api/v3/query_sql` endpoint](#operation/GetExecuteQuerySQL) for
|
||||
new query workloads using SQL.
|
||||
|
||||
- HTTP [`/api/v3/query_influxql`
|
||||
endpoint](#operation/GetExecuteInfluxQLQuery) for new query workloads
|
||||
using InfluxQL.
|
||||
|
||||
- Flight SQL and InfluxDB 3 _Flight+gRPC_ APIs for querying with SQL or
|
||||
InfluxQL. For more information about using Flight APIs, see [InfluxDB 3
|
||||
client
|
||||
libraries](https://github.com/InfluxCommunity?q=influxdb3&type=public&language=&sort=).
|
||||
|
||||
|
||||
### Server information
|
||||
|
||||
|
||||
Server information endpoints such as `/health` and `metrics` are
|
||||
compatible with InfluxDB 1.x and InfluxDB 2.x clients.
|
||||
tag: Compatibility endpoints
|
||||
isConceptual: false
|
||||
menuGroup: Compatibility
|
||||
operations:
|
||||
- operationId: PostV1Write
|
||||
method: POST
|
||||
path: /write
|
||||
summary: Write line protocol (v1-compatible)
|
||||
tags:
|
||||
- Compatibility endpoints
|
||||
- Write data
|
||||
compatVersion: v1
|
||||
externalDocs:
|
||||
description: Use compatibility APIs to write data
|
||||
url: /influxdb3/enterprise/write-data/http-api/compatibility-apis/
|
||||
- operationId: PostV2Write
|
||||
method: POST
|
||||
path: /api/v2/write
|
||||
summary: Write line protocol (v2-compatible)
|
||||
tags:
|
||||
- Compatibility endpoints
|
||||
- Write data
|
||||
compatVersion: v2
|
||||
externalDocs:
|
||||
description: Use compatibility APIs to write data
|
||||
url: /influxdb3/enterprise/write-data/http-api/compatibility-apis/
|
||||
- operationId: GetV1ExecuteQuery
|
||||
method: GET
|
||||
path: /query
|
||||
summary: Execute InfluxQL query (v1-compatible)
|
||||
tags:
|
||||
- Query data
|
||||
- Compatibility endpoints
|
||||
compatVersion: v1
|
||||
externalDocs:
|
||||
description: Use the InfluxDB v1 HTTP query API and InfluxQL to query data
|
||||
url: /influxdb3/enterprise/query-data/execute-queries/influxdb-v1-api/
|
||||
- operationId: PostExecuteV1Query
|
||||
method: POST
|
||||
path: /query
|
||||
summary: Execute InfluxQL query (v1-compatible)
|
||||
tags:
|
||||
- Query data
|
||||
- Compatibility endpoints
|
||||
compatVersion: v1
|
||||
externalDocs:
|
||||
description: Use the InfluxDB v1 HTTP query API and InfluxQL to query data
|
||||
url: /influxdb3/enterprise/query-data/execute-queries/influxdb-v1-api/
|
||||
- operationId: GetHealthV1
|
||||
method: GET
|
||||
path: /api/v1/health
|
||||
summary: Health check (v1-compatible)
|
||||
tags:
|
||||
- Server information
|
||||
- Compatibility endpoints
|
||||
compatVersion: v1
|
||||
tagDescription: >
|
||||
InfluxDB 3 provides compatibility endpoints for InfluxDB 1.x and
|
||||
InfluxDB 2.x workloads and clients.
|
||||
|
||||
|
||||
### Write data using v1- or v2-compatible endpoints
|
||||
|
||||
|
||||
- [`/api/v2/write` endpoint](#operation/PostV2Write)
|
||||
for InfluxDB v2 clients and when you bring existing InfluxDB v2 write workloads to InfluxDB 3.
|
||||
- [`/write` endpoint](#operation/PostV1Write) for InfluxDB v1 clients
|
||||
and when you bring existing InfluxDB v1 write workloads to InfluxDB 3.
|
||||
|
||||
|
||||
For new workloads, use the [`/api/v3/write_lp`
|
||||
endpoint](#operation/PostWriteLP).
|
||||
|
||||
|
||||
All endpoints accept the same line protocol format.
|
||||
|
||||
|
||||
### Query data
|
||||
|
||||
|
||||
Use the HTTP [`/query`](#operation/GetV1ExecuteQuery) endpoint for
|
||||
InfluxDB v1 clients and v1 query workloads using InfluxQL.
|
||||
|
||||
|
||||
For new workloads, use one of the following:
|
||||
|
||||
|
||||
- HTTP [`/api/v3/query_sql` endpoint](#operation/GetExecuteQuerySQL) for
|
||||
new query workloads using SQL.
|
||||
|
||||
- HTTP [`/api/v3/query_influxql`
|
||||
endpoint](#operation/GetExecuteInfluxQLQuery) for new query workloads
|
||||
using InfluxQL.
|
||||
|
||||
- Flight SQL and InfluxDB 3 _Flight+gRPC_ APIs for querying with SQL or
|
||||
InfluxQL. For more information about using Flight APIs, see [InfluxDB 3
|
||||
client
|
||||
libraries](https://github.com/InfluxCommunity?q=influxdb3&type=public&language=&sort=).
|
||||
|
||||
|
||||
### Server information
|
||||
|
||||
|
||||
Server information endpoints such as `/health` and `metrics` are
|
||||
compatible with InfluxDB 1.x and InfluxDB 2.x clients.
|
||||
source: >-
|
||||
static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-compatibility-endpoints.yaml
|
||||
staticFilePath: >-
|
||||
/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-compatibility-endpoints.yaml
|
||||
source: static/openapi/influxdb3-enterprise/tags/tags/ref-cache-data.yaml
|
||||
staticFilePath: /openapi/influxdb3-enterprise/tags/tags/ref-cache-data.yaml
|
||||
- path: api/database
|
||||
fields:
|
||||
name: Database
|
||||
|
|
@ -472,8 +283,8 @@ articles:
|
|||
tags:
|
||||
- Database
|
||||
tagDescription: Manage databases
|
||||
source: static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-database.yaml
|
||||
staticFilePath: /openapi/influxdb-influxdb3_enterprise/tags/tags/ref-database.yaml
|
||||
source: static/openapi/influxdb3-enterprise/tags/tags/ref-database.yaml
|
||||
staticFilePath: /openapi/influxdb3-enterprise/tags/tags/ref-database.yaml
|
||||
- path: api/headers-and-parameters
|
||||
fields:
|
||||
name: Headers and parameters
|
||||
|
|
@ -483,10 +294,8 @@ articles:
|
|||
Most InfluxDB API endpoints require parameters in the request--for
|
||||
example, specifying the database to use.
|
||||
|
||||
|
||||
### Common parameters
|
||||
|
||||
|
||||
The following table shows common parameters used by many InfluxDB API
|
||||
endpoints.
|
||||
|
||||
|
|
@ -495,7 +304,6 @@ articles:
|
|||
|
||||
request body that perform functions specific to those endpoints.
|
||||
|
||||
|
||||
| Query parameter | Value type |
|
||||
Description |
|
||||
|
||||
|
|
@ -504,7 +312,6 @@ articles:
|
|||
|
||||
| `db` | string | The database name |
|
||||
|
||||
|
||||
InfluxDB HTTP API endpoints use standard HTTP request and response
|
||||
headers.
|
||||
|
||||
|
|
@ -517,7 +324,6 @@ articles:
|
|||
the write endpoints accept the `Content-Encoding` header to indicate
|
||||
that line protocol is compressed in the request body.
|
||||
|
||||
|
||||
| Header | Value type |
|
||||
Description |
|
||||
|
||||
|
|
@ -543,10 +349,8 @@ articles:
|
|||
Most InfluxDB API endpoints require parameters in the request--for
|
||||
example, specifying the database to use.
|
||||
|
||||
|
||||
### Common parameters
|
||||
|
||||
|
||||
The following table shows common parameters used by many InfluxDB API
|
||||
endpoints.
|
||||
|
||||
|
|
@ -555,7 +359,6 @@ articles:
|
|||
|
||||
request body that perform functions specific to those endpoints.
|
||||
|
||||
|
||||
| Query parameter | Value type |
|
||||
Description |
|
||||
|
||||
|
|
@ -564,7 +367,6 @@ articles:
|
|||
|
||||
| `db` | string | The database name |
|
||||
|
||||
|
||||
InfluxDB HTTP API endpoints use standard HTTP request and response
|
||||
headers.
|
||||
|
||||
|
|
@ -577,7 +379,6 @@ articles:
|
|||
the write endpoints accept the `Content-Encoding` header to indicate
|
||||
that line protocol is compressed in the request body.
|
||||
|
||||
|
||||
| Header | Value type |
|
||||
Description |
|
||||
|
||||
|
|
@ -596,9 +397,77 @@ articles:
|
|||
| `Content-Type` | string | The format of the
|
||||
data in the request body. |
|
||||
source: >-
|
||||
static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-headers-and-parameters.yaml
|
||||
static/openapi/influxdb3-enterprise/tags/tags/ref-headers-and-parameters.yaml
|
||||
staticFilePath: /openapi/influxdb3-enterprise/tags/tags/ref-headers-and-parameters.yaml
|
||||
- path: api/migrate-from-influxdb-v1-or-v2
|
||||
fields:
|
||||
name: Migrate from InfluxDB v1 or v2
|
||||
describes: []
|
||||
title: Migrate from InfluxDB v1 or v2
|
||||
description: >
|
||||
Migrate your existing InfluxDB v1 or v2 workloads to InfluxDB 3.
|
||||
|
||||
InfluxDB 3 provides compatibility endpoints that work with InfluxDB 1.x
|
||||
and 2.x client libraries and tools.
|
||||
|
||||
Operations marked with <span class="api-compat-badge
|
||||
api-compat-badge--v1">v1</span> or <span class="api-compat-badge
|
||||
api-compat-badge--v2">v2</span> badges are compatible with the
|
||||
respective InfluxDB version.
|
||||
|
||||
### Migration guides
|
||||
|
||||
- [Migrate from InfluxDB
|
||||
v1](/influxdb3/enterprise/guides/migrate/influxdb-1x/) - For users
|
||||
migrating from InfluxDB 1.x
|
||||
|
||||
- [Migrate from InfluxDB
|
||||
v2](/influxdb3/enterprise/guides/migrate/influxdb-2x/) - For users
|
||||
migrating from InfluxDB 2.x or Cloud
|
||||
|
||||
- [Use compatibility APIs to write
|
||||
data](/influxdb3/enterprise/write-data/http-api/compatibility-apis/) -
|
||||
v1 and v2 write endpoints
|
||||
|
||||
- [Use the v1 HTTP query
|
||||
API](/influxdb3/enterprise/query-data/execute-queries/influxdb-v1-api/)
|
||||
- InfluxQL queries via HTTP
|
||||
tag: Migrate from InfluxDB v1 or v2
|
||||
isConceptual: true
|
||||
menuGroup: Other
|
||||
operations: []
|
||||
tagDescription: >
|
||||
Migrate your existing InfluxDB v1 or v2 workloads to InfluxDB 3.
|
||||
|
||||
InfluxDB 3 provides compatibility endpoints that work with InfluxDB 1.x
|
||||
and 2.x client libraries and tools.
|
||||
|
||||
Operations marked with <span class="api-compat-badge
|
||||
api-compat-badge--v1">v1</span> or <span class="api-compat-badge
|
||||
api-compat-badge--v2">v2</span> badges are compatible with the
|
||||
respective InfluxDB version.
|
||||
|
||||
### Migration guides
|
||||
|
||||
- [Migrate from InfluxDB
|
||||
v1](/influxdb3/enterprise/guides/migrate/influxdb-1x/) - For users
|
||||
migrating from InfluxDB 1.x
|
||||
|
||||
- [Migrate from InfluxDB
|
||||
v2](/influxdb3/enterprise/guides/migrate/influxdb-2x/) - For users
|
||||
migrating from InfluxDB 2.x or Cloud
|
||||
|
||||
- [Use compatibility APIs to write
|
||||
data](/influxdb3/enterprise/write-data/http-api/compatibility-apis/) -
|
||||
v1 and v2 write endpoints
|
||||
|
||||
- [Use the v1 HTTP query
|
||||
API](/influxdb3/enterprise/query-data/execute-queries/influxdb-v1-api/)
|
||||
- InfluxQL queries via HTTP
|
||||
source: >-
|
||||
static/openapi/influxdb3-enterprise/tags/tags/ref-migrate-from-influxdb-v1-or-v2.yaml
|
||||
staticFilePath: >-
|
||||
/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-headers-and-parameters.yaml
|
||||
/openapi/influxdb3-enterprise/tags/tags/ref-migrate-from-influxdb-v1-or-v2.yaml
|
||||
- path: api/processing-engine
|
||||
fields:
|
||||
name: Processing engine
|
||||
|
|
@ -618,7 +487,6 @@ articles:
|
|||
Manage Processing engine triggers, test plugins, and send requests to
|
||||
trigger On Request plugins.
|
||||
|
||||
|
||||
InfluxDB 3 Enterprise provides the InfluxDB 3 processing engine, an
|
||||
embedded Python VM that can dynamically load and trigger Python plugins
|
||||
in response to events in your database.
|
||||
|
|
@ -626,7 +494,6 @@ articles:
|
|||
Use Processing engine plugins and triggers to run code and perform tasks
|
||||
for different database events.
|
||||
|
||||
|
||||
To get started with the processing engine, see the [Processing engine
|
||||
and Python plugins](/influxdb3/enterprise/processing-engine/) guide.
|
||||
tag: Processing engine
|
||||
|
|
@ -709,7 +576,6 @@ articles:
|
|||
Manage Processing engine triggers, test plugins, and send requests to
|
||||
trigger On Request plugins.
|
||||
|
||||
|
||||
InfluxDB 3 Enterprise provides the InfluxDB 3 processing engine, an
|
||||
embedded Python VM that can dynamically load and trigger Python plugins
|
||||
in response to events in your database.
|
||||
|
|
@ -717,13 +583,10 @@ articles:
|
|||
Use Processing engine plugins and triggers to run code and perform tasks
|
||||
for different database events.
|
||||
|
||||
|
||||
To get started with the processing engine, see the [Processing engine
|
||||
and Python plugins](/influxdb3/enterprise/processing-engine/) guide.
|
||||
source: >-
|
||||
static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-processing-engine.yaml
|
||||
staticFilePath: >-
|
||||
/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-processing-engine.yaml
|
||||
source: static/openapi/influxdb3-enterprise/tags/tags/ref-processing-engine.yaml
|
||||
staticFilePath: /openapi/influxdb3-enterprise/tags/tags/ref-processing-engine.yaml
|
||||
- path: api/query-data
|
||||
fields:
|
||||
name: Query data
|
||||
|
|
@ -767,7 +630,6 @@ articles:
|
|||
summary: Execute InfluxQL query (v1-compatible)
|
||||
tags:
|
||||
- Query data
|
||||
- Compatibility endpoints
|
||||
compatVersion: v1
|
||||
externalDocs:
|
||||
description: Use the InfluxDB v1 HTTP query API and InfluxQL to query data
|
||||
|
|
@ -778,15 +640,15 @@ articles:
|
|||
summary: Execute InfluxQL query (v1-compatible)
|
||||
tags:
|
||||
- Query data
|
||||
- Compatibility endpoints
|
||||
compatVersion: v1
|
||||
externalDocs:
|
||||
description: Use the InfluxDB v1 HTTP query API and InfluxQL to query data
|
||||
url: /influxdb3/enterprise/query-data/execute-queries/influxdb-v1-api/
|
||||
tagDescription: Query data using SQL or InfluxQL
|
||||
source: >-
|
||||
static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-query-data.yaml
|
||||
staticFilePath: /openapi/influxdb-influxdb3_enterprise/tags/tags/ref-query-data.yaml
|
||||
related:
|
||||
- /influxdb3/enterprise/query-data/execute-queries/influxdb-v1-api/
|
||||
source: static/openapi/influxdb3-enterprise/tags/tags/ref-query-data.yaml
|
||||
staticFilePath: /openapi/influxdb3-enterprise/tags/tags/ref-query-data.yaml
|
||||
- path: api/quick-start
|
||||
fields:
|
||||
name: Quick start
|
||||
|
|
@ -795,31 +657,24 @@ articles:
|
|||
description: >
|
||||
1. [Create an admin token](#section/Authentication) to authorize API
|
||||
requests.
|
||||
|
||||
```bash
|
||||
curl -X POST "http://localhost:8181/api/v3/configure/token/admin"
|
||||
```
|
||||
2. [Check the status](#section/Server-information) of the InfluxDB
|
||||
server.
|
||||
|
||||
```bash
|
||||
curl "http://localhost:8181/health" \
|
||||
--header "Authorization: Bearer ADMIN_TOKEN"
|
||||
```
|
||||
|
||||
3. [Write data](#operation/PostWriteLP) to InfluxDB.
|
||||
|
||||
```bash
|
||||
curl "http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto"
|
||||
--header "Authorization: Bearer ADMIN_TOKEN" \
|
||||
--data-raw "home,room=Kitchen temp=72.0
|
||||
home,room=Living\ room temp=71.5"
|
||||
```
|
||||
|
||||
If all data is written, the response is `204 No Content`.
|
||||
|
||||
4. [Query data](#operation/GetExecuteQuerySQL) from InfluxDB.
|
||||
|
||||
```bash
|
||||
curl -G "http://localhost:8181/api/v3/query_sql" \
|
||||
--header "Authorization: Bearer ADMIN_TOKEN" \
|
||||
|
|
@ -829,7 +684,6 @@ articles:
|
|||
```
|
||||
|
||||
Output:
|
||||
|
||||
```jsonl
|
||||
{"room":"Living room","temp":71.5,"time":"2025-02-25T20:19:34.984098"}
|
||||
```
|
||||
|
|
@ -843,31 +697,24 @@ articles:
|
|||
tagDescription: >
|
||||
1. [Create an admin token](#section/Authentication) to authorize API
|
||||
requests.
|
||||
|
||||
```bash
|
||||
curl -X POST "http://localhost:8181/api/v3/configure/token/admin"
|
||||
```
|
||||
2. [Check the status](#section/Server-information) of the InfluxDB
|
||||
server.
|
||||
|
||||
```bash
|
||||
curl "http://localhost:8181/health" \
|
||||
--header "Authorization: Bearer ADMIN_TOKEN"
|
||||
```
|
||||
|
||||
3. [Write data](#operation/PostWriteLP) to InfluxDB.
|
||||
|
||||
```bash
|
||||
curl "http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto"
|
||||
--header "Authorization: Bearer ADMIN_TOKEN" \
|
||||
--data-raw "home,room=Kitchen temp=72.0
|
||||
home,room=Living\ room temp=71.5"
|
||||
```
|
||||
|
||||
If all data is written, the response is `204 No Content`.
|
||||
|
||||
4. [Query data](#operation/GetExecuteQuerySQL) from InfluxDB.
|
||||
|
||||
```bash
|
||||
curl -G "http://localhost:8181/api/v3/query_sql" \
|
||||
--header "Authorization: Bearer ADMIN_TOKEN" \
|
||||
|
|
@ -877,16 +724,14 @@ articles:
|
|||
```
|
||||
|
||||
Output:
|
||||
|
||||
```jsonl
|
||||
{"room":"Living room","temp":71.5,"time":"2025-02-25T20:19:34.984098"}
|
||||
```
|
||||
|
||||
For more information about using InfluxDB 3 Enterprise, see the [Get
|
||||
started](/influxdb3/enterprise/get-started/) guide.
|
||||
source: >-
|
||||
static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-quick-start.yaml
|
||||
staticFilePath: /openapi/influxdb-influxdb3_enterprise/tags/tags/ref-quick-start.yaml
|
||||
source: static/openapi/influxdb3-enterprise/tags/tags/ref-quick-start.yaml
|
||||
staticFilePath: /openapi/influxdb3-enterprise/tags/tags/ref-quick-start.yaml
|
||||
- path: api/server-information
|
||||
fields:
|
||||
name: Server information
|
||||
|
|
@ -914,7 +759,6 @@ articles:
|
|||
summary: Health check (v1-compatible)
|
||||
tags:
|
||||
- Server information
|
||||
- Compatibility endpoints
|
||||
compatVersion: v1
|
||||
- operationId: GetPing
|
||||
method: GET
|
||||
|
|
@ -936,9 +780,8 @@ articles:
|
|||
- Server information
|
||||
tagDescription: Retrieve server metrics, status, and version information
|
||||
source: >-
|
||||
static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-server-information.yaml
|
||||
staticFilePath: >-
|
||||
/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-server-information.yaml
|
||||
static/openapi/influxdb3-enterprise/tags/tags/ref-server-information.yaml
|
||||
staticFilePath: /openapi/influxdb3-enterprise/tags/tags/ref-server-information.yaml
|
||||
- path: api/table
|
||||
fields:
|
||||
name: Table
|
||||
|
|
@ -999,8 +842,8 @@ articles:
|
|||
- Cache data
|
||||
- Table
|
||||
tagDescription: Manage table schemas and data
|
||||
source: static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-table.yaml
|
||||
staticFilePath: /openapi/influxdb-influxdb3_enterprise/tags/tags/ref-table.yaml
|
||||
source: static/openapi/influxdb3-enterprise/tags/tags/ref-table.yaml
|
||||
staticFilePath: /openapi/influxdb3-enterprise/tags/tags/ref-table.yaml
|
||||
- path: api/token
|
||||
fields:
|
||||
name: Token
|
||||
|
|
@ -1052,8 +895,8 @@ articles:
|
|||
- Authentication
|
||||
- Token
|
||||
tagDescription: Manage tokens for authentication and authorization
|
||||
source: static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-token.yaml
|
||||
staticFilePath: /openapi/influxdb-influxdb3_enterprise/tags/tags/ref-token.yaml
|
||||
source: static/openapi/influxdb3-enterprise/tags/tags/ref-token.yaml
|
||||
staticFilePath: /openapi/influxdb3-enterprise/tags/tags/ref-token.yaml
|
||||
- path: api/write-data
|
||||
fields:
|
||||
name: Write data
|
||||
|
|
@ -1065,17 +908,14 @@ articles:
|
|||
description: >
|
||||
Write data to InfluxDB 3 using line protocol format.
|
||||
|
||||
|
||||
#### Timestamp precision across write APIs
|
||||
|
||||
|
||||
InfluxDB 3 provides multiple write endpoints for compatibility with
|
||||
different InfluxDB versions.
|
||||
|
||||
The following table compares timestamp precision support across v1, v2,
|
||||
and v3 write APIs:
|
||||
|
||||
|
||||
| Precision | v1 (`/write`) | v2 (`/api/v2/write`) | v3
|
||||
(`/api/v3/write_lp`) |
|
||||
|
||||
|
|
@ -1097,7 +937,6 @@ articles:
|
|||
|
||||
| **Default** | Nanosecond | Nanosecond | **Auto** (guessed) |
|
||||
|
||||
|
||||
All timestamps are stored internally as nanoseconds.
|
||||
tag: Write data
|
||||
isConceptual: false
|
||||
|
|
@ -1108,7 +947,6 @@ articles:
|
|||
path: /write
|
||||
summary: Write line protocol (v1-compatible)
|
||||
tags:
|
||||
- Compatibility endpoints
|
||||
- Write data
|
||||
compatVersion: v1
|
||||
externalDocs:
|
||||
|
|
@ -1119,7 +957,6 @@ articles:
|
|||
path: /api/v2/write
|
||||
summary: Write line protocol (v2-compatible)
|
||||
tags:
|
||||
- Compatibility endpoints
|
||||
- Write data
|
||||
compatVersion: v2
|
||||
externalDocs:
|
||||
|
|
@ -1134,17 +971,14 @@ articles:
|
|||
tagDescription: >
|
||||
Write data to InfluxDB 3 using line protocol format.
|
||||
|
||||
|
||||
#### Timestamp precision across write APIs
|
||||
|
||||
|
||||
InfluxDB 3 provides multiple write endpoints for compatibility with
|
||||
different InfluxDB versions.
|
||||
|
||||
The following table compares timestamp precision support across v1, v2,
|
||||
and v3 write APIs:
|
||||
|
||||
|
||||
| Precision | v1 (`/write`) | v2 (`/api/v2/write`) | v3
|
||||
(`/api/v3/write_lp`) |
|
||||
|
||||
|
|
@ -1166,8 +1000,8 @@ articles:
|
|||
|
||||
| **Default** | Nanosecond | Nanosecond | **Auto** (guessed) |
|
||||
|
||||
|
||||
All timestamps are stored internally as nanoseconds.
|
||||
source: >-
|
||||
static/openapi/influxdb-influxdb3_enterprise/tags/tags/ref-write-data.yaml
|
||||
staticFilePath: /openapi/influxdb-influxdb3_enterprise/tags/tags/ref-write-data.yaml
|
||||
related:
|
||||
- /influxdb3/enterprise/write-data/http-api/compatibility-apis/
|
||||
source: static/openapi/influxdb3-enterprise/tags/tags/ref-write-data.yaml
|
||||
staticFilePath: /openapi/influxdb3-enterprise/tags/tags/ref-write-data.yaml
|
||||
|
|
|
|||
|
|
@ -0,0 +1,73 @@
|
|||
{{/*
|
||||
API Operation Page Layout
|
||||
|
||||
Standalone page for a single API operation, rendered using RapiDoc Mini.
|
||||
Uses existing tag-level OpenAPI specs with client-side filtering via match-paths.
|
||||
|
||||
Required frontmatter:
|
||||
- title: Operation display name (e.g., "Write line protocol (v1-compatible)")
|
||||
- description: SEO description
|
||||
- specFile: Path to tag-level OpenAPI spec
|
||||
- matchPaths: RapiDoc Mini filter (e.g., "post /write")
|
||||
- operationId: The operationId from the spec
|
||||
- method: HTTP method (GET, POST, PUT, DELETE, etc.)
|
||||
- apiPath: The API path (e.g., "/write", "/api/v2/write")
|
||||
|
||||
Optional frontmatter:
|
||||
- compatVersion: v1 or v2 for compatibility badges
|
||||
- tag: Associated tag name
|
||||
- related: Array of related documentation paths
|
||||
*/}}
|
||||
|
||||
{{ partial "header.html" . }}
|
||||
{{ partial "topnav.html" . }}
|
||||
|
||||
<div class="page-wrapper">
|
||||
{{/* Left: Existing Hugo sidebar */}}
|
||||
{{ partial "sidebar.html" . }}
|
||||
|
||||
{{/* Center + Right: Content and TOC */}}
|
||||
<div class="content-wrapper api-content">
|
||||
<div class="api-main">
|
||||
<article class="article article--content api-reference api-operation-page" role="main">
|
||||
{{/* Visually hidden h1 for SEO/accessibility - RapiDoc shows visible title */}}
|
||||
<h1 class="sr-only">{{ .Title }}</h1>
|
||||
|
||||
{{/* Download OpenAPI spec button - positioned above RapiDoc */}}
|
||||
{{ with .Params.specFile }}
|
||||
<div class="api-spec-actions">
|
||||
<a href="{{ . }}" class="btn api-spec-download" download>
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true">
|
||||
<path d="M8 12L3 7h3V2h4v5h3L8 12z"/>
|
||||
<path d="M1 14h14v2H1v-2z"/>
|
||||
</svg>
|
||||
Download OpenAPI Spec
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{/* Hugo page content shown as overview */}}
|
||||
{{ with .Content }}
|
||||
<section class="api-content-overview">
|
||||
{{ . }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{/* RapiDoc Mini renderer for single operation */}}
|
||||
{{ with .Params.specFile }}
|
||||
<section class="api-renderer-section">
|
||||
{{ partial "api/rapidoc-mini.html" $ }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{/* Related documentation links */}}
|
||||
{{ partial "article/related.html" . }}
|
||||
|
||||
</article>
|
||||
</div>
|
||||
|
||||
{{/* Right sidebar hidden - operation pages have no TOC headings */}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ partial "footer.html" . }}
|
||||
|
|
@ -88,7 +88,10 @@
|
|||
<h2 id="endpoints">Endpoints</h2>
|
||||
<div class="api-operations-grid">
|
||||
{{ range $operations }}
|
||||
<a href="#operation/{{ .operationId }}" class="api-operation-card">
|
||||
{{/* Build URL: parent section (e.g., /influxdb3/core/api/) + operation path + method */}}
|
||||
{{ $apiBase := $.Parent.RelPermalink }}
|
||||
{{ $operationURL := printf "%s%s/%s/" $apiBase .path (lower .method) }}
|
||||
<a href="{{ $operationURL }}" class="api-operation-card">
|
||||
<span class="api-method api-method--{{ lower .method }}">{{ upper .method }}</span>
|
||||
<code class="api-path">{{ .path }}</code>
|
||||
<span class="api-operation-summary">{{ .summary }}</span>
|
||||
|
|
@ -99,10 +102,11 @@
|
|||
{{ end }}
|
||||
|
||||
{{/* Overview - full tag description after endpoints */}}
|
||||
{{ with .Description }}
|
||||
{{ $desc := .Description | strings.TrimSpace }}
|
||||
{{ if gt (len $desc) 0 }}
|
||||
<section class="api-description">
|
||||
<h2 id="overview">Overview</h2>
|
||||
{{ . | markdownify }}
|
||||
{{ $desc | markdownify }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
|
|
@ -113,12 +117,8 @@
|
|||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{/* RapiDoc renderer for API operations */}}
|
||||
{{ with .Params.staticFilePath }}
|
||||
<section class="api-renderer-section">
|
||||
{{ partial "api/rapidoc.html" $ }}
|
||||
</section>
|
||||
{{ end }}
|
||||
{{/* RapiDoc renderer - only for pages with additional content beyond description */}}
|
||||
{{/* Don't show RapiDoc on list pages since operations are already shown as cards above */}}
|
||||
|
||||
{{ end }}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,135 @@
|
|||
{{/*
|
||||
RapiDoc Mini - Lightweight Single Operation Renderer
|
||||
|
||||
Renders a single API operation using RapiDoc Mini web component.
|
||||
Uses TypeScript component for initialization and theme management.
|
||||
|
||||
Required page params:
|
||||
- specFile: Path to the OpenAPI specification file
|
||||
- matchPaths: Filter expression (e.g., "post /write" or "get /api/v3/query_sql")
|
||||
|
||||
Optional page params:
|
||||
- operationId: Operation ID for linking/navigation purposes
|
||||
*/}}
|
||||
|
||||
{{ $specPath := .Params.specFile }}
|
||||
{{ $specPathJSON := replace $specPath ".yaml" ".json" | replace ".yml" ".json" }}
|
||||
{{ $matchPaths := .Params.matchPaths | default "" }}
|
||||
|
||||
{{/* Machine-readable links for AI agent discovery */}}
|
||||
{{ if $specPath }}
|
||||
<link rel="alternate" type="application/x-yaml" href="{{ $specPath | absURL }}" title="OpenAPI Specification (YAML)" />
|
||||
<link rel="alternate" type="application/json" href="{{ $specPathJSON | absURL }}" title="OpenAPI Specification (JSON)" />
|
||||
{{ end }}
|
||||
|
||||
{{/* Component container - TypeScript handles initialization */}}
|
||||
<div class="api-reference-wrapper api-reference-mini"
|
||||
data-component="rapidoc-mini"
|
||||
data-spec-url="{{ $specPath }}"
|
||||
{{ with $matchPaths }}data-match-paths="{{ . }}"{{ end }}>
|
||||
{{/* RapiDoc Mini element created by TypeScript component */}}
|
||||
</div>
|
||||
|
||||
{{/* Custom slot content if needed */}}
|
||||
{{ with .Content }}
|
||||
<div class="api-overview-content">
|
||||
{{ . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<style>
|
||||
/* Screen reader only - visually hidden but accessible */
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.api-reference-mini {
|
||||
width: 100%;
|
||||
margin: 1rem 0;
|
||||
position: relative; /* Contains absolutely positioned auth elements */
|
||||
}
|
||||
|
||||
rapi-doc-mini,
|
||||
rapi-doc {
|
||||
width: 100%;
|
||||
min-height: 300px;
|
||||
display: block;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
|
||||
/* Override RapiDoc internal CSS variables - subtle borders */
|
||||
--light-border-color: rgba(0, 163, 255, 0.25);
|
||||
--border-color: rgba(0, 163, 255, 0.25);
|
||||
/* HTTP method colors - lighter palette for light theme */
|
||||
--blue: #00A3FF; /* $b-pool - GET */
|
||||
--green: #34BB55; /* $gr-rainforest - POST */
|
||||
--orange: #FFB94A; /* $y-pineapple - PUT (distinct from red) */
|
||||
--red: #F95F53; /* $r-curacao - DELETE */
|
||||
--purple: #9b2aff; /* $br-new-purple - PATCH */
|
||||
}
|
||||
|
||||
/* Dark mode overrides */
|
||||
[data-theme="dark"] rapi-doc-mini,
|
||||
[data-theme="dark"] rapi-doc,
|
||||
html:has(link[title="dark-theme"]:not([disabled])) rapi-doc-mini,
|
||||
html:has(link[title="dark-theme"]:not([disabled])) rapi-doc {
|
||||
/* HTTP method colors - darker palette for dark theme */
|
||||
--blue: #066FC5; /* $b-ocean - GET */
|
||||
--green: #009F5F; /* $gr-viridian - POST */
|
||||
--orange: #FFC800; /* $y-thunder - PUT (brighter for dark mode) */
|
||||
--red: #DC4E58; /* $r-fire - DELETE */
|
||||
--purple: #8E1FC3; /* $p-amethyst - PATCH */
|
||||
}
|
||||
|
||||
/* Hide tag section on operation pages - only show on tag landing pages */
|
||||
rapi-doc::part(section-tag) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Fix parameter table layout - reduce indentation from empty td cells */
|
||||
rapi-doc {
|
||||
--font-size-regular: 14px;
|
||||
}
|
||||
|
||||
/* Fix auth schemes at narrow widths - ensure content is scrollable */
|
||||
@media (max-width: 1280px) {
|
||||
.api-reference-mini {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
rapi-doc-mini, rapi-doc {
|
||||
min-width: 800px; /* Prevent auth elements from collapsing/overlapping */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Error state styling */
|
||||
.api-operation-error {
|
||||
padding: 2rem;
|
||||
text-align: center;
|
||||
color: #BF3D5E; /* $r-ruby */
|
||||
background: #FFF7F4; /* $r-flan */
|
||||
border: 1px solid #C6CAD3;
|
||||
border-radius: 4px;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
.api-operation-error p {
|
||||
margin: 0.5rem 0;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .api-operation-error,
|
||||
html:has(link[title="dark-theme"]:not([disabled])) .api-operation-error {
|
||||
background: #2F1F29; /* $r-basalt */
|
||||
color: #FFB6A0; /* $r-tungsten */
|
||||
border-color: #333346;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
bg-color="#ffffff"
|
||||
text-color="#2b2b2b"
|
||||
header-color="#020a47"
|
||||
primary-color="#020a47"
|
||||
primary-color="#00A3FF"
|
||||
nav-bg-color="#f7f8fa"
|
||||
nav-text-color="#2b2b2b"
|
||||
nav-hover-bg-color="#e8e8f0"
|
||||
|
|
@ -50,14 +50,15 @@
|
|||
font-size="large"
|
||||
render-style="view"
|
||||
layout="column"
|
||||
schema-style="tree"
|
||||
default-schema-tab="schema"
|
||||
schema-style="table"
|
||||
default-schema-tab="model"
|
||||
response-area-height="400px"
|
||||
show-header="false"
|
||||
show-info="false"
|
||||
show-side-nav="false"
|
||||
show-components="false"
|
||||
allow-authentication="true"
|
||||
allow-try="true"
|
||||
allow-try="false"
|
||||
allow-spec-url-load="false"
|
||||
allow-spec-file-load="false"
|
||||
allow-server-selection="false"
|
||||
|
|
@ -96,6 +97,8 @@
|
|||
<script>
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
console.log('[RapiDoc] Script loaded');
|
||||
|
||||
// Detect current theme by checking which theme stylesheet is enabled
|
||||
function isDarkTheme() {
|
||||
|
|
@ -167,6 +170,38 @@
|
|||
updateRapiDocTheme();
|
||||
}
|
||||
|
||||
// Set custom CSS properties for input border styling
|
||||
function setInputBorderStyles() {
|
||||
const rapiDoc = document.getElementById('api-doc');
|
||||
if (!rapiDoc) {
|
||||
console.log('[RapiDoc] Element not found');
|
||||
return;
|
||||
}
|
||||
|
||||
// Set CSS custom property on the rapi-doc element
|
||||
// This will penetrate the shadow DOM
|
||||
rapiDoc.style.setProperty('--border-color', '#00A3FF');
|
||||
console.log('[RapiDoc] Set --border-color to #00A3FF');
|
||||
}
|
||||
|
||||
// Wait for RapiDoc custom element to be fully defined
|
||||
if (customElements && customElements.whenDefined) {
|
||||
customElements.whenDefined('rapi-doc').then(() => {
|
||||
console.log('[RapiDoc] Custom element defined');
|
||||
setInputBorderStyles();
|
||||
// Set again after render
|
||||
setTimeout(setInputBorderStyles, 500);
|
||||
});
|
||||
} else {
|
||||
// Fallback for older browsers
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', setInputBorderStyles);
|
||||
} else {
|
||||
setInputBorderStyles();
|
||||
}
|
||||
setTimeout(setInputBorderStyles, 500);
|
||||
}
|
||||
|
||||
// Watch for stylesheet changes (theme toggles enable/disable stylesheets)
|
||||
const observer = new MutationObserver(function(mutations) {
|
||||
mutations.forEach(function(mutation) {
|
||||
|
|
@ -196,6 +231,95 @@
|
|||
attributes: true,
|
||||
attributeFilter: ['data-theme']
|
||||
});
|
||||
|
||||
// Hide "Expand all | Collapse all" controls and Overview section inside shadow DOM
|
||||
function hideExpandCollapseControls() {
|
||||
const rapiDoc = document.getElementById('api-doc');
|
||||
if (!rapiDoc) return;
|
||||
|
||||
// Wait for RapiDoc to render, try multiple times
|
||||
let attempts = 0;
|
||||
const maxAttempts = 10;
|
||||
|
||||
const tryHide = function() {
|
||||
attempts++;
|
||||
try {
|
||||
const shadowRoot = rapiDoc.shadowRoot;
|
||||
if (!shadowRoot) {
|
||||
if (attempts < maxAttempts) {
|
||||
setTimeout(tryHide, 500);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Find all elements in shadow DOM and hide those containing "Expand all"
|
||||
const allElements = shadowRoot.querySelectorAll('*');
|
||||
let hiddenCount = 0;
|
||||
|
||||
allElements.forEach(function(element) {
|
||||
const text = element.textContent || '';
|
||||
|
||||
// Check if element contains "Expand all", "Collapse all"
|
||||
if (text.includes('Expand all') || text.includes('Collapse all')) {
|
||||
// Hide the element and its parent containers
|
||||
element.style.display = 'none';
|
||||
if (element.parentElement) {
|
||||
element.parentElement.style.display = 'none';
|
||||
}
|
||||
hiddenCount++;
|
||||
}
|
||||
});
|
||||
|
||||
// Separately target all headings and hide those with "Overview"
|
||||
const headings = shadowRoot.querySelectorAll('h1, h2, h3, h4');
|
||||
headings.forEach(function(heading) {
|
||||
const text = (heading.textContent || '').trim();
|
||||
const innerText = (heading.innerText || '').trim();
|
||||
|
||||
// Log for debugging
|
||||
if (text.includes('Overview') || innerText.includes('Overview')) {
|
||||
console.log('[RapiDoc] Found heading:', heading.tagName, 'with text:', text, 'innerText:', innerText);
|
||||
heading.style.display = 'none';
|
||||
hiddenCount++;
|
||||
}
|
||||
});
|
||||
|
||||
// Also inject CSS as backup to hide Overview sections
|
||||
const style = document.createElement('style');
|
||||
style.textContent = `
|
||||
/* Hide Overview section and headings */
|
||||
.section-gap.section-tag,
|
||||
[id*="overview"],
|
||||
.regular-font.section-gap:empty,
|
||||
h1:empty, h2:empty, h3:empty {
|
||||
display: none !important;
|
||||
}
|
||||
`;
|
||||
shadowRoot.appendChild(style);
|
||||
|
||||
console.log('[RapiDoc] Hidden ' + hiddenCount + ' elements containing expand/collapse text (attempt ' + attempts + ')');
|
||||
|
||||
if (hiddenCount === 0 && attempts < maxAttempts) {
|
||||
// Try again if nothing was hidden
|
||||
setTimeout(tryHide, 500);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('[RapiDoc] Could not access shadow DOM:', e);
|
||||
if (attempts < maxAttempts) {
|
||||
setTimeout(tryHide, 500);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
setTimeout(tryHide, 500);
|
||||
}
|
||||
|
||||
// Call after RapiDoc initializes
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', hideExpandCollapseControls);
|
||||
} else {
|
||||
hideExpandCollapseControls();
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
|
@ -216,17 +340,35 @@ rapi-doc {
|
|||
--bg: #ffffff;
|
||||
--bg2: #f7f8fa;
|
||||
--bg3: #eef0f3;
|
||||
/* Input field border styling - subtle with transparency */
|
||||
--border-color: rgba(0, 163, 255, 0.25);
|
||||
--light-border-color: rgba(0, 163, 255, 0.15);
|
||||
/* HTTP method colors - lighter palette for light theme */
|
||||
--blue: #00A3FF; /* $b-pool - GET */
|
||||
--green: #34BB55; /* $gr-rainforest - POST */
|
||||
--orange: #FFB94A; /* $y-pineapple - PUT (distinct from red) */
|
||||
--red: #F95F53; /* $r-curacao - DELETE */
|
||||
--purple: #9b2aff; /* $br-new-purple - PATCH */
|
||||
}
|
||||
|
||||
/* Dark mode overrides - match Hugo $grey10: #14141F */
|
||||
[data-theme="dark"] rapi-doc,
|
||||
html:has(link[title="dark-theme"]:not([disabled])) rapi-doc {
|
||||
--bg: #14141F;
|
||||
/* Subtle border colors for dark mode with transparency */
|
||||
--border-color: rgba(0, 163, 255, 0.35);
|
||||
--light-border-color: rgba(0, 163, 255, 0.2);
|
||||
--bg2: #1a1a2a;
|
||||
--bg3: #252535;
|
||||
--fg: #D4D7DD;
|
||||
--fg2: #c8ccd2;
|
||||
--fg3: #b0b4ba;
|
||||
/* HTTP method colors - darker palette for dark theme */
|
||||
--blue: #066FC5; /* $b-ocean - GET */
|
||||
--green: #009F5F; /* $gr-viridian - POST */
|
||||
--orange: #FFC800; /* $y-thunder - PUT (brighter for dark mode) */
|
||||
--red: #DC4E58; /* $r-fire - DELETE */
|
||||
--purple: #8E1FC3; /* $p-amethyst - PATCH */
|
||||
}
|
||||
|
||||
/* Custom examples section styling */
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@
|
|||
{{ end }}
|
||||
{{ $isSingleTag := eq (len $articlesInGroup) 1 }}
|
||||
|
||||
{{/* Check if this group should be open (contains active page) */}}
|
||||
{{/* Check if this group should be open (contains active page or active operation) */}}
|
||||
{{ $groupIsOpen := false }}
|
||||
{{ range $articlesInGroup }}
|
||||
{{ $path := index . "path" }}
|
||||
|
|
@ -109,6 +109,17 @@
|
|||
{{ if eq $currentPage.RelPermalink $pageUrl }}
|
||||
{{ $groupIsOpen = true }}
|
||||
{{ end }}
|
||||
{{/* Also check if any operation pages in this group are active */}}
|
||||
{{ $fields := index . "fields" }}
|
||||
{{ if and (reflect.IsMap $fields) (isset $fields "operations") }}
|
||||
{{ range index $fields "operations" }}
|
||||
{{ $opPathSlug := .path | replaceRE "^/" "" }}
|
||||
{{ $opUrl := printf "/%s/%s/api/%s/%s/" $product $version $opPathSlug (lower .method) }}
|
||||
{{ if eq $currentPage.RelPermalink $opUrl }}
|
||||
{{ $groupIsOpen = true }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $isSingleTag }}
|
||||
|
|
@ -131,15 +142,13 @@
|
|||
<ul class="children{{ if or $isActive $groupIsOpen }} open{{ end }}">
|
||||
{{ range $operations }}
|
||||
{{ $apiPath := .path }}
|
||||
{{ $trimmedPath := strings.TrimPrefix "/" $apiPath }}
|
||||
{{ $contentPath := $trimmedPath }}
|
||||
{{ if not (hasPrefix $trimmedPath "api/") }}
|
||||
{{ $contentPath = printf "api/%s" $trimmedPath }}
|
||||
{{ end }}
|
||||
{{ $fragment := printf "#operation/%s" .operationId }}
|
||||
{{ $fullUrl := printf "%s%s" (print "/" $product "/" $version "/" $contentPath "/" | relURL) $fragment }}
|
||||
<li class="nav-item api-operation">
|
||||
<a href="{{ $fullUrl | safeURL }}">
|
||||
{{/* Build path-based URL for standalone operation page */}}
|
||||
{{ $opPathSlug := $apiPath | replaceRE "^/" "" }}
|
||||
{{ $operationUrl := printf "/%s/%s/api/%s/%s/" $product $version $opPathSlug (lower .method) | relURL }}
|
||||
{{/* Check if this operation page is active */}}
|
||||
{{ $opIsActive := eq $currentPage.RelPermalink (printf "/%s/%s/api/%s/%s/" $product $version $opPathSlug (lower .method)) }}
|
||||
<li class="nav-item api-operation{{ if $opIsActive }} active{{ end }}">
|
||||
<a href="{{ $operationUrl | safeURL }}">
|
||||
<span class="api-method api-method--{{ lower .method }}">{{ upper .method }}</span>
|
||||
{{- $summary := .summary -}}
|
||||
{{- with .compatVersion -}}
|
||||
|
|
@ -191,19 +200,26 @@
|
|||
<li class="nav-item{{ if $isActive }} active{{ end }}">
|
||||
{{ if $hasOperations }}<a href="#" class="children-toggle{{ if $isActive }} open{{ end }}"></a>{{ end }}
|
||||
<a href="{{ $tagPageUrl }}">{{ $menuName }}</a>
|
||||
{{/* Check if any operation in this tag is active */}}
|
||||
{{ $tagHasActiveOp := false }}
|
||||
{{ range $operations }}
|
||||
{{ $opPathSlug := .path | replaceRE "^/" "" }}
|
||||
{{ $opUrl := printf "/%s/%s/api/%s/%s/" $product $version $opPathSlug (lower .method) }}
|
||||
{{ if eq $currentPage.RelPermalink $opUrl }}
|
||||
{{ $tagHasActiveOp = true }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $hasOperations }}
|
||||
<ul class="children{{ if $isActive }} open{{ end }}">
|
||||
<ul class="children{{ if or $isActive $tagHasActiveOp }} open{{ end }}">
|
||||
{{ range $operations }}
|
||||
{{ $apiPath := .path }}
|
||||
{{ $trimmedPath := strings.TrimPrefix "/" $apiPath }}
|
||||
{{ $contentPath := $trimmedPath }}
|
||||
{{ if not (hasPrefix $trimmedPath "api/") }}
|
||||
{{ $contentPath = printf "api/%s" $trimmedPath }}
|
||||
{{ end }}
|
||||
{{ $fragment := printf "#operation/%s" .operationId }}
|
||||
{{ $fullUrl := printf "%s%s" (print "/" $product "/" $version "/" $contentPath "/" | relURL) $fragment }}
|
||||
<li class="nav-item api-operation">
|
||||
<a href="{{ $fullUrl | safeURL }}">
|
||||
{{/* Build path-based URL for standalone operation page */}}
|
||||
{{ $opPathSlug := $apiPath | replaceRE "^/" "" }}
|
||||
{{ $operationUrl := printf "/%s/%s/api/%s/%s/" $product $version $opPathSlug (lower .method) | relURL }}
|
||||
{{/* Check if this operation page is active */}}
|
||||
{{ $opIsActive := eq $currentPage.RelPermalink (printf "/%s/%s/api/%s/%s/" $product $version $opPathSlug (lower .method)) }}
|
||||
<li class="nav-item api-operation{{ if $opIsActive }} active{{ end }}">
|
||||
<a href="{{ $operationUrl | safeURL }}">
|
||||
<span class="api-method api-method--{{ lower .method }}">{{ upper .method }}</span>
|
||||
{{- $summary := .summary -}}
|
||||
{{- with .compatVersion -}}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
/* Custom RapiDoc overrides */
|
||||
|
||||
/* Reduce parameter table indentation - target the expand column */
|
||||
.m-table tr > td:first-child {
|
||||
width: 0 !important;
|
||||
min-width: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
/* Reduce param-name cell indentation */
|
||||
.param-name {
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
/* Make auth section scrollable on narrow viewports */
|
||||
.security-info-button {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
Loading…
Reference in New Issue