Triggers

Update

Updates an existing trigger. All attributes are optional; only the provided ones are changed.

When updating the component of trigger you need permissions for both the current component and the component you're updating the trigger to.

Giving a trigger another runWithTokenId revokes the token the trigger created for itself, unless another trigger still runs with it.

put/v2/storage/triggers/{triggerId}/

Request

Path parameters

triggerIdinteger required

ID of the trigger you want to update.

Request body

runWithTokenIdinteger

ID of the token that runs the configured component. Replacing the token the trigger created for itself revokes that token.

componentstring

Component ID of the triggered configuration (typically orchestration).

configurationIdstring

ID of component configuration.

coolDownPeriodMinutesinteger

Minimal cool down period before firing action again in minutes (min is 1 minute).

tableIdsstring[]

IDs of tables to watch (like in.c-test.watched). Replaces the current set.

Example request

{
  "runWithTokenId": 100,
  "component": "orchestration",
  "configurationId": "123",
  "coolDownPeriodMinutes": 20,
  "tableIds": [
    "in.c-test.watched-1"
  ]
}

Response

Trigger updated.

idstring required

Trigger ID.

runWithTokenIdinteger required

ID of token used for running configured component.

componentstring required

Component ID of the triggered configuration.

configurationIdstring required

ID of component configuration.

lastRunstring nullable required

Time of the last trigger run, ISO 8601 with a +hhmm offset; null if never fired.

coolDownPeriodMinutesinteger required

Minimal cool down period before firing action again in minutes.

Example response

{
  "id": "3",
  "runWithTokenId": 123,
  "component": "orchestration",
  "configurationId": "config-100",
  "lastRun": "2017-02-13T12:01:05+0100",
  "creatorToken": {
    "id": 1,
    "description": "dev@keboola.com"
  },
  "coolDownPeriodMinutes": 20,
  "tables": [
    {
      "tableId": "in.c-test.watched-1"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.