EBF REST APIs

Authentication token

From Command line terminal:

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

Example:

 1 curl --location --request POST 'https://172.16.30.138/api/v0.2/token/' \
 2      --header 'Content-Type: application/json' \
 3      --data-raw '{"username": "testuser", "password":"test"}'
 4
 5 {
 6     "result": "success",
 7     "data": {
 8         "token": "ujpy0cpf2g9e0ydqp0pmbgr6hsdcxclcysigs062hynqm41dqnrdgukysjjgl5nwwp1jtp50ep4qbfte1c0o3gw77ldwk6m5swopj3snlh7o0e1y54qn78r68wpyf5oy"
 9     }
10 }

Device Management

List Devices

From Web browser:

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

Example:

 1https://172.16.30.102/api/v0.2/devices/
 2
 3{
 4    "result": "success",
 5    "data": [
 6        "rpi01",
 7        "bbb01",
 8    ],
 9    "version": "2.4.0"
10}

From Command line terminal

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

Example:

 1curl --location --request 'https://172.16.30.102/api/v0.2/devices/' \
 2      --header 'Authorization: token ujpy0cpf2g9e0ydqp0pmbgr6hsdcxclcysigs062hynqm41dqnrdgukysjjgl5nwwp1jtp50ep4qbfte1c0o3gw77ldwk6m5swopj3snlh7o0e1y54qn78r68wpyf5oy'
 3
 4{
 5    "result": "success",
 6    "data": [
 7        "rpi01",
 8        "bbb01",
 9    ],
10    "version": "2.4.0"
11}

Allocate Device

From Web browser:

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

Example:

1https://172.16.30.102/api/v0.2/devices/bbb01/assign/
2
3{
4    "result": "success",
5    "version": "2.4.0"
6}

From Command line terminal

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

Example:

1curl --location --request 'https://172.16.30.102/api/v0.2/devices/bbb01/assign/' \
2      --header 'Authorization: token ujpy0cpf2g9e0ydqp0pmbgr6hsdcxclcysigs062hynqm41dqnrdgukysjjgl5nwwp1jtp50ep4qbfte1c0o3gw77ldwk6m5swopj3snlh7o0e1y54qn78r68wpyf5oy'
3
4{
5    "result": "success",
6    "version": "2.4.0"
7}

Release Device

From Web browser:

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

To release device assigned to some other user:

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

Example:

1https://172.16.30.102/api/v0.2/devices/bbb01/release/
2
3{
4    "result": "success",
5    "version": "2.4.0"
6}

From Command line terminal

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

Example:

1curl --location --request GET 'https://172.16.30.102/api/v0.2/devices/bbb01/release/' \
2      --header 'Authorization: token ujpy0cpf2g9e0ydqp0pmbgr6hsdcxclcysigs062hynqm41dqnrdgukysjjgl5nwwp1jtp50ep4qbfte1c0o3gw77ldwk6m5swopj3snlh7o0e1y54qn78r68wpyf5oy'
3
4{
5    "result": "success",
6    "version": "2.4.0"
7}

Device Release (force)

From Web browser:

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

Example:

1https://172.16.30.102/api/v0.2/devices/bb01/release/force/
2
3{
4    "result": "success",
5    "version": "2.4.0"
6}

From Command line terminal

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

Example:

1curl --location --request GET 'https://172.16.30.102/api/v0.2/devices/device-name/release/force/' \
2      --header 'Authorization: token ujpy0cpf2g9e0ydqp0pmbgr6hsdcxclcysigs062hynqm41dqnrdgukysjjgl5nwwp1jtp50ep4qbfte1c0o3gw77ldwk6m5swopj3snlh7o0e1y54qn78r68wpyf5oy'
3
4{
5    "result": "success",
6    "version": "2.4.0"
7}

My Devices

From Web browser:

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

Example:

1https://172.16.30.102/api/v0.2/devices/mine/
2
3{
4    "result": "success",
5    "data": [
6        "bbb01",
7    ],
8    "version": "2.4.0"
9}

From Command line terminal

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

Example:

 1curl --location --request GET 'https://172.16.30.102/api/v0.2/devices/mine/' \
 2      --header 'Authorization: token ujpy0cpf2g9e0ydqp0pmbgr6hsdcxclcysigs062hynqm41dqnrdgukysjjgl5nwwp1jtp50ep4qbfte1c0o3gw77ldwk6m5swopj3snlh7o0e1y54qn78r68wpyf5oy'
 3
 4{
 5    "result": "success",
 6    "data": [
 7        "bbb01",
 8    ],
 9    "version": "2.4.0"
10}

Device Info

From Web browser:

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

Example:

 1https://172.16.30.102/api/v0.2/devices/dev3/
 2
 3{
 4    "result": "success",
 5    "data": {
 6        "Hostname": "dev3",
 7        "AssignedTo": "",
 8        "ForceReleaseAllowed": true,
 9        "PowerCommands": [
10            "on",
11            "off",
12            "reboot",
13            "status"
14        ],
15        "ConsoleSharing": true,
16        "NumConsoles": 4,
17        "DeviceStatus": "Good",
18        "Tags": [
19            "tag1",
20            "tag2"
21        ],
22        "lab": {
23            "Zombie": {
24                "Hostname": "Zombie_204",
25                "IPAddress": "172.16.30.204",
26                "URL": "http://172.16.30.204/",
27                "DevicePort": 1,
28                "AppZombieConnected": false
29            },
30            "IOCXConnected": false,
31            "Power": {
32                "PowerSwitch": "digital_IP_Power_switch",
33                "PowerSwitchPort": 6
34            },
35            "NetworkBoot": {
36                "NetbootType": "",
37                "TFTP Boot Directory": "upload/DUT1",
38                "NFS Root Directory": "/var/lib/lava/dispatcher/tmp/nfs/DUT1/tmp",
39                "NetbootDetails": {}
40            }
41        }
42    },
43    "version": "2.4.0"
44}

From Command line terminal

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

Example:

 1curl --location --request GET 'https://172.16.30.102/api/v0.2/devices/dev3/' \
 2      --header 'Authorization: token ujpy0cpf2g9e0ydqp0pmbgr6hsdcxclcysigs062hynqm41dqnrdgukysjjgl5nwwp1jtp50ep4qbfte1c0o3gw77ldwk6m5swopj3snlh7o0e1y54qn78r68wpyf5oy'
 3
 4{
 5    "result": "success",
 6    "data": {
 7        "Hostname": "dev3",
 8        "AssignedTo": "",
 9        "ForceReleaseAllowed": true,
10        "PowerCommands": [
11            "on",
12            "off",
13            "reboot",
14            "status"
15        ],
16        "ConsoleSharing": true,
17        "NumConsoles": 4,
18        "DeviceStatus": "Good",
19        "lab": {
20            "Zombie": {
21                "Hostname": "Zombie_204",
22                "IPAddress": "172.16.30.204",
23                "URL": "http://172.16.30.204/",
24                "DevicePort": 1,
25                "AppZombieConnected": false
26            },
27            "IOCXConnected": false,
28            "Power": {
29                "PowerSwitch": "digital_IP_Power_switch",
30                "PowerSwitchPort": 6
31            },
32            "NetworkBoot": {
33                "NetbootType": "",
34                "TFTP Boot Directory": "upload/DUT1",
35                "NFS Root Directory": "/var/lib/lava/dispatcher/tmp/nfs/DUT1/tmp",
36                "NetbootDetails": {}
37            }
38        }
39    },
40    "version": "2.4.0"
41}

Device delete

From Command line terminal

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

Example:

1curl --location --request DELETE https://172.16.7.21/api/v0.2/devices/rpi-board/ \
2      --header 'Authorization: token 22nbjxec52gxfpz32t82cqb7twfk9b2llrlaxfm2jl4ftkfhnxylyidsae260ajqfp2lk3r0l02crugak42yoy7tt90sn4flo20zt13ibuc0yfnb0xjgxsg3tcry33am'
3
4{
5  "result": "success",
6  "version": "2.4.0"
7}

Console Sharing Control

Status

From Command line terminal

1curl --location --request GET 'https://{EBF Server IP Address}/api/v0.2/devices/<devicename>/console/sharing/' \
2      --header 'Authorization: token {Authorization token}'

Example:

1curl -k --location --request GET 'https://172.16.30.27/api/v0.2/devices/bbb-demo/console/sharing/' \
2      --header 'Authorization: token geqaffqpmzy25xzeas7zrebbq6qfe4x6jr6r44hpl288z2ypeq08dotg7e6qycywubmx0c5m9sy7ih2qecuwl89o87tj1gucxu0t006xd0olm2n471rolzs2jn7fq6f1'
3
4{
5   "data": true,
6   "result": "success",
7   "version": "2.4.0"
8}

Enable

From Command line terminal

1curl --location --request PUT 'https://{EBF Server IP Address}/api/v0.2/devices/<devicename>/console/sharing/true/' \
2      --header 'Authorization: token {Authorization token}'

Example:

1curl -k --location --request PUT 'https://172.16.30.27/api/v0.2/devices/bbb-demo/console/sharing/true/' \
2      --header 'Authorization: token geqaffqpmzy25xzeas7zrebbq6qfe4x6jr6r44hpl288z2ypeq08dotg7e6qycywubmx0c5m9sy7ih2qecuwl89o87tj1gucxu0t006xd0olm2n471rolzs2jn7fq6f1'
3
4{
5   "message":" Successfully enabled console sharing for this device.",
6   "result": "success",
7   "version": "2.4.0"
8}

Disable

1curl --location --request PUT 'https://{EBF Server IP Address}/api/v0.2/devices/<devicename>/console/sharing/false/' \
2      --header 'Authorization: token {Authorization token}'

Example:

1curl -k --location --request PUT 'https://172.16.30.27/api/v0.2/devices/bbb-demo/console/sharing/false/' \
2      --header 'Authorization: token geqaffqpmzy25xzeas7zrebbq6qfe4x6jr6r44hpl288z2ypeq08dotg7e6qycywubmx0c5m9sy7ih2qecuwl89o87tj1gucxu0t006xd0olm2n471rolzs2jn7fq6f1'
3
4{
5   "message":"Successfully disabled console sharing for this device.",
6   "result":"success",
7   "version":"2.4.0"
8}

Power Control

ON

From Command line terminal

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

Example:

1curl --location --request PUT 'https://172.16.3.21/api/v0.2/devices/bbb_demo/power/on/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5  "data": "on",
6  "result": "success",
7  "version": "2.4.0"
8}

OFF

From Command line terminal

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

Example:

1curl --location --request PUT 'https://172.16.3.21/api/v0.2/devices/bbb_demo/power/on/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5  "result": "success",
6  "data": "success",
7  "version": "2.4.0"
8}

REBOOT

From Command line terminal

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

Example:

1curl --location --request PUT 'https://172.16.3.21/api/v0.2/devices/bbb_demo/power/reboot/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5  "result": "success",
6  "data": "success",
7  "version": "2.4.0"
8}

User Defined

From Command line terminal

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

Example:

1curl --location --request PUT 'https://172.16.3.21/api/v0.2/devices/bbb_demo/power/status/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5  "result": "success",
6  "data": "success",
7  "version": "2.4.0"
8}

Zombie Power Control

ON

From Command line terminal

 1curl --location ---request POST https://172.16.7.21/api/v0.2/zombies/Zombie01/power/on \
 2      --header 'Authorization: token {Authorization token}'
 3
 4curl --location --request POST https://172.16.7.21/api/v0.2/zombies/Zombie01/power/on \
 5      --header 'Authorization: token 22nbjxec52gxfpz32t82cqb7twfk9b2llrlaxfm2jl4ftkfhnxylyidsae260ajqfp2lk3r0l02crugak42yoy7tt90sn4flo20zt13ibuc0yfnb0xjgxsg3tcry33am'
 6
 7{
 8  "result": "success",
 9  "data": "curl https://ADMIN:1234@172.16.30.99/OUTLET?1=ON",
10  "version": "2.4.0"
11}

OFF

From Command line terminal

 1curl --location ---request POST https://172.16.7.21/api/v0.2/zombies/Zombie01/power/off \
 2      --header 'Authorization: token {Authorization token}'
 3
 4curl --location --request POST https://172.16.7.21/api/v0.2/zombies/Zombie01/power/off \
 5      --header 'Authorization: token 22nbjxec52gxfpz32t82cqb7twfk9b2llrlaxfm2jl4ftkfhnxylyidsae260ajqfp2lk3r0l02crugak42yoy7tt90sn4flo20zt13ibuc0yfnb0xjgxsg3tcry33am'
 6
 7{
 8  "result": "success",
 9  "data": "curl https://ADMIN:1234@172.16.30.99/OUTLET?1=OFF",
10  "version": "2.4.0"
11}

REBOOT

From Command line terminal

 1curl --location ---request POST https://172.16.7.21/api/v0.2/zombies/Zombie01/power/reboot/ \
 2      --header 'Authorization: token {Authorization token}'
 3
 4curl --location --request POST https://172.16.7.21/api/v0.2/zombies/Zombie01/power/off/ \
 5      --header 'Authorization: token 22nbjxec52gxfpz32t82cqb7twfk9b2llrlaxfm2jl4ftkfhnxylyidsae260ajqfp2lk3r0l02crugak42yoy7tt90sn4flo20zt13ibuc0yfnb0xjgxsg3tcry33am'
 6
 7{
 8  "result": "success",
 9  "data": "curl https://ADMIN:1234@172.16.30.99/OUTLET?1=OFF",
10  "version": "2.4.0"
11}
12
13curl --location --request POST https://172.16.7.21/api/v0.2/zombies/Zombie01/power/on/ \
14      --header 'Authorization: token 22nbjxec52gxfpz32t82cqb7twfk9b2llrlaxfm2jl4ftkfhnxylyidsae260ajqfp2lk3r0l02crugak42yoy7tt90sn4flo20zt13ibuc0yfnb0xjgxsg3tcry33am'
15
16{
17  "result": "success",
18  "data": "curl https://ADMIN:1234@172.16.30.99/OUTLET?1=ON",
19  "version": "2.4.0"
20}

Device Serial Console

List consoles

From Command line terminal

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

Example:

 1curl --location --request GET 'https://172.16.3.21/api/v0.2/devices/bbb-demo/serial/' \
 2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
 3
 4{
 5    "result": "success",
 6    "data": {
 7        "NumConsoles": 1,
 8        "ConsoleSharing": true
 9    },
10    "version": "2.4.0"
11}

Upload

From Command line terminal

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

Example:

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

Download

From Command line terminal

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

Example:

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

Run Command

From Command line terminal

1 curl --location --request GET 'https://{EBF Server IP Address}/api/v0.2/devices/<device name>/run/serial/' \
2        --header 'Authorization: token {Authorization token}' --header 'Content-Type: application/json' \
3        --data-raw '{"command":["{Command}"],"prompts":["{prompt to check for completion, default:empty}"],"timeout": {timeout in secs default:5},"console":"{console name default: first console}"}'

Example:

Run command on first console

1curl --location --request GET 'https://172.16.3.21/api/v0.2/devices/run/serial/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
3      --header 'Content-Type: application/json' --form --data-raw '{"command": ["whoami"]}'
4
5{
6    "data": ["root"],
7    "result": "success",
8    "version": "2.4.0"
9}

Run command on a chosen console

1curl --location --request GET 'https://172.16.3.21/api/v0.2/devices/run/serial/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
3      --header 'Content-Type: application/json' --form --data-raw '{"command": ["whoami"], "console": "serial0"}'
4
5{
6    "data": ["root"],
7    "result": "success",
8    "version": "2.4.0"
9}

Start

From Web browser:

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

Example:

1https://172.16.3.21/api/v0.2/devices/bbb_demo/console/serial/start/
2
3{
4  "message": "Device session successfully started",
5  "result": "success",
6  "version": "2.4.0"
7}

From Command line terminal

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

Example:

1curl --location --request GET 'https://172.16.3.21/api/v0.2/devices/bbb_demo/console/serial/start/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5  "message": "Device session successfully started",
6  "result": "success",
7  "version": "2.4.0"
8}

Stop

From Web browser:

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

Example:

1https://172.16.3.21/api/v0.2/devices/bbb_demo/console/serial/stop/
2
3{
4  "message": "Device session successfully stopped",
5  "result": "success",
6  "version": "2.4.0"
7}

From Command line terminal

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

Example:

1curl --location --request GET 'https://172.16.3.21/api/v0.2/devices/bbb_demo/console/serial/stop/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5  "message": "Device session successfully stopped",
6  "data": "restarted",
7  "result": "success",
8  "version": "2.4.0"
9}

Status

From Web browser:

1https://{EBF Server IP Address}/api/v0.2/devices/<device name>/console/serial/status/<console name: optional>/

Example:

 1https://172.16.3.21/api/v0.2/devices/bbb_demo/console/serial/status/
 2
 3{
 4  "data": {
 5    "dut_number": 1,
 6    "isActive": true,
 7    "status": {
 8         "serial0": true,
 9         "serial1": false,
10         "serial2": false,
11         "serial3": true,
12         "serial4": false,
13         "serial5": false,
14         "serial6": false,
15         "serial7": false
16    }
17  },
18  "message": "Console session running.",
19  "result": "success",
20  "version": "2.4.0"
21}

From Command line terminal

1curl --location --request GET 'https://{EBF Server IP Address}/api/v0.2/devices/<device name>/console/serial/status/<console name: optional>/'

Example:

 1curl --location --request GET 'https://172.16.3.21/api/v0.2/devices/bbb_demo/console/serial/status/' \
 2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
 3
 4{
 5  "data": {
 6    "dut_number": 1,
 7    "isActive": true,
 8    "status": {
 9         "serial0": true,
10         "serial1": false,
11         "serial2": false,
12         "serial3": true,
13         "serial4": false,
14         "serial5": false,
15         "serial6": false,
16         "serial7": false
17    }
18  },
19  "message": "Console session running.",
20  "result": "success",
21  "version": "2.4.0"
22}

Device SSH Console

Upload

From Command line terminal

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

Example:

 1curl --location --request POST 'https://172.16.3.21/api/v0.2/devices/upload/ssh/' \
 2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
 3     --form 'file=@"/home/hbansal/Isos/BBB/MLO"' \
 4     --form 'path="/root"' \
 5     --form 'username="root"' \
 6     --form 'device_ip="192.168.111.13"'
 7
 8{
 9    "message": "MLO uploaded",
10    "result": "success",
11    "version": "2.4.0"
12}

Download

From Command line terminal

1 curl --location --request GET \
2         'https://{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}' \
3        --header 'Authorization: token {Authorization token}' \
4        --output '{Saved file}'

Example:

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

Run Command

From Command line terminal

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

Example:

 1curl --location --request GET 'https://172.16.3.21/api/v0.2/devices/run/ssh/' \
 2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
 3     --header 'Content-Type: application/json' --form --data-raw ''{"command": "whoami","device_ip": "192.168.111.13","username": "root"}''
 4
 5{
 6    "data": {
 7        "data": [
 8            "root\n"
 9        ],
10        "return_code": 0
11    },
12    "result": "success",
13    "version": "2.4.0"
14}

Import SSH Key

From Command line terminal

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

Example:

 1curl --location --request POST 'https://172.16.30.138/api/v0.2/devices/bbb01/import/key/ssh/' \
 2     --header 'Authorization: token 3ywmgwdt2hm7uwn79104e6rctkhm1x5tgzssrbthhcgajg8ja1i3uxu3ypwpjys060s0mfzm9z6yk91nkwiodcpn1fyeytrk2li27mqyoqg3dafcifnta1l35h6c18bq' \
 3     --form 'device_ip="192.168.111.13"' \
 4     --form 'username="root"' \
 5     --form 'password="root"'
 6
 7{
 8    "message": "",
 9    "result": "success",
10    "version": "2.4.0"
11}

Hotplugs

Status

From Web browser:

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

Example:

1https://172.16.3.21/api/v0.2/devices/bbb_demo/hotplug/1/
2
3{
4  "data": "on",
5  "result": "success",
6  "version": "2.4.0"
7}

From Command line terminal

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

Example:

1curl --location --request GET 'https://172.16.3.21/api/v0.2/devices/bbb_demo/hotplug/1/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5  "data": "on",
6  "result": "success",
7  "version": "2.4.0"
8}

ON

From Command line terminal

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

Example:

1curl --location --request PUT 'https://172.16.3.21/api/v0.2/devices/bbb_demo/hotplug/1/on/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5  "data": "on",
6  "result": "success",
7  "version": "2.4.0"
8}

OFF

From Command line terminal

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

Example:

1curl --location --request PUT 'https://172.16.3.21/api/v0.2/devices/bbb_demo/hotplug/1/off/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5  "data": "off",
6  "result": "success",
7  "version": "2.4.0"
8}

Switch

From Command line terminal

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

Example:

1curl --location --request PUT 'https://172.16.3.21/api/v0.2/devices/bbb_demo/hotplug/1/switch/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5  "data": "off",
6  "result": "success",
7  "version": "2.4.0"
8}

SDMux

Status

From Web browser:

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

Example:

1https://172.16.3.21/api/v0.2/devices/bbb_demo/sdmux/
2
3{
4  "data": "device",
5  "result": "success",
6  "version": "2.4.0"
7}

From Command line terminal

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

Example:

1curl --location --request GET 'https://172.16.3.21/api/v0.2/devices/bbb_demo/sdmux/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5  "data": "device",
6  "result": "success",
7  "version": "2.4.0"
8}

Switch

From Command line terminal

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

Example:

1curl --location --request PUT 'https://172.16.3.21/api/v0.2/devices/bbb_demo/sdmux/switch/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5  "data": "zombie",
6  "result": "success",
7  "version": "2.4.0"
8}

Switch-Zombie

From Command line terminal

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

Example:

1curl --location --request PUT 'https://172.16.3.21/api/v0.2/devices/bbb_demo/sdmux/switch/zombie/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5  "data": "zombie",
6  "result": "success"
7}

Switch-Device

From Command line terminal

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

Example:

1curl --location --request PUT 'https://172.16.3.21/api/v0.2/devices/bbb_demo/sdmux/device/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5  "data": "device",
6  "result": "success"
7}

USBMux

Status

From Web browser:

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

Example:

1https://172.16.3.21/api/v0.2/devices/bbb_demo/usbmux/
2
3{
4  "result": "success",
5  "data": "zombie",
6  "version": "2.4.0"
7}

From Command line terminal

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

Example:

1curl --location --request GET 'https://172.16.3.21/api/v0.2/devices/bbb_demo/usbmux/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5  "result": "success",
6  "data": "zombie",
7  "version": "2.4.0"
8}

Switch

From Command line terminal

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

Example:

1curl --location --request PUT 'https://172.16.3.21/api/v0.2/devices/bbb_demo/usbmux/switch' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5  "result": "success",
6  "data": "device",
7  "hp_num": 1,
8  "version": "2.4.0"
9}

Switch-Zombie

From Command line terminal

1curl --location --request PUT 'https://{EBF Server IP Address}/api/<device name>/usbmux/switch/zombie' \
2      --header 'Authorization: token {Authorization token}'

Example:

1curl --location --request PUT 'https://172.16.3.21/api/bbb_demo/usbmux/switch/zombie' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5  "result": "success",
6  "data": "zombie",
7  "hp_num": 1,
8  "version": "2.4.0"
9}

Switch-Device

From Command line terminal

1curl --location --request PUT 'https://{EBF Server IP Address}/api/<device name>/usbmux/switch/device' \
2      --header 'Authorization: token {Authorization token}'

Example:

1curl --location --request PUT 'https://172.16.3.21/api/bbb_demo/usbmux/switch/device' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5  "result": "success",
6  "data": "device",
7  "hp_num": 1,
8  "version": "2.4.0"
9}

SDCard

Info

From Web browser:

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

Example:

 1https://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/info
 2
 3{
 4    "result": "success",
 5    "data": {
 6        "partitions": [
 7            {
 8                "start_sector": "2048",
 9                "fstype": "vfat",
10                "dev": "sdb1",
11                "size": "100M",
12                "bootable": true,
13                "label": "boot",
14                "type": "part"
15            },
16            {
17                "start_sector": "206848",
18                "fstype": "ext4",
19                "dev": "sdb2",
20                "size": "6.9G",
21                "bootable": false,
22                "label": "",
23                "type": "part"
24            }
25        ],
26        "fdisk": [
27            "",
28            "Disk /dev/sdb: 7.4 GiB, 7948206080 bytes, 15523840 sectors",
29            "Units: sectors of 1 * 512 = 512 bytes",
30            "Sector size (logical/physical): 512 bytes / 512 bytes",
31            "I/O size (minimum/optimal): 512 bytes / 512 bytes",
32            "Disklabel type: dos",
33            "Disk identifier: 0x0d7da0a4",
34            "",
35            "Device     Boot  Start      End  Sectors  Size Id Type",
36            "/dev/sdb1  *      2048   206847   204800  100M  c W95 FAT32 (LBA)",
37            "/dev/sdb2       206848 14542847 14336000  6.9G 83 Linux",
38            "",
39            ""
40        ],
41        "total_size": "7.4G",
42        "device": "sdb"
43    },
44    "version": "2.4.0"
45
46}

From Command line terminal

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

Example:

 1curl --location --request GET 'https://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/info/' \
 2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
 3
 4{
 5  "result": "success",
 6  "data": {
 7    "partitions": [
 8      {
 9        "start_sector": "2048",
10        "fstype": "vfat",
11        "dev": "sdb1",
12        "size": "100M",
13        "type": "part",
14        "label": "boot",
15        "bootable": true
16      },
17      {
18        "start_sector": "206848",
19        "fstype": "ext4",
20        "dev": "sdb2",
21        "size": "6.9G",
22        "type": "part",
23        "label": "",
24        "bootable": false
25      }
26    ],
27    "fdisk": [
28      "",
29      "Disk /dev/sdb: 7.4 GiB, 7948206080 bytes, 15523840 sectors",
30      "Units: sectors of 1 * 512 = 512 bytes",
31      "Sector size (logical/physical): 512 bytes / 512 bytes",
32      "I/O size (minimum/optimal): 512 bytes / 512 bytes",
33      "Disklabel type: dos",
34      "Disk identifier: 0x0d7da0a4",
35      "",
36      "Device     Boot  Start      End  Sectors  Size Id Type",
37      "/dev/sdb1  *      2048   206847   204800  100M  c W95 FAT32 (LBA)",
38      "/dev/sdb2       206848 14542847 14336000  6.9G 83 Linux",
39      "",
40      ""
41    ],
42    "total_size": "7.4G",
43    "device": "sdb"
44  },
45  "version": "2.4.0"
46}

Mount

From Command line terminal

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

Example:

1curl --location --request POST 'https://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/mount/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5  "result": "success",
6  "version": "2.4.0"
7}

Format

From Command line terminal

1curl --location --request POST 'https://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdcard/format' \
2      --header 'Authorization: token {Authorization token}' \
3      --data-raw '{"format": [{"partition": "{partition name}","type": "{partition type}"}]}'

Example:

1curl --location --request POST 'https://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/format/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
3      --data-raw '{"format": [{"partition": "sda1","type": "vfat"},{"partition": "sda2","type": "ext4"}]}'
4
5{
6    "result": "success",
7    "version": "2.4.0"
8}

Partition

From Command line terminal

1curl --location --request POST 'https://{EBF Server IP Address}/api/v0.2/devices/<device name>/sdcard/partition' \
2      --header 'Authorization: token {Authorization token}' /
3      --data-raw '{"partitions": [{"label": "{partition name}","size": "{partition size}","type": "{partition type}"}]}'

Example:

1curl --location --request POST 'https://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/partition/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
3      --data-raw '{"partitions": [{"label": "boot","size": "64","type": "vfat"},{"label": "rfs","size": "2048","type": "ext4"}]}'
4
5{
6    "result": "success",
7    "version": "2.4.0"
8}

Flash File

From Local Computer

From Command line terminal

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

Example:

 1curl --location --request POST 'https://172.16.30.138/api/v0.2/devices/bbb01/sdcard/flash/' \
 2       --header 'Authorization: token 3ywmgwdt2hm7uwn79104e6rctkhm1x5tgzssrbthhcgajg8ja1i3uxu3ypwpjys060s0mfzm9z6yk91nkwiodcpn1fyeytrk2li27mqyoqg3dafcifnta1l35h6c18bq'
 3       --form 'file=@/home/hbansal/Isos/BBB/bbb_minimal_ll_orig.img.gz' --form 'partition=sda'
 4
 5{
 6   "result": "success",
 7   "data": {
 8    "job_id": "b33bd7db-1065-41c3-b27a-a059f3734de1",
 9    "progress_url": "https://172.16.30.138/api/v0.2/devices/bbb01/sdcard/flash/status/b33bd7db-1065-41c3-b27a-a059f3734de1/"
10   },
11   "version": "2.4.0"
12}

From EBF Server

From Command line terminal

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

Example:

 1curl --location --request POST 'https://172.16.30.138/api/v0.2/devices/bbb01/sdcard/flash/' \
 2       --header 'Authorization: token 3ywmgwdt2hm7uwn79104e6rctkhm1x5tgzssrbthhcgajg8ja1i3uxu3ypwpjys060s0mfzm9z6yk91nkwiodcpn1fyeytrk2li27mqyoqg3dafcifnta1l35h6c18bq' \
 3       --header 'Content-Type: application/json' --data-raw '{"file": "bbb_minimal_ll_orig.img.gz", "partition": "sda"}'
 4
 5{
 6  "result":"success",
 7  "data":{
 8      "job_id":"b33bd7db-1065-41c3-b27a-a059f3734de1",
 9      "progress_url":"https://172.16.30.138/api/v0.2/devices/bbb01/sdcard/flash/status/b33bd7db-1065-41c3-b27a-a059f3734de1/"
10   },
11   "version": "2.4.0"
12}

Check Flash File Status

From Command line terminal

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

Example:

 1curl --location --request GET 'https://172.16.30.138/api/v0.2/devices/bbb01/sdcard/flash/status/a825c7c0-3e36-4f4f-833a-af565ecd155b/'
 2       --header 'Authorization: token 3ywmgwdt2hm7uwn79104e6rctkhm1x5tgzssrbthhcgajg8ja1i3uxu3ypwpjys060s0mfzm9z6yk91nkwiodcpn1fyeytrk2li27mqyoqg3dafcifnta1l35h6c18bq'
 3
 4{
 5  "result":"success",
 6  "data":{
 7      "status":"started",
 8       "info":{
 9          "progress":11,
10          "file_size":2147483648,
11          "storage_size_check":"done",
12          "file_size_check":"done",
13          "flash":"running",
14          "current":"Flashing File",
15          "file_name":"bbb_minimal_ll_orig.img.gz","partition":"sda"
16        }
17   },
18  "version": "2.4.0"
19}

USB

Flash File

From Local Computer

From Command line terminal

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

Example:

 1curl --location --request POST 'https://172.16.30.138/api/v0.2/devices/bbb01/usb/flash/' \
 2       --header 'Authorization: token 3ywmgwdt2hm7uwn79104e6rctkhm1x5tgzssrbthhcgajg8ja1i3uxu3ypwpjys060s0mfzm9z6yk91nkwiodcpn1fyeytrk2li27mqyoqg3dafcifnta1l35h6c18bq'
 3       --form 'file=@/home/hbansal/Isos/BBB/bbb_minimal_ll_orig.img.gz' --form 'partition=sda'
 4
 5{
 6  "result":"success",
 7  "data":{
 8      "job_id":"b33bd7db-1065-41c3-b27a-a059f3734de1",
 9      "progress_url":"https://172.16.30.138/api/v0.2/devices/bbb01/usb/flash/status/b33bd7db-1065-41c3-b27a-a059f3734de1/"
10   },
11  "version": "2.4.0"
12}

From EBF Server

From Command line terminal

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

Example:

 1curl --location --request POST 'https://172.16.30.138/api/v0.2/devices/bbb01/usb/flash/' \
 2       --header 'Authorization: token 3ywmgwdt2hm7uwn79104e6rctkhm1x5tgzssrbthhcgajg8ja1i3uxu3ypwpjys060s0mfzm9z6yk91nkwiodcpn1fyeytrk2li27mqyoqg3dafcifnta1l35h6c18bq' \
 3       --header 'Content-Type: application/json' --data-raw '{"file": "bbb_minimal_ll_orig.img.gz", "partition": "sda"}'
 4
 5{
 6  "result":"success",
 7  "data":{
 8      "job_id":"b33bd7db-1065-41c3-b27a-a059f3734de1",
 9      "progress_url":"https://172.16.30.138/api/v0.2/devices/bbb01/usb/flash/status/b33bd7db-1065-41c3-b27a-a059f3734de1/"
10   },
11  "version": "2.4.0"
12}

Check Flash File Status

From Command line terminal

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

Example:

 1curl --location --request GET 'https://172.16.30.138/api/v0.2/devices/bbb01/usb/flash/status/a825c7c0-3e36-4f4f-833a-af565ecd155b/'
 2       --header 'Authorization: token 3ywmgwdt2hm7uwn79104e6rctkhm1x5tgzssrbthhcgajg8ja1i3uxu3ypwpjys060s0mfzm9z6yk91nkwiodcpn1fyeytrk2li27mqyoqg3dafcifnta1l35h6c18bq'
 3
 4{
 5  "result":"success",
 6  "data":{
 7      "status":"started",
 8       "info":{
 9          "progress":11,
10          "file_size":2147483648,
11          "storage_size_check":"done",
12          "file_size_check":"done",
13          "flash":"running",
14          "current":"Flashing File",
15          "file_name":"bbb_minimal_ll_orig.img.gz","partition":"sda"
16        }
17   },
18  "version": "2.4.0"
19}

Network Boot

Transfer File

From Local Computer

From Command line terminal

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

Example:

 1curl --location --request POST 'https://172.16.30.138/api/v0.2/devices/bbb01/netboot/transfer/file/' \
 2       --header 'Authorization: token 3ywmgwdt2hm7uwn79104e6rctkhm1x5tgzssrbthhcgajg8ja1i3uxu3ypwpjys060s0mfzm9z6yk91nkwiodcpn1fyeytrk2li27mqyoqg3dafcifnta1l35h6c18bq'
 3       --form 'file=@/home/hbansal/Isos/BBB/rootfs-bbb.tar.gz'
 4
 5{
 6  "result":"success",
 7  "data":{
 8      "job_id":"b33bd7db-1065-41c3-b27a-a059f3734de1",
 9      "progress_url":"https://172.16.30.138/api/v0.2/devices/bbb01/netboot/transfer/file/status/b33bd7db-1065-41c3-b27a-a059f3734de1/"
10   },
11  "version": "2.4.0"
12}

From EBF Server

From Command line terminal

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

Example:

 1curl --location --request POST 'https://172.16.30.138/api/v0.2/devices/bbb01/netboot/transfer/file/' \
 2       --header 'Authorization: token 3ywmgwdt2hm7uwn79104e6rctkhm1x5tgzssrbthhcgajg8ja1i3uxu3ypwpjys060s0mfzm9z6yk91nkwiodcpn1fyeytrk2li27mqyoqg3dafcifnta1l35h6c18bq' \
 3       --header 'Content-Type: application/json' --data-raw '{"file": "rootfs-bbb.tar.gz"}'
 4
 5{
 6  "result":"success",
 7  "data":{
 8      "job_id":"b33bd7db-1065-41c3-b27a-a059f3734de1",
 9      "progress_url":"https://172.16.30.138/api/v0.2/devices/bbb01/netboot/transfer/file/status/b33bd7db-1065-41c3-b27a-a059f3734de1/"
10   },
11  "version": "2.4.0"
12}

Check Transfer File Status

From Command line terminal

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

Example:

 1curl --location --request GET 'https://172.16.30.138/api/v0.2/devices/bbb01/netboot/transfer/file/status/a825c7c0-3e36-4f4f-833a-af565ecd155b/'
 2       --header 'Authorization: token 3ywmgwdt2hm7uwn79104e6rctkhm1x5tgzssrbthhcgajg8ja1i3uxu3ypwpjys060s0mfzm9z6yk91nkwiodcpn1fyeytrk2li27mqyoqg3dafcifnta1l35h6c18bq'
 3
 4{
 5  "result":"success",
 6  "data":{
 7            "status":"started",
 8             "info":{
 9                      "progress":11,
10                      "file_size":2147483648,
11                      "storage_size_check":"done",
12                      "file_size_check":"done",
13                      "flash":"running",
14                      "current":"Flashing File",
15                      "file_name":"rootfs-bbb.tar.gz"
16                    }
17         },
18  "version": "2.4.0"
19}

Generate Boot-menu

Kernel only

From Command line terminal

1curl --location --request POST 'https://{EBF Server IP Address}/api/v0.2/devices/<device name>/netboot/bootmenu/' \
2        --header 'Authorization: token {Authorization token}' \
3        --header 'Content-Type: application/json' --data-raw '{"kernel": "<kernel path>"}'

Example:

1curl --location --request POST 'https://172.16.30.140/api/v0.2/devices/dev1/netboot/bootmenu/' \
2   --header 'Authorization: token rdn10oyatbcjch54d3hz3lxxs9j49f3olc880ii8u4rahaqwjswc8p58aznlw20xdig0770z005lw30qb3rk1ui08u5a3002blw890l2c5x6whe50ceb06ropfjixp0x' \
3   --header 'Content-Type: application/json' --data-raw '{"kernel": "kernel"}'
4
5{
6  "result":"success",
7  "version": "2.4.0"
8}

Kernel and Initrd

From Command line terminal

1curl --location --request POST 'https://{EBF Server IP Address}/api/v0.2/devices/<device name>/netboot/bootmenu/' \
2        --header 'Authorization: token {Authorization token}' \
3        --header 'Content-Type: application/json' --data-raw '{"kernel": "<kernel path>", "initrd": "<initrd path>"}'

Example:

1curl --location --request POST 'https://172.16.30.140/api/v0.2/devices/dev1/netboot/bootmenu/' \
2   --header 'Authorization: token rdn10oyatbcjch54d3hz3lxxs9j49f3olc880ii8u4rahaqwjswc8p58aznlw20xdig0770z005lw30qb3rk1ui08u5a3002blw890l2c5x6whe50ceb06ropfjixp0x' \
3   --header 'Content-Type: application/json' --data-raw '{"kernel": "kernel", "initrd": "ramdisk.img"}'
4
5{
6  "result":"success",
7  "version": "2.4.0"
8}

SDCard File manager

List

From Web browser:

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

Example:

 1https://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/fmanager/sdb1/
 2
 3{
 4  "data": [
 5    {
 6      "file_or_dir_name": "MLO",
 7      "modified_date": "Jan 22, 2021 12:50:42 PM",
 8      "owner": "root",
 9      "size": "108K",
10      "symlink_target": "",
11      "type": "File"
12    }
13  ],
14  "result": "success",
15  "version": "2.4.0"
16}

From Command line terminal

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

Example:

 1curl --location --request GET 'https://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/fmanager/sdb1/' \
 2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
 3
 4{
 5  "data": [
 6    {
 7      "file_or_dir_name": "MLO",
 8      "modified_date": "Jan 22, 2021 12:50:42 PM",
 9      "owner": "root",
10      "size": "108K",
11      "symlink_target": "",
12      "type": "File"
13    }
14  ],
15  "result": "success",
16  "version": "2.4.0"
17}

Create Directory

From Command line terminal

1curl --location --request POST 'https://{EBF Server IP Address}/sdcard/fmanager/dir/<path>/' \
2   --header 'Authorization: token {Authorization token}'

Example:

1curl --location --request POST 'https://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/fmanager/dir/sdb1/test/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5   "message":"sdb1/test  created",
6   "result":"success",
7   "version": "2.4.0"
8}

Delete Directory

From Command line terminal

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

Example:

1curl --location --request DELETE 'hhttps://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/fmanager/dir/sdb1/test/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5   "message":"sdb1/test  deleted",
6   "result":"success"
7   "version": "2.4.0",
8}

Upload Files

From Command line terminal

1curl --location --request PUT 'https://{EBF Server IP Address/api/v0.2/devices/<device name>/sdcard/fmanager/dir/' \
2      --header 'Authorization: token {Authorization token}' \
3      --form 'file=@"<Upload file>"' \
4      --form 'path_to_upload_file="<upload path>"'

Example:

 1curl --location --request PUT 'https://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/fmanager/dir/sdb1/' \
 2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
 3      --form 'file=@"/home/admin/QNX"' \
 4      --form 'path_to_upload_file="sdb1/"'
 5
 6{
 7   "message":"100% upload completed.",
 8   "result":"success",
 9   "version": "2.4.0"
10}

Download Files

From Web browser:

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

Example:

1https://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/fmanager/download/sdb1/MLO

From Command line terminal

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

Example:

1curl --location --request GET 'https://172.16.3.21/api/v0.2/devices/bbb_demo/sdcard/fmanager/dir/sdb1/MLO' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
3      --output /home/admin/Desktop/MLO

Network Boot File Manager

List

From Web browser:

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

Example:

 1https://172.16.3.21/api/v0.2/devices/bbb_demo/netboot/fmanager/
 2
 3{
 4    "data": [
 5        {
 6            "file_or_dir_name": "fsroot",
 7            "modified_date": "Jan 21, 2021 05:32:08 PM",
 8            "owner": "root",
 9            "size": "47",
10            "symlink_target": "-> my_rootfs",
11            "type": "Directory"
12        },
13        {
14            "file_or_dir_name": "my_rootfs",
15            "modified_date": "Jan 21, 2021 05:32:08 PM",
16            "owner": "root",
17            "size": "4.0K",
18            "symlink_target": "",
19            "type": "Directory"
20        },
21        {
22            "file_or_dir_name": "qnx",
23            "modified_date": "Jan 22, 2021 11:26:12 AM",
24            "owner": "root",
25            "size": "4.0K",
26            "symlink_target": "",
27            "type": "Directory"
28        },
29        {
30            "file_or_dir_name": "beaglebone_black.dtb",
31            "modified_date": "Jan 21, 2021 04:33:40 PM",
32            "owner": "root",
33            "size": "36K",
34            "symlink_target": "",
35            "type": "File"
36        },
37        {
38            "file_or_dir_name": "uImage-4.14-ts-armv7l",
39            "modified_date": "Jan 21, 2021 05:46:23 PM",
40            "owner": "root",
41            "size": "5.0M",
42            "symlink_target": "",
43            "type": "File"
44        }
45    ],
46    "result": "success",
47    "version": "2.4.0"
48}

From Command line terminal

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

Example:

 1curl --location --request GET 'https://172.16.3.21/api/v0.2/devices/bbb_demo/netboot/fmanager/' \
 2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
 3
 4{
 5  "data": [
 6    {
 7      "file_or_dir_name": "fsroot",
 8      "modified_date": "Jan 21, 2021 05:32:08 PM",
 9      "owner": "root",
10      "size": "47",
11      "symlink_target": "-> my_rootfs",
12      "type": "Directory"
13    },
14    {
15      "file_or_dir_name": "my_rootfs",
16      "modified_date": "Jan 21, 2021 05:32:08 PM",
17      "owner": "root",
18      "size": "4.0K",
19      "symlink_target": "",
20      "type": "Directory"
21    },
22    {
23      "file_or_dir_name": "qnx",
24      "modified_date": "Jan 22, 2021 11:26:12 AM",
25      "owner": "root",
26      "size": "4.0K",
27      "symlink_target": "",
28      "type": "Directory"
29    },
30    {
31      "file_or_dir_name": "beaglebone_black.dtb",
32      "modified_date": "Jan 21, 2021 04:33:40 PM",
33      "owner": "root",
34      "size": "36K",
35      "symlink_target": "",
36      "type": "File"
37    },
38    {
39      "file_or_dir_name": "uImage-4.14-ts-armv7l",
40      "modified_date": "Jan 21, 2021 05:46:23 PM",
41      "owner": "root",
42      "size": "5.0M",
43      "symlink_target": "",
44      "type": "File"
45    }
46  ],
47  "result": "success",
48  "version": "2.4.0"
49}

Create Directory

From Command line terminal

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

Example:

1curl --location --request POST 'https://172.16.3.21/api/v0.2/devices/bbb_demo/netboot/fmanager/dir/test/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5   "message":"test  created",
6   "result":"success",
7   "version": "2.4.0"
8}

Delete File / Directory

From Command line terminal

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

Example:

1curl --location --request DELETE 'https://172.16.3.21/api/v0.2/devices/bbb_demo/netboot/fmanager/dir/test/'
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5   "message":"test  deleted",
6   "result":"success",
7   "version": "2.4.0"
8}

upload files

From Command line terminal

1curl --location --request PUT 'https://{EBF Server IP Address}/api/v0.2/devices/<device name>/netboot/fmanager/dir/{upload path}' \
2      --header 'Authorization: token {Authorization token}' \
3      --form file=@{file path} \
4      --form path_to_upload_file={upload file path} \
5      --form file_rename={true/false}

Examples:

Upload file

1curl --location --request PUT 'https://172.16.3.21/api/v0.2/devices/bbb_demo/netboot/fmanager/dir/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
3      --form 'file=@"/home/admin/screenshot.png"' \
4      --form 'path_to_upload_file="qnx/"'
5
6{
7   "message":"100% upload completed.",
8   "result":"success"
9}

OR

1curl --location --request PUT 'https://172.16.3.21/api/v0.2/devices/bbb_demo/netboot/fmanager/dir/qnx/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
3      --form 'file=@"/home/admin/screenshot.png"' \
4
5{
6   "message":"100% upload completed.",
7   "result":"success"
8}

Upload and rename file

 1curl --location --request PUT 'https://172.16.3.21/api/v0.2/devices/bbb_demo/netboot/fmanager/dir/' \
 2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
 3      --form 'file=@"/home/admin/screenshot.png"' \
 4      --form 'path_to_upload_file="qnx/myscreenshot.png"' \
 5      --form 'file_rename=true'
 6
 7{
 8   "message":"100% upload completed.",
 9   "result":"success"
10}

OR

1curl --location --request PUT 'https://172.16.3.21/api/v0.2/devices/bbb_demo/netboot/fmanager/dir/qnx/myscreenshot.png/' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
3      --form 'file=@"/home/admin/screenshot.png"' \
4      --form 'file_rename=true'
5
6{
7   "message":"100% upload completed.",
8   "result":"success"
9}

Download files

From Web browser:

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

Example:

1https://172.16.3.21/api/v0.2/devices/bbb_demo/netboot/fmanager/download/qnx/sshd_config

From Command line terminal

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

Example:

1curl --location --request GET 'https://172.16.3.21/api/v0.2/devices/bbb_demo/netboot/fmanager/download/qnx/sshd_config' \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
3      --output /home/admin/Desktop/MLO

Port Forwarding

Add Port List rules ———-

From Command line terminal

1curl --location --request GET 'https://{EBF Server IP Address}/api/v0.2/devices/<device name>/portfw/nat/' \
2      --header 'Authorization: token {Authorization token}'

Example:

 1curl --location --request GET 'https://172.16.3.21/api/v0.2/devices/bbb_demo/portfw/nat/ \
 2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
 3
 4{
 5  "result": "success",
 6  "data": [
 7    {
 8      "device_ip": "192.168.111.98",
 9      "dut_port": 22,
10      "pcol": "tcp",
11      "zombie_port": 4904,
12      "is_active": true
13    }
14  ],
15  "version": "2025.03.0"
16}

Add rule

From Command line terminal

1curl --location --request POST 'https://{EBF Server IP Address}/api/v0.2/devices/<device name>/portfw/nat/' \
2      --header 'Authorization: token {Authorization token}' \
3      --data-raw '{"device_ip": "<device_ip>","dut_port": <device port to forward>,"zombie_port": <zombie port>,"pcol":"<protocol>"}'

Example:

1curl --location --request POST 'https://172.16.3.21/api/v0.2/devices/bbb_demo/portfw/nat/ \
2         --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
3         --data-raw '{"device_ip": "192.168.111.19","dut_port": 22,"zombie_port": 1491,"pcol":"tcp"}'
4
5{
6   "result": "success",
7   "version": "2.4.0"
8}

Remove rule

From Command line terminal

1curl --location --request DELETE 'https://{EBF Server IP Address}/api/v0.2/devices/<device name>/portfw/nat/' \
2      --header 'Authorization: token {Authorization token}' \
3      --data-raw '{"device_ip": "<device_ip>","dut_port": <device port to forward>,"zombie_port": <zombie port>,"pcol":"<protocol>"}'

Example:

1curl --location --request DELETE 'https://172.16.3.21/api/v0.2/devices/bbb_demo/portfw/nat/ \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
3         --data-raw '{"device_ip": "192.168.111.19","dut_port": 22,"zombie_port": 1491,"pcol":"tcp"}'
4
5{
6   "result": "success",
7   "version": "2.4.0"
8}

Restore rule

From Command line terminal

1curl --location --request PUT 'https://{EBF Server IP Address}/api/v0.2/devices/<device name>/portfw/nat/' \
2      --header 'Authorization: token {Authorization token}' \
3      --data-raw '{"device_ip": "<device_ip>","dut_port": <device port to forward>,"zombie_port": <zombie port>,"pcol":"<protocol>"}'

Example:

1curl --location --request PUT 'https://172.16.3.21/api/v0.2/devices/bbb_demo/portfw/nat/ \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
3      --data-raw '{"device_ip": "192.168.111.19","dut_port": 22,"zombie_port": 1491,"pcol":"tcp"}'
4
5{
6   "result": "success",
7   "version": "2.4.0"
8}

Device Static IP address

Assign Static IP address

From Command line terminal

1curl --location --request POST 'https://{EBF Server IP Address}/api/v0.2/devices/<device name>/staticip/' \
2      --header 'Authorization: token {Authorization token}' \
3      --data-raw '{"device_ip": "<device_ip>","device_mac": "<device mac address>"}'

Example:

1curl --location --request POST 'https://172.16.3.21/api/v0.2/devices/bbb_demo/staticip/ \
2         --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
3         --data-raw '{"device_ip": "192.168.111.19","device_mac": "b8:27:eb:70:fa:a9"}'
4
5{
6   "result": "success",
7   "message": "Successfully added the static IP address.",
8   "version": "2025.03.0"
9}

View Static IP address LIST

From Command line terminal

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

Example:

 1curl --location --request GET 'https://172.16.3.21/api/v0.2/devices/bbb_demo/staticip/ \
 2         --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
 3
 4{
 5  "result": "success",
 6  "data": [
 7    {
 8      "ip": "192.168.111.90",
 9      "mac": "b8:27:eb:70:fa:a6"
10    },
11    {
12      "ip": "192.168.111.10",
13      "mac": "b8:27:eb:70:fa:a9"
14    }
15  ],
16  "version": "2025.03.0"
17}

Remove Static IP address

From Command line terminal

1curl --location --request DELETE 'https://{EBF Server IP Address}/api/v0.2/devices/<device name>/staticip/' \
2      --header 'Authorization: token {Authorization token}' \
3      --data-raw '{"device_ip": "<device_ip>","device_mac": "<device mac address>"}'

Example:

1curl --location --request DELETE 'https://172.16.3.21/api/v0.2/devices/bbb_demo/staticip/ \
2         --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0' \
3         --data-raw '{"device_ip": "192.168.111.19","device_mac": "b8:27:eb:70:fa:a9"}'
4
5{
6   "result": "success",
7   "message": "Successfully deleted the static IP address.",
8   "version": "2025.03.0"
9}

WEB CAM

Restart-feed

From Command line terminal

1curl --location --request POST 'https://{EBF Server IP Address}/api/v0.2/devices/<device name>/webcam/restartfeed/' \
2      --header 'Authorization: token {Authorization token}'

Example:

1curl --location --request POST 'https://172.16.3.21/api/v0.2/devices/bbb_demo/webcam/restartfeed/ \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5   "result": "success",
6   "version": "2.4.0"
7}

Image Capture

From Command line terminal

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

Example:

1curl --location --request GET 'https://172.16.3.21/api/v0.2/devices/bbb_demo/image/capture/ \
2      --header 'Authorization: token e463u9334siny819ybsk3x5hxxj0hps01h3lk35fkh5qdnyqkptmw2aewboo3m86ljawaig0t42elzbb131iptpe2dqkbf39tltcnfmtdm0qin8mw00a9uwljrm4shr0'
3
4{
5   "status": "success",
6   "data": "https://172.16.99.105/icamImages/2021-01-25_084945.jpg",
7   "version": "2.4.0"
8}

Download Console Logs

From Command line terminal

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

Example:

download from first console

1curl --location --request GET https://172.16.30.247/api/v0.2/devices/EBF_Build_Rpi3/console/logs/download \
2      --header 'Authorization: token a6nhx3rep1jfbhwimfp847pu55n4n3fbh64u1yxn2kz8t9mbumuc8bjjf9bgegjqly54y11kha0ui11zkt2m1d4wzgikanmwswtg1l0u5j7060i1pohjts122jslwu1j' \
3      --output EBF_Build_Rpi3-2310271529.logs
4
5{
6   "download": "Successfully Downloaded console logs to "EBF_Build_Rpi3-1-2310271529.logs"
7}

download from Nth console

1curl --location --request GET https://172.16.30.247/api/v0.2/devices/EBF_Build_Rpi3/console/logs/download/serial0/ \
2      --header 'Authorization: token a6nhx3rep1jfbhwimfp847pu55n4n3fbh64u1yxn2kz8t9mbumuc8bjjf9bgegjqly54y11kha0ui11zkt2m1d4wzgikanmwswtg1l0u5j7060i1pohjts122jslwu1j' \
3      --output EBF_Build_Rpi3-2310271529.logs
4
5{
6   "download": "Successfully Downloaded console logs to "EBF_Build_Rpi3-4-2310271529.logs"
7}

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.

_images/GPIOiocxSetup.jpeg
  1. 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.

_images/GPIOi2cSetup.jpeg

From Command line terminal:

1curl -k https://{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:

1curl --location --request GET 'https://172.16.30.11/api/bbb_demo/gpio/get_mode/6'
2
3{
4   "result": "success",
5   "data": "write"
6}

RESOURCE

Get Resource

1curl --location --request GET https://{EBF Server IP Address}/api/v0.2/devices/{DeviceName}/get-resource/{Resource-Type}/ \
2      --header 'Authorization: token {Authorization token}
 1curl --location --request GET https://172.16.30.246/api/v0.2/devices/rpi3-2/get-resource/power-measurement \
 2      --header 'Authorization: token 27gy0kmr0ak2650zu09e6azda0255gofjkpl8qyks4cuh5ukifyh4o45ypp1nm3q7klo1kzx8to6jf5dicewot15eirctf0ll4uk47yd15sd11qfdgxokda9sy0i70xr'
 3
 4{
 5   "result":"success",
 6   "data":{
 7      "resource_name":"ACME1"
 8   },
 9   "version": "2.4.0"
10}

Power Management

Start Capture

1curl --location --request POST https://{EBF Server IP Address}/api/v0.2/resources/{ResourceName}/power-measurement/start-capture/ \
2      --header 'Authorization: token {Authorization token}
1curl --location --request POST https://172.16.30.246/api/v0.2/resources/ACME1/power-measurement/start-capture/ \
2      --header 'Authorization: token 27gy0kmr0ak2650zu09e6azda0255gofjkpl8qyks4cuh5ukifyh4o45ypp1nm3q7klo1kzx8to6jf5dicewot15eirctf0ll4uk47yd15sd11qfdgxokda9sy0i70xr'
3
4{
5   "result": "success",
6   "data": 1639552930,
7   "version": "2.4.0"
8}

Stop Capture

1curl --location --request PUT https://{EBF Server IP Address}/api/v0.2/resources/{ResourceName}/power-measurement/stop-capture/{token} \
2      --header 'Authorization: token {Authorization token}
1curl --location --request PUT https://172.16.30.246/api/v0.2/resources/ACME1/power-measurement/stop-capture/1639552930 \
2      --header 'Authorization: token 27gy0kmr0ak2650zu09e6azda0255gofjkpl8qyks4cuh5ukifyh4o45ypp1nm3q7klo1kzx8to6jf5dicewot15eirctf0ll4uk47yd15sd11qfdgxokda9sy0i70xr'
3
4{
5   "result": "success",
6   "version": "2.4.0"
7}

Get Data

1curl --location --request GET https://{EBF Server IP Address}//api/v0.2/resources/{ResourceName}/power-measurement/get-data/{token} \
2      --header 'Authorization: token {Authorization token}
 1curl --location --request GET https://172.16.30.246/api/v0.2/resources/ACME1/power-measurement/get-data/1639552930 \
 2      --header 'Authorization: token 27gy0kmr0ak2650zu09e6azda0255gofjkpl8qyks4cuh5ukifyh4o45ypp1nm3q7klo1kzx8to6jf5dicewot15eirctf0ll4uk47yd15sd11qfdgxokda9sy0i70xr'
 3
 4{
 5   "result": "success",
 6   "data": "timestamp,voltage,current
 7            1572709715,5136.200,350.768
 8            1572709716,5136.218,350.751
 9            1572709717,5136.184,350.972
10            1572709718,5136.185,350.937
11            1572709719,5136.204,350.909
12            1572709720,5136.208,350.870
13            1572709721,5136.192,350.959
14            1572709722,5136.200,350.924",
15   "version": "2.4.0"
16}

Delete Data

1curl --location --request DELETE https://{EBF Server IP Address}//api/v0.2/resources/{ResourceName}/power-measurement/delete/{token}
1curl --location --request DELETE https://172.16.30.246/api/v0.2/resources/ACME1/power-measurement/delete/1639552930 \
2      --header 'Authorization: token 27gy0kmr0ak2650zu09e6azda0255gofjkpl8qyks4cuh5ukifyh4o45ypp1nm3q7klo1kzx8to6jf5dicewot15eirctf0ll4uk47yd15sd11qfdgxokda9sy0i70xr'
3
4{
5   "result": "success",
6   "version": "2.4.0"
7}

CAMERA

Capture Still Image

1curl --location --request GET https://{EBF Server IP Address}/api/v0.2/resources/{ResourceName}/camera/capture/ \
2      --header 'Authorization: token {Authorization token}
1curl --location --request GET https://172.16.30.245/api/v0.2/resources/CAM1/camera/capture \
2      --header 'Authorization: token b2yykdx0g1wg3iklrhhmkaz0i73paj3jt10yasz1is93mop8k3gt69rwn1mpihmuo7l7jkk62354l0sucqfpqqybablz3yx9d2bklckr0y5307cbfxsd0qj6jrkxkhpn'
3
4{
5   "result":"success",
6   "data":"https://172.16.30.245/camera/rpi_test-2022-06-23_073947.jpg",
7   "version": "2.4.0"
8}

AUDIO

Start

1curl --location --request POST https://{EBF Server IP Address}/api/v0.2/resources/{ResourceName}/audio/start-capture/ \
2      --header 'Authorization: token {Authorization token}
 1curl --location --request POST https://172.16.30.245/api/v0.2/resources/AUDIO1/audio/start-capture/ \
 2      --header 'Authorization: token b2yykdx0g1wg3iklrhhmkaz0i73paj3jt10yasz1is93mop8k3gt69rwn1mpihmuo7l7jkk62354l0sucqfpqqybablz3yx9d2bklckr0y5307cbfxsd0qj6jrkxkhpn'
 3
 4{
 5   "data":{
 6      "token":"33cf89d4741e4fccb892c2d23d73ad1b"
 7      },
 8   "result":"success",
 9   "version": "2.4.0"
10}

Stop

1curl --location --request PUT https://{EBF Server IP Address}/api/v0.2/resources/{ResourceName}/audio/stop-capture/{AudioID} \
2      --header 'Authorization: token {Authorization token}
1curl --location --request PUT https://172.16.30.245/api/v0.2/resources/AUDIO1/audio/stop-capture/b414e732b09843af8a7db1c32dbcdd23 \
2      --header 'Authorization: token b2yykdx0g1wg3iklrhhmkaz0i73paj3jt10yasz1is93mop8k3gt69rwn1mpihmuo7l7jkk62354l0sucqfpqqybablz3yx9d2bklckr0y5307cbfxsd0qj6jrkxkhpn'
3
4{
5   "result":"success",
6   "version": "2.4.0"
7}

Get-reference

1curl --location --request GET https://{EBF Server IP Address}/api/v0.2/resources/{ResourceName}/audio/get-ref/{AudioID} \
2      --header 'Authorization: token {Authorization token}
1curl --location --request GET https://172.16.30.245/api/v0.2/resources/AUDIO1/audio/get-ref/5159e4f233a9442cb623da1120cd2bfb \
2      --header 'Authorization: token b2yykdx0g1wg3iklrhhmkaz0i73paj3jt10yasz1is93mop8k3gt69rwn1mpihmuo7l7jkk62354l0sucqfpqqybablz3yx9d2bklckr0y5307cbfxsd0qj6jrkxkhpn'
3
4{
5   "result":"success",
6   "data":"https://172.16.30.245/audio/test-5159e4f233a9442cb623da1120cd2bfb.wmv",
7   "version": "2.4.0"
8}

Delete

1curl --location --request DELETE https://{EBF Server IP Address}/api/v0.2/resources/{ResourceName}/audio/delete/{AudioID} \
2      --header 'Authorization: token {Authorization token}
1curl --location --request DELETE https://172.16.30.245/api/v0.2/resources/AUDIO1/audio/delete/5159e4f233a9442cb623da1120cd2bfb \
2      --header 'Authorization: token b2yykdx0g1wg3iklrhhmkaz0i73paj3jt10yasz1is93mop8k3gt69rwn1mpihmuo7l7jkk62354l0sucqfpqqybablz3yx9d2bklckr0y5307cbfxsd0qj6jrkxkhpn'
3
4{
5   "result":"success",
6   "version": "2.4.0"
7}

Delete Zombie

From Command line terminal

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

Example:

1curl --location --request DELETE https://172.16.7.21/api/v0.2/zombies/Zombie01 \
2      --header 'Authorization: token 22nbjxec52gxfpz32t82cqb7twfk9b2llrlaxfm2jl4ftkfhnxylyidsae260ajqfp2lk3r0l02crugak42yoy7tt90sn4flo20zt13ibuc0yfnb0xjgxsg3tcry33am'
3
4{
5   "result":"success",
6   "version": "2.4.0"
7}

Search/Allocate Devices

From Web browser:

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

Example:

1https://172.16.30.253/api/v0.2/devices/description__startswith=d
2
3{
4    "result": "success"
5}

From Command line terminal

1curl --location --request GET 'https://172.16.30.253/api/v0.2/devices/?description__startswith=d' \
2      --header 'Authorization: token {Authorization token}'

Example:

1curl --location --request GET 'https://172.16.30.253/api/v0.2/devices/?description__startswith=d' \
2      --header 'Authorization: token mks3wn3ddk3z5kym8jsehg9m09lflsn5hn4ef07tcylctddre8y98cjkratdo04roo2bd5h0s1810jqiub2nr0eig7t0o3ltceukiop3xo5ony4auh3n7bqydh4topt0'
3
4{
5   "result":"success",
6   "data":["rpi-demo"],
7   "version": "2.4.0"
8}