This method allows to run a script on a host此方法允许在主机上运行脚本.

    Returns the result of script execution返回执行脚本的结果.

    Property参数 Type类型 Description说明
    response string Whether the script was run successfully脚本是否成功运行. Possible values可能的值为: or或 .
    value string Script output脚本输出.

    Run a script运行脚本

    Request请求:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": {
    4. "value": "PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.\n64 bytes from 127.0.0.1: icmp_req=1 ttl=64 time=0.074 ms\n64 bytes from 127.0.0.1: icmp_req=2 ttl=64 time=0.030 ms\n64 bytes from 127.0.0.1: icmp_req=3 ttl=64 time=0.030 ms\n\n--- 127.0.0.1 ping statistics ---\n3 packets transmitted, 3 received, 0% packet loss, time 1998ms\nrtt min/avg/max/mdev = 0.030/0.044/0.074/0.022 ms\n"
    5. },
    6. "id": 1
    7. }

    CScript::execute() in frontends/php/include/classes/api/services/CScript.php.