From 4f5122da92ef080f9b5ff0002dcf4171b1273dd5 Mon Sep 17 00:00:00 2001 From: Jason Stirnaman Date: Mon, 24 Feb 2025 14:42:35 -0600 Subject: [PATCH] Update content/shared/v3-core-plugins/_index.md --- content/shared/v3-core-plugins/_index.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/content/shared/v3-core-plugins/_index.md b/content/shared/v3-core-plugins/_index.md index 1e7200d6a..8d80ba8ec 100644 --- a/content/shared/v3-core-plugins/_index.md +++ b/content/shared/v3-core-plugins/_index.md @@ -396,7 +396,15 @@ def process_request(influxdb3_local, query_parameters, request_headers, request_ #### On Request trigger configuration -On-request plugins are set with a `trigger-spec` of `request:`. 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`. +**On Request** plugins are defined using the `request:` trigger-spec. + +For example, the following command creates an `/api/v3/engine/my_plugin` endpoint that runs a `/examples/my-on-request.py` plugin: + +```bash +influxdb3 create trigger \ + --trigger-spec "request:my_plugin" \ + --plugin-filename "examples/my-on-request.py" \ + --database mydb my-plugin 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: