Skip to content

Plugin API

12 endpoints.

GEThttp://localhost:3000/api/plugins/{type}

List all plugins of the given type.

Path parameters

typestring · enum: download | login | metadata | script | allrequired
Type of plugins you want to list. You can use "all" to get all types at once.

Responses

200Array of plugins
[
  {
    "author": "Difegue",
    "description": "Searches chaika.moe for tags matching your archive.",
    "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA\\nB3RJTUUH4wYCFQocjU4r+QAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUH\\nAAAEZElEQVQ4y42T3WtTdxzGn/M7J+fk5SRpTk7TxMZkXU84tTbVNrUT3YxO7HA4pdtQZDe7cgx2\\ns8vBRvEPsOwFYTDYGJUpbDI2wV04cGXCGFLonIu1L2ptmtrmxeb1JDkvv121ZKVze66f74eH7/f5\\nMmjRwMCAwrt4/9KDpflMJpPHvyiR2DPcJklJ3TRDDa0xk36cvrm8vDwHAAwAqKrqjjwXecPG205w\\nHBuqa9rk77/d/qJYLD7cCht5deQIIczbgiAEKLVAKXWUiqVV06Tf35q8dYVJJBJem2A7Kwi2nQzD\\nZig1CG93+PO5/KN6tf5NKpVqbsBUVVVFUUxwHJc1TXNBoxojS7IbhrnLMMx9pVJlBqFQKBKPxwcB\\nkJYgjKIo3QCE1nSKoghbfJuKRqN2RVXexMaQzWaLezyeEUEQDjscjk78PxFFUYRkMsltJgGA3t7e\\nyMLCwie6rr8iCILVbDbvMgwzYRjGxe0o4XC4s1AoHPP5fMP5/NNOyzLKAO6Ew+HrDADBbre/Ryk9\\nnzx81FXJNlEpVpF+OqtpWu2MpmnXWmH9/f2umZmZi4cOHXnLbILLzOchhz1YerJAs9m1GwRAg2GY\\nh7GYah488BJYzYW+2BD61AFBlmX/1nSNRqN9//792ujoaIPVRMjOKHoie3DytVGmp2fXCAEAjuMm\\nu7u7Umosho6gjL/u/QHeEgvJZHJ2K/D+/fuL4+PjXyvPd5ldkShy1UXcmb4DnjgQj/fd5gDA6/XS\\nYCAwTwh9oT3QzrS1+VDVi+vd3Tsy26yQVoFF3dAXJVmK96p9EJ0iLNOwKKU3CQCk0+lSOpP5WLDz\\nF9Q9kZqyO0SloOs6gMfbHSU5NLRiUOuax2/HyZPHEOsLw2SbP83eu/fLxrkNp9P554XxCzVa16MC\\n7+BPnTk9cfmH74KJE8nmga7Xy5JkZ8VKifGIHpoBb1VX8hNTd3/t/7lQ3OeXfFPvf/jBRw8ezD/a\\n7M/aWq91cGgnJaZ2VcgSdnV1XRNNd3vAoBVVYusmnEQS65hfgSG6c+zy3Kre7nF/KrukcMW0Zg8O\\nD08DoJutDxxOEb5IPUymwrq8ft1gLKfkFojkkRxemERCAQUACPFWRazYLJcrFGwQhyufbQQ7rFpy\\nLMkCwGZC34qPIuwp+XPOjBFwazQ/txrdFS2GGS/Xuj+pUKLGk1Kjvlded3s72lyGW+PLbGVcmrAA\\ngN0wTk1NWYODg9XOKltGtpazi5GigzroUnHN5nUHG1ylRsG7rDXHmnEpu4CeEtEKkqNc6QqlLc/M\\n8uT5lLH5eq0aGxsju1O7GQB498a5s/0x9dRALPaQEDZnYwnhWJtMCCNrjeb0UP34Z6e/PW22zjPP\\n+vwXBwfPvbw38XnXjk7GsiwKAIQQhjAMMrlsam45d+zLH6/8o6vkWcBcrXbVKQhf6bpucCwLjmUB\\nSmmhXC419eblrbD/TAgAkUjE987xE0c7ZDmk66ajUCnq+cL63fErl25s5/8baQPaWLhx6goAAAAA\\nSUVORK5CYII=",
    "name": "Chaika.moe",
    "namespace": "trabant",
    "oneshot_arg": "Chaika Gallery or Archive URL (Will attach matching tags to your archive)",
    "origin": "builtin",
    "parameters": [
      {
        "desc": "ipb_pass_hash cookie",
        "type": "string"
      },
      {
        "default_value": 0,
        "desc": "Force resampled archive download",
        "name": "forceresampled",
        "type": "bool"
      }
    ],
    "type": "metadata",
    "version": "2.1"
  }
]

Your own instance address. Requests go from this browser straight to it.

GET /plugins/export?namespace=... (specs/006-ai-plugin-wizard FR-028) — downloads an

Section titled “GET /plugins/export?namespace=... (specs/006-ai-plugin-wizard FR-028) — downloads an”
GEThttp://localhost:3000/api/plugins/export

Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet.

The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/plugins.rs:1038), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers.


GET /plugins/export?namespace=... (specs/006-ai-plugin-wizard FR-028) — downloads an installed plugin (wizard-created or not) as a .zip containing its own .ts file, named after the namespace’s own last path component (e.g. custom/metadata/foo → foo.zip containing foo.ts) rather than the full namespace, since the namespace’s /-separated category prefix isn’t meaningful once extracted standalone.

Responses

200The endpoint responded. Its exact shape is not documented yet — see the handler at crates/lanrurugi-api/src/plugins.rs:435.

This response carries no example body.

Your own instance address. Requests go from this browser straight to it.

POST /plugins/export-batch — like [export_plugin] but for several namespaces at once,

Section titled “POST /plugins/export-batch — like [export_plugin] but for several namespaces at once,”
POSThttp://localhost:3000/api/plugins/export-batch

Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet.

The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/plugins.rs:1109), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers.


POST /plugins/export-batch — like [export_plugin] but for several namespaces at once, packed into a single .zip. Each entry is stored under its full namespace path (custom/ download/foo.ts, not just foo.ts) since two different namespaces can share the same file stem (custom/download/foo vs custom/metadata/foo) — collapsing both to foo.ts would silently drop one on zip write.

Responses

200The endpoint responded. Its exact shape is not documented yet — see the handler at crates/lanrurugi-api/src/plugins.rs:436.

This response carries no example body.

This endpoint needs an administrator token — a guest (read-only) token is refused by the server.

Your own instance address. Requests go from this browser straight to it.

DELETEhttp://localhost:3000/api/plugins/options

Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet.

The handler is delete_plugin_options in crates/lanrurugi-api/src/plugins.rs:931.

Responses

200The endpoint responded. Its exact shape is not documented yet — see the handler at crates/lanrurugi-api/src/plugins.rs:437.

This response carries no example body.

This endpoint needs an administrator token — a guest (read-only) token is refused by the server.

Your own instance address. Requests go from this browser straight to it.

GEThttp://localhost:3000/api/plugins/options

Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet.

The handler is get_plugin_options in crates/lanrurugi-api/src/plugins.rs:785.

Responses

200The endpoint responded. Its exact shape is not documented yet — see the handler at crates/lanrurugi-api/src/plugins.rs:437.

This response carries no example body.

Your own instance address. Requests go from this browser straight to it.

PUThttp://localhost:3000/api/plugins/options

Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet.

The handler is put_plugin_options in crates/lanrurugi-api/src/plugins.rs:854.

Responses

200The endpoint responded. Its exact shape is not documented yet — see the handler at crates/lanrurugi-api/src/plugins.rs:437.

This response carries no example body.

This endpoint needs an administrator token — a guest (read-only) token is refused by the server.

Your own instance address. Requests go from this browser straight to it.

PUT /plugins/priority — persists a drag-and-drop reorder of one plugin type group’s display

Section titled “PUT /plugins/priority — persists a drag-and-drop reorder of one plugin type group’s display”
POSThttp://localhost:3000/api/plugins/priority

Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet.

The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/plugins.rs:567), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers.


PUT /plugins/priority — persists a drag-and-drop reorder of one plugin type group’s display order (additive, no legacy equivalent: legacy’s plugins.html.tt2 has no such affordance at all). Rewrites every listed namespace’s priority field in its own LRR_PLUGIN_<NS> hash (same storage as customargs/enabled) to its position in order, so a subsequent GET /plugins/{type} sorts accordingly. A namespace whose actual type doesn’t match body.type is skipped (not written, not erroring the whole request) — see PutPluginPriorityBody::kind’s own docs for why this check exists at all.

Responses

200The endpoint responded. Its exact shape is not documented yet — see the handler at crates/lanrurugi-api/src/plugins.rs:432.

This response carries no example body.

This endpoint needs an administrator token — a guest (read-only) token is refused by the server.

Your own instance address. Requests go from this browser straight to it.

POSThttp://localhost:3000/api/plugins/queue

Uses a Plugin and returns a Minion Job ID matching the Plugin run. This endpoint is useful if you want to run longer-lived plugins which might timeout if ran with the standard endpoint.

Query parameters

idstring · min: 40 · max: 40 · patternoptional
ID of the archive to use the Plugin on. This is only mandatory for metadata plugins.
priorityinteger · default: 0optional
Priority of the Minion job. The higher the number, the more important the job is.
pluginstringoptional
Namespace of the plugin to use.
argstringoptional
Optional One-Shot argument to use when executing this Plugin.

Responses

200Enqueued job
{
  "job": 86,
  "operation": "queue_plugin_exec",
  "success": 1
}

This endpoint needs an administrator token — a guest (read-only) token is refused by the server.

Your own instance address. Requests go from this browser straight to it.

GET /plugins/settings?namespace=... — the plugin’s currently persisted customargs (padded/

Section titled “GET /plugins/settings?namespace=... — the plugin’s currently persisted customargs (padded/”
GEThttp://localhost:3000/api/plugins/settings

Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet.

The note below is the handler’s own documentation comment (crates/lanrurugi-api/src/plugins.rs:461), quoted verbatim. It is written for maintainers of this codebase and may reference internal identifiers.


GET /plugins/settings?namespace=... — the plugin’s currently persisted customargs (padded/ truncated to exactly its own declared parameters.len() — a stale saved array longer/shorter than the plugin’s current declaration, e.g. after the plugin was upgraded to add/remove a parameter, is silently reconciled to the current shape rather than surfaced as a mismatch, matching legacy’s own default-value-fill-then-overwrite behavior in get_plugin_parameters) and enabled (legacy’s “Run Automatically” toggle — is_plugin_enabled, false when never set, same as legacy’s own hexists-gated default).

Responses

200The endpoint responded. Its exact shape is not documented yet — see the handler at crates/lanrurugi-api/src/plugins.rs:422.

This response carries no example body.

Your own instance address. Requests go from this browser straight to it.

PUThttp://localhost:3000/api/plugins/settings

Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet.

The handler is put_plugin_settings in crates/lanrurugi-api/src/plugins.rs:497.

Responses

200The endpoint responded. Its exact shape is not documented yet — see the handler at crates/lanrurugi-api/src/plugins.rs:422.

This response carries no example body.

This endpoint needs an administrator token — a guest (read-only) token is refused by the server.

Your own instance address. Requests go from this browser straight to it.

POSThttp://localhost:3000/api/plugins/upload

Not yet described in this reference. This endpoint is listed because the server registers it, but its request and response shapes have not been written down yet.

The handler is upload_plugin in crates/lanrurugi-api/src/plugins.rs:3920.

Responses

200The endpoint responded. Its exact shape is not documented yet — see the handler at crates/lanrurugi-api/src/plugins.rs:434.

This response carries no example body.

This endpoint needs an administrator token — a guest (read-only) token is refused by the server.

Your own instance address. Requests go from this browser straight to it.

POSThttp://localhost:3000/api/plugins/use

Uses a Plugin and returns the result. If using a metadata plugin, the matching archive will not be modified in the database. See more info on Plugins in the matching section of the Docs.

Query parameters

idstring · min: 40 · max: 40 · patternoptional
ID of the archive to use the Plugin on. This is only mandatory for metadata plugins.
pluginstringoptional
Namespace of the plugin to use.
argstringoptional
Optional One-Shot argument to use when executing this Plugin.

Responses

200Plugin result
{
  "data": {
    "new_tags": "pages:45"
  },
  "operation": "use_plugin",
  "success": 1,
  "type": "metadata"
}

This endpoint needs an administrator token — a guest (read-only) token is refused by the server.

Your own instance address. Requests go from this browser straight to it.