How to use cmd.run in salt-api

Viewed 2024
curl -skS "https://xx.xxx.xxx.xxx:8080/run"     -H 'Accept: application/x-yaml'     -H 'Content-type: application/json'     -d '[{
        "client": "local",
        "tgt": "*",
        "fun": "cmd.run",
        "name": "df -h",
        "username": "ravi",
        "password": "teledna",
        "eauth": "pam" }]'

I want to run a command through the salt-api. But I am getting an error. Where test.ping is working fine. I think I am missing the params in the body. Can anybody point out the documentation or adjust the curl command above here. Thanks.

1 Answers
Related