User

Execute a command as the specified user

Changed on

Executes a command on the system as the specified user (private API)

post/api/user/run_command

Request

  • The document declares no server URL.
  • Auth
    socaAuth (a scheme the document does not define) and socaToken (a scheme the document does not define)

Headers

X-EDH-USERstring required

SOCA username to execute command as

Request body application/x-www-form-urlencoded

commandstring required

Command to execute

Example request

{
  "command": "ls -la /home"
}

Response

Command executed successfully

successboolean
messagestring

Command output

Example response

{
  "success": true,
  "message": "total 4 drwxr-xr-x 3 root root 4096 Jan 1 12:00 user.name"
}

Changes

    • info

      the endpoint scheme security socaAuth AND socaToken was added to the API

    • info

      the endpoint scheme security edhAuth AND edhToken was removed from the API

    • info

      the endpoint scheme security edhAuth AND edhToken was added to the API

    • info

      the endpoint scheme security socaAuth AND socaToken was removed from the API