method_StartActionByGetAndWait.adoc 1.0 KB

1234567891011121314151617181920212223
  1. = API Method: StartActionByGetAndWait (deprecated)
  2. [WARNING]
  3. ====
  4. `StartActionByGetAndWait` is **deprecated** and will be removed in a future version of OliveTin. Use xref:api/method_StartActionAndWait.adoc[StartActionAndWait] 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/StartActionByGetAndWait/pingGithub`) returns `404` in OliveTin 3k, and is not coming back.
  6. ====
  7. == Migrating to `StartActionAndWait`
  8. `StartActionAndWait` takes the same `actionId` field, and returns the same Log Entry, so you only need to change the method name. It also accepts `arguments` and a `justification`.
  9. .Before (deprecated)
  10. ----
  11. user@host: curl http://olivetin.example.com:1337/api/StartActionByGetAndWait --json '{"actionId": "pingGithub"}'
  12. ----
  13. .After
  14. ----
  15. user@host: curl http://olivetin.example.com:1337/api/StartActionAndWait --json '{"actionId": "pingGithub"}'
  16. {"logEntry":{"actionTitle":"Ping GitHub.com","output":"...","exitCode":0, ... }}
  17. ----