method_StartActionByGet.adoc 1.1 KB

1234567891011121314151617181920212223
  1. = API Method: StartActionByGet (deprecated)
  2. [WARNING]
  3. ====
  4. `StartActionByGet` is **deprecated** and will be removed in a future version of OliveTin. Use xref:api/method_StartAction.adoc[StartAction] instead.
  5. Despite its name, this method no longer supports `GET` requests. The OliveTin 2k style of putting the action ID in the URL (eg: `GET /api/StartActionByGet/pingGithub`) returns `404` in OliveTin 3k, and is not coming back.
  6. ====
  7. == Migrating to `StartAction`
  8. `StartActionByGet` takes only an `actionId`, and returns an Execution Tracking ID. `StartAction` does the same with `bindingId` - for a normal action, the binding ID is the same as the action `id` from your `config.yaml` (see xref:api/start_action.adoc#api-ids[Action IDs vs Binding IDs]).
  9. .Before (deprecated)
  10. ----
  11. user@host: curl http://olivetin.example.com:1337/api/StartActionByGet --json '{"actionId": "pingGithub"}'
  12. ----
  13. .After
  14. ----
  15. user@host: curl http://olivetin.example.com:1337/api/StartAction --json '{"bindingId": "pingGithub"}'
  16. {"executionTrackingId":"ff7d6f13-af8f-4ebe-8174-ad4cc7197b45"}
  17. ----