Skip to main content
The Plugin Management APIs allow you to manage plugins in Halo CMS, including installation, configuration, enabling/disabling, and upgrades.

Plugin Listing

List Plugins

Retrieve a paginated list of plugins with filtering options.
curl -X GET "http://localhost:8091/apis/api.console.halo.run/v1alpha1/plugins?page=0&size=20" \
  -H "Authorization: Bearer {token}"
page
integer
default:"0"
Page number. Default is 0.
size
integer
default:"0"
Size number. Default is 0.
keyword
string
Keyword of plugin name or description
enabled
boolean
Whether the plugin is enabled
labelSelector
array
Label selector. e.g.: hidden!=true
fieldSelector
array
Field selector. e.g.: metadata.name==halo
sort
array
Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.
items
array
Array of plugin objects
page
integer
Current page number
size
integer
Size of each page
total
integer
Total number of plugins
totalPages
integer
Total number of pages

Plugin Installation

Install Plugin (File Upload)

Install a plugin by uploading a JAR file.
curl -X POST "http://localhost:8091/apis/api.console.halo.run/v1alpha1/plugins/install" \
  -H "Authorization: Bearer {token}" \
  -F "file=@/path/to/plugin.jar"
plugin
object
The installed plugin object
metadata.name
string
Plugin identifier
spec.displayName
string
Display name of the plugin
spec.version
string
Plugin version
spec.enabled
boolean
Whether the plugin is enabled

Install Plugin from URI

Install a plugin from a remote URL.
curl -X POST "http://localhost:8091/apis/api.console.halo.run/v1alpha1/plugins/-/install-from-uri" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "uri": "https://example.com/plugins/my-plugin.jar"
  }'
uri
string
required
URL of the plugin JAR file to install
plugin
object
The installed plugin object

Plugin State Management

Change Plugin Running State

Start or stop a plugin.
curl -X PUT "http://localhost:8091/apis/api.console.halo.run/v1alpha1/plugins/{name}/plugin-state" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "enable": true
  }'
name
string
required
Plugin name
enable
boolean
required
Set to true to start the plugin, false to stop it
plugin
object
The updated plugin object

Reload Plugin

Reload a plugin by name.
curl -X PUT "http://localhost:8091/apis/api.console.halo.run/v1alpha1/plugins/{name}/reload" \
  -H "Authorization: Bearer {token}"
name
string
required
Plugin name to reload
plugin
object
The reloaded plugin object

Plugin Configuration

Fetch Plugin Setting

Retrieve the setting schema for a plugin.
curl -X GET "http://localhost:8091/apis/api.console.halo.run/v1alpha1/plugins/{name}/setting" \
  -H "Authorization: Bearer {token}"
name
string
required
Plugin name
setting
object
The plugin setting schema

Fetch Plugin Config

Retrieve the current configuration values for a plugin.
curl -X GET "http://localhost:8091/apis/api.console.halo.run/v1alpha1/plugins/{name}/json-config" \
  -H "Authorization: Bearer {token}"
name
string
required
Plugin name
config
object
JSON configuration object for the plugin

Update Plugin Config

Update the configuration of a plugin.
curl -X PUT "http://localhost:8091/apis/api.console.halo.run/v1alpha1/plugins/{name}/json-config" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "setting1": "value1",
    "setting2": "value2"
  }'
name
string
required
Plugin name
config
object
required
Configuration object with key-value pairs

Reset Plugin Config

Reset the plugin configuration to default values.
curl -X PUT "http://localhost:8091/apis/api.console.halo.run/v1alpha1/plugins/{name}/reset-config" \
  -H "Authorization: Bearer {token}"
name
string
required
Plugin name
configMap
object
The reset configuration object

Plugin Upgrades

Upgrade Plugin (File Upload)

Upgrade a plugin by uploading a new JAR file.
curl -X POST "http://localhost:8091/apis/api.console.halo.run/v1alpha1/plugins/{name}/upgrade" \
  -H "Authorization: Bearer {token}" \
  -F "file=@/path/to/plugin-v2.jar"
name
string
required
Plugin name to upgrade

Upgrade Plugin from URI

Upgrade a plugin from a remote URL.
curl -X POST "http://localhost:8091/apis/api.console.halo.run/v1alpha1/plugins/{name}/upgrade-from-uri" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "uri": "https://example.com/plugins/my-plugin-v2.jar"
  }'
name
string
required
Plugin name to upgrade
uri
string
required
URL of the new plugin version JAR file
plugin
object
The upgraded plugin object

Plugin Assets

Fetch CSS Bundle

Merge all CSS bundles of enabled plugins into one.
curl -X GET "http://localhost:8091/apis/api.console.halo.run/v1alpha1/plugins/-/bundle.css" \
  -H "Authorization: Bearer {token}"
css
string
Merged CSS content from all enabled plugins

Fetch JS Bundle

Merge all JavaScript bundles of enabled plugins into one.
curl -X GET "http://localhost:8091/apis/api.console.halo.run/v1alpha1/plugins/-/bundle.js" \
  -H "Authorization: Bearer {token}"
javascript
string
Merged JavaScript content from all enabled plugins

Build docs developers (and LLMs) love