EBF API

Authentication token

From Command line terminal:

$ curl --location --request POST 'http://{EBF Server IP Address}/api/v0.2/token/' --header 'Content-Type: application/json' --data-raw '{"username": "{ username }","password":"{password}"}'

Example:

$ curl --location --request POST 'http://172.16.30.138/api/v0.2/token/' --header 'Content-Type: application/json' --data-raw '{"username": "testuser", "password":"test"}'

{
    "result": "success",
    "data": {
        "token": "ujpy0cpf2g9e0ydqp0pmbgr6hsdcxclcysigs062hynqm41dqnrdgukysjjgl5nwwp1jtp50ep4qbfte1c0o3gw77ldwk6m5swopj3snlh7o0e1y54qn78r68wpyf5oy" 
    }
}

Device Management

List Devices

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/

Example:
http://172.16.30.102/api/v0.2/devices/
Output: "{
    "result": "success",
    "data": [
        "rpi01",
        "bbb01",
    ]
}" 

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/' --header 'Authorization: token {Authorization token}'

Example:

$curl --location --request 'http://172.16.30.102/api/v0.2/devices/' --header 'Authorization: token ujpy0cpf2g9e0ydqp0pmbgr6hsdcxclcysigs062hynqm41dqnrdgukysjjgl5nwwp1jtp50ep4qbfte1c0o3gw77ldwk6m5swopj3snlh7o0e1y54qn78r68wpyf5oy'

{
    "result": "success",
    "data": [
        "rpi01",
        "bbb01",
    ]
}

Allocate Device

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/{device name}/assign/

Example:
http://172.16.30.102/api/v0.2/devices/bbb01/assign/
Output: "{
    "result": "success" 
}" 

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/{device name}/assign/' --header 'Authorization: token {Authorization token}'

Example:

$curl --location --request 'http://172.16.30.102/api/v0.2/devices/bbb01/assign/' --header 'Authorization: token ujpy0cpf2g9e0ydqp0pmbgr6hsdcxclcysigs062hynqm41dqnrdgukysjjgl5nwwp1jtp50ep4qbfte1c0o3gw77ldwk6m5swopj3snlh7o0e1y54qn78r68wpyf5oy'

{
    "result": "success" 
}

Release Device

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/{device name}/release/

To release device assigned to some other user:
http://{EBF Server IP Address}/api/v0.2/devices/{device name}/release/force/

Example:

http://172.16.30.102/api/v0.2/devices/bbb01/release/
Output: "{
    "result": "success" 
}" 

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/{device name}/release/' --header 'Authorization: token {Authorization token}'

Example:

$curl --location --request 'http://172.16.30.102/api/v0.2/devices/bbb01/release/' --header 'Authorization: token ujpy0cpf2g9e0ydqp0pmbgr6hsdcxclcysigs062hynqm41dqnrdgukysjjgl5nwwp1jtp50ep4qbfte1c0o3gw77ldwk6m5swopj3snlh7o0e1y54qn78r68wpyf5oy'

{
    "result": "success" 
}

Device Release Permissions

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/device-name/release force

Example:
http://172.16.30.102/api/v0.2/devices/bb01/release force/true
Output: "{
    "result": "success",
    "data": [
        "bbb01",
    ]
}" 

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/device-name/release force true ' --header 'Authorization: token {Authorization token}'

Example:

$curl --location --request 'http://172.16.30.102/api/v0.2/devices/device-name/release force true/' --header 'Authorization: token ujpy0cpf2g9e0ydqp0pmbgr6hsdcxclcysigs062hynqm41dqnrdgukysjjgl5nwwp1jtp50ep4qbfte1c0o3gw77ldwk6m5swopj3snlh7o0e1y54qn78r68wpyf5oy'

{
    "result": "success",
    "data": [
        "bbb01",
    ]
}

My Devices

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/mine/

Example:
http://172.16.30.102/api/v0.2/devices/mine/
Output: "{
    "result": "success",
    "data": [
        "bbb01",
    ]
}" 

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/mine/' --header 'Authorization: token {Authorization token}'

Example:

$curl --location --request 'http://172.16.30.102/api/v0.2/devices/mine/' --header 'Authorization: token ujpy0cpf2g9e0ydqp0pmbgr6hsdcxclcysigs062hynqm41dqnrdgukysjjgl5nwwp1jtp50ep4qbfte1c0o3gw77ldwk6m5swopj3snlh7o0e1y54qn78r68wpyf5oy'

{
    "result": "success",
    "data": [
        "bbb01",
    ]
}

Device Info

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/{device name}/

Example:

http://172.16.30.102/api/v0.2/devices/bbb01/
Output: "{
    "result": "success",
    "data": {
        "Hostname": "bbb01",
        "AssignedTo": "",
        "PowerCommands": [
            "on",
            "off",
            "reboot",
            "status" 
        ],
        "lab": {
            "Zombie": {
                "Hostname": "HBZombie",
                "IPAddress": "172.16.30.101",
                "URL": "http://172.16.30.101/",
                "DevicePort": 1
            },
            "IOCXConnected": false,
            "Power": {
                "PowerSwitch": "IO-CX Power Switch",
                "PowerSwitchPort": 1
            },
            "NetworkBoot": {
                "TFTP Boot Directory": "upload/DUT1",
                "NFS Root Directory": "/var/lib/lava/dispatcher/tmp/nfs/DUT1/tmp" 
            }
        }
    }
}" 

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/{device name}/' --header 'Authorization: token {Authorization token}'

Example:

$curl --location --request 'http://172.16.30.102/api/v0.2/devices/bbb01/release/' --header 'Authorization: token ujpy0cpf2g9e0ydqp0pmbgr6hsdcxclcysigs062hynqm41dqnrdgukysjjgl5nwwp1jtp50ep4qbfte1c0o3gw77ldwk6m5swopj3snlh7o0e1y54qn78r68wpyf5oy'

{
    "result": "success",
    "data": {
        "Hostname": "bbb01",
        "AssignedTo": "",
        "PowerCommands": [
            "on",
            "off",
            "reboot",
            "status" 
        ],
        "lab": {
            "Zombie": {
                "Hostname": "HBZombie",
                "IPAddress": "172.16.30.101",
                "URL": "http://172.16.30.101/",
                "DevicePort": 1
            },
            "IOCXConnected": false,
            "Power": {
                "PowerSwitch": "IO-CX Power Switch",
                "PowerSwitchPort": 1
            },
            "NetworkBoot": {
                "TFTP Boot Directory": "upload/DUT1",
                "NFS Root Directory": "/var/lib/lava/dispatcher/tmp/nfs/DUT1/tmp" 
            }
        }
    }
}

Device delete

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/{device name}/delete

Example:

https://172.16.7.21/api/v0.2/devices/rpi-board/delete

From Command line terminal:

 $ curl --location --request GET 'https://{EBF Server IP Address}/api/v0.2/devices/{device name}/' --header 'Authorization: token {Authorization token}'

Example:

$ curl -s -k --location --request DELETE https://172.16.7.21/api/v0.2/devices/rpi-board --header 'Authorization: token 22nbjxec52gxfpz32t82cqb7twfk9b2llrlaxfm2jl4ftkfhnxylyidsae260ajqfp2lk3r0l02crugak42yoy7tt90sn4flo20zt13ibuc0yfnb0xjgxsg3tcry33am'

Output
{"result":"success"}

Power Control

ON

From Command line terminal:

http://{EBF Server IP Address}/api/v0.2/devices/<devicename>/power/on/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/power/on/
{"result": "success","data": "success","version": "2.3.2"}

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<devicename>/power/on/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request PUT 'http://172.16.3.21/api/v0.2/devices/bbb_demo/power/on/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"data": "on", "result": "success","version": "2.3.2"}

OFF

From Command line terminal:

http://{EBF Server IP Address}/api/v0.2/devices/<devicename>/power/off/ --header 'Authorization: token {Authorization token}'

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/power/off/ --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"result": "success","data": "success","version": "2.3.2"}

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<devicename>/power/off/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request PUT 'http://172.16.3.21/api/v0.2/devices/bbb_demo/power/on/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"result": "success","data": "success","version": "2.3.2"}

REBOOT

From Command line terminal:

http://{EBF Server IP Address}/api/v0.2/devices/<devicename>/power/reboot/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/power/reboot/
{"result": "success","data": "success","version": "2.3.2"}

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<devicename>/power/reboot/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request PUT 'http://172.16.3.21/api/v0.2/devices/bbb_demo/power/reboot/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'

{"result": "success","data": "success","version": "2.3.2"}

User Defined

From Command line terminal:

http://{EBF Server IP Address}/api/v0.2/devices/<devicename>/power/<userDefinedCommand>/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/power/status/
{"result":"success","data":"success","version":"2.3.2"}

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<devicename>/power/<userDefinedCommand>/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request PUT 'http://172.16.3.21/api/v0.2/devices/bbb_demo/power/status/'--header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"result":"success","data":"success","version":"2.3.2"}

Zombie Power Control

ON

From Web browser:

http://{EBF Server IP Address}/api/v0.2/zombies/{zombie name}/power/on

Example:

https://172.16.7.21/api/v0.2/zombies/DelhiTimesysZombie01/power/on

From Command line terminal:

 $ curl --location ---request POST https://172.16.7.21/api/v0.2/zombies/DelhiTimesysZombie01/power/on --header 'Authorization: token {Authorization token}'

curl -s -k --location --request POST https://172.16.7.21/api/v0.2/zombies/DelhiTimesysZombie01/power/on --header 'Authorization: token 22nbjxec52gxfpz32t82cqb7twfk9b2llrlaxfm2jl4ftkfhnxylyidsae260ajqfp2lk3r0l02crugak42yoy7tt90sn4flo20zt13ibuc0yfnb0xjgxsg3tcry33am'
{"result":"success","data":"CURL HTTP://ADMIN:1234@172.16.30.99/OUTLET?1=ON"}

OFF

From Web browser:

http://{EBF Server IP Address}/api/v0.2/zombies/{zombie name}/power/off

Example:

https://172.16.7.21/api/v0.2/zombies/DelhiTimesysZombie01/power/off

From Command line terminal:

 $ curl --location ---request POST https://172.16.7.21/api/v0.2/zombies/DelhiTimesysZombie01/power/off --header 'Authorization: token {Authorization token}'

curl -s -k --location --request POST https://172.16.7.21/api/v0.2/zombies/DelhiTimesysZombie01/power/off --header 'Authorization: token 22nbjxec52gxfpz32t82cqb7twfk9b2llrlaxfm2jl4ftkfhnxylyidsae260ajqfp2lk3r0l02crugak42yoy7tt90sn4flo20zt13ibuc0yfnb0xjgxsg3tcry33am'
{"result":"success","data":"CURL HTTP://ADMIN:1234@172.16.30.99/OUTLET?1=OFF"}

REBOOT

From Web browser:

http://{EBF Server IP Address}/api/v0.2/zombies/{zombie name}/power/reboot

Example:

https://172.16.7.21/api/v0.2/zombies/DelhiTimesysZombie01/power/reboot

From Command line terminal:

 $ curl --location ---request POST https://172.16.7.21/api/v0.2/zombies/DelhiTimesysZombie01/power/reboot/ --header 'Authorization: token {Authorization token}'

$ curl -s -k --location --request POST https://172.16.7.21/api/v0.2/zombies/DelhiTimesysZombie01/power/off/ --header 'Authorization: token 22nbjxec52gxfpz32t82cqb7twfk9b2llrlaxfm2jl4ftkfhnxylyidsae260ajqfp2lk3r0l02crugak42yoy7tt90sn4flo20zt13ibuc0yfnb0xjgxsg3tcry33am'
{"result":"success","data":"CURL HTTP://ADMIN:1234@172.16.30.99/OUTLET?1=OFF"}

$ curl -s -k --location --request POST https://172.16.7.21/api/v0.2/zombies/DelhiTimesysZombie01/power/on/ --header 'Authorization: token 22nbjxec52gxfpz32t82cqb7twfk9b2llrlaxfm2jl4ftkfhnxylyidsae260ajqfp2lk3r0l02crugak42yoy7tt90sn4flo20zt13ibuc0yfnb0xjgxsg3tcry33am'
{"result":"success","data":"CURL HTTP://ADMIN:1234@172.16.30.99/OUTLET?1=ON"}

Device Serial Console

Upload

From Command line terminal:

 $ curl --location --request POST 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/upload/serial/' \
        --header 'Authorization: token {Authorization token}' \
        --form 'file=@"{File Path}"'

Example:

curl --location --request POST 'http://172.16.3.21/api/v0.2/devices/upload/serial/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
     --form 'file=@"/home/hbansal/Isos/MLO-cmm-2019.01+gitAUTOINC+4fa6070cdd-r32"'
{
    "message": "MLO-cmm-2019.01+gitAUTOINC+4fa6070cdd-r32 uploaded",
    "result": "success" 
}

Download

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/download/serial?path={File path to download}' \
        --header 'Authorization: token {Authorization token}' \
        --output '{Saved file}'

Example:

curl --location --request GET 'http://172.16.3.21/api/v0.2/devices/download/serial?path=/etc/profile' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
     --output 'profile'

Run Command

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/run/serial/' \
        --header 'Authorization: token {Authorization token}' --header 'Content-Type: application/json' \
        --data-raw '{"command": "{Command}", "prompts": "{device prompt to check for completion, default:empty}", "timeout": {timeout in seconds}, "single":{true/false for single or multi command execution}}'

Example:

curl --location --request GET 'http://172.16.3.21/api/v0.2/devices/run/serial/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
     --header 'Content-Type: application/json' --form --data-raw '{"command": "whoami","prompts": "", "timeout": 10, "single":true}'
{
    "data": "whoami\n\nroot",
    "result": "success",
    "version": "2.3.2" 
}

Start

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/console/serial/start/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/console/serial/start/
{"data":"started","result":"success"}

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/console/serial/start/'--header 'Authorization: token {Authorization token}'

Example:

curl --location --request GET 'http://172.16.3.21/api/v0.2/devices/bbb_demo/console/serial/start/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"data":"started","result":"success"}

Stop

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/console/serial/stop/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/console/serial/stop/
{"data":"stopped","result":"success"}

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/console/serial/stop/'--header 'Authorization: token {Authorization token}'

Example:

curl --location --request GET 'http://172.16.3.21/api/v0.2/devices/bbb_demo/console/serial/stop/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"data":"stopped","result":"success"}

Restart

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/console/serial/restart/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/console/serial/restart/
{"data":"restarted","result":"success"}

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/console/serial/restart/'--header 'Authorization: token {Authorization token}'

Example:

curl --location --request GET 'http://172.16.3.21/api/v0.2/devices/bbb_demo/console/serial/restart/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"data":"restarted","result":"success"}

IsActive

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/console/serial/isactive/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/console/serial/isactive/
{"data":{"isActive":true,"message":"Console session running."},"result":"success"}

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/console/serial/isactive/'

Example:

curl --location --request GET 'http://172.16.3.21/api/v0.2/devices/bbb_demo/console/serial/isactive/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"data":{"isActive":true,"message":"Console session running."},"result":"success"}

Device SSH Console

Upload

From Command line terminal:

 $ curl --location --request POST 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/upload/ssh/' \
        --header 'Authorization: token {Authorization token}' \
        --form 'file=@"{File Path}"' \
        --form 'path="{Upload Path}"' \
        --form 'username="{SSH Username}"' \
        --form 'device_ip="{Device IP Address}"'

Example:

curl --location --request POST 'http://172.16.3.21/api/v0.2/devices/upload/ssh/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
     --form 'file=@"/home/hbansal/Isos/BBB/MLO"' \
     --form 'path="/root"' \
     --form 'username="root"' \
     --form 'device_ip="192.168.111.13"'

{
    "message": "MLO uploaded",
    "result": "success" 
}

Download

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/download/ssh?path={File path to download}&device_ip={Device IP Address}&username={Device SSH Username}' \
        --header 'Authorization: token {Authorization token}' \
        --output '{Saved file}'

Example:

curl --location --request GET 'http://172.16.3.21/api/v0.2/devices/download/ssh?path=/root/test.txt&device_ip=192.168.111.13&username=root' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
     --output 'test.txt'

Run Command

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/run/ssh/' \
        --header 'Authorization: token {Authorization token}' --header 'Content-Type: application/json' \
        --data-raw '{"command": "{Command}", "device_ip": "{Device IP Address}", "username": "{Device Username}"}'

Example:

curl --location --request GET 'http://172.16.3.21/api/v0.2/devices/run/ssh/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
     --header 'Content-Type: application/json' --form --data-raw ''{"command": "whoami","device_ip": "192.168.111.13","username": "root"}''
{
    "data": {
        "data": [
            "root\n" 
        ],
        "return_code": 0
    },
    "result": "success" 
}

Import SSH Key

From Command line terminal:

 $ curl --location --request POST 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/import/key/ssh/' \
        --header 'Authorization: token {Authorization token}' \
        --form 'username="{SSH Username}"' \
        --form 'password="{SSH Password}"' \
        --form 'device_ip="{Device IP Address}"'

Example:

curl --location --request POST 'http://172.16.30.138/api/v0.2/devices/bbb01/import/key/ssh/' \
     --header 'Authorization: token 3ywmgwdt2hm7uwn79104e6rctkhm1x5tgzssrbthhcgajg8ja1i3uxu3ypwpjys060s0mfzm9z6yk91nkwiodcpn1fyeytrk2li27mqyoqg3dafcifnta1l35h6c18bq' \
     --form 'device_ip="192.168.111.13"' \
     --form 'username="root"' \
     --form 'password="root"'

{
    "message": "",
    "result": "success" 
}

Hotplugs

Status

From Web browser:

http://{EBF Server IP Address}/api/<devicename>/hotplug/<hotplug number(1-4)>/status/

Example:
http://172.16.3.21/api/bbb_demo/hotplug/1/status/
{"data": "off", "result": "success"}" 

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/<devicename>/hotplug/<hotplug number(1-4)>/status/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request GET 'http://172.16.3.21/api/bbb_demo/hotplug/1/status/'--header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"data": "off", "result": "success"}

Alternative API For Status

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/hotplug/<hotplug number (1-4)>/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/hotplug/1/
{"data": "on", "result": "success"}" 

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/hotplug/<hotplug number (1-4)>/' --header 'Authorization: token {Authorization token}'

Example:

curl --location --request GET 'http://172.16.3.21/api/v0.2/devices/bbb_demo/hotplug/1/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"data":"on","result":"success"}

ON

From Web browser:

http://{EBF Server IP Address}/api/<devicename>/hotplug/<hotplug number(1-4)>/on/

Example:
http://172.16.3.21/api/bbb_demo/hotplug/1/on/
{"data": "on", "result": "success"}" 

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/<devicename>/hotplug/<hotplug number(1-4)>/on/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request GET 'http://172.16.3.21/api/bbb_demo/hotplug/1/on/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"data": "on", "result": "success"}

Alternative API For Status

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/hotplug/<hotplug number (1-4)>/on

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/hotplug/1/on
{"data": "on", "result": "success"}" 

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/hotplug/<hotplug number (1-4)>/on' --header 'Authorization: token {Authorization token}'

Example:

curl --location --request PUT 'http://172.16.3.21/api/v0.2/devices/bbb_demo/hotplug/1/on' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"data":"on","result":"success"}

OFF

From Web browser:

http://{EBF Server IP Address}/api/<devicename>/hotplug/<hotplug number(1-4)>/off/

Example:
http://172.16.3.21/api/bbb_demo/hotplug/1/off/
{"data": "off", "result": "success"}" 

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/<devicename>/hotplug/<hotplug number(1-4)>/off/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request GET 'http://172.16.3.21/api/bbb_demo/hotplug/1/off/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"data": "off", "result": "success"}

Alternative API For Status

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/hotplug/<hotplug number (1-4)>/off

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/hotplug/1/off
{"data": "off", "result": "success"}" 

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/hotplug/<hotplug number (1-4)>/off'  --header 'Authorization: token {Authorization token}'

Example:

curl --location --request PUT 'http://172.16.3.21/api/v0.2/devices/bbb_demo/hotplug/1/off' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"data":"off","result":"success"}

Switch

From Web browser:

http://{EBF Server IP Address}/api/<devicename>/hotplug/<hotplug number(1-4)>/switch/

Example:
http://172.16.3.21/api/bbb_demo/hotplug/1/switch/
{"data": "on", "result": "success"}" 

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/<devicename>/hotplug/<hotplug number(1-4)>/switch/'  --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request GET 'http://172.16.3.21/api/bbb_demo/hotplug/1/switch/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"data": "on", "result": "success"}

Alternative API For Status

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/hotplug/<hotplug number (1-4)>/switch

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/hotplug/1/switch
{"data": "off", "result": "success"}" 

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/hotplug/<hotplug number (1-4)>/switch'  --header 'Authorization: token {Authorization token}'

Example:

curl --location --request PUT 'http://172.16.3.21/api/v0.2/devices/bbb_demo/hotplug/1/switch' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"data":"off","result":"success"}

SDMux

Status

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdmux/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/sdmux/

{"data": "device", "result": "success"}

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdmux/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request GET 'http://172.16.3.21/api/v0.2/devices/bbb_demo/sdmux/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"data": "device", "result": "success"}

Switch

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdmux/switch

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/sdmux/switch

{"data": "zombie", "result": "success"}

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdmux/switch' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request PUT 'http://172.16.3.21/api/v0.2/devices/bbb_demo/sdmux/switch' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"data": "zombie", "result": "success"}

Switch-Zombie

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdmux/switch/zombie

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/sdmux/switch/zombie

{"data": "zombie", "result": "success"}

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdmux/switch/zombie' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request PUT 'http://172.16.3.21/api/v0.2/devices/bbb_demo/sdmux/switch/zombie' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"data": "zombie", "result": "success"}

Switch-Device

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdmux/device

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/sdmux/device

{"data": "device", "result": "success"}

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdmux/device' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request PUT 'http://172.16.3.21/api/v0.2/devices/bbb_demo/sdmux/device' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"data": "device", "result": "success"}

USBMux

Status

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/usbmux/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/usbmux/

{"result":"success","data":"zombie"}

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/usbmux/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request GET 'http://172.16.3.21/api/v0.2/devices/bbb_demo/usbmux/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"result":"success","data":"zombie"}

Switch

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/usbmux/switch

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/usbmux/switch
{"result":"success","data":"device","hp_num":1}

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/usbmux/switch' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request PUT 'http://172.16.3.21/api/v0.2/devices/bbb_demo/usbmux/switch' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"result":"success","data":"zombie","hp_num":1}

Switch-Zombie

From Web browser:

http://{EBF Server IP Address}/api/<device name>/usbmux/switch/Zombie

Example:
http://172.16.3.21/api/bbb_demo/usbmux/switch/zombie
{"result":"success","data":"zombie","hp_num":1}

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/<device name>/usbmux/switch/zombie' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request GET 'http://172.16.3.21/api/bbb_demo/usbmux/switch/zombie' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"result": "success", "data": "zombie", "hp_num": 1}

Switch-Device

From Web browser:

http://{EBF Server IP Address}/api/<device name>/usbmux/switch/device

Example:
http://172.16.3.21/api/bbb_demo/usbmux/switch/device
{"result":"success","data":"device","hp_num":1}

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/<device name>/usbmux/switch/device' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request GET 'http://172.16.3.21/api/bbb_demo/usbmux/switch/device' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
{"result": "success", "data": "device", "hp_num": 1}

SDCard

Info

From Web browser:

http://{EBF Server IP Address}/api/<devicename>/sdcard/info/

Example:
http://172.16.3.21/api/bbb_demo/sdcard/info

{
    "result": "success",
    "data": {
        "partitions": [
            {
                "start_sector": "2048",
                "fstype": "vfat",
                "dev": "sdb1",
                "size": "100M",
                "bootable": true,
                "label": "boot",
                "type": "part" 
            },
            {
                "start_sector": "206848",
                "fstype": "ext4",
                "dev": "sdb2",
                "size": "6.9G",
                "bootable": false,
                "label": "",
                "type": "part" 
            }
        ],
        "fdisk": [
            "",
            "Disk /dev/sdb: 7.4 GiB, 7948206080 bytes, 15523840 sectors",
            "Units: sectors of 1 * 512 = 512 bytes",
            "Sector size (logical/physical): 512 bytes / 512 bytes",
            "I/O size (minimum/optimal): 512 bytes / 512 bytes",
            "Disklabel type: dos",
            "Disk identifier: 0x0d7da0a4",
            "",
            "Device     Boot  Start      End  Sectors  Size Id Type",
            "/dev/sdb1  *      2048   206847   204800  100M  c W95 FAT32 (LBA)",
            "/dev/sdb2       206848 14542847 14336000  6.9G 83 Linux",
            "",
            "" 
        ],
        "total_size": "7.4G",
        "device": "sdb" 
    }
}

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/<devicename>/sdcard/info' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request GET 'http://172.16.3.21/api/bbb_demo/sdcard/info/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'

{"result": "success", "data": {"partitions": [{"start_sector": "2048", "fstype": "vfat", "dev": "sdb1", "size": "100M", "bootable": true, "label": "boot", "type": "part"}, {"start_sector": "206848", "fstype": "ext4", "dev": "sdb2", "size": "6.9G", "bootable": false, "label": "", "type": "part"}], "fdisk": ["", "Disk /dev/sdb: 7.4 GiB, 7948206080 bytes, 15523840 sectors", "Units: sectors of 1 * 512 = 512 bytes", "Sector size (logical/physical): 512 bytes / 512 bytes", "I/O size (minimum/optimal): 512 bytes / 512 bytes", "Disklabel type: dos", "Disk identifier: 0x0d7da0a4", "", "Device     Boot  Start      End  Sectors  Size Id Type", "/dev/sdb1  *      2048   206847   204800  100M  c W95 FAT32 (LBA)", "/dev/sdb2       206848 14542847 14336000  6.9G 83 Linux", "", ""], "total_size": "7.4G", "device": "sdb"}}

Alternative API For Sdcard info

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdcard/info

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/info

{
    "result": "success",
    "data": {
        "partitions": [
            {
                "start_sector": "2048",
                "fstype": "vfat",
                "dev": "sdb1",
                "size": "100M",
                "bootable": true,
                "label": "boot",
                "type": "part" 
            },
            {
                "start_sector": "206848",
                "fstype": "ext4",
                "dev": "sdb2",
                "size": "6.9G",
                "bootable": false,
                "label": "",
                "type": "part" 
            }
        ],
        "fdisk": [
            "",
            "Disk /dev/sdb: 7.4 GiB, 7948206080 bytes, 15523840 sectors",
            "Units: sectors of 1 * 512 = 512 bytes",
            "Sector size (logical/physical): 512 bytes / 512 bytes",
            "I/O size (minimum/optimal): 512 bytes / 512 bytes",
            "Disklabel type: dos",
            "Disk identifier: 0x0d7da0a4",
            "",
            "Device     Boot  Start      End  Sectors  Size Id Type",
            "/dev/sdb1  *      2048   206847   204800  100M  c W95 FAT32 (LBA)",
            "/dev/sdb2       206848 14542847 14336000  6.9G 83 Linux",
            "",
            "" 
        ],
        "total_size": "7.4G",
        "device": "sdb" 
    }
}

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdcard/info' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request GET 'http://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/info/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'

{"result":"success","data":{"partitions":[{"start_sector":"2048","fstype":"vfat","dev":"sdb1","size":"100M","type":"part","label":"boot","bootable":true},{"start_sector":"206848","fstype":"ext4","dev":"sdb2","size":"6.9G","type":"part","label":"","bootable":false}],"fdisk":["","Disk /dev/sdb: 7.4 GiB, 7948206080 bytes, 15523840 sectors","Units: sectors of 1 * 512 = 512 bytes","Sector size (logical/physical): 512 bytes / 512 bytes","I/O size (minimum/optimal): 512 bytes / 512 bytes","Disklabel type: dos","Disk identifier: 0x0d7da0a4","","Device     Boot  Start      End  Sectors  Size Id Type","/dev/sdb1  *      2048   206847   204800  100M  c W95 FAT32 (LBA)","/dev/sdb2       206848 14542847 14336000  6.9G 83 Linux","",""],"total_size":"7.4G","device":"sdb"}}

Mount

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdcard/mount

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/mount

{
    "success": null,
    "data": "http://172.16.99.104:8002" 
}

From Command line terminal:

 $ curl --location --request POST 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdcard/mount' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request POST 'http://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/mount/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'

{"success": null, "data": "http://172.16.99.104:8002"}

Format

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdcard/format

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/format

{
  "format": [
        {
                 "partition": "sda1", 
                 "type": "vfat" 

        }
       {
                 "partition": "sda2", 
                 "type": "ext4" 

        }
            ]

}

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdcard/format' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request POST 'http://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/format/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'

{"format": [{"partition": "sda1","type": "vfat"},{"partition": "sda2", "type":"ext4"}]}

Partition

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdcard/partition

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/partition

{
        "partitions":[
                {
                        "label": "boot", 
                        "size": "64", 
                        "type": "vfat" 

                },
                {
                        "label": "rfs", 
                        "size": "2048", 
                        "type": "ext4" 

                }
        ]

}

From Command line terminal:

 $ curl --location --request POST 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdcard/partition' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request POST 'http://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/partition/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'

{"partitions":[{"label": "boot","size": "64","type": "vfat"},{"label": "rfs","size": "2048","type": "ext4"}]}

Flash File

From Local Computer

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdcard/flash' \
        --header 'Authorization: token {Authorization token}' \
        --form 'file=@{File Path}' --form 'partition={Device partition}'

Example:

$ curl --location --request POST 'http://172.16.30.138/api/v0.2/devices/bbb01/sdcard/flash/' \
       --header 'Authorization: token 3ywmgwdt2hm7uwn79104e6rctkhm1x5tgzssrbthhcgajg8ja1i3uxu3ypwpjys060s0mfzm9z6yk91nkwiodcpn1fyeytrk2li27mqyoqg3dafcifnta1l35h6c18bq' 
       --form 'file=@/home/hbansal/Isos/BBB/bbb_minimal_ll_orig.img.gz' --form 'partition=sda'

{
  "result":"success",
  "data":{"job_id":"b33bd7db-1065-41c3-b27a-a059f3734de1","progress_url":"http://172.16.30.138/api/v0.2/devices/bbb01/sdcard/flash/status/b33bd7db-1065-41c3-b27a-a059f3734de1/"}
}

From EBF Server

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdcard/flash' \
        --header 'Authorization: token {Authorization token}' \
        --header 'Content-Type: application/json' --data-raw '{"file": "{File Name}", "partition": "{Device partition}"}'

Example:

$ curl --location --request POST 'http://172.16.30.138/api/v0.2/devices/bbb01/sdcard/flash/' \
       --header 'Authorization: token 3ywmgwdt2hm7uwn79104e6rctkhm1x5tgzssrbthhcgajg8ja1i3uxu3ypwpjys060s0mfzm9z6yk91nkwiodcpn1fyeytrk2li27mqyoqg3dafcifnta1l35h6c18bq' \
       --header 'Content-Type: application/json' --data-raw '{"file": "bbb_minimal_ll_orig.img.gz", "partition": "sda"}'

{
  "result":"success",
  "data":{"job_id":"b33bd7db-1065-41c3-b27a-a059f3734de1","progress_url":"http://172.16.30.138/api/v0.2/devices/bbb01/sdcard/flash/status/b33bd7db-1065-41c3-b27a-a059f3734de1/"}
}

Check Flash File Status

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdcard/flash/status/{Job Id}' \
        --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request GET 'http://172.16.30.138/api/v0.2/devices/bbb01/sdcard/flash/status/a825c7c0-3e36-4f4f-833a-af565ecd155b/' 
       --header 'Authorization: token 3ywmgwdt2hm7uwn79104e6rctkhm1x5tgzssrbthhcgajg8ja1i3uxu3ypwpjys060s0mfzm9z6yk91nkwiodcpn1fyeytrk2li27mqyoqg3dafcifnta1l35h6c18bq'

{
  "result":"success",
  "data":{
            "status":"started",
             "info":{
                      "progress":11,
                      "file_size":2147483648,
                      "storage_size_check":"done",
                      "file_size_check":"done",
                      "flash":"running",
                      "current":"Flashing File",
                      "file_name":"bbb_minimal_ll_orig.img.gz","partition":"sda" 
                    }
         }
}

USB

Flash File

From Local Computer

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/usb/flash' \
        --header 'Authorization: token {Authorization token}' \
        --form 'file=@{File Path}' --form 'partition={Device partition}'

Example:

$ curl --location --request POST 'http://172.16.30.138/api/v0.2/devices/bbb01/usb/flash/' \
       --header 'Authorization: token 3ywmgwdt2hm7uwn79104e6rctkhm1x5tgzssrbthhcgajg8ja1i3uxu3ypwpjys060s0mfzm9z6yk91nkwiodcpn1fyeytrk2li27mqyoqg3dafcifnta1l35h6c18bq' 
       --form 'file=@/home/hbansal/Isos/BBB/bbb_minimal_ll_orig.img.gz' --form 'partition=sda'

{
  "result":"success",
  "data":{"job_id":"b33bd7db-1065-41c3-b27a-a059f3734de1","progress_url":"http://172.16.30.138/api/v0.2/devices/bbb01/usb/flash/status/b33bd7db-1065-41c3-b27a-a059f3734de1/"}
}

From EBF Server

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/usb/flash' \
        --header 'Authorization: token {Authorization token}' \
        --header 'Content-Type: application/json' --data-raw '{"file": "{File Name}", "partition": "{Device partition}"}'

Example:

$ curl --location --request POST 'http://172.16.30.138/api/v0.2/devices/bbb01/usb/flash/' \
       --header 'Authorization: token 3ywmgwdt2hm7uwn79104e6rctkhm1x5tgzssrbthhcgajg8ja1i3uxu3ypwpjys060s0mfzm9z6yk91nkwiodcpn1fyeytrk2li27mqyoqg3dafcifnta1l35h6c18bq' \
       --header 'Content-Type: application/json' --data-raw '{"file": "bbb_minimal_ll_orig.img.gz", "partition": "sda"}'

{
  "result":"success",
  "data":{"job_id":"b33bd7db-1065-41c3-b27a-a059f3734de1","progress_url":"http://172.16.30.138/api/v0.2/devices/bbb01/usb/flash/status/b33bd7db-1065-41c3-b27a-a059f3734de1/"}
}

Check Flash File Status

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/usb/flash/status/{Job Id}' \
        --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request GET 'http://172.16.30.138/api/v0.2/devices/bbb01/usb/flash/status/a825c7c0-3e36-4f4f-833a-af565ecd155b/' 
       --header 'Authorization: token 3ywmgwdt2hm7uwn79104e6rctkhm1x5tgzssrbthhcgajg8ja1i3uxu3ypwpjys060s0mfzm9z6yk91nkwiodcpn1fyeytrk2li27mqyoqg3dafcifnta1l35h6c18bq'

{
  "result":"success",
  "data":{
            "status":"started",
             "info":{
                      "progress":11,
                      "file_size":2147483648,
                      "storage_size_check":"done",
                      "file_size_check":"done",
                      "flash":"running",
                      "current":"Flashing File",
                      "file_name":"bbb_minimal_ll_orig.img.gz","partition":"sda" 
                    }
         }
}

Network Boot

Transfer File

From Local Computer

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/netboot/transfer/file/' \
        --header 'Authorization: token {Authorization token}' \
        --form 'file=@{File Path}'

Example:

$ curl --location --request POST 'http://172.16.30.138/api/v0.2/devices/bbb01/netboot/transfer/file/' \
       --header 'Authorization: token 3ywmgwdt2hm7uwn79104e6rctkhm1x5tgzssrbthhcgajg8ja1i3uxu3ypwpjys060s0mfzm9z6yk91nkwiodcpn1fyeytrk2li27mqyoqg3dafcifnta1l35h6c18bq' 
       --form 'file=@/home/hbansal/Isos/BBB/rootfs-bbb.tar.gz'

{
  "result":"success",
  "data":{"job_id":"b33bd7db-1065-41c3-b27a-a059f3734de1","progress_url":"http://172.16.30.138/api/v0.2/devices/bbb01/netboot/transfer/file/status/b33bd7db-1065-41c3-b27a-a059f3734de1/"}
}

From EBF Server

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/netboot/transfer/file/' \
        --header 'Authorization: token {Authorization token}' \
        --header 'Content-Type: application/json' --data-raw '{"file": "{File Name}"}'

Example:

$ curl --location --request POST 'http://172.16.30.138/api/v0.2/devices/bbb01/netboot/transfer/file/' \
       --header 'Authorization: token 3ywmgwdt2hm7uwn79104e6rctkhm1x5tgzssrbthhcgajg8ja1i3uxu3ypwpjys060s0mfzm9z6yk91nkwiodcpn1fyeytrk2li27mqyoqg3dafcifnta1l35h6c18bq' \
       --header 'Content-Type: application/json' --data-raw '{"file": "rootfs-bbb.tar.gz"}'

{
  "result":"success",
  "data":{"job_id":"b33bd7db-1065-41c3-b27a-a059f3734de1","progress_url":"http://172.16.30.138/api/v0.2/devices/bbb01/netboot/transfer/file/status/b33bd7db-1065-41c3-b27a-a059f3734de1/"}
}

Check Transfer File Status

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/netboot/transfer/file/status/{Job Id}' \
        --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request GET 'http://172.16.30.138/api/v0.2/devices/bbb01/netboot/transfer/file/status/a825c7c0-3e36-4f4f-833a-af565ecd155b/' 
       --header 'Authorization: token 3ywmgwdt2hm7uwn79104e6rctkhm1x5tgzssrbthhcgajg8ja1i3uxu3ypwpjys060s0mfzm9z6yk91nkwiodcpn1fyeytrk2li27mqyoqg3dafcifnta1l35h6c18bq'

{
  "result":"success",
  "data":{
            "status":"started",
             "info":{
                      "progress":11,
                      "file_size":2147483648,
                      "storage_size_check":"done",
                      "file_size_check":"done",
                      "flash":"running",
                      "current":"Flashing File",
                      "file_name":"rootfs-bbb.tar.gz" 
                    }
         }
}

SDCard File manager

List

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdcard/fmanager/<path: optional>/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/fmanager/sdb1/

{"data":[{"file_or_dir_name":"MLO","modified_date":"Jan 22, 2021 12:50:42 PM","owner":"root","size":"108K","symlink_target":"","type":"File"}],"result":"success"}

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdcard/fmanager/<path: optional>/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request GET 'http://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/fmanager/sdb1/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'

{"data":[{"file_or_dir_name":"MLO","modified_date":"Jan 22, 2021 12:50:42 PM","owner":"root","size":"108K","symlink_target":"","type":"File"}],"result":"success"}

Create Directory

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdcard/fmanager/dir/<path>/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/fmanager/dir/sdb1/test/

{"message":"sdb1/test  created","result":"success"}

From Command line terminal:

/sdcard/fmanager/dir/<path>/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request POST 'http://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/fmanager/dir/sdb1/test/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'

{"message":"sdb1/test  created","result":"success"}

Delete Directory

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdcard/fmanager/dir/<path>/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/fmanager/dir/sdb1/test/

{"message":"sdb1/test  deleted","result":"success"}

From Command line terminal:

 $ curl --location --request DELETE 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdcard/fmanager/dir/<path>/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request DELETE 'hhttp://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/fmanager/dir/sdb1/test/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'

{"message":"sdb1/test  deleted","result":"success"}

Upload Files

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdcard/fmanager/dir/<path>/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/fmanager/dir/sdb1/

{"message":"qnx.png  uploaded","result":"success"}

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address/api/v0.2/devices/<device name>/sdcard/fmanager/dir/<path>/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request DELETE 'http://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/fmanager/dir/sdb1/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'

{"message":"qnx.png  uploaded","result":"success"}

Download Files

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdcard/fmanager/dir/<path>/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/fmanager/download/sdb1/MLO

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address/api/v0.2/devices/<device name>/sdcard/fmanager/dir/<path>/' --header 'Authorization: token {Authorization token}' --output <path/filename>

Example:

$ curl --location --request GET 'http://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/fmanager/download/sdb1/MLO' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' --output /home/timesys/Desktop/MLO

Network Boot File Manager

List

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/netboot/fmanager/<path: optional>/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/netboot/fmanager/

{
    "data": [
        {
            "file_or_dir_name": "fsroot",
            "modified_date": "Jan 21, 2021 05:32:08 PM",
            "owner": "root",
            "size": "47",
            "symlink_target": "-> my_rootfs",
            "type": "Directory" 
        },
        {
            "file_or_dir_name": "my_rootfs",
            "modified_date": "Jan 21, 2021 05:32:08 PM",
            "owner": "root",
            "size": "4.0K",
            "symlink_target": "",
            "type": "Directory" 
        },
        {
            "file_or_dir_name": "qnx",
            "modified_date": "Jan 22, 2021 11:26:12 AM",
            "owner": "root",
            "size": "4.0K",
            "symlink_target": "",
            "type": "Directory" 
        },
        {
            "file_or_dir_name": "beaglebone_black.dtb",
            "modified_date": "Jan 21, 2021 04:33:40 PM",
            "owner": "root",
            "size": "36K",
            "symlink_target": "",
            "type": "File" 
        },
        {
            "file_or_dir_name": "uImage-4.14-ts-armv7l",
            "modified_date": "Jan 21, 2021 05:46:23 PM",
            "owner": "root",
            "size": "5.0M",
            "symlink_target": "",
            "type": "File" 
        }
    ],
    "result": "success" 
}

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/netboot/fmanager/<path: optional>/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request GET 'http://172.16.3.21/api/v0.2/devices/bbb_demo/netboot/fmanager/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'

{"data":[{"file_or_dir_name":"fsroot","modified_date":"Jan 21, 2021 05:32:08 PM","owner":"root","size":"47","symlink_target":"-> my_rootfs","type":"Directory"},{"file_or_dir_name":"my_rootfs","modified_date":"Jan 21, 2021 05:32:08 PM","owner":"root","size":"4.0K","symlink_target":"","type":"Directory"},{"file_or_dir_name":"qnx","modified_date":"Jan 22, 2021 11:26:12 AM","owner":"root","size":"4.0K","symlink_target":"","type":"Directory"},{"file_or_dir_name":"beaglebone_black.dtb","modified_date":"Jan 21, 2021 04:33:40 PM","owner":"root","size":"36K","symlink_target":"","type":"File"},{"file_or_dir_name":"uImage-4.14-ts-armv7l","modified_date":"Jan 21, 2021 05:46:23 PM","owner":"root","size":"5.0M","symlink_target":"","type":"File"}],"result":"success"}

Create Directory

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/netboot/fmanager/dir/<path>/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/netboot/fmanager/dir/test/

{
    "message": "test  created",
    "result": "success" 
}

From Command line terminal:

 $ curl --location --request POST 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/netboot/fmanager/dir/<path>/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request POST 'http://172.16.3.21/api/v0.2/devices/bbb_demo/netboot/fmanager/dir/test/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'

{"message":"test  created","result":"success"}

Delete File / Directory

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/netboot/fmanager/dir/<path>/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/netboot/fmanager/dir/test/
{
    "message": "test  deleted",
    "result": "success" 
}

From Command line terminal:

 $ curl --location --request DELETE 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/netboot/fmanager/dir/<path>/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request DELETE 'http://172.16.3.21/api/v0.2/devices/bbb_demo/netboot/fmanager/dir/test/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'

{"message":"test  deleted","result":"success"}

upload files

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/netboot/fmanager/dir/' --header 'Authorization: token {Authorization token}' --form file=@{file path} --form path_to_upload_file={upload file path}

Example:

$ curl --location --request PUT 'http://172.16.3.21/api/v0.2/devices/bbb_demo/netboot/fmanager/dir/' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' --form 'file=@"/home/timesys/screenshot.png"' --form 'path_to_upload_file="qnx/"'
{"message":"screenshot.png  uploaded","result":"success"}

Download files

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/netboot/fmanager/download/<path>/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/netboot/fmanager/download/qnx/sshd_config

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/netboot/fmanager/download/<path>/'  --header 'Authorization: token {Authorization token}' --output <path/filename>

Example:

$ curl --location --request GET 'http://172.16.3.21/api/v0.2/devices/bbb_demo/netboot/fmanager/download/qnx/sshd_config' --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' --output /home/timesys/Desktop/MLO

Port Forwarding

Add Port

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/portfw/nat/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/portfw/nat/
{
    "result": "success" 
}

From Command line terminal:

 $ curl --location --request POST 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/portfw/nat/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request POST 'http://172.16.3.21/api/v0.2/devices/bbb_demo/portfw/nat/ --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'

{"result": "success"}

Remove Port

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/portfw/nat/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/portfw/nat/
{
    "result": "success" 
}

From Command line terminal:

 $ curl --location --request DELETE 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/portfw/nat/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request DELETE 'http://172.16.3.21/api/v0.2/devices/bbb_demo/portfw/nat/ --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'

{"result": "success"}

Restore Port

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/portfw/nat/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/portfw/nat/
{
    "result": "success" 
}

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/portfw/nat/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request PUT 'http://172.16.3.21/api/v0.2/devices/bbb_demo/portfw/nat/ --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'

{"result": "success"}

WEB CAM

Restart-feed

From Web browser:

http://{EBF Server IP Address}/api/<devicename>/webcam/restartfeed/

Example:
http://172.16.3.21/api/bbb_demo/webcam/restartfeed/
{
    "result": "success" 
}

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/<devicename>/webcam/restartfeed/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request GET 'http://172.16.3.21/api/bbb_demo/webcam/restartfeed/ --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'

{"result": "success"}

OR
From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/webcam/restartfeed/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/webcam/restartfeed/
{
    "result": "success" 
}

From Command line terminal:

 $ curl --location --request PUT 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/webcam/restartfeed/' --header 'Authorization: token {Authorization token}'

Example:

$ curl --location --request PUT 'http://172.16.3.21/api/v0.2/devices/bbb_demo/webcam/restartfeed/ --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'

{"result": "success"}

Image Capture

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/image/capture/

Example:
http://172.16.3.21/api/v0.2/devices/bbb_demo/image/capture/
{
    "status": "success",
    "data": "http://172.16.99.105/icamImages/2021-01-25_084945.jpg" 
}

From Command line terminal:

 $ curl --location --request GET 'http://{EBF Server IP Address}/api/v0.2/devices/<device name>/image/capture/' --header 'Authorization: token {Authorization token}

Example:

$ curl --location --request GET 'http://172.16.3.21/api/v0.2/devices/bbb_demo/image/capture --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'

{"status": "success","data": "http://172.16.99.105/icamImages/2021-01-25_084945.jpg"}

Download Console Logs

From Web browser:

http://{EBF Server IP Address}/api/v0.2/devices/<device name>/console/logs/download

Example:

https://172.16.30.247/api/v0.2/devices/EBF_Build_Rpi3/console/logs/download
{
    "status": "download" 
}

From Command line terminal:

   $ curl --location --request GET https://{EBF Server IP Address}/api/v0.2/devices/<device name>/console/logs/download --header 'Authorization: token {Authorization token}

Example:

  $ curl --location --request GET https://172.16.30.247/api/v0.2/devices/EBF_Build_Rpi3/console/logs/download --header 'Authorization: token a6nhx3rep1jfbhwimfp847pu55n4n3fbh64u1yxn2kz8t9mbumuc8bjjf9bgegjqly54y11kha0ui11zkt2m1d4wzgikanmwswtg1l0u5j7060i1pohjts122jslwu1j' --output EBF_Build_Rpi3-2310271529.logs

{"download":  "Successfully Downloaded console logs to "EBF_Build_Rpi3-2310271529.logs"}

GPIO

GPIO Pins Hardware setup
  1. The following image shows how User GPIO pins are setup.
    These GPIO pins are in the pair of PIN-GROUND format. The following image representation is for Pins 1 to 6.
  2. To set up I2C GPIO pins, see the following image.
    The following image representation is for Pins 7 and 8. These Pins are connected to the I2C bus on first and third pins, starting from the left.

From Command line terminal:

$ curl -k http://{Master IP Address}/api/<devicename>/gpio/<command>/<gpio_pin_pattern>/<gpio_pin_data>

Here's a table overview of the commands, arguments, and inputs and outputs:

Commands gpio_pin_pattern gpio_pin_data output
set_mode_mask 1-255 0-255 Current GPIO pin modes as dec (0-255)
get_mode_mask 1-255 Current GPIO pin modes as dec (0-255)
set_mode 1-8 {read,write} Current GPIO pin modes as dec (0-255)
get_mode 1-8 Current GPIO pin mode as string (read,write)
read_mask 1-255 Current GPIO values as dec (0-255)
write_mask 1-255 0-255 Current GPIO values as dec (0-255)
read 1-8 Current GPIO value as bin (0-1)
write 1-8 0-1 Current GPIO value as bin (0-1)

Any value listed as either 0-255 or 1-255 is a decimal representation of the GPIO input or output bytes. The 'mode' arguments refer to input (write) or output (read). For the outputs, 0 is considered 'write', and 1 is considered 'read'.

Example:

curl --location --request GET 'http://172.16.30.11/api/bbb_demo/gpio/get_mode/6'
Output: {"result": "success","data": write}

RESOURCE

Get Resource

https://{EBF Server IP Address}/api/v0.2/devices/{DeviceName}/get-resource/{Resource-Type}/
$ curl -s -k --location --request GET https://bfc.timesys.com/api/v0.2/devices/rpi3-2/get-resource/power-measurement --header 'Authorization: token 27gy0kmr0ak2650zu09e6azda0255gofjkpl8qyks4cuh5ukifyh4o45ypp1nm3q7klo1kzx8to6jf5dicewot15eirctf0ll4uk47yd15sd11qfdgxokda9sy0i70xr'

Output
{"result":"success","data":{"resource_name":"ACME1"}}

Power Management

Start Capture

https://{EBF Server IP Address}/api/v0.2/resources/{ResourceName}/power-measurement/start-capture/
curl -s -k --location --request POST https://bfc.timesys.com/api/v0.2/resources/ACME1/power-measurement/start-capture/ --header 'Authorization: token 27gy0kmr0ak2650zu09e6azda0255gofjkpl8qyks4cuh5ukifyh4o45ypp1nm3q7klo1kzx8to6jf5dicewot15eirctf0ll4uk47yd15sd11qfdgxokda9sy0i70xr'

Output
{"result": "success", "data": 1639552930}

Stop Capture

https://{EBF Server IP Address}/api/v0.2/resources/{ResourceName}/power-measurement/stop-capture/{token}
curl -s -k --location --request PUT https://bfc.timesys.com/api/v0.2/resources/ACME1/power-measurement/stop-capture/1639552930 --header 'Authorization: token 27gy0kmr0ak2650zu09e6azda0255gofjkpl8qyks4cuh5ukifyh4o45ypp1nm3q7klo1kzx8to6jf5dicewot15eirctf0ll4uk47yd15sd11qfdgxokda9sy0i70xr'

Output
{"result": "success"}

Get Data

https://{EBF Server IP Address}//api/v0.2/resources/{ResourceName}/power-measurement/get-data/{token}
curl -s -k --location --request GET https://bfc.timesys.com/api/v0.2/resources/ACME1/power-measurement/get-data/1639552930 --header 'Authorization: token 27gy0kmr0ak2650zu09e6azda0255gofjkpl8qyks4cuh5ukifyh4o45ypp1nm3q7klo1kzx8to6jf5dicewot15eirctf0ll4uk47yd15sd11qfdgxokda9sy0i70xr'

Output
{"result": "success", "data": "timestamp,voltage,current
1572709715,5136.200,350.768
1572709716,5136.218,350.751
1572709717,5136.184,350.972
1572709718,5136.185,350.937
1572709719,5136.204,350.909
1572709720,5136.208,350.870
1572709721,5136.192,350.959
1572709722,5136.200,350.924
"}

Delete Data

https://{EBF Server IP Address}//api/v0.2/resources/{ResourceName}/power-measurement/delete/{token}
curl -s -k --location --request DELETE https://bfc.timesys.com/api/v0.2/resources/ACME1/power-measurement/delete/1639552930 --header 'Authorization: token 27gy0kmr0ak2650zu09e6azda0255gofjkpl8qyks4cuh5ukifyh4o45ypp1nm3q7klo1kzx8to6jf5dicewot15eirctf0ll4uk47yd15sd11qfdgxokda9sy0i70xr'

Output
{"result": "success"}

CAMERA

Capture Still Image

https://{EBF Server IP Address}/api/v0.2/resources/{ResourceName}/camera/capture/
curl -s -k --location --request GET https://172.16.30.245/api/v0.2/resources/CAM1/camera/capture --header 'Authorization: token b2yykdx0g1wg3iklrhhmkaz0i73paj3jt10yasz1is93mop8k3gt69rwn1mpihmuo7l7jkk62354l0sucqfpqqybablz3yx9d2bklckr0y5307cbfxsd0qj6jrkxkhpn'

Output
{"result":"success","data":"http://172.16.30.245/camera/rpi_test-2022-06-23_073947.jpg"}

AUDIO

Start

https://{EBF Server IP Address}/api/v0.2/resources/{ResourceName}/audio/start-capture/
curl -s -k --location --request POST https://172.16.30.245/api/v0.2/resources/AUDIO1/audio/start-capture/ --header 'Authorization: token b2yykdx0g1wg3iklrhhmkaz0i73paj3jt10yasz1is93mop8k3gt69rwn1mpihmuo7l7jkk62354l0sucqfpqqybablz3yx9d2bklckr0y5307cbfxsd0qj6jrkxkhpn'

Output
{"data":{"token":"33cf89d4741e4fccb892c2d23d73ad1b"},"result":"success"}

Stop

https://{EBF Server IP Address}/api/v0.2/resources/{ResourceName}/audio/stop-capture/{AudioID}
curl -s -k --location --request PUT https://172.16.30.245/api/v0.2/resources/AUDIO1/audio/stop-capture/b414e732b09843af8a7db1c32dbcdd23 --header 'Authorization: token b2yykdx0g1wg3iklrhhmkaz0i73paj3jt10yasz1is93mop8k3gt69rwn1mpihmuo7l7jkk62354l0sucqfpqqybablz3yx9d2bklckr0y5307cbfxsd0qj6jrkxkhpn'

Output
{"result":"success"}

Get-reference

https://{EBF Server IP Address}/api/v0.2/resources/{ResourceName}/audio/get-ref/{AudioID}
curl -s -k --location --request GET https://172.16.30.245/api/v0.2/resources/AUDIO1/audio/get-ref/5159e4f233a9442cb623da1120cd2bfb --header 'Authorization: token b2yykdx0g1wg3iklrhhmkaz0i73paj3jt10yasz1is93mop8k3gt69rwn1mpihmuo7l7jkk62354l0sucqfpqqybablz3yx9d2bklckr0y5307cbfxsd0qj6jrkxkhpn'

Output
{"result":"success","data":"http://172.16.30.245/audio/test-5159e4f233a9442cb623da1120cd2bfb.wmv"}

Delete

https://{EBF Server IP Address}/api/v0.2/resources/{ResourceName}/audio/delete/{AudioID}
curl -s -k --location --request DELETE https://172.16.30.245/api/v0.2/resources/AUDIO1/audio/delete/5159e4f233a9442cb623da1120cd2bfb --header 'Authorization: token b2yykdx0g1wg3iklrhhmkaz0i73paj3jt10yasz1is93mop8k3gt69rwn1mpihmuo7l7jkk62354l0sucqfpqqybablz3yx9d2bklckr0y5307cbfxsd0qj6jrkxkhpn'

Output
success

Delete Zombie

From Web browser:

http://{EBF Server IP Address}/api/v0.2/zombies/<zombie name>

Example:
http://172.16.7.21/api/v0.2/zombies/DelhiTimesysZombie01
{

    "result": "success" 
}

From Command line terminal:

 $ curl --location --request DELETE  https://172.16.7.21/api/v0.2/zombies/DelhiTimesysZombie01 --header 'Authorization: token {Authorization token}'

Example:

$ curl -s -k --location --request DELETE https://172.16.7.21/api/v0.2/zombies/DelhiTimesysZombie01 --header 'Authorization: token 22nbjxec52gxfpz32t82cqb7twfk9b2llrlaxfm2jl4ftkfhnxylyidsae260ajqfp2lk3r0l02crugak42yoy7tt90sn4flo20zt13ibuc0yfnb0xjgxsg3tcry33am'

Output
{"result":"success"}

Search/Allocate Devices

From Web browser:

https://172.16.30.253/api/v0.2/devices/description

Example:

https://172.16.30.253/api/v0.2/devices/description__startswith=d
{

    "result": "success" 
}

From Command line terminal:
$ curl -s -k --location --request GET 'https://172.16.30.253/api/v0.2/devices/?description__startswith=d' --header 'Authorization: token {Authorization token}'

Example:

curl -s -k --location --request GET 'https://172.16.30.253/api/v0.2/devices/?description__startswith=d' --header 'Authorization: token mks3wn3ddk3z5kym8jsehg9m09lflsn5hn4ef07tcylctddre8y98cjkratdo04roo2bd5h0s1810jqiub2nr0eig7t0o3ltceukiop3xo5ony4auh3n7bqydh4topt0'

Output
{"result":"success","data":["rpi-demo"]}