What arguments do Forge functions receive?

This seems a pretty basic question, but I struggle to find documentation on what arguments are passed to a Forge function (in particular a function handling a web trigger if that matters).

I would have expected to find it here: https://developer.atlassian.com/platform/forge/manifest-reference/modules/function/ under the handler property spec.

Has any seen a type definition for this?


It seems there is just as little documentation on what a web trigger function should return. This example seems to give some insight into the contract but this is just an example. I cannot find docs for this either.

Another example for reference: Bitbucket

Looks like both have a req object being passed to the function handling the webtrigger and then send back an object of:

 body: String,
 headers: Object
 statusCode: Number,
 statusText: String,