POST
/
executor
/
localExecutionCommand
curl --request POST \
  --url https://demo.enneo.ai/api/mind/executor/localExecutionCommand \
  --header 'Content-Type: application/json' \
  --data '{
  "id": 123,
  "code": "<?php\n\n echo '\''{\"success\": true}'\'';\n",
  "type": "sourceCode",
  "language": "php82",
  "packages": "",
  "parameters": {
    "key1": "val1ö\"\\n*!",
    "key2": "val'\''ue"
  }
}'
{
  "unix": "curl -s http://host.docker.internal:8000/api/codeExecutor/sdk/php82.php -o sdk.php && echo '{}' | ENNEO_API_URL=http://host.docker.internal:8000 ENNEO_SESSION_TOKEN=***TOKEN_EXAMPLE*** ENNEO_USER_AUTH_HEADER=Authorization: Bearer ***TOKEN_EXAMPLE*** SDK=sdk.php php -dxdebug.mode=debug -dxdebug.client_port=9003 -dxdebug.client_host=127.0.0.1 -dxdebug.start_with_request=yes mycode.php",
  "windows": "Invoke-WebRequest -Uri http://host.docker.internal:8000/api/codeExecutor/sdk/php82.php -OutFile sdk.php ; $env:ENNEO_API_URL = \"http://host.docker.internal:8000\"; $env:ENNEO_SESSION_TOKEN=***TOKEN_EXAMPLE*** $env:ENNEO_USER_AUTH_HEADER = \"Authorization: Bearer ***TOKEN_EXAMPLE***\"; $env:SDK = \"sdk.php\"; ; php -dxdebug.mode=debug -dxdebug.client_port=9003 -dxdebug.client_host=127.0.0.1 -dxdebug.start_with_request=yes mycode.php"
}

Authorizations

connect.sid
string
cookie
required

Cookie-based authentication

Body

application/json
id
integer

The id of the executor

Example:

123

code
string

The name of the executor

Example:

"<?php\n\n echo '{\"success\": true}';\n"

type
string

The type of the executor

Example:

"sourceCode"

language
string
Example:

"php82"

packages
string
Example:

""

parameters
object

Response

200
application/json
Successful execution
unix
string
Example:

"curl -s http://host.docker.internal:8000/api/codeExecutor/sdk/php82.php -o sdk.php && echo '{}' | ENNEO_API_URL=http://host.docker.internal:8000 ENNEO_SESSION_TOKEN=***TOKEN_EXAMPLE*** ENNEO_USER_AUTH_HEADER=Authorization: Bearer ***TOKEN_EXAMPLE*** SDK=sdk.php php -dxdebug.mode=debug -dxdebug.client_port=9003 -dxdebug.client_host=127.0.0.1 -dxdebug.start_with_request=yes mycode.php"

windows
string
Example:

"Invoke-WebRequest -Uri http://host.docker.internal:8000/api/codeExecutor/sdk/php82.php -OutFile sdk.php ; $env:ENNEO_API_URL = \"http://host.docker.internal:8000\"; $env:ENNEO_SESSION_TOKEN=***TOKEN_EXAMPLE*** $env:ENNEO_USER_AUTH_HEADER = \"Authorization: Bearer ***TOKEN_EXAMPLE***\"; $env:SDK = \"sdk.php\"; ; php -dxdebug.mode=debug -dxdebug.client_port=9003 -dxdebug.client_host=127.0.0.1 -dxdebug.start_with_request=yes mycode.php"