title: Why isn't salt-api working with this configuration?
body: <p>I'm trying to set up a really basic salt-api configuration just to test it out.  I'm using salt-master and <strong>salt-minion 2016.3.0 Boron</strong> on <strong>Ubuntu 14.04</strong></p>
  
  <p>I'm using <a href="http://bencane.com/2014/07/17/integrating-saltstack-with-other-services-via-salt-api/" rel="nofollow">this tutorial</a>, and my configuration is below.</p>
  
  <p><strong>/srv/salt/top.sls</strong></p>
  
  <pre><code>base:
    '*':
        - reactor
  </code></pre>
  
  <p><strong>/etc/salt/master.d/reactor.conf</strong></p>
  
  <pre><code>reactor:
    - 'salt/netapi/hook/restart':
      - /srv/reactor/test.sls
  </code></pre>
  
  <p><strong>/srv/reactor/test.sls</strong></p>
  
  <pre><code>{% set postdata = data.get('post', {}) %}
  
  {% if postdata.secretkey == "replacethiswithsomethingbetter"  %}
  test:
    local.cmd.run:
      - tgt: '{{ postdata.tgt }}'
      -arg:
        - touch /home/username/test.txt
  {% endif %}
  </code></pre>
  
  <p>I have restarted the master, and if I run <code>salt '*' state.sls reactor</code> then everything in the state works fine.  All it does is <code>touch /home/username/test.txt</code>, and that file is created when I run the state.</p>
  
  <p>The command I'm running to use the API is</p>
  
  <pre><code>curl -H "Accept: application/json" -d tgt='*' -d secretkey="replacethiswithsomethingbetter" -k https://192.168.1.1:8080/hook/services/restart
  </code></pre>
  
  <p>and that command returns <code>{"success": true}</code></p>
  
  <p>Then I check on the minion, and the file hasn't been created.</p>
  
  <p>The output of <code>salt-run state.event pretty=True</code> is </p>
  
  <pre><code>salt/netapi/hook/services/restart   {
      "_stamp": "2016-06-29T19:30:04.193832", 
      "body": "", 
      "headers": {
          "Accept": "application/json", 
          "Content-Length": "46", 
          "Content-Type": "application/x-www-form-urlencoded", 
          "Host": "192.168.1.1:8080", 
          "Remote-Addr": "192.168.1.3", 
          "User-Agent": "curl/7.35.0"
      }, 
      "post": {
          "secretkey": "replacethiswithsomethingbetter", 
          "tgt": "*"
      }
  }
  </code></pre>
  
  <p>I did go through all of the self signed cert steps.  I'm not 100% sure why I need those, but it's done, and they are listed in the rest_cherrypy configs.</p>
  
  <p>Any help is appreciated.</p>
  
  <hr>
  
  <p><strong>EDIT 1</strong></p>
  
  <p>I edited the reactor stuff, because there's an example of using cmd.run, or local.cmd.run located int he salt docs <a href="https://docs.saltstack.com/en/latest/topics/reactor/" rel="nofollow">here</a></p>
  
  <p>It's still returning true, and not working.</p>