Invoke a function
Make invocation requests on your functions.
Function deployments on Beamlit have an invocation endpoint which can be used by external consumers to request an invocation execution. Invocation requests are then routed on the Global invocation Network based on the deployment policies associated with your function deployment.
Invocation endpoints
Whenever you deploy a function on Beamlit, an invocation endpoint is generated on Global invocation Network.
The invocation URL looks like this:
There is one distinct endpoint for each function deployment, i.e. for each combination of a function and an environment on which it is deployed.
For example, if you have one version of function “your-function” deployed on the production environment and one version deployed on the development environment:
run.beamlit.dev/{your-workspace}/functions/{your-function}?environment=production
will call the production deploymentrun.beamlit.dev/{your-workspace}/functions/{your-function}?environment=development
will call the development deployment
If you do not specify the environment in the invocation request, it will call the production environment by default. If the function is not deployed on the production environment, it will return an error.
Endpoint authentication
By default, functions deployed on Beamlit aren’t public. It is necessary to authenticate all invocation requests, via a bearer token.
The evaluation of authentication/authorization for invocation requests is managed by the Global invocation Network based on the access given in your workspace.
Make an invocation request
Beamlit API
Make a POST request to the invocation endpoint for the function deployment you are requesting, making sure to fill in the authentication token:
Read about the API parameters in the reference.
Beamlit console
invocation requests can be made from the Beamlit console from the function deployment’s workbench page.