pluginApi
DSL wrapper for plugin API routes. Automatically prefixes all nested routes with /api/plugins/{pluginId}.
Usage:
override suspend fun onEnable(routing: Routing) {
routing.pluginApi(pluginId) {
get("/notes") { ... }
post("/notes") { ... }
}
}Content copied to clipboard
Parameters
pluginId
The unique plugin identifier used for route prefixing
block
Route configuration block