Triggers
Create
Creates a trigger listening on a set of tables.
Token has to be master (then runWithTokenId can be also master). If it isn't master, it has to have canManageBuckets permission or componentAccess permission for the component which you want to trigger. This also applies when updating and deleting triggers. When updating the component of trigger you need permissions for both the current component and the component you're updating the trigger to.
Without runWithTokenId, the trigger creates the token it runs with, in the same request, and owns it:
- The token never expires and is named [_internal] Token for triggering <configurationId>.
- In a project with a protected default branch it can only create jobs; elsewhere it can manage buckets and read all file uploads.
- Your token has to be able to create that token.
- If the trigger cannot be created, no token is left behind.
- Deleting the trigger, or giving it another token, revokes the token.
post/v2/storage/triggers
Request
- Base URLhttps://connection.keboola.com
- Auth
- API key in header X-StorageApi-Token
- or API key in header X-KBC-ManageApiToken
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"runWithTokenId": 123,
"component": "orchestration",
"configurationId": "123",
"coolDownPeriodMinutes": 20,
"tableIds": [
"in.c-test.watched-1",
"in.c-prod.watched-5"
]
}Response
Trigger created.
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.