API

Trigger API

This API allows to query the state of the triggers.

Get all Triggers

This operation lets you get all the configured triggers.

curl http://drydock:3000/api/v1/triggers

{
    "data": [
      {
        "id":"smtp.gmail",
        "type":"smtp",
        "name":"gmail",
        "configuration":{
           "host":"smtp.gmail.com",
           "port":465,
           "user":"xxx@gmail.com",
           "pass":"secret",
           "from":"admin@dd.com",
           "to":"xxx@gmail.com"
        }
      }
    ],
    "total": 1,
    "limit": 0,
    "offset": 0,
    "hasMore": false
}

Get a Trigger by id

This operation lets you get a specific Trigger.

curl http://drydock:3000/api/v1/triggers/smtp/gmail

{
  "id":"smtp.gmail",
  "type":"smtp",
  "name":"gmail",
  "configuration":{
     "host":"smtp.gmail.com",
     "port":465,
     "user":"xxx@gmail.com",
     "pass":"secret",
     "from":"admin@dd.com",
     "to":"xxx@gmail.com"
  }
}

Agent-scoped lookup

To fetch a trigger registered on a specific agent, append the agent name:

curl http://drydock:3000/api/v1/triggers/smtp/gmail/agent1

Running a trigger

This operation lets you run a specific Trigger with simulated data.

export CONTAINER='{"id":"123456789","name":"container_test","watcher":"watcher_test","updateKind":{"kind":"tag","semverDiff":"patch","localValue":"1.2.3","remoteValue":"1.2.4","result":{"link":"https://my-container/release-notes/"}}}'
curl -X POST -H "Content-Type: application/json" -d $CONTAINER http://drydock:3000/api/v1/triggers/smtp/gmail

Running a remote trigger (agent-scoped)

Use the agent-scoped route when the target container is managed by a connected remote agent. The path order is /:type/:name/:agent (agent is the final segment).

export CONTAINER='{"id":"123456789","name":"container_test","agent":"agent1","watcher":"remote"}'
curl -X POST -H "Content-Type: application/json" -d $CONTAINER http://drydock:3000/api/v1/triggers/smtp/gmail/agent1