toc

Running Cages

How to run your deployed Cages.

Automatically run your Cage code by passing the Cage name and the payload into the evervault.run() function. Or, send an HTTPS POST request with a JSON payload and API-Key header to https://run.evervault.com/cage-name.

Cages can currently only be called server-side because they require your team's API key for authentication.

  • Node.js
  • Python
javascript
// `encryptedData` must be an Object
const result = await evervault.run('YOUR-CAGE-NAME', encryptedData);

Run your application to see the result. Return the result to the client via your server, or forward it to a third party API via an HTTP request. All outbound HTTP requests are logged, and are shown in your team's Dashboard.

The Node.js SDK is pre-initialized in all Cages as the globally-scoped evervault object. This allows you to encrypt the result, and store it in your database.

Cage IP Whitelist

You can restrict your Cage to only run when invoked from specified IP addresses or CIDR blocks.

If your Cage is invoked from a IP which isn’t included in your whitelist, you will receive a 403 HTTP status code with the Evervault error header: x-evervault-error-code: forbidden-ip-error.

You can configure the IP Whitelist from the Evervault dashboard by going to Dashboard -> Cage -> IP Whitelist


Was this page useful?