start_action_methods.adoc 1.9 KB

123456789101112131415161718192021222324
  1. There are 2 methods to start an action in OliveTin, which can be used in scripts or other applications. These methods allow you to trigger actions either immediately or wait for them to complete. Like every OliveTin API method, they are called with an HTTP `POST` and a JSON request body (eg: `curl --json '{...}'`).
  2. .Webhook/API reference table
  3. [%header]
  4. |======================================================
  5. | Function | HTTP Method | Request Type (How to select an action) | Response Type
  6. | xref:api/method_StartAction.adoc[StartAction]
  7. | POST
  8. | xref:api/start_action.adoc#api-request-startaction[`bindingId`, arguments, tracking ID, justification]
  9. | xref:api/start_action.adoc#api-response-trackingid[Execution Tracking ID]
  10. | xref:api/method_StartActionAndWait.adoc[StartActionAndWait]
  11. | POST
  12. | xref:api/start_action.adoc#api-request-startactionandwait[`actionId`, arguments, justification]
  13. | xref:api/start_action.adoc#api-response-logentry[Log Entry (waits for the action to finish)]
  14. |======================================================
  15. NOTE: `StartActionAndWait` checks that the caller is allowed to view the action's logs *after* the action has finished. A caller that can start an action but cannot view its logs receives a permission error, even though the action has already run - so retrying on that error can run the action again. Use `StartAction` when you do not need the log entry.
  16. WARNING: `StartActionByGet` and `StartActionByGetAndWait` are xref:api/start_action.adoc#api-deprecated-byget[deprecated] and will be removed in a future version. Use `StartAction` or `StartActionAndWait` instead.
  17. You can also browse these methods in the link:https://docs.olivetin.app/api/swagger/3k/[OpenAPI/Swagger] docs if you prefer. The link:https://github.com/OliveTin/OliveTin/blob/main/proto/olivetin/api/v1/olivetin.proto[Protobuf definition] is the source of truth for all request and response fields.