Freeplug¶
The freeplug API allow you to list the freeplugs on the Freebox network and get stats
Freeplug Errors¶
When attempting to access the freeplug API, you may encounter the following errors:
| error_code | Description |
|---|---|
| inval | Invalid request |
| nomem | Internal error |
| nosta | No freeplug with this id |
| nopeer | No freeplug with this id |
Freeplug Network¶
FreeplugNetwork has the following attributes:
Freeplug Object¶
Freeplug has the following attributes:
-
Freeplug¶ -
idstring Read-only¶ Freeplug unique id
-
localbool Read-only¶ if true the Freeplug is connected directly to the Freebox
-
net_roleenum Read-only¶ - Freeplug network role
Type Description sta Freeplug Station pco Freeplug proxy coordinator cco Central coordinator
-
modelstring Read-only¶ Freebox Server netbios name
-
eth_port_statusenum Read-only¶ Type Description up The ethernet port is up down The ethernet port is down unknown The ethernet port state is unknown
-
eth_full_duplexbool Read-only¶ ethernet link is full duplex
-
has_networkbool Read-only¶ is connected to the network
-
eth_speedint Read-only¶ ethernet port speed
-
inactiveint Read-only¶ seconds since last activity
-
net_idstring Read-only¶ network id
-
rx_rateint Read-only¶ rx rate (from the freeplugs to the “cco” freeplug) (in Mb/s) -1 if not available
-
tx_rateint Read-only¶ tx rate (from the “cco” freeplug to the freeplugs) (in Mb/s) -1 if not available
-
Freeplug API¶
Get the current Freeplugs networks¶
-
GET/api/v4/freeplug/¶ Returns the list of
FreeplugNetworkExample request:
GET /api/v4/freeplug/ HTTP/1.1 Host: mafreebox.freebox.fr
Example response:
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8
{ "success": true, "result": [ { "id": "c8:f7:b9:83:f5:10:01", "members": [ { "id": "00:24:D4:36:4C:CF", "tx_rate": 148, "eth_port_status": "up", "rx_rate": 148, "net_role": "sta", "inactive": 1, "net_id": "c8:f7:b9:83:f5:10:01", "model": "int6400", "eth_speed": 100, "local": true, "eth_full_duplex": true, "has_network": true }, { "id": "F4:CA:E5:1D:46:AE", "tx_rate": 149, "eth_port_status": "up", "rx_rate": 148, "net_role": "sta", "inactive": 1, "net_id": "c8:f7:b9:83:f5:10:01", "model": "int6400", "eth_speed": 100, "local": true, "eth_full_duplex": true, "has_network": true }, { "id": "00:24:D4:1B:15:D0", "tx_rate": -1, "eth_port_status": "up", "rx_rate": -1, "net_role": "cco", "inactive": 1, "net_id": "c8:f7:b9:83:f5:10:01", "model": "int6400", "eth_speed": 100, "local": false, "eth_full_duplex": true, "has_network": true } ] } ] }
Get a particular Freeplug information¶
-
GET/api/v4/freeplug/{id}/¶ Returns the list of
FreeplugExample request:
GET /api/v4/freeplug/F4:CA:E5:1D:46:AE/ HTTP/1.1 Host: mafreebox.freebox.fr
Example response:
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8
{ "success": true, "result": { "id": "00:24:D4:36:4C:CF", "tx_rate": -1, "eth_port_status": "up", "rx_rate": -1, "net_role": "sta", "inactive": 1, "net_id": "c8:f7:b9:83:f5:10:01", "model": "int6400", "eth_speed": 100, "local": true, "eth_full_duplex": true, "has_network": true } }