Skip to content

Commit 002074b

Browse files
committed
fix: On Request configuration
1 parent 6a5aeb3 commit 002074b

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

content/shared/v3-core-plugins/_index.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,10 @@ influxdb3 create trigger \
367367

368368
### On Request trigger
369369

370-
On Request plugins are triggered by a request to a specific endpoint under `/api/v3/engine`. The plugin receives the shared API, query parameters `Dict[str, str]`, request headers `Dict[str, str]`, the request body (as bytes), and any arguments passed in the trigger definition.
371-
372-
#### Example: simple On Request plugin
370+
On Request plugins are triggered by a request to an HTTP API endpoint.
371+
The plugin receives the shared API, query parameters `Dict[str, str]`, request headers `Dict[str, str]`, the request body (as bytes), and any arguments passed in the trigger definition.
373372

373+
#### Example: On Request plugin
374374

375375
```python
376376
import json
@@ -397,17 +397,18 @@ def process_request(influxdb3_local, query_parameters, request_headers, request_
397397

398398
#### On Request trigger configuration
399399

400-
On Request plugins are defined using the `request:<endpoint>` trigger-spec.
401-
For example, the following `influxdb3` CLI command creates an `/api/v3/engine/my-plugin` HTTP endpoint
402-
to execute the `<plugin-directory>/examples/my-on-request.py` plugin:
400+
To create a trigger for an On Request plugin, specify the `request:<ENDPOINT>` trigger-spec.
401+
402+
For example, the following command creates an HTTP API `/api/v3/engine/my-plugin` endpoint for the plugin file:
403403

404404
```bash
405405
influxdb3 create trigger \
406406
--trigger-spec "request:my-plugin" \
407407
--plugin-filename "examples/my-on-request.py" \
408408
--database mydb my-plugin
409409

410-
Because all On Request plugins for a server share the same `<host>/api/v3/engine/` base URL ,
411-
the trigger-spec
412-
you define must be unique across all plugins configured for a server,
410+
To run the plugin, you send an HTTP request to `<HOST>/api/v3/engine/my-plugin`.
411+
412+
Because all On Request plugins for a server share the same `<host>/api/v3/engine/` base URL,
413+
the trigger-spec you define must be unique across all plugins configured for a server,
413414
regardless of which database they are associated with.

0 commit comments

Comments
 (0)