Plugin Commands API

This API provides access to read and execute any plugin command that is provided by a Plugins implementation. You can also read and update command presets. A command preset is a combination of an plugin command and pre defined data.

GET /commands

Gets a list of all commands provided by plugins.

JSON Response

PropertyTypeDescription
commands Array<CommandInfo>

List of available commands.

CommandInfo

PropertyTypeDescription
pluginId string

The ID of the plugin that provides this command.

name string

The command name.

displayName string

The command name to be displayed on the user interface. (>3.1.0)

description string

The command description

exampleData string

Optional. JSON string with example data.

POST /commands/:commandName/execute

Executes a command.

JSON Request

Optional: The body can contain a valid JSON that is used as the command data.

JSON Response

Optional: The command implementation can return data that is JSON serialized to the response body.

INTERNAL_SERVER_ERROR (500) Response

PropertyTypeDescription
message string

A detailed error message.

GET /commands/:commandName/execute

Same as the post request. The "get" is provided to allow easy command executing with just a link.

GET /commands/presets

Gets a list of all command presets.

JSON Response

PropertyTypeDescription
presets Array<CommandPreset>

List of command presets.

CommandPreset

PropertyTypeDescription
name string

The unique preset name.

displayName string

The preset name to be used for the user interface.

groupName string

Optional: Group presets together.

commandName string

The name of the plugin provided command.

commandData object

Optional: Data for the command. Do not use strings here.

POST /commands/presets

Updates a command preset

JSON Request

PropertyTypeDescription
preset CommandPreset"

The command presets.

BAD_REQUEST (400) Response

PropertyTypeDescription
message string

No preset or preset.name missing.

PUT /commands/presets/:presetName

Adds a new command preset

JSON Request

PropertyTypeDescription
preset CommandPreset

The command presets.

BAD_REQUEST (400) Response

PropertyTypeDescription
message string

No preset or preset.name missing.

DELETE /commands/presets/:presetName

Deletes an existing command preset.

BAD_REQUEST (400) Response

PropertyTypeDescription
message string

Preset does not exist.

POST /commands/presets/:presetName/execute

Executes a command.

JSON Response

Optional: The command implementation can return data that is JSON serialized to the response body.

BAD_REQUEST (400) Response

PropertyTypeDescription
message string

Preset does not exist.

INTERNAL_SERVER_ERROR (500) Response

PropertyTypeDescription
message string

A detailed error message.

GET /commands/presets/:presetName/execute

Same as the post request. The "get" is provided to allow easy command preset executing with just a link.