...
Excerpt Include |
---|
| Commands |
---|
| Commands |
---|
nopanel | true |
---|
|
The The REST resource must be called with HTTP
.You can only call commands via REST which are whitelisted at /modules/rest-services/rest-endpoints/commands/enabledCommands
. (For further details see REST module configuring the commands endpoint and REST security.)
Request URLs
The endpoint recognizes URLs with or without a catalog parameter.
/commands/v2/{catalogName}/{commandName}
/commands/v2/{commandName}
Parameters
Advanced Tables - Table Plus |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
enableHighlighting | false |
---|
|
Parameter | Description | Parameter type | Data type | commandName | required The name of the command as defined in the Command definition. | path | String | catalogName
| optional default catalog name is default The name of the Command catalog. | path
| String
| body
| required Request body in JSON or XML format; it contains the parameters required to execute the command. | body
| String
| |
Example
Publish (activate) the page /travel/hello
.
Code Block |
---|
|
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"
}' |
You cannot send the request as XML, you only can receive the response in XML with the Accept
header.