Magnolia 5.6 reached end of life on June 25, 2020. This branch is no longer supported, see End-of-life policy.
This page describes the commands
endpoint, which can be used to trigger commands defined in catalogs.
Commands can perform duties within the system or connect to external resources.
The REST resource must be called with HTTP POST.
The endpoint recognizes URLs with or without a catalog parameter.
POST /commands/v2/{catalogName}/{commandName}
POST /commands/v2/{commandName}
Parameter | Description | Parameter type | Data type |
commandName | required The name of the command as defined in the Command definition. | path | String |
| optional default catalog name is The name of the Command catalog. |
|
|
| required Request body in JSON or XML format; it contains the parameters required to execute the command. |
|
|
Publish (activate) the page /travel/hello.
curl http://localhost:8080/magnoliaAuthor/.rest/commands/v2/website/activate \ -H "Content-Type: application/json" \ -X POST --user superuser:superuser \ --data \ '{ "repository": "website", "path": "/travel/hello", "recursive": "false" }'
curl http://localhost:8080/magnoliaAuthor/.rest/commands/v2/website/activate \ -H "Content-Type: application/xml" \ -X POST --user superuser:superuser \ --data \ '<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <parameters> <repository>hello</repository> <path>/travel/hello</path> <recursive>false</recursive> </parameters>'