Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

A number of context variables and methods are available for use in webhook provider match scripts and webhook function scripts. View suggestions while editing the match script or function editing windows by typing Ctrl + Space. These variables and methods are described below.

Context Variables

NameDescription
FLX_MESSAGE_IDUnique id for the incoming webhook message
FLX_PRISTINE_PAYLOADPristine (untouched) payload from the sender. Use this payload when generating hmac strings
FLX_REMOTE_ADDRRemote address of the incoming request. If using a reverse proxy, this will be the address of the proxy, NOT the address of the original sender. A reverse proxy will typically pass the original sender address as a new header 'x-forwarded-for'.
FLX_REMOTE_HOSTRemote host of the incoming request. If using a reverse proxy, this will be the host of the proxy, NOT the host of the original sender.
HTTP_HEADERSHeaders of the incoming request. Ex. HTTP_HEADERS['header_name']
PAYLOAD

Hash map of incoming payload. Nodes can be referenced with dot notation. Ex. PAYLOAD.field2.field3

If the webhook payload cannot be converted to JSON, it will be passed as a simple string

QUERY_PARAMSQuery parameters of the incoming request. Nodes can be referenced with dot notation. Ex. QUERY_PARAMS.field2 

Function Classes

ClassDescription
FLEXDEPLOYFunctions for performing actions in FlexDeploy
HMACFunctions for generating an hmac string
LOGFunctions for printing log messages
GITHUBFunctions for getting information from a GitHub payload
BITBUCKETFunctions for getting information from a Bitbucket payload
SLACKFunctions for getting information from a Slack payload
  • No labels