Prerequisites
Configuring trigger type
When you create a new trigger or edit an existing one, choose the optionAPI
under trigger type.
API endpoint
The endpoint to use when making an API request will depend on the domain you’re running Mage and the trigger’s unique ID. For example, if you’re running Mage on localhost with port 6789 and the trigger you just created has an ID of 3, then the API endpoint you’ll use is:Request payload
You can optionally include runtime variables in your request payload. These runtime variables are accessible from within each pipeline block.Example
env
, schema
)
within the request payload (in addition to the global variables defined within
the pipeline itself).
To use those runtime variables, use the variable name as a key when accessing
the keyword arguments dictionary (kwargs
) in the decorated function of your
block. For example: