Skip to content

Commit 4f5122d

Browse files
authored
Update content/shared/v3-core-plugins/_index.md
1 parent 5976a64 commit 4f5122d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,15 @@ def process_request(influxdb3_local, query_parameters, request_headers, request_
396396

397397
#### On Request trigger configuration
398398

399-
On-request plugins are set with a `trigger-spec` of `request:<endpoint>`. The `args` parameter can be used to pass configuration to the plugin. For example, if we wanted the above plugin to run on the endpoint `/api/v3/engine/my_plugin`, we would use `request:my_plugin` as the `trigger-spec`.
399+
**On Request** plugins are defined using the `request:<endpoint>` trigger-spec.
400+
401+
For example, the following command creates an `/api/v3/engine/my_plugin` endpoint that runs a `<plugin-directory>/examples/my-on-request.py` plugin:
402+
403+
```bash
404+
influxdb3 create trigger \
405+
--trigger-spec "request:my_plugin" \
406+
--plugin-filename "examples/my-on-request.py" \
407+
--database mydb my-plugin
400408

401409
Trigger specs must be unique across all configured plugins, regardless of which database they are tied to, given the path is the same. Here's an example to create a request trigger tied to the "hello-world' path using a plugin in the plugin-dir:
402410

0 commit comments

Comments
 (0)