---
title: 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.
url: https://docs.influxdata.com/influxdb3/enterprise/api/processing-engine/
estimated_tokens: 4043
product: InfluxDB 3 Enterprise
version: enterprise
publisher: InfluxData
canonical: https://docs.influxdata.com/influxdb3/enterprise/api/processing-engine/
---

[Download InfluxDB 3 Enterprise API Spec](/openapi/influxdb3-enterprise-openapi.yml)

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.

POST`/api/v3/configure/plugin_environment/install_packages`

### Install plugin packages

Installs the specified Python packages into the processing engine plugin environment.

This endpoint is synchronous and blocks until the packages are installed.

#### Parameters

##### Header parameters

`Content-Type`string

The format of the data in the request body.

Allowed values:`application/json`

#### Request bodyrequired

Content-Type:`application/json`

`packages`requiredstring[]

A list of Python package names to install.
Can include version specifiers (for example, “scipy==1.9.0”).

Example:`["influxdb3-python","scipy","pandas==1.5.0","requests"]`

Example request[Ask AI about this](#)

```sh
curl --request POST \
  "https://localhost:8181/api/v3/configure/plugin_environment/install_packages" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "packages": [
    "influxdb3-python",
    "scipy",
    "pandas==1.5.0",
    "requests"
  ]
}'
```

#### Responses

200Success. The packages are installed.

400Bad request.

401Unauthorized access.

`data`object

`error`string

POST`/api/v3/configure/plugin_environment/install_requirements`

### Install plugin requirements

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

##### Header parameters

`Content-Type`string

The format of the data in the request body.

Allowed values:`application/json`

#### Request bodyrequired

Content-Type:`application/json`

`requirements_location`requiredstring

The path to the requirements file containing Python packages to install.
Can be a relative path (relative to the plugin directory) or an absolute path.

Example:`"requirements.txt"`

Example request[Ask AI about this](#)

```sh
curl --request POST \
  "https://localhost:8181/api/v3/configure/plugin_environment/install_requirements" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "requirements_location": "requirements.txt"
}'
```

#### Responses

200Success. The requirements have been installed.

400Bad request.

401Unauthorized access.

`data`object

`error`string

POST`/api/v3/configure/processing_engine_trigger`

### Create processing engine trigger

Creates a processing engine trigger with the specified plugin file and trigger specification.

#### Request bodyrequired

Content-Type:`application/json`

`db`requiredstring

`disabled`requiredboolean

Whether the trigger is disabled.

`node_spec`string

`plugin_filename`requiredstring

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.

`trigger_arguments`object

Optional arguments passed to the plugin.

`trigger_name`requiredstring

`trigger_settings`requiredstring

Configuration for trigger error handling and execution behavior.

`trigger_specification`requiredstring

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)
│ ┌───────────── minute (0-59)
│ │ ┌───────────── hour (0-23)
│ │ │ ┌───────────── day of month (1-31)
│ │ │ │ ┌───────────── month (1-12)
│ │ │ │ │ ┌───────────── day of week (0-6, Sunday=0)
│ │ │ │ │ │
* * * * * *
```

Examples:

* `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
* `every:1h` - Every hour
* `every:1d` - Every day
* `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`

Example:`"cron:0 0 6 * * 1-5"`

Example request[Ask AI about this](#)

```sh
curl --request POST \
  "https://localhost:8181/api/v3/configure/processing_engine_trigger" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "db": "DB",
  "disabled": false,
  "node_spec": {},
  "plugin_filename": "PLUGIN_FILENAME",
  "trigger_arguments": {},
  "trigger_name": "TRIGGER_NAME",
  "trigger_settings": "TRIGGER_SETTINGS",
  "trigger_specification": "cron:0 0 6 * * 1-5"
}'
```

#### Responses

200Success. Processing engine trigger created.

400Bad request.

401Unauthorized access.

`data`object

`error`string

404Trigger not found.

DELETE`/api/v3/configure/processing_engine_trigger`

### Delete processing engine trigger

Deletes a processing engine trigger.

#### Parameters

##### Query parameters

`db`requiredstring

The name of the database.

`trigger_name`requiredstring

`force`boolean

Force deletion of the trigger even if it has active executions.
By default, deletion fails if the trigger is currently executing.

Example request[Ask AI about this](#)

```sh
curl --request DELETE \
  "https://localhost:8181/api/v3/configure/processing_engine_trigger?db=DB&trigger_name=TRIGGER_NAME" \
  --header "Authorization: Bearer INFLUX_TOKEN"
```

#### Responses

200Success. The processing engine trigger has been deleted.

400Bad request.

401Unauthorized access.

`data`object

`error`string

404Trigger not found.

POST`/api/v3/configure/processing_engine_trigger/disable`

### Disable processing engine trigger

Disables a processing engine trigger.

#### Parameters

##### Query parameters

`db`requiredstring

The database name.

`trigger_name`requiredstring

The name of the trigger.

Example request[Ask AI about this](#)

```sh
curl --request POST \
  "https://localhost:8181/api/v3/configure/processing_engine_trigger/disable?db=DB&trigger_name=TRIGGER_NAME" \
  --header "Authorization: Bearer INFLUX_TOKEN"
```

#### Responses

200Success. The processing engine trigger has been disabled.

400Bad request.

401Unauthorized access.

`data`object

`error`string

404Trigger not found.

POST`/api/v3/configure/processing_engine_trigger/enable`

### Enable processing engine trigger

Enables a processing engine trigger.

#### Parameters

##### Query parameters

`db`requiredstring

The database name.

`trigger_name`requiredstring

The name of the trigger.

Example request[Ask AI about this](#)

```sh
curl --request POST \
  "https://localhost:8181/api/v3/configure/processing_engine_trigger/enable?db=DB&trigger_name=TRIGGER_NAME" \
  --header "Authorization: Bearer INFLUX_TOKEN"
```

#### Responses

200Success. The processing engine trigger is enabled.

400Bad request.

401Unauthorized access.

`data`object

`error`string

404Trigger not found.

GET`/api/v3/engine/{request_path}`

### On Request processing engine plugin request

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.

Example request[Ask AI about this](#)

```sh
curl --request GET \
  "https://localhost:8181/api/v3/engine/{request_path}" \
  --header "Authorization: Bearer INFLUX_TOKEN"
```

#### Responses

200Success. The plugin request has been executed.

400Malformed request.

401Unauthorized access.

`data`object

`error`string

404Plugin not found.

500Processing failure.

POST`/api/v3/engine/{request_path}`

### On Request processing engine plugin request

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

##### Header parameters

`Content-Type`string

The format of the data in the request body.

Allowed values:`application/json`

#### Request body

Content-Type:`application/json`

Example request[Ask AI about this](#)

```sh
curl --request POST \
  "https://localhost:8181/api/v3/engine/{request_path}" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json"
```

#### Responses

200Success. The plugin request has been executed.

400Malformed request.

401Unauthorized access.

`data`object

`error`string

404Plugin not found.

500Processing failure.

POST`/api/v3/plugin_test/schedule`

### Test scheduling plugin

Executes a test of a scheduling plugin.

#### Request bodyrequired

Content-Type:`application/json`

`cache_name`string

Optional name of the cache to use in the test.

`database`requiredstring

The database name to use for the test.

`filename`requiredstring

The path and filename of the plugin to test.

`input_arguments`object

Optional key-value pairs of arguments to pass to the plugin.

`schedule`string

Optional schedule specification in cron or interval format.

Example request[Ask AI about this](#)

```sh
curl --request POST \
  "https://localhost:8181/api/v3/plugin_test/schedule" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "cache_name": "CACHE_NAME",
  "database": "DATABASE",
  "filename": "FILENAME",
  "input_arguments": {},
  "schedule": "SCHEDULE"
}'
```

#### Responses

200Success. The plugin test has been executed.

400Bad request.

401Unauthorized access.

`data`object

`error`string

404Plugin not enabled.

POST`/api/v3/plugin_test/wal`

### Test WAL plugin

Executes a test of a write-ahead logging (WAL) plugin.

#### Request bodyrequired

Content-Type:`application/json`

`cache_name`string

Optional name of the cache to use in the test.

`database`requiredstring

The database name to use for the test.

`filename`requiredstring

The path and filename of the plugin to test.

`input_arguments`object

Optional key-value pairs of arguments to pass to the plugin.

`input_lp`requiredstring

Line protocol data to use as input for the test.

Example request[Ask AI about this](#)

```sh
curl --request POST \
  "https://localhost:8181/api/v3/plugin_test/wal" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "cache_name": "CACHE_NAME",
  "database": "DATABASE",
  "filename": "FILENAME",
  "input_arguments": {},
  "input_lp": "INPUT_LP"
}'
```

#### Responses

200Success. The plugin test has been executed.

400Bad request.

401Unauthorized access.

`data`object

`error`string

404Plugin not enabled.

PUT`/api/v3/plugins/directory`

### Update a multi-file plugin directory

Replaces all files in a multi-file plugin directory. The`plugin_name` must match a registered trigger name. Each entry in
the `files` array specifies a `relative_path` and `content`—the
server writes them into the trigger’s plugin directory.

Use this endpoint to update multi-file plugins (directories with`__init__.py` and supporting modules). For single-file plugins,
use `PUT /api/v3/plugins/files` instead.

#### Request bodyrequired

Content-Type:`application/json`

`files`requiredobject[]

List of plugin files to include in the directory.

`plugin_name`requiredstring

The name of the plugin directory to update.

Example request[Ask AI about this](#)

```sh
curl --request PUT \
  "https://localhost:8181/api/v3/plugins/directory" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "files": [],
  "plugin_name": "PLUGIN_NAME"
}'
```

#### Responses

200Success. The plugin directory has been updated.

401Unauthorized access.

`data`object

`error`string

403Forbidden. Admin token required.

500Plugin not found. The `plugin_name` does not match any registered trigger.

POST`/api/v3/plugins/files`

### Create a plugin file

Creates a single plugin file in the plugin directory. Writes the`content` to a file named after `plugin_name`. Does not require an
existing trigger—use this to upload plugin files before creating
triggers that reference them.

#### Request bodyrequired

Content-Type:`application/json`

`content`requiredstring

The content of the plugin file.

`plugin_name`requiredstring

The name of the plugin file to update.

Example request[Ask AI about this](#)

```sh
curl --request POST \
  "https://localhost:8181/api/v3/plugins/files" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "content": "CONTENT",
  "plugin_name": "PLUGIN_NAME"
}'
```

#### Responses

200Success. The plugin file has been created.

401Unauthorized access.

`data`object

`error`string

403Forbidden. Admin token required.

PUT`/api/v3/plugins/files`

### Update a plugin file

Updates a single plugin file for an existing trigger. The`plugin_name` must match a registered trigger name—the server
resolves the trigger’s `plugin_filename` and overwrites that file
with the provided `content`.

To upload a new plugin file before creating a trigger, use`POST /api/v3/plugins/files` instead. To update a multi-file
plugin directory, use `PUT /api/v3/plugins/directory`.

#### Request bodyrequired

Content-Type:`application/json`

`content`requiredstring

The content of the plugin file.

`plugin_name`requiredstring

The name of the plugin file to update.

Example request[Ask AI about this](#)

```sh
curl --request PUT \
  "https://localhost:8181/api/v3/plugins/files" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "content": "CONTENT",
  "plugin_name": "PLUGIN_NAME"
}'
```

#### Responses

200Success. The plugin file has been updated.

401Unauthorized access.

`data`object

`error`string

403Forbidden. Admin token required.

500Plugin not found. The `plugin_name` does not match any registered trigger.

#### Related

* [Processing engine and Python plugins](/influxdb3/enterprise/processing-engine/)
* [InfluxDB 3 API client libraries](/influxdb3/enterprise/reference/client-libraries/v3/)
