4
0

method_StartActionByGet.adoc 872 B

1234567891011121314151617181920212223242526272829
  1. = API Method: StartActionByGet
  2. This is the method that allows you to specify the action ID in the URL, and is probably the best to do quick integrations - QR Codes, streamdeck, etc. You cannot pass arguments using this method.
  3. * **HTTP Method**: `GET`
  4. * **Request Type**: Action ID in the URL
  5. * **Response Type**: Execution Tracking ID
  6. include::partial$api/start_action_methods.adoc[]
  7. == Example API call; Start an action by ID in the URL
  8. .curl
  9. ----
  10. user@host: curl http://olivetin.example.com/api/StartActionByGet/pingGithub
  11. ----
  12. The corresponding config.yaml would look like this;
  13. [source,yaml]
  14. ----
  15. actions:
  16. - title: Ping GitHub.com
  17. id: pingGithub
  18. shell: ping github.com -c 1
  19. ----
  20. IDs are used by these API calls, as you probably want the interface to display a human-readable title, whereas the API call doesn't want to have spaces or punctuation.