netlify functions:invoke <name>

Trigger a function while in netlify dev with simulated data, good for testing function calls including Netlify's Event Triggered Functions

Arguments

NameDescription
nameFunction name to invoke

Options

NameDescription
-f, --functions <functions>Specify a functions folder to parse, overriding netlify.toml
-n, --name <name>Function name to invoke
-p, --payload <payload>Supply POST payload in stringified json, or a path to a json file
-q, --querystring <querystring>Querystring to add to your function invocation
--debugPrint debugging information
--httpProxy <httpProxy>Proxy server address to route requests through
--httpProxyCertificateFilename <httpProxyCertificateFilename>Certificate file to use when connecting using a proxy server
--identitySimulate Netlify Identity authentication JWT
--no-identityAffirm unauthenticated request
port <port>Port where netlify dev is accessible. e.g. 8888