title: Running ‘heroku run:detached’ programmatically. How exactly?
body: <p>I've tried googling and stackoverflowing this and all I get is links back to the API reference or examples of scaling dynos, which is not what I want.</p>
  
  <p><code>heroku run:detached</code> is great as it just spins up a dyno with your app, runs whatever you want, then spins down the dyno.</p>
  
  <p>How do I achieve the exact same things but using the <strong>Heroku Platform AP</strong>I?</p>
  
  <p>I've seen people mention you have to use the <code>Dyno</code> endpoint on the API, but how? Can someone offer an exact example of how I would run the following from the API?</p>
  
  <pre><code>$ heroku run:detached --size 2x rake my_task.rb
  </code></pre>