Update plugin configuration

Outdated Version

You're viewing an older version (v1.5.x). The latest documentation is available for the current version. Click here to visit latest version.

Updates mutable plugin fields such as timeout, emit_logs, emit_traces, raw_response, allow_get_invocation, config, and forward_logs. The plugin id and path cannot be changed after creation.

All fields are optional - only the provided fields will be updated. To clear the config field, pass "config": null.

PATCH
/api/v1/plugins/{plugin_id}
AuthorizationBearer <token>

In: header

Path Parameters

plugin_idstring

The unique identifier of the plugin

Plugin configuration update. All fields are optional.

allow_get_invocation?boolean | null

Whether to allow GET requests to invoke plugin logic

config?object | null

User-defined configuration accessible to the plugin (must be a JSON object) Use null to clear the config

Empty Object

emit_logs?boolean | null

Whether to include logs in the HTTP response

emit_traces?boolean | null

Whether to include traces in the HTTP response

forward_logs?boolean | null

Whether to forward plugin logs into the relayer's tracing output

raw_response?boolean | null

Whether to return raw plugin response without ApiResponse wrapper

timeout?integer | null

Plugin timeout in seconds

Formatint64
Range0 <= value

Response Body

curl -X PATCH "https://loading/api/v1/plugins/string" \  -H "Content-Type: application/json" \  -d '{    "config": {      "apiKey": "xyz123",      "featureFlag": true    },    "emit_logs": true,    "forward_logs": true,    "timeout": 60  }'
{
  "data": {
    "allow_get_invocation": false,
    "config": {
      "apiKey": "xyz123",
      "featureFlag": true
    },
    "emit_logs": true,
    "emit_traces": false,
    "forward_logs": true,
    "id": "my-plugin",
    "path": "plugins/my-plugin.ts",
    "raw_response": false,
    "timeout": 60
  },
  "error": null,
  "success": true
}
{
  "data": null,
  "error": "Timeout must be greater than 0",
  "success": false
}
{
  "data": null,
  "error": "Unauthorized",
  "success": false
}
{
  "data": null,
  "error": "Plugin with id my-plugin not found",
  "success": false
}
{
  "data": null,
  "error": "Too Many Requests",
  "success": false
}
{
  "data": null,
  "error": "Internal Server Error",
  "success": false
}