Skip to content

Commit 1db8550

Browse files
jstirnamanclaude
andcommitted
fix(influxdb3): Update API reference and fix processing engine documentation for 3.2 release
Resolves issue #6161 with InfluxDB 3.2 API reference updates. ## API Reference Updates - Add `hard_delete_at` parameter to database and table deletion endpoints for scheduled hard deletion - Add update database and update table endpoints with retention period configuration - Add license endpoint response schema - Fix request trigger specification format from `path:` to `request:` in Core API - Fix OpenAPI schema validation error in Enterprise API by removing conflicting type declaration ## Processing Engine Documentation Fixes - Standardize terminology across documentation: - "Data write" (not "WAL flush" or "On WAL flush") - "Scheduled" (not "On Schedule") - "HTTP request" (not "On Request") - Fix placeholder inconsistencies: use REQUEST_PATH instead of ENDPOINT_PATH - Add Enterprise-specific warnings about request trigger format differences - Update trigger specification format in Enterprise API to use JSON object format - Add proper table of contents with consistent structure - Improve distributed cluster configuration documentation ## Enterprise Request Trigger Bug Documentation Due to a bug in InfluxDB 3 Enterprise, the request trigger specification format differs between CLI and API: - CLI: `request:<REQUEST_PATH>` (same as Core CLI and API) - Enterprise API: `{"request_path": {"path": "<REQUEST_PATH>"}}` This difference is now properly documented with warnings in all relevant sections. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5a44f6c commit 1db8550

File tree

6 files changed

+235
-62
lines changed

6 files changed

+235
-62
lines changed

api-docs/influxdb3/core/v3/ref.yml

Lines changed: 107 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -922,9 +922,25 @@ paths:
922922
summary: Delete a database
923923
description: |
924924
Soft deletes a database.
925-
The database is scheduled for deletion and unavailable for querying.
925+
The database is scheduled for deletion and unavailable for querying.
926+
Use the `hard_delete_at` parameter to schedule a hard deletion.
926927
parameters:
927928
- $ref: '#/components/parameters/db'
929+
- name: hard_delete_at
930+
in: query
931+
required: false
932+
schema:
933+
type: string
934+
format: date-time
935+
description: |
936+
Schedule the database for hard deletion at the specified time.
937+
If not provided, the database will be soft deleted.
938+
Use ISO 8601 date-time format (for example, "2025-12-31T23:59:59Z").
939+
940+
#### Deleting a database cannot be undone
941+
942+
Deleting a database is a destructive action.
943+
Once a database is deleted, data stored in that database cannot be recovered.
928944
responses:
929945
'200':
930946
description: Success. Database deleted.
@@ -961,14 +977,30 @@ paths:
961977
summary: Delete a table
962978
description: |
963979
Soft deletes a table.
964-
The table is scheduled for deletion and unavailable for querying.
980+
The table is scheduled for deletion and unavailable for querying.
981+
Use the `hard_delete_at` parameter to schedule a hard deletion.
982+
983+
#### Deleting a table cannot be undone
984+
985+
Deleting a table is a destructive action.
986+
Once a table is deleted, data stored in that table cannot be recovered.
965987
parameters:
966988
- $ref: '#/components/parameters/db'
967989
- name: table
968990
in: query
969991
required: true
970992
schema:
971993
type: string
994+
- name: hard_delete_at
995+
in: query
996+
required: false
997+
schema:
998+
type: string
999+
format: date-time
1000+
description: |
1001+
Schedule the table for hard deletion at the specified time.
1002+
If not provided, the table will be soft deleted.
1003+
Use ISO 8601 format (for example, "2025-12-31T23:59:59Z").
9721004
responses:
9731005
'200':
9741006
description: Success (no content). The table has been deleted.
@@ -1078,7 +1110,7 @@ paths:
10781110
In `"cron:CRON_EXPRESSION"`, `CRON_EXPRESSION` uses extended 6-field cron format.
10791111
The cron expression `0 0 6 * * 1-5` means the trigger will run at 6:00 AM every weekday (Monday to Friday).
10801112
value:
1081-
db: DATABASE_NAME
1113+
db: mydb
10821114
plugin_filename: schedule.py
10831115
trigger_name: schedule_cron_trigger
10841116
trigger_specification: cron:0 0 6 * * 1-5
@@ -1136,7 +1168,7 @@ paths:
11361168
db: mydb
11371169
plugin_filename: request.py
11381170
trigger_name: hello_world_trigger
1139-
trigger_specification: path:hello-world
1171+
trigger_specification: request:hello-world
11401172
cron_friday_afternoon:
11411173
summary: Cron trigger for Friday afternoons
11421174
description: |
@@ -1365,16 +1397,16 @@ paths:
13651397
description: Plugin not enabled.
13661398
tags:
13671399
- Processing engine
1368-
/api/v3/engine/{plugin_path}:
1400+
/api/v3/engine/{request_path}:
13691401
parameters:
1370-
- name: plugin_path
1402+
- name: request_path
13711403
description: |
1372-
The path configured in the request trigger specification "path:<plugin_path>"` for the plugin.
1404+
The path configured in the request trigger specification for the plugin.
13731405
13741406
For example, if you define a trigger with the following:
13751407
13761408
```json
1377-
trigger-spec: "path:hello-world"
1409+
trigger_specification: "request:hello-world"
13781410
```
13791411
13801412
then, the HTTP API exposes the following plugin endpoint:
@@ -1390,7 +1422,7 @@ paths:
13901422
operationId: GetProcessingEnginePluginRequest
13911423
summary: On Request processing engine plugin request
13921424
description: |
1393-
Executes the On Request processing engine plugin specified in `<plugin_path>`.
1425+
Executes the On Request processing engine plugin specified in the trigger's `plugin_filename`.
13941426
The request can include request headers, query string parameters, and a request body, which InfluxDB passes to the plugin.
13951427
13961428
An On Request plugin implements the following signature:
@@ -1417,7 +1449,7 @@ paths:
14171449
operationId: PostProcessingEnginePluginRequest
14181450
summary: On Request processing engine plugin request
14191451
description: |
1420-
Executes the On Request processing engine plugin specified in `<plugin_path>`.
1452+
Executes the On Request processing engine plugin specified in the trigger's `plugin_filename`.
14211453
The request can include request headers, query string parameters, and a request body, which InfluxDB passes to the plugin.
14221454
14231455
An On Request plugin implements the following signature:
@@ -1868,7 +1900,7 @@ components:
18681900
`schedule.py` or `endpoints/report.py`.
18691901
The path can be absolute or relative to the `--plugins-dir` directory configured when starting InfluxDB 3.
18701902
1871-
The plugin file must implement the trigger interface associated with the trigger's specification (`trigger_spec`).
1903+
The plugin file must implement the trigger interface associated with the trigger's specification.
18721904
trigger_name:
18731905
type: string
18741906
trigger_specification:
@@ -1911,12 +1943,12 @@ components:
19111943
- `table:TABLE_NAME` - Triggers on write events to a specific table
19121944
19131945
### On-demand triggers
1914-
Format: `path:ENDPOINT_NAME`
1946+
Format: `request:REQUEST_PATH`
19151947
1916-
Creates an HTTP endpoint `/api/v3/engine/ENDPOINT_NAME` for manual invocation:
1917-
- `path:hello-world` - Creates endpoint `/api/v3/engine/hello-world`
1918-
- `path:data-export` - Creates endpoint `/api/v3/engine/data-export`
1919-
pattern: ^(cron:[0-9 *,/-]+|every:[0-9]+[smhd]|all_tables|table:[a-zA-Z_][a-zA-Z0-9_]*|path:[a-zA-Z0-9_-]+)$
1948+
Creates an HTTP endpoint `/api/v3/engine/REQUEST_PATH` for manual invocation:
1949+
- `request:hello-world` - Creates endpoint `/api/v3/engine/hello-world`
1950+
- `request:data-export` - Creates endpoint `/api/v3/engine/data-export`
1951+
pattern: ^(cron:[0-9 *,/-]+|every:[0-9]+[smhd]|all_tables|table:[a-zA-Z_][a-zA-Z0-9_]*|request:[a-zA-Z0-9_-]+)$
19201952
example: cron:0 0 6 * * 1-5
19211953
trigger_arguments:
19221954
type: object
@@ -2013,6 +2045,65 @@ components:
20132045
- m
20142046
- h
20152047
type: string
2048+
UpdateDatabaseRequest:
2049+
type: object
2050+
properties:
2051+
retention_period:
2052+
type: string
2053+
description: |
2054+
The retention period for the database. Specifies how long data should be retained.
2055+
Use duration format (for example, "1d", "1h", "30m", "7d").
2056+
example: "7d"
2057+
description: Request schema for updating database configuration.
2058+
UpdateTableRequest:
2059+
type: object
2060+
properties:
2061+
db:
2062+
type: string
2063+
description: The name of the database containing the table.
2064+
table:
2065+
type: string
2066+
description: The name of the table to update.
2067+
retention_period:
2068+
type: string
2069+
description: |
2070+
The retention period for the table. Specifies how long data in this table should be retained.
2071+
Use duration format (for example, "1d", "1h", "30m", "7d").
2072+
example: "30d"
2073+
required:
2074+
- db
2075+
- table
2076+
description: Request schema for updating table configuration.
2077+
LicenseResponse:
2078+
type: object
2079+
properties:
2080+
license_type:
2081+
type: string
2082+
description: The type of license (for example, "enterprise", "trial").
2083+
example: "enterprise"
2084+
expires_at:
2085+
type: string
2086+
format: date-time
2087+
description: The expiration date of the license in ISO 8601 format.
2088+
example: "2025-12-31T23:59:59Z"
2089+
features:
2090+
type: array
2091+
items:
2092+
type: string
2093+
description: List of features enabled by the license.
2094+
example:
2095+
- "clustering"
2096+
- "processing_engine"
2097+
- "advanced_auth"
2098+
status:
2099+
type: string
2100+
enum:
2101+
- "active"
2102+
- "expired"
2103+
- "invalid"
2104+
description: The current status of the license.
2105+
example: "active"
2106+
description: Response schema for license information.
20162107
responses:
20172108
Unauthorized:
20182109
description: Unauthorized access.

api-docs/influxdb3/enterprise/v3/ref.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,7 @@ paths:
12401240
plugin_filename: request.py
12411241
trigger_name: hello_world_trigger
12421242
# trigger_specification: "request:hello-world" - For 3.2.1 (issue#6171)
1243-
trigger_specification: '{"request_path": {"path": "hello-world"}}'
1243+
trigger_specification: {"request_path": {"path": "hello-world"}}
12441244
cron_friday_afternoon:
12451245
summary: Cron trigger for Friday afternoons
12461246
description: |
@@ -2056,7 +2056,6 @@ components:
20562056
trigger_name:
20572057
type: string
20582058
trigger_specification:
2059-
type: string
20602059
description: |
20612060
Specifies when and how the processing engine trigger should be invoked.
20622061

content/shared/influxdb3-cli/create/trigger.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ influxdb3 create trigger [OPTIONS] \
2727
| `-d` | `--database` | _({{< req >}})_ Name of the database to operate on |
2828
| | `--token` | _({{< req >}})_ Authentication token |
2929
| | `--plugin-filename` | _({{< req >}})_ Name of the file, stored in the server's `plugin-dir`, that contains the Python plugin code to run |
30-
| | `--trigger-spec` | Trigger specification--for example `table:<TABLE_NAME>` or `all_tables` |
30+
| | `--trigger-spec` | Trigger specification: `table:<TABLE_NAME>`, `all_tables`, `every:<DURATION>`, `cron:<EXPRESSION>`, or `request:<REQUEST_PATH>` |
3131
| | `--disabled` | Create the trigger in disabled state |
3232
| | `--tls-ca` | Path to a custom TLS certificate authority (for testing or self-signed certificates) |
3333
| `-h` | `--help` | Print help information |
@@ -113,3 +113,15 @@ influxdb3 create trigger \
113113
Creating a trigger in a disabled state prevents it from running immediately. You can enable it later when you're ready to activate it.
114114

115115
{{% /code-placeholders %}}
116+
117+
{{% show-in "enterprise" %}}
118+
> [!Warning]
119+
> #### Request trigger specification format differs between CLI and API
120+
>
121+
> Due to a bug in InfluxDB 3 Enterprise, the request trigger specification format differs:
122+
>
123+
> - **CLI**: `request:<REQUEST_PATH>` (same as Core CLI and API)
124+
> - **Enterprise API**: `{"request_path": {"path": "<REQUEST_PATH>"}}`
125+
>
126+
> See the [API reference](/influxdb3/enterprise/api/#operation/PostConfigureProcessingEngineTrigger) for examples. Use `influxdb3 show summary` to verify the actual trigger specification.
127+
{{% /show-in %}}

content/shared/influxdb3-get-started/processing-engine.md

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,36 @@ engine [trigger](#trigger).
2323
### Trigger
2424

2525
When you create a trigger, you specify a [plugin](#plugin), a database, optional
26-
arguments, and a _trigger-spec_, which defines when the plugin is executed and
26+
arguments, and a trigger specification, which defines when the plugin is executed and
2727
what data it receives.
2828

2929
#### Trigger types
3030

3131
InfluxDB 3 provides the following types of triggers, each with specific
32-
trigger-specs:
32+
specifications:
3333

34-
- **On WAL flush**: Sends a batch of written data (for a specific table or all
35-
tables) to a plugin (by default, every second).
36-
- **On Schedule**: Executes a plugin on a user-configured schedule (using a
34+
- **Data write** (`table:` or `all_tables`): Sends a batch of written data (for a specific table or all
35+
tables) to a plugin when the database flushes data to the Write-Ahead Log (by default, every second).
36+
- **Scheduled** (`every:` or `cron:`): Executes a plugin on a user-configured schedule (using a
3737
crontab or a duration). This trigger type is useful for data collection and
3838
deadman monitoring.
39-
- **On Request**: Binds a plugin to a custom HTTP API endpoint at
40-
`/api/v3/engine/<ENDPOINT_PATH>`.
39+
- **HTTP request** (`request:`): Binds a plugin to a custom HTTP API endpoint at
40+
`/api/v3/engine/<REQUEST_PATH>`.
4141
The plugin receives the HTTP request headers and content, and can parse,
4242
process, and send the data into the database or to third-party services.
4343

44+
{{% show-in "enterprise" %}}
45+
> [!Warning]
46+
> #### Request trigger specification format differs between CLI and API
47+
>
48+
> Due to a bug in InfluxDB 3 Enterprise, the request trigger specification format differs:
49+
>
50+
> - **CLI**: `request:<REQUEST_PATH>` (same as Core CLI and API)
51+
> - **Enterprise API**: `{"request_path": {"path": "<REQUEST_PATH>"}}`
52+
>
53+
> See the [API reference](/influxdb3/enterprise/api/#operation/PostConfigureProcessingEngineTrigger) for examples. Use `influxdb3 show summary` to verify the actual trigger specification.
54+
{{% /show-in %}}
55+
4456
## Activate the processing engine
4557

4658
To activate the processing engine, include the `--plugin-dir <PLUGIN_DIR>` option
@@ -64,10 +76,10 @@ to the current working directory of the `influxdb3` server.
6476
## Create a plugin
6577

6678
To create a plugin, write and store a Python file in your configured `PLUGIN_DIR`.
67-
The following example is a WAL flush plugin that processes data before it gets
79+
The following example is a data write plugin that processes data before it gets
6880
persisted to the object store.
6981

70-
##### Example Python plugin for WAL rows
82+
##### Example Python plugin for data writes
7183

7284
```python
7385
# This is the basic structure for Python plugin code that runs in the
@@ -77,9 +89,9 @@ persisted to the object store.
7789
# allowing you to write generic code that uses variables such as monitoring
7890
# thresholds, environment variables, and host names.
7991
#
80-
# Use the following exact signature to define a function for the WAL flush
92+
# Use the following exact signature to define a function for the data write
8193
# trigger.
82-
# When you create a trigger for a WAL flush plugin, you specify the database
94+
# When you create a trigger for a data write plugin, you specify the database
8395
# and tables that the plugin receives written data from on every WAL flush
8496
# (default is once per second).
8597
def process_writes(influxdb3_local, table_batches, args=None):
@@ -98,9 +110,8 @@ def process_writes(influxdb3_local, table_batches, args=None):
98110
# value.
99111
influxdb3_local.info("query result: " + str(query_result))
100112

101-
# this is the data that is sent when the WAL is flushed of writes the server
102-
# received for the DB or table of interest. One batch for each table (will
103-
# only be one if triggered on a single table)
113+
# this is the data that is sent when data is written to the database and flushed to the WAL.
114+
# One batch for each table (will only be one if triggered on a single table)
104115
for table_batch in table_batches:
105116
# here you can see that the table_name is available.
106117
influxdb3_local.info("table: " + table_batch["table_name"])

0 commit comments

Comments
 (0)