Skip to content
English

Remote CLI invocation

POST
/system/cli
curl --request POST \
--url https://example.com/api/v1/system/cli \
--header 'Content-Type: application/json' \
--cookie grommunioAuthJwt=<grommunioAuthJwt> \
--data '{ "command": "example", "mode": "exec", "color": false, "fs": { "additionalProperty": "example" } }'
X-Csrf-Token
string

CSRF Token

Media typeapplication/json
object
command
required

CLI command to execute

string
mode

CLI mode (execute or complete)

string
default: exec
Allowed values: exec complete
color

Enable terminal colors

boolean
fs

If not null, enable filesystem redirection. Each property is a file path

object
key
additional properties

Content of the file

string

Execution successful

Media typeapplication/json
object
code

Command exit code (exec mode only)

integer
stdout

Command output (exec mode only)

string
fs
object
key
additional properties
object
mode

Mode the file was opened with

string
conf

Configuration key the file path was derived from

string
nullable
content

Content of the file

string
completions

Possible command completions (complete mode only)

Array<string>
Examplegenerated
{
"code": 1,
"stdout": "example",
"fs": {
"additionalProperty": {
"mode": "example",
"conf": "example",
"content": "example"
}
},
"completions": [
"example"
]
}

Validation of input parameters failed

Media typeapplication/json
object
message
string
errors

List of errors encountered during validation

Array<string>
Examplegenerated
{
"message": "example",
"errors": [
"example"
]
}

An error occurred while processing the request

Media typeapplication/json
object
message

String representation of the exception

string
Examplegenerated
{
"message": "example"
}