CLI REST-API
exec
exec [file]
The "exec" command executes all CLI commands in the specified file by reading
the file on a line-by-line basis and then running each line as it would have
been entered manually.
You can set optional variables in the url (/api/set-macro?file=xyz&var_p1=clock).
These variables will be applied in the executed file.
"${p1:meinberg}" -> "clock"
If a variable isn't set, it will take its default-value.
"${p1:meinberg}" -> "meinberg"
RESTAPI: The data can be passed in the body like this:
{
"parameters": {
"file": "xyz"
}
}
Name | Value | Description | Example |
---|
| file | | |
REST-API Support:
This command is supported by the REST API:
Method: PUT
URL: /api/exec
Body:
{
"parameters": {
"file": [filename]
}
}
Example using curl:
curl -X PUT /api/exec -d
"{
\"parameters\": {
\"file\": \"xyz\"
}
}"