Closed MathijsG closed 4 years ago
The action field is the identifier for your command. It's purpose is to identify the command you want to execute on the server side.
Basically it is like this: in config.yaml your system commands are stored, with a display name, an action (identifier) and the real command. Now you want to run a command from your client (or anyone else using your OctoPrint instance). you send the OctoPrint Instance a request to start the command and OctoPrint needs a way to know which command you want to use because you wouldn't like to execute a command line that got send from somewhere right?
I hope this clarified the purpose of the action field from OctoPrints System Command feature.
My command wouldn't work until I put something random in the 'action' field. Even though the command rule on itself is valid and does work in the command line. What is the purpose of that weird action field anyway? Where is it being used for? Because it can be confusing.