API Method: StartAction

This is the method the OliveTin web UI uses to start actions, and is probably the best method to use if you are writing scripts.

  • HTTP Method: POST

  • Request Type: OliveTin request object

  • Response Type: Execution Tracking ID

There are several variants of this API call available which might be easier for scripts (or humans) to work with:

There are 4 main 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, and they can be accessed via HTTP requests.

Webhook/API reference table
Function HTTP Method Request Type (How to select an action) Response Type

StartAction

POST

OliveTin request object

Execution Tracking ID

StartActionByGet

GET

Action ID in the URL

Execution Tracking ID

StartActionAndWait

POST

OliveTin request object

Log Entry (waits for the action to finish)

StartActionByGetAndWait

GET

Action ID in the URL

Log Entry (waits for the action to finish)

Example API call: Start an action using StartAction

curl
user@host: curl -X POST "http://olivetin.webapps.teratan.lan/api/StartAction" -d '{"actionId": "nuclear_reactor_shutdown"}'
Powershell
PS C:\Users\xcons> $json = '{"actionId": "deploy_attack_gnomes"}'
PS C:\Users\xcons> Invoke-RestMethod -Method "Post" -Uri "http://olivetinServer:1337/api/StartAction" -Body $json

Example API call: Start an action using StartAction with arguments

curl
user:host: curl -X POST 'http://olivetin.example.com/api/StartAction' -d '{"actionId": "Ping_host", "arguments": [{"name": "host", "value": "example.com"},{"name": "count", "value": "1"}]}'