Core
Functions

Run a Function

The Function run endpoint lets you invoke an Evervault Function. The body of the request should contain a payload, the value of which will be decrypted and passed as an argument to the Function.

post/functions/{function_name}/runs

Request

Path parameters

function_namestring required

The name of the Function to be executed.

Request body

payloadobject required

The data payload that the Function will use during its execution. Any encrypted values will be decrypted before being passed to the function.

asyncboolean

If you want your Function to run asynchronously and notify a callback URL, this can be set to true and the API will queue your Function run and return a 202 response code.

Example request

{
  "payload": {
    "name": "ev:debug:Tk9D:oVPHsPvwFHNk73DU:AglNWOgZekolcrxdxSpZJOusBgE+C9eWSapGIZkgTsUj:JKeSkdhVE9SCXqQINID4oBRCE/VhTb56VWGqyObP:$"
  }
}

Response

The Function run has completed

idstring required

A unique identifier representing this specific Function execution instance.

status'success' | 'failure' | 'scheduled' required

The outcome of the Function execution.

resultobject

This field represents the output returned by the Function. This is provided only when the Function execution status is 'success'.

createdAtinteger required

The exact time, in epoch milliseconds, when this Function execution was triggered.

Example response

{
  "id": "func_run_eead1d640d7c",
  "status": "success",
  "result": {
    "message": "Hello, World"
  },
  "error": {
    "message": "Some error message!",
    "stack": "Error: Some error message!\n    at exports.handler (/runtime/app/index.js:5:11)\n    at /runtime/index.js:64:26\n    at new Promise (<anonymous>)\n    at /runtime/index.js:51:16"
  },
  "createdAt": 1692972623233
}

Changes

No recorded changes to this operation across all 1 revision of this API.