JavaScript
import Riza from '@riza-io/api';

const client = new Riza({
  apiKey: process.env['RIZA_API_KEY'], // This is the default and can be omitted
});

const response = await client.command.execFunc({
  code: 'def execute(input): return { "name": input["name"], "executed": True }',
  language: 'python',
  input: { name: 'John' },
});

console.log(response.execution);
{
  "output": {
    "name": "John",
    "executed": true
  },
  "output_status": "valid",
  "execution": {
    "id": "",
    "exit_code": 0,
    "stdout": "",
    "stderr": "",
    "duration": 7
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

200
application/json

OK

The response is of type object.