Execute function
Run a function in a secure, isolated environment. Define a function named execute
. The function will be passed input
as an object.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
The function to execute. Your code must define a function named "execute" that takes in a single argument and returns a JSON-serializable value.
The interpreter to use when executing code.
python
, javascript
, typescript
Set of key-value pairs to add to the function's execution environment.
List of input files.
Configuration for HTTP requests and authentication.
The input to the function. This must be a valid JSON-serializable object. If you do not pass an input, your function will be called with None (Python) or null (JavaScript/TypeScript) as the argument.
Configuration for execution environment limits.
The ID of the runtime revision to use when executing code.
Response
The output of the function.
The status of the output. "valid" means your function executed successfully and returned a valid JSON-serializable object, or void. "json_serialization_error" means your function executed successfully, but returned a nonserializable object. "error" means your function failed to execute.
error
, json_serialization_error
, valid