Guest User

Untitled

a guest
Mar 10th, 2022
469
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 427.51 KB | None | 0 0
  1.  
  2. API List
  3. Language
  4. Language support
  5.  
  6. With this API you can fetch the list of supported languages on the Freebox, and change the current language.
  7. Language support Object
  8.  
  9. LanguageSupport
  10.  
  11. lang enum
  12.  
  13. Currently configured language.
  14.  
  15. avalaible[] array of string Read-only
  16.  
  17. List of supported languages, in iso 639-3 (alpha-3) format, used for changing the language.
  18.  
  19. Get language status
  20.  
  21. GET /api/v8/lang/
  22.  
  23. Get the current language in iso 639-3 (alpha-3) format, as well as the list of supported languages.
  24.  
  25. Example request:
  26.  
  27. GET /api/v8/lang HTTP/1.1
  28. Host: mafreebox.freebox.fr
  29.  
  30. Example response:
  31.  
  32. HTTP/1.1 200 OK
  33. Content-Type: application/json; charset=utf-8
  34.  
  35. {
  36. "success": true,
  37. "result": {
  38. "lang": "fra",
  39. "avalaible": [
  40. "fra",
  41. "eng"
  42. ]
  43. }
  44. }
  45.  
  46. Set language
  47.  
  48. POST /api/v8/lang/
  49.  
  50. Set the current language.
  51.  
  52. Example request:
  53.  
  54. POST /api/v8/lang HTTP/1.1
  55. Host: mafreebox.freebox.fr
  56.  
  57. {
  58. "lang": "eng"
  59. }
  60.  
  61. Example response:
  62.  
  63. HTTP/1.1 200 OK
  64. Content-Type: application/json; charset=utf-8
  65.  
  66. {
  67. "success": true,
  68. }
  69.  
  70. Downloads
  71. Download
  72.  
  73. With the download API you can control the download queue of the Freebox. The Freebox supports downloads from HTTP, FTP, Magnet link, .torrent files and newsgroups (NNTP). Each download task is represented by a Download object.
  74. Download Errors
  75.  
  76. When attempting to access the download API, you may encounter the following errors:
  77.  
  78. error_code
  79.  
  80. Description
  81.  
  82. task_not_found
  83.  
  84. No task was found with the given id
  85.  
  86. invalid_operation
  87.  
  88. Attempt to perform an invalid operation
  89.  
  90. invalid_file
  91.  
  92. Error with the download file (invalid format ?)
  93.  
  94. invalid_url
  95.  
  96. URL is invalid
  97.  
  98. not_implemented
  99.  
  100. Method not implemented
  101.  
  102. out_of_memory
  103.  
  104. No more memory available to perform the requested action
  105.  
  106. invalid_task_type
  107.  
  108. The task type is invalid
  109.  
  110. hibernating
  111.  
  112. The downloader is hibernating
  113.  
  114. need_bt_stopped_done
  115.  
  116. This action is only valid for Bittorrent task in stopped or done state
  117.  
  118. bt_tracker_not_found
  119.  
  120. Attempt to access an invalid tracker object
  121.  
  122. too_many_tasks
  123.  
  124. Too many tasks
  125.  
  126. invalid_address
  127.  
  128. Invalid peer address
  129.  
  130. port_conflict
  131.  
  132. Port conflict when setting config
  133.  
  134. invalid_priority
  135.  
  136. Invalid priority
  137.  
  138. internal_error
  139.  
  140. Internal error
  141.  
  142. ctx_file_error
  143.  
  144. Failed to initialize task context file (need to check disk)
  145.  
  146. exists
  147.  
  148. Same task already exists
  149.  
  150. port_outside_range
  151.  
  152. Incoming port is not available for this customer (see ConnectionStatus ipv4_port_range)
  153. Download Task / TaskFile Errors
  154.  
  155. Each download task can encounter one of the following errors:
  156.  
  157. Error
  158.  
  159. Description
  160.  
  161. none
  162.  
  163. No error
  164.  
  165. internal
  166.  
  167. Internal error
  168.  
  169. disk_full
  170.  
  171. The disk is full
  172.  
  173. unknown
  174.  
  175. Unknown error
  176.  
  177. parse_error
  178.  
  179. Parse error
  180.  
  181. http_301
  182.  
  183. HTTP 301 error
  184.  
  185. http_400
  186.  
  187. HTTP 400 error
  188.  
  189. http_401
  190.  
  191. http_402
  192.  
  193. http_403
  194.  
  195. http_404
  196.  
  197. http_405
  198.  
  199. http_406
  200.  
  201. http_407
  202.  
  203. http_408
  204.  
  205. http_409
  206.  
  207. http_410
  208.  
  209. http_411
  210.  
  211. http_412
  212.  
  213. [ … ]
  214.  
  215. http_413
  216.  
  217. http_414
  218.  
  219. http_415
  220.  
  221. http_416
  222.  
  223. http_417
  224.  
  225. http_422
  226.  
  227. http_423
  228.  
  229. http_424
  230.  
  231. http_425
  232.  
  233. http_426
  234.  
  235. http_427
  236.  
  237. http_428
  238.  
  239. http_429
  240.  
  241. http_430
  242.  
  243. http_431
  244.  
  245. http_4xx
  246.  
  247. Other 4xx HTTP errors
  248.  
  249. http_500
  250.  
  251. HTTP 500 error
  252.  
  253. http_501
  254.  
  255. http_502
  256.  
  257. http_503
  258.  
  259. http_504
  260.  
  261. http_505
  262.  
  263. http_506
  264.  
  265. [ … ]
  266.  
  267. http_507
  268.  
  269. http_508
  270.  
  271. http_509
  272.  
  273. http_510
  274.  
  275. http_511
  276.  
  277. http_5xx
  278.  
  279. Other 5xx HTTP errors
  280.  
  281. http_redirections_exceeded
  282.  
  283. Too many HTTP redirections
  284.  
  285. nzb_no_group
  286.  
  287. Cannot find the requested group on server
  288.  
  289. nzb_not_found
  290.  
  291. Article not fount on the server
  292.  
  293. nzb_invalid_crc
  294.  
  295. Invalid article CRC
  296.  
  297. nzb_invalid_size
  298.  
  299. Invalid article size
  300.  
  301. nzb_invalid_filename
  302.  
  303. Invalid filename
  304.  
  305. nzb_open_failed
  306.  
  307. Error opening
  308.  
  309. nzb_write_failed
  310.  
  311. Error writing
  312.  
  313. nzb_missing_size
  314.  
  315. Missing article size
  316.  
  317. nzb_decode_error
  318.  
  319. Article decoding error
  320.  
  321. nzb_missing_segments
  322.  
  323. Missing article segments
  324.  
  325. nzb_error
  326.  
  327. Other nzb error
  328.  
  329. unknown_host
  330.  
  331. Unknown host
  332.  
  333. timeout
  334.  
  335. Timeout
  336.  
  337. bad_authentication
  338.  
  339. Invalid credentials
  340.  
  341. connection_refused
  342.  
  343. Remote host refused connection
  344.  
  345. nzb_authentication_required
  346.  
  347. Nzb server need authentication
  348.  
  349. bt_tracker_error
  350.  
  351. Unable to announce on tracker
  352.  
  353. bt_missing_files
  354.  
  355. Missing torrent files
  356.  
  357. bt_file_error
  358.  
  359. Error accessing torrent files
  360.  
  361. missing_ctx_file
  362.  
  363. Error accessing task context file
  364.  
  365. Download object
  366.  
  367. Download objects have the following attributes:
  368.  
  369. Download
  370.  
  371. id int Read-only
  372.  
  373. id
  374.  
  375. type enum Read-only
  376.  
  377. The valid download types are:
  378.  
  379. Type
  380.  
  381. Description
  382.  
  383. bt
  384.  
  385. bittorrent download
  386.  
  387. nzb
  388.  
  389. newsgroup download
  390.  
  391. http
  392.  
  393. HTTP download
  394.  
  395. ftp
  396.  
  397. FTP download
  398.  
  399. name string Read-only
  400.  
  401. status enum
  402.  
  403. The valid download status are:
  404.  
  405. Status
  406.  
  407. Description
  408.  
  409. stopped
  410.  
  411. task is stopped, can be resumed by setting the status to downloading
  412.  
  413. queued
  414.  
  415. task will start when a new download slot is available the queue position is stored in queue_pos attribute
  416.  
  417. starting
  418.  
  419. task is preparing to start download
  420.  
  421. downloading
  422.  
  423. stopping
  424.  
  425. task is gracefully stopping
  426.  
  427. error
  428.  
  429. there was a problem with the download, you can get an error code in the error field
  430.  
  431. done
  432.  
  433. the download is over. For bt you can resume seeding setting the status to seeding if the ratio is not reached yet
  434.  
  435. checking
  436.  
  437. (only valid for nzb) download is over, the downloaded files are being checked using par2
  438.  
  439. repairing
  440.  
  441. (only valid for nzb) download is over, the downloaded files are being repaired using par2
  442.  
  443. extracting
  444.  
  445. only valid for nzb) download is over, the downloaded files are being extracted
  446.  
  447. seeding
  448.  
  449. (only valid for bt) download is over, the content is Change to being shared to other users. The task will automatically stop once the seed ratio has been reached
  450.  
  451. retry
  452.  
  453. You can set a task status to ‘retry’ to restart the download task.
  454.  
  455. size int Read-only
  456.  
  457. download size (in Bytes)
  458.  
  459. queue_pos int
  460.  
  461. position in download queue (0 if not queued)
  462.  
  463. io_priority enum
  464.  
  465. The valid download priorities are:
  466.  
  467. Priority
  468.  
  469. Description
  470.  
  471. low
  472.  
  473. low
  474.  
  475. normal
  476.  
  477. normal
  478.  
  479. high
  480.  
  481. high
  482.  
  483. tx_bytes int Read-only
  484.  
  485. transmitted bytes (including protocol overhead)
  486.  
  487. rx_bytes int Read-only
  488.  
  489. received bytes (including protocol overhead)
  490.  
  491. tx_rate int Read-only
  492.  
  493. current transmit rate (in byte/s)
  494.  
  495. rx_rate int Read-only
  496.  
  497. current receive rate (in byte/s)
  498.  
  499. tx_pct int Read-only
  500.  
  501. transmit percentage (without protocol overhead)
  502.  
  503. To improve precision the value as been scaled by 100 so that a tx_pct of 123 means 1.23%
  504.  
  505. rx_pct int Read-only
  506.  
  507. received percentage (without protocol overhead)
  508.  
  509. To improve precision the value as been scaled by 100 so that a tx_pct of 123 means 1.23%
  510.  
  511. error enum Read-only
  512.  
  513. An error code
  514.  
  515. created_ts timestamp Read-only
  516.  
  517. timestamp of the download creation time
  518.  
  519. eta int Read-only
  520.  
  521. estimated remaining download time (in seconds)
  522.  
  523. download_dir string Read-only
  524.  
  525. directory where the file(s) will be saved (base64 encoded)
  526.  
  527. stop_ratio int Read-only
  528.  
  529. Only relevant for bittorrent tasks. Once the transmit ration has been reached the task will stop seeding.
  530.  
  531. The ratio is scaled by 100 to improve resolution.
  532.  
  533. A stop_ratio of 150 means that the task will stop seeding once tx_bytes = 1.5 * rx_bytes.
  534.  
  535. archive_password string
  536.  
  537. (only relevant for nzb) password for extracting downloaded archives
  538.  
  539. info_hash string
  540.  
  541. (only relevant for bt) torrent info_hash encoded in hexa
  542.  
  543. piece_length int
  544.  
  545. (only relevant for bt) torrent piece length in bytes
  546.  
  547. Download API
  548. Retrieve a Download task
  549.  
  550. GET /api/v8/downloads/
  551.  
  552. Returns the collection of all Download tasks
  553.  
  554. Example request:
  555.  
  556. GET /api/v8/downloads/ HTTP/1.1
  557. Host: mafreebox.freebox.fr
  558.  
  559. Example response:
  560.  
  561. HTTP/1.1 200 OK
  562. Content-Type: application/json; charset=utf-8
  563.  
  564. {
  565. "success": true,
  566. "result": {
  567. "rx_bytes": 147450,
  568. "tx_bytes": 3460,
  569. "download_dir": "L0Rpc3F1ZSBkdXIvVMOpbMOpY2hhcmdlbWVudHMv",
  570. "archive_password": "",
  571. "eta": 60290,
  572. "status": "downloading",
  573. "io_priority": "normal",
  574. "type": "bt",
  575. "piece_length": 524288,
  576. "queue_pos": 2,
  577. "id": 1273,
  578. "info_hash": "A7055D06E5A8F7F816EC01AC7F7F5243D3CB008F",
  579. "created_ts": 1485513882,
  580. "stop_ratio": 150,
  581. "tx_rate": 202,
  582. "name": "debian-8.7.1-amd64-CD-1.iso",
  583. "tx_pct": 0,
  584. "rx_pct": 0,
  585. "rx_rate": 10950,
  586. "error": "none",
  587. "size": 660600000
  588. }
  589. }
  590.  
  591. GET /api/v8/downloads/{id}
  592.  
  593. Returns the Download task with the given id
  594.  
  595. Example request:
  596.  
  597. GET /api/v8/downloads/16 HTTP/1.1
  598. Host: mafreebox.freebox.fr
  599.  
  600. Example response:
  601.  
  602. HTTP/1.1 200 OK
  603. Content-Type: application/json; charset=utf-8
  604.  
  605. {
  606. "success": true,
  607. "result": {
  608. "rx_bytes": 688005364,
  609. "tx_bytes": 3232055279,
  610. "download_dir": "L0Rpc3F1ZSBkdXIvVMOpbMOpY2hhcmdlbWVudHMv", /* /Disque dur/Téléchargements/ */
  611. "archive_password": "",
  612. "eta": 331896,
  613. "status": "seeding",
  614. "io_priority": "high",
  615. "size": 678428672,
  616. "type": "bt",
  617. "error": "none",
  618. "queue_pos": 0,
  619. "id": 14,
  620. "created_ts": 1349786169,
  621. "tx_rate": 0,
  622. "name": "debian-6.0.6-amd64-CD-1.iso",
  623. "rx_pct": 10000,
  624. "rx_rate": 0,
  625. "tx_pct": 0
  626. }
  627.  
  628. }
  629.  
  630. Delete a Download task
  631.  
  632. DELETE /api/v8/downloads/{id}
  633.  
  634. Deletes the Download task with the given id, without erasing the downloaded files If the task was not done it is stopped
  635.  
  636. You can call this method to remove done tasks from the task list.
  637.  
  638. Example request:
  639.  
  640. DELETE /api/v8/downloads/16 HTTP/1.1
  641. Host: mafreebox.freebox.fr
  642.  
  643. Example response:
  644.  
  645. HTTP/1.1 200 OK
  646. Content-Type: application/json; charset=utf-8
  647.  
  648. {
  649. "success": true
  650. }
  651.  
  652. DELETE /api/v8/downloads/{id}/erase
  653.  
  654. Same as previous, but erases the downloaded files
  655.  
  656. Update a Download task
  657.  
  658. PUT /api/v8/downloads/{id}
  659.  
  660. Updates the Download task with the given id
  661.  
  662. Example request:
  663.  
  664. PUT /api/v8/downloads/16 HTTP/1.1
  665. Host: mafreebox.freebox.fr
  666.  
  667. {
  668. "io_priority": "high",
  669. "status": "stopped"
  670. }
  671.  
  672. Example response:
  673.  
  674. HTTP/1.1 200 OK
  675. Content-Type: application/json; charset=utf-8
  676.  
  677. {
  678. "success": true,
  679. "result": {
  680. "rx_bytes": 683407058,
  681. "tx_bytes": 17866436,
  682. "download_dir": "L0Rpc3F1ZSBkdXIvVMOpbMOpY2hhcmdlbWVudHMv", /* /Disque dur/Téléchargements/ */
  683. "eta": 1075260392,
  684. "status": "stopping",
  685. "io_priority": "high",
  686. "size": 678428672,
  687. "type": "bt",
  688. "error": "none",
  689. "queue_pos": 0,
  690. "id": 14,
  691. "created_ts": 1349786169,
  692. "tx_rate": 0,
  693. "name": "debian-6.0.6-amd64-CD-1.iso",
  694. "stop_ratio": 55936,
  695. "rx_pct": 10000,
  696. "rx_rate": 0,
  697. "tx_pct": 4
  698. }
  699. }
  700.  
  701. Get download log
  702.  
  703. GET /api/v8/downloads/{id}/log
  704.  
  705. Get the log.
  706.  
  707. Example request:
  708.  
  709. GET /api/v8/downloads/16/log HTTP/1.1
  710. Host: mafreebox.freebox.fr
  711.  
  712. Example response:
  713.  
  714. HTTP/1.1 200 OK
  715. Content-Type: application/json; charset=utf-8
  716.  
  717. {
  718. "success": true,
  719. "result": "log line\nanother log line\n"
  720. }
  721.  
  722. Adding a new Download task
  723. Adding by URL
  724.  
  725. Supported URL scheme are http://, ftp://, magnet:
  726.  
  727. You can start a recursive download by setting the recursive parameter. The downloader will then extract links from each donwloaded html page and continue downloading files on the same domain and on the same root path. This can be used to download all the files on a directory index.
  728.  
  729. You can add multiple downloads at once by passing a list of URL (separated by a new line delimiter) in download_url_list instead of using download_url.
  730.  
  731. /!NOTE: for this API the request arguments must be encoded using “application/x-www-form-urlencoded” (or “multipart/form-data” for file upload) instead of “application/json”
  732.  
  733. POST /api/v8/downloads/add
  734.  
  735. Parameters
  736.  
  737. download_url (string) – The URL
  738.  
  739. download_url_list (string) – A list of URL separated by a new line delimiter (use download_url or download_url_list)
  740.  
  741. download_dir (string) – The download destination directory (optional: will use the configuration download_dir by default)
  742.  
  743. filename (string) – Override the name of the destination file. Only valid with one, non-recursive download_url.
  744.  
  745. hash (string) – Verify the hash of the downloaded file. The format is sha256:xxxxxx or sha512:xxxxxx; or the URL of a SHA256SUMS, SHA512SUMS, -CHECKSUM or .sha256 file. Only valid with one, non-recursive download_url.
  746.  
  747. recursive (bool) – If true the download will be recursive
  748.  
  749. username (string) – Auth username (optional)
  750.  
  751. password (string) – Auth password (optional)
  752.  
  753. archive_password (string) – The password required to extract downloaded content (only relevant for nzb)
  754.  
  755. cookies (string) – The http cookies (to be able to pass session cookies along with url). This is the content of the HTTP Cookie header, for example: cookie1=value1; cookie2=value2
  756.  
  757. NOTE: instead of passing password and username you can include them in the URL.
  758.  
  759. Example request : Single download add:
  760.  
  761. POST /api/v8/downloads/add HTTP/1.1
  762. Host: mafreebox.freebox.fr
  763.  
  764. download_url=http%3A%2F%2Fcdimage.debian.org%2Fdebian-cd%2F6.0.6%2Famd64%2Fbt-cd%2Fdebian-6.0.6-amd64-CD-1.iso.torrent
  765. &download_dir=L0Rpc3F1ZSBkdXIvVMOpbMOpY2hhcmdlbWVudHMv
  766.  
  767. Example response:
  768.  
  769. On success you’ll get the id of the new download task.
  770.  
  771. {
  772. "result": {
  773. "id": 23
  774. },
  775. "success": true
  776. }
  777.  
  778. Example request : Multiple downloads at once:
  779.  
  780. POST /api/v8/downloads/add HTTP/1.1
  781. Host: mafreebox.freebox.fr
  782.  
  783. download_url_list=ftp%3A%2F%2Ftest-debit.free.fr%2F1024.rnd
  784. %0Ahttp%3A%2F%2Ftest-debit.free.fr%2F4096.rnd
  785. %0Ahttp%3A%2F%2Ftest-debit.free.fr%2F32768.rnd
  786. &download_dir=L0Rpc3F1ZSBkdXIvVMOpbMOpY2hhcmdlbWVudHMv
  787.  
  788. Example response:
  789.  
  790. On success you’ll get the list of id of the new download tasks.
  791.  
  792. {
  793. "result": {
  794. "id": [
  795. 32,
  796. 33,
  797. 34
  798. ]
  799. },
  800. "success": true
  801. }
  802.  
  803. Adding by file upload
  804.  
  805. Supported files are .torrent, .nzb,
  806.  
  807. POST /api/v8/downloads/add
  808.  
  809. Parameters
  810.  
  811. download_file (string) – The download file (must be uploaded using multipart/form-data
  812.  
  813. download_dir (string) – The download destination directory (optional: will use the configuration download_dir by default)
  814.  
  815. archive_password (string) – The password required to extract downloaded content (only relevant for nzb)
  816.  
  817. Example request:
  818.  
  819. POST /api/v8/downloads/add HTTP/1.1
  820. Host: mafreebox.freebox.fr
  821. Content-Type: multipart/form-data; boundary=---------------------------176791920111939857911845395343
  822. Content-Length: 26651
  823.  
  824. -----------------------------176791920111939857911845395343
  825. Content-Disposition: form-data; name="download_dir"
  826.  
  827. L0Rpc3F1ZSBkdXIvVMOpbMOpY2hhcmdlbWVudHMv
  828. -----------------------------176791920111939857911845395343
  829. Content-Disposition: form-data; name="archive_password"
  830.  
  831.  
  832. -----------------------------176791920111939857911845395343
  833. Content-Disposition: form-data; name="download_file"; filename="debian-6.0.6-amd64-CD-1.iso.torrent"
  834. Content-Type: application/x-bittorrent
  835.  
  836. d8:announce41:http://bttracker.debian.org:6969/announce7:comment [ ... ]
  837.  
  838. Example response:
  839.  
  840. {
  841. "result": {
  842. "id": 42
  843. },
  844. "success": true
  845. }
  846.  
  847. Download Stats
  848.  
  849. If you just want to display synthetic information about downloader this is the method to use.
  850. Download Nzb configuration status Object
  851.  
  852. NzbConfigStatus
  853.  
  854. status enum Read-only
  855.  
  856. The valid config status are:
  857.  
  858. Type
  859.  
  860. Description
  861.  
  862. not_checked
  863.  
  864. config has not been checked yet
  865.  
  866. checking
  867.  
  868. test in progress
  869.  
  870. error
  871.  
  872. config is invalid, see error
  873.  
  874. ok
  875.  
  876. config is ok
  877.  
  878. error enum Read-only
  879.  
  880. The valid config status are:
  881.  
  882. Type
  883.  
  884. Description
  885.  
  886. none
  887.  
  888. test is ok
  889.  
  890. nzb_authentication_required
  891.  
  892. authentication is required
  893.  
  894. bad_authentication
  895.  
  896. incorrect credentials
  897.  
  898. connection_refused
  899.  
  900. unable to connect to NNTP server
  901.  
  902. Download DHT stats Object
  903.  
  904. DhtStats
  905.  
  906. enabled bool Read-only
  907.  
  908. is the dht enabled
  909.  
  910. node_count int Read-only
  911.  
  912. number of active nodes
  913.  
  914. enabled_ipv6 bool Read-only
  915.  
  916. is the dht enabled on IPv6
  917.  
  918. node_count_ipv6 int Read-only
  919.  
  920. number of active nodes on IPv6
  921.  
  922. Download Stats Object
  923.  
  924. DownloadStats
  925.  
  926. nb_tasks int Read-only
  927.  
  928. total number of tasks
  929.  
  930. nb_tasks_stopped int Read-only
  931.  
  932. number of stopped tasks
  933.  
  934. nb_tasks_checking int Read-only
  935.  
  936. number of checking tasks
  937.  
  938. nb_tasks_queued int Read-only
  939.  
  940. number of queued tasks
  941.  
  942. nb_tasks_extracting int Read-only
  943.  
  944. number of extracting tasks
  945.  
  946. nb_tasks_done int Read-only
  947.  
  948. number of done tasks
  949.  
  950. nb_tasks_repairing int Read-only
  951.  
  952. number of repairing tasks
  953.  
  954. nb_tasks_seeding int Read-only
  955.  
  956. number of seeding tasks
  957.  
  958. nb_tasks_downloading int Read-only
  959.  
  960. number of downloading tasks
  961.  
  962. nb_tasks_error int Read-only
  963.  
  964. number of error tasks
  965.  
  966. nb_tasks_stopping int Read-only
  967.  
  968. number of stopping tasks
  969.  
  970. nb_tasks_active int Read-only
  971.  
  972. number of active tasks (checking + queued + extracting + repairing + seeding + downloading)
  973.  
  974. nb_rss int Read-only
  975.  
  976. number of RSS feed subscriptions
  977.  
  978. nb_rss_items_unread int Read-only
  979.  
  980. number of unread RSS items
  981.  
  982. rx_rate int Read-only
  983.  
  984. current receive rate in bytes / second
  985.  
  986. tx_rate int Read-only
  987.  
  988. current transmit rate in bytes / second
  989.  
  990. throttling_mode enum Read-only
  991.  
  992. active throttling_mode (see DlThrottlingConfig)
  993.  
  994. throttling_is_scheduled bool Read-only
  995.  
  996. if true, the current throttling mode has been computed using the throttling schedule
  997.  
  998. if false, the current throttling mode has been manually forced
  999.  
  1000. throttling_rate :json:object:`DlRate` Read-only
  1001.  
  1002. current rate for throttling
  1003.  
  1004. nzb_config_status :json:object:`NzbConfigStatus` Read-only
  1005.  
  1006. current nzb configuration status
  1007.  
  1008. conn_ready bool Read-only
  1009.  
  1010. is the connection ready
  1011.  
  1012. nb_peer int Read-only
  1013.  
  1014. number of bittorrent peers
  1015.  
  1016. blocklist_entries int Read-only
  1017.  
  1018. number of rules in blocklist
  1019.  
  1020. blocklist_hits int Read-only
  1021.  
  1022. number of hits in blocklist
  1023.  
  1024. dht_stats :json:object:`DhtStats` Read-only
  1025.  
  1026. dht stats
  1027.  
  1028. Get the Download Stats
  1029.  
  1030. GET /api/v8/downloads/stats
  1031.  
  1032. Example request:
  1033.  
  1034. GET /api/v8/downloads/stats HTTP/1.1
  1035. Host: mafreebox.freebox.fr
  1036.  
  1037. Example response:
  1038.  
  1039. {
  1040. "success": true,
  1041. "result": {
  1042. "throttling_rate": {
  1043. "rx_rate": 0,
  1044. "tx_rate": 0
  1045. },
  1046. "nb_tasks_stopped": 1,
  1047. "nb_tasks_checking": 0,
  1048. "nb_tasks_queued": 0,
  1049. "nb_tasks_extracting": 4,
  1050. "nb_tasks_done": 1,
  1051. "nb_tasks_repairing": 0,
  1052. "throttling_mode": "normal",
  1053. "nb_tasks_active": 11,
  1054. "tx_rate": 4294,
  1055. "nb_tasks_downloading": 4,
  1056. "throttling_is_scheduled": true,
  1057. "nb_tasks": 13,
  1058. "nb_tasks_error": 0,
  1059. "nb_tasks_stopping": 0,
  1060. "nb_rss_items_unread": 5,
  1061. "rx_rate": 14222,
  1062. "nb_tasks_seeding": 3
  1063. }
  1064. }
  1065.  
  1066. Download Files
  1067. Download Files Object
  1068.  
  1069. Each Download has one or more DownloadFile.
  1070.  
  1071. DownloadFile
  1072.  
  1073. id string Read-only
  1074.  
  1075. opaque id
  1076.  
  1077. task_id int Read-only
  1078.  
  1079. id of the download task
  1080.  
  1081. path string Read-only
  1082.  
  1083. [ DEPRECATED ]
  1084.  
  1085. filepath string Read-only
  1086.  
  1087. full filepath on the disk (encoded as in file system api)
  1088.  
  1089. name string Read-only
  1090.  
  1091. file name
  1092.  
  1093. mimetype string Read-only
  1094.  
  1095. file mimetype
  1096.  
  1097. size int Read-only
  1098.  
  1099. file size in bytes
  1100.  
  1101. rx int Read-only
  1102.  
  1103. received bytes
  1104.  
  1105. status enum Read-only
  1106.  
  1107. file download status
  1108.  
  1109. Status
  1110.  
  1111. Description
  1112.  
  1113. queued
  1114.  
  1115. file is queued for download
  1116.  
  1117. error
  1118.  
  1119. there was a problem with this file, see error to get the error code
  1120.  
  1121. done
  1122.  
  1123. file download is completed
  1124.  
  1125. error enum Read-only
  1126.  
  1127. file error code in case status is error
  1128.  
  1129. priority string
  1130.  
  1131. file download priority inside the download task
  1132.  
  1133. Priority
  1134.  
  1135. Description
  1136.  
  1137. no_dl
  1138.  
  1139. this file will not be downloaded
  1140.  
  1141. low
  1142.  
  1143. low priority
  1144.  
  1145. normal
  1146.  
  1147. default priority
  1148.  
  1149. high
  1150.  
  1151. high priority
  1152.  
  1153. preview_url string Read-only
  1154.  
  1155. url to preview downloaded file (only available for bittorrent) as a share link, this url can be use without requiring any form of authentication so that it can be passed as-is to any software.
  1156.  
  1157. Download Files API
  1158. Get the list of files for a given Download
  1159.  
  1160. GET /api/v8/downloads/{task_id}/files
  1161.  
  1162. Example request:
  1163.  
  1164. GET /api/v8/downloads/37/files HTTP/1.1
  1165. Host: mafreebox.freebox.fr
  1166.  
  1167. Example response:
  1168.  
  1169. {
  1170. "success": true,
  1171. "result": [
  1172. {
  1173. "path": "/Disque dur/Téléchargements//test-debit.free.fr.html",
  1174. "id": "5-1",
  1175. "task_id": "5",
  1176. "filepath": "L0Rpc3F1ZSBkdXIvVMOpbMOpY2hhcmdlbWVudHMvL3Rlc3QtZGViaXQuZnJlZS5mci5odG1s",
  1177. "mimetype": "text/html",
  1178. "name": "test-debit.free.fr.html",
  1179. "rx": 0,
  1180. "status": "done",
  1181. "priority": "normal",
  1182. "error": "none",
  1183. "size": 0
  1184.  
  1185. },
  1186. {
  1187. "path": "/Disque dur/Téléchargements//test-debit.free.fr/1024.rnd",
  1188. "id": "5-7",
  1189. "task_id": "5",
  1190. "filepath": "L0Rpc3F1ZSBkdXIvVMOpbMOpY2hhcmdlbWVudHMvL3Rlc3QtZGViaXQuZnJlZS5mci8xMDI0LnJuZA==",
  1191. "mimetype": "application/octet-stream",
  1192. "name": "1024.rnd",
  1193. "rx": 1048576,
  1194. "status": "done",
  1195. "priority": "low",
  1196. "error": "none",
  1197. "size": 1048576
  1198. },
  1199.  
  1200. [ ... ]
  1201.  
  1202. {
  1203. "path": "/Disque dur/Téléchargements//test-debit.free.fr/image.iso",
  1204. "id": "5-16",
  1205. "task_id": "5",
  1206. "filepath": "L0Rpc3F1ZSBkdXIvVMOpbMOpY2hhcmdlbWVudHMvL3Rlc3QtZGViaXQuZnJlZS5mci9pbWFnZS5pc28=",
  1207. "mimetype": "application/x-cd-image",
  1208. "name": "image.iso",
  1209. "rx": 678428672,
  1210. "status": "done",
  1211. "priority": "low",
  1212. "error": "none",
  1213. "size": 678428672
  1214. }
  1215. ]
  1216.  
  1217. }
  1218.  
  1219. Change the priority of a Download File
  1220.  
  1221. PUT /api/v8/downloads/{task_id}/files/{file_id}
  1222.  
  1223. Parameters
  1224.  
  1225. task_id (string) – The download task id
  1226.  
  1227. path (string) – The file_id
  1228.  
  1229. priority (string) – The new file download priority
  1230.  
  1231. Example request:
  1232.  
  1233. PUT /api/v8/downloads/37/files/37-4 HTTP/1.1
  1234. Host: mafreebox.freebox.fr
  1235.  
  1236. {
  1237. "priority" : "high"
  1238. }
  1239.  
  1240. Example response:
  1241.  
  1242. {
  1243. "success": true
  1244. }
  1245.  
  1246. Download Trackers [UNSTABLE]
  1247. Download Tracker Object
  1248.  
  1249. Each torrent Download task has one or more DownloadTracker.
  1250.  
  1251. Each tracker is identified by its announce URL.
  1252.  
  1253. DownloadTracker
  1254.  
  1255. announce string Read-only
  1256.  
  1257. tracker announce URL
  1258.  
  1259. is_backup bool Read-only
  1260.  
  1261. true if the tracker is a backup tracker (the downloader won’t connect to this tracker unless the primary tracker fails)
  1262.  
  1263. status enum Read-only
  1264.  
  1265. tracker status
  1266.  
  1267. Status
  1268.  
  1269. Description
  1270.  
  1271. unannounced
  1272.  
  1273. not announced
  1274.  
  1275. announcing
  1276.  
  1277. announcing
  1278.  
  1279. announce_failed
  1280.  
  1281. an error occurred while trying to announce
  1282.  
  1283. announced
  1284.  
  1285. announced
  1286.  
  1287. interval int Read-only
  1288.  
  1289. desired interval between two announces (in seconds)
  1290.  
  1291. min_interval int Read-only
  1292.  
  1293. minimum interval between two announces (in seconds)
  1294.  
  1295. reannounce_in int Read-only
  1296.  
  1297. time left before reannounce (in seconds)
  1298.  
  1299. nseeders int Read-only
  1300.  
  1301. number of seeders announced on tracker
  1302.  
  1303. nleechers int Read-only
  1304.  
  1305. number of leechers announced on tracker
  1306.  
  1307. is_enabled bool
  1308.  
  1309. is the tracker enabled
  1310.  
  1311. Download Tracker API
  1312. Get the list of trackers for a given Download
  1313.  
  1314. Attempting to call this method on a download other than bittorent will fail
  1315.  
  1316. GET /api/v8/downloads/{task_id}/trackers
  1317.  
  1318. Example request:
  1319.  
  1320. GET /api/v8/downloads/35/tracker HTTP/1.1
  1321. Host: mafreebox.freebox.fr
  1322.  
  1323. Example response:
  1324.  
  1325. {
  1326. "success": true,
  1327. "result": [
  1328. {
  1329. "nseeders": 0,
  1330. "nleechers": 0,
  1331. "reannounce_in": 790,
  1332. "is_backup": false,
  1333. "interval": 900,
  1334. "min_interval": 60,
  1335. "announce": "http://bttracker.debian.org:6969/announce",
  1336. "status": "announced"
  1337. }
  1338. ]
  1339. }
  1340.  
  1341. Add a new tracker
  1342.  
  1343. Attempting to call this method on a download other than bittorent will fail
  1344.  
  1345. POST /api/v8/downloads/{task_id}/trackers
  1346.  
  1347. Example request:
  1348.  
  1349. POST /api/v8/downloads/35/tracker HTTP/1.1
  1350. Host: mafreebox.freebox.fr
  1351.  
  1352. {
  1353. "announce": "udp://tracker.openbittorrent.com:80"
  1354. }
  1355.  
  1356. Example response:
  1357.  
  1358. {
  1359. "success": true
  1360. }
  1361.  
  1362. Remove a tracker
  1363.  
  1364. DELETE /api/v8/downloads/{task_id}/trackers/{announce}
  1365.  
  1366. Example request:
  1367.  
  1368. DELETE /api/v8/downloads/35/tracker/udp%3A%2F%2Ftracker.openbittorrent.com%3A80 HTTP/1.1
  1369. Host: mafreebox.freebox.fr
  1370.  
  1371. {
  1372. "announce": "udp://tracker.openbittorrent.com:80"
  1373. }
  1374.  
  1375. Example response:
  1376.  
  1377. {
  1378. "success": true
  1379. }
  1380.  
  1381. Update a tracker
  1382.  
  1383. PUT /api/v8/downloads/{task_id}/trackers/{announce}
  1384.  
  1385. Example request:
  1386.  
  1387. PUT /api/v8/downloads/35/tracker/udp%3A%2F%2Ftracker.openbittorrent.com%3A80 HTTP/1.1
  1388. Host: mafreebox.freebox.fr
  1389.  
  1390. {
  1391. "announce": "udp://tracker.openbittorrent.com:80",
  1392. "is_enabled": true
  1393. }
  1394.  
  1395. Example response:
  1396.  
  1397. {
  1398. "success": true
  1399. }
  1400.  
  1401. Download Peers [UNSTABLE]
  1402. Download Peer Object
  1403.  
  1404. Each torrent Download task has one or more DownloadPeer.
  1405.  
  1406. DownloadPeer
  1407.  
  1408. host string Read-only
  1409.  
  1410. peer IP
  1411.  
  1412. port int Read-only
  1413.  
  1414. peer port
  1415.  
  1416. state enum Read-only
  1417.  
  1418. peer state
  1419.  
  1420. State
  1421.  
  1422. Description
  1423.  
  1424. disconnected
  1425.  
  1426. not connected
  1427.  
  1428. connecting
  1429.  
  1430. trying to connect to the peer
  1431.  
  1432. handshaking
  1433.  
  1434. connected to the peer, negotiating capabilities
  1435.  
  1436. ready
  1437.  
  1438. ready to exchange data
  1439.  
  1440. origin enum Read-only
  1441.  
  1442. peer origin
  1443.  
  1444. Origin
  1445.  
  1446. Description
  1447.  
  1448. tracker
  1449.  
  1450. got the peer from the tracker
  1451.  
  1452. incoming
  1453.  
  1454. incoming peer
  1455.  
  1456. dht
  1457.  
  1458. got the peer from DHT
  1459.  
  1460. pex
  1461.  
  1462. got the peer from Peer exchange protocol
  1463.  
  1464. user
  1465.  
  1466. manually added peer
  1467.  
  1468. protocol enum Read-only
  1469.  
  1470. Protocol
  1471.  
  1472. Description
  1473.  
  1474. tcp
  1475.  
  1476. TCP
  1477.  
  1478. tcp_obfuscated
  1479.  
  1480. Obfuscated TCP
  1481.  
  1482. udp
  1483.  
  1484. UDP
  1485.  
  1486. client string Read-only
  1487.  
  1488. Bittorrent client name
  1489.  
  1490. country_code string Read-only
  1491.  
  1492. Peer country code (iso 3166)
  1493.  
  1494. If country code is not available it will have the value “??”
  1495.  
  1496. tx int Read-only
  1497.  
  1498. transmitted bytes
  1499.  
  1500. rx int Read-only
  1501.  
  1502. received bytes
  1503.  
  1504. tx_rate int Read-only
  1505.  
  1506. current transmit rate in byte/s
  1507.  
  1508. rx_rate int Read-only
  1509.  
  1510. current receive rate in byte/s
  1511.  
  1512. progress int Read-only
  1513.  
  1514. peer current download progress
  1515.  
  1516. requests[] array of int Read-only
  1517.  
  1518. current requested pieces
  1519.  
  1520. Get the list of peers for a given Download
  1521.  
  1522. Attempting to call this method on a download other than bittorent will fail
  1523.  
  1524. GET /api/v8/downloads/{task_id}/peers
  1525.  
  1526. Example request:
  1527.  
  1528. GET /api/v8/downloads/42/peers HTTP/1.1
  1529. Host: mafreebox.freebox.fr
  1530.  
  1531. Example response:
  1532.  
  1533. {
  1534. "success": true,
  1535. "result": [
  1536. {
  1537. "protocol": "tcp_obfuscated",
  1538. "origin": "tracker",
  1539. "progress": 91,
  1540. "remote_choke": true,
  1541. "requests": { },
  1542. "host": "186.213.200.201",
  1543. "port": 0,
  1544. "client": "Azureus 4.7.2.0",
  1545. "country_code": "BR",
  1546. "local_interest": false,
  1547. "state": "ready",
  1548. "rx": 1617,
  1549. "tx": 836670,
  1550. "remote_interest": true,
  1551. "tx_rate": 0,
  1552. "rx_rate": 0,
  1553. "local_choke": false
  1554. },
  1555.  
  1556. [ ... ]
  1557.  
  1558. {
  1559. "protocol": "tcp",
  1560. "origin": "tracker",
  1561. "progress": 11,
  1562. "remote_choke": true,
  1563. "requests": { },
  1564. "host": "208.127.4.60",
  1565. "port": 0,
  1566. "client": "Transmission 2.51",
  1567. "country_code": "US",
  1568. "local_interest": false,
  1569. "state": "ready",
  1570. "rx": 8929,
  1571. "tx": 7592234,
  1572. "remote_interest": true,
  1573. "tx_rate": 0,
  1574. "rx_rate": 0,
  1575. "local_choke": false
  1576. }
  1577. ]
  1578.  
  1579. }
  1580.  
  1581. Download Pieces
  1582.  
  1583. Each Torrent is split in ‘pieces’ of fixed size. The Download Piece Api allow tracking the download state of each pieces of a Torrent
  1584.  
  1585. Get the pieces status a given download
  1586.  
  1587. The result value is a string, with each character representing a piece status. Piece status can be:
  1588.  
  1589. Status
  1590.  
  1591. Description
  1592.  
  1593. X
  1594.  
  1595. piece is complete
  1596.  
  1597.  
  1598.  
  1599. piece is currently downloading
  1600.  
  1601. .
  1602.  
  1603. piece is wanted but not downloading yet
  1604.  
  1605.  
  1606.  
  1607. piece is not wanted and will not be downloaded
  1608.  
  1609. /
  1610.  
  1611. piece is downloading with high priority as it is needed for file preview
  1612.  
  1613. U
  1614.  
  1615. piece is scheduled with high priority as it is needed for file preview
  1616.  
  1617. GET /api/v8/downloads/{task_id}/pieces
  1618.  
  1619. Example request:
  1620.  
  1621. GET /api/v8/downloads/5/pieces HTTP/1.1
  1622. Host: mafreebox.freebox.fr
  1623.  
  1624. Example response:
  1625.  
  1626. {
  1627. "success": true,
  1628. "result": "XXXXX//++....-- [ ... ] XXX"
  1629. }
  1630.  
  1631. Download Blacklist [UNSTABLE]
  1632.  
  1633. For bittorrent downloads, we use a blacklist to store information about “useless” or broken peers. For instance if a peer is complete and we are trying to seed data, there is no use attempting to connect to this peer again.
  1634.  
  1635. The download blacklist api allow you to retreive information about this blacklist, and remove, or add peers to the blacklist.
  1636.  
  1637. Each DownloadBlacklistEntry can be specific to a torrent, or “global” and apply to any torrent.
  1638.  
  1639. Download Blacklist Object
  1640.  
  1641. DownloadBlacklistEntry
  1642.  
  1643. host string Read-only
  1644.  
  1645. entry ip
  1646.  
  1647. reason enum Read-only
  1648.  
  1649. blacklist reason
  1650.  
  1651. State
  1652.  
  1653. Description
  1654.  
  1655. not_blacklisted
  1656.  
  1657. crypto_not_supported
  1658.  
  1659. peer does not support encrypted connection
  1660.  
  1661. connect_fail
  1662.  
  1663. failed to connect
  1664.  
  1665. hs_timeout
  1666.  
  1667. handshake timeout
  1668.  
  1669. hs_failed
  1670.  
  1671. handshake failed
  1672.  
  1673. hs_crypt_failed
  1674.  
  1675. handshake failed during crypto
  1676.  
  1677. hs_crypto_disabled
  1678.  
  1679. handshake failed because encryption is disabled
  1680.  
  1681. torrent_not_found
  1682.  
  1683. torrent not found
  1684.  
  1685. read_failed
  1686.  
  1687. failed to read from peer
  1688.  
  1689. write_failed
  1690.  
  1691. failed to send data to peer
  1692.  
  1693. crap_received
  1694.  
  1695. received invalid data from peer
  1696.  
  1697. conn_closed
  1698.  
  1699. connection closed by remote peer
  1700.  
  1701. timeout
  1702.  
  1703. timeout
  1704.  
  1705. blocklist
  1706.  
  1707. peer is in a blocked ip range
  1708.  
  1709. user
  1710.  
  1711. manually blacklisted
  1712.  
  1713. expire int Read-only
  1714.  
  1715. time left before blacklist removal
  1716.  
  1717. global bool Read-only
  1718.  
  1719. does this entry applies to all torrents
  1720.  
  1721. Get the list of blacklist entries for a given download
  1722.  
  1723. Attempting to call this method on a download other than bittorent will fail.
  1724.  
  1725. GET /api/v8/downloads/{task_id}/blacklist
  1726.  
  1727. Example request:
  1728.  
  1729. GET /api/v8/downloads/5/blacklist HTTP/1.1
  1730. Host: mafreebox.freebox.fr
  1731.  
  1732. Example response:
  1733.  
  1734. {
  1735. "success": true,
  1736. "result": [
  1737. {
  1738. "host": "89.215.188.6",
  1739. "expire": 90,
  1740. "global": true,
  1741. "reason": "torrent_not_found"
  1742. },
  1743. {
  1744. "host": "94.23.0.89",
  1745. "expire": 120,
  1746. "global": true,
  1747. "reason": "conn_closed"
  1748. },
  1749. {
  1750. "host": "188.254.151.215",
  1751. "expire": 150,
  1752. "global": true,
  1753. "reason": "timeout"
  1754. },
  1755. {
  1756. "host": "201.25.54.26",
  1757. "expire": 180,
  1758. "global": true,
  1759. "reason": "timeout"
  1760. }
  1761. ]
  1762. }
  1763.  
  1764. Empty the blacklist for a given download
  1765.  
  1766. This call allow to remove all global entries, and entries related to the given download
  1767.  
  1768. DELETE /api/v8/downloads/{task_id}/blacklist/empty
  1769.  
  1770. Example request:
  1771.  
  1772. DELETE /api/v8/downloads/5/blacklist/empty HTTP/1.1
  1773. Host: mafreebox.freebox.fr
  1774.  
  1775. Example response:
  1776.  
  1777. {
  1778. "success": true
  1779. }
  1780.  
  1781. Delete a particular blacklist entry
  1782.  
  1783. DELETE /api/v8/downloads/blacklist/{host}
  1784.  
  1785. Example request:
  1786.  
  1787. DELETE /api/v8/downloads/blacklist/201.25.54.26 HTTP/1.1
  1788. Host: mafreebox.freebox.fr
  1789.  
  1790. Example response:
  1791.  
  1792. {
  1793. "success": true
  1794. }
  1795.  
  1796. Add a blacklist entry
  1797.  
  1798. POST /api/v8/downloads/blacklist
  1799.  
  1800. Example request:
  1801.  
  1802. POST /api/v8/downloads/blacklist HTTP/1.1
  1803. Host: mafreebox.freebox.fr
  1804.  
  1805. {
  1806. "host": "8.8.8.8",
  1807. "expire": 3600
  1808. }
  1809.  
  1810. Example response:
  1811.  
  1812. {
  1813. "success": true,
  1814. "result":
  1815. {
  1816. "host": "197.200.139.87",
  1817. "expire": 300,
  1818. "global": true,
  1819. "reason": "user"
  1820. }
  1821. }
  1822.  
  1823. Download Feeds
  1824.  
  1825. The Freebox downloader supports subscribing to RSS feeds, for automatic content download.
  1826. Download Feed object
  1827.  
  1828. Download Feeds have the following attributes:
  1829.  
  1830. DownloadFeed
  1831.  
  1832. id int Read-only
  1833.  
  1834. id
  1835.  
  1836. status enum Read-only
  1837.  
  1838. The feed can have the following status
  1839.  
  1840. Status
  1841.  
  1842. Description
  1843.  
  1844. ready
  1845.  
  1846. feed is up to date
  1847.  
  1848. fetching
  1849.  
  1850. feed is updating
  1851.  
  1852. error
  1853.  
  1854. there was an error trying to refresh this feed, see error
  1855.  
  1856. url string Read-only
  1857.  
  1858. Feed URL
  1859.  
  1860. title string Read-only
  1861.  
  1862. Feed title (extracted from the RSS)
  1863.  
  1864. desc string Read-only
  1865.  
  1866. Feed description (extracted from the RSS)
  1867.  
  1868. image_url string Read-only
  1869.  
  1870. Feed image URL (extracted from the RSS)
  1871.  
  1872. nb_read int Read-only
  1873.  
  1874. Number of read items in the feed
  1875.  
  1876. nb_unread int Read-only
  1877.  
  1878. Number of unread items in the feed
  1879.  
  1880. auto_download bool
  1881.  
  1882. If set to true, the downloader will automatically download new items
  1883.  
  1884. fetch_ts timestamp Read-only
  1885.  
  1886. Last time the feed was fetched
  1887.  
  1888. pub_ts timestamp Read-only
  1889.  
  1890. Last time the feed was published on remote server
  1891.  
  1892. error enum Read-only
  1893.  
  1894. Error code (same as used in Download or DownloadFile).
  1895.  
  1896. Download Feed Errors
  1897.  
  1898. When attempting to access the download feed API, you may encounter the following errors:
  1899.  
  1900. error_code
  1901.  
  1902. Description
  1903.  
  1904. feed_not_found
  1905.  
  1906. No feed was found with the given id
  1907.  
  1908. item_not_found
  1909.  
  1910. No feed item was found with the given id
  1911.  
  1912. feed_is_recent
  1913.  
  1914. You are trying to update a feed that is already up to date
  1915.  
  1916. internal_error
  1917.  
  1918. Internal error
  1919. Download Feed API
  1920. Get the list of all download Feeds
  1921.  
  1922. GET /api/v8/downloads/feeds/
  1923.  
  1924. Returns the collection of all DownloadFeed feeds
  1925.  
  1926. Example request:
  1927.  
  1928. GET /api/v8/downloads/feeds/ HTTP/1.1
  1929. Host: mafreebox.freebox.fr
  1930.  
  1931. Example response:
  1932.  
  1933. HTTP/1.1 200 OK
  1934. Content-Type: application/json; charset=utf-8
  1935.  
  1936. {
  1937. "success": true,
  1938. "result": [
  1939. {
  1940. "auto_download": false,
  1941. "id": 1,
  1942. "desc": "Custom RSS feed based off search filters.",
  1943. "error": "none",
  1944. "nb_read": 0,
  1945. "title": "ezRSS - Search Results",
  1946. "image_url": "http://ezrss.it/images/ezrssit.png",
  1947. "status": "ready",
  1948. "url": "http://www.ezrss.it/search/index.php?show_name=Ubuntu&mode=rss",
  1949. "nb_unread": 29,
  1950. "fetch_ts": 1349885023,
  1951. "pub_ts": 1350583600
  1952. },
  1953. {
  1954. "auto_download": false,
  1955. "id": 2,
  1956. "desc": "Latest nzb for Debian",
  1957. "error": "none",
  1958. "nb_read": 0,
  1959. "title": "Debian NZB RSS",
  1960. "image_url": "",
  1961. "status": "ready",
  1962. "url": "http://www.nzb-rss.com/rss/Debian.rss",
  1963. "nb_unread": 13,
  1964. "fetch_ts": 1350469391,
  1965. "pub_ts": 1350583600
  1966. }
  1967. ]
  1968. }
  1969.  
  1970. Get a download Feed
  1971.  
  1972. GET /api/v8/downloads/feeds/{id}
  1973.  
  1974. Gets the DownloadFeed with the given id
  1975.  
  1976. Example request:
  1977.  
  1978. GET /api/v8/downloads/feeds/2 HTTP/1.1
  1979. Host: mafreebox.freebox.fr
  1980.  
  1981. Example response:
  1982.  
  1983. HTTP/1.1 200 OK
  1984. Content-Type: application/json; charset=utf-8
  1985.  
  1986. {
  1987. "success": true,
  1988. "result":
  1989. {
  1990. "auto_download": false,
  1991. "id": 2,
  1992. "desc": "Latest nzb for Debian",
  1993. "error": "none",
  1994. "nb_read": 0,
  1995. "title": "Debian NZB RSS",
  1996. "image_url": "",
  1997. "status": "ready",
  1998. "url": "http://www.nzb-rss.com/rss/Debian.rss",
  1999. "nb_unread": 13,
  2000. "fetch_ts": 1350469391,
  2001. "pub_ts": 1350583600
  2002. }
  2003. }
  2004.  
  2005. Add a Download Feed
  2006.  
  2007. POST /api/v8/downloads/feeds/
  2008.  
  2009. Creates a new DownloadFeed.
  2010.  
  2011. Example request:
  2012.  
  2013. POST /api/v8/downloads/feeds/ HTTP/1.1
  2014. Host: mafreebox.freebox.fr
  2015.  
  2016. {
  2017. "url": "http://www.nzb-rss.com/rss/Debian-unstable.rss"
  2018. }
  2019.  
  2020. Example response:
  2021.  
  2022. HTTP/1.1 200 OK
  2023. Content-Type: application/json; charset=utf-8
  2024.  
  2025. {
  2026. "success": true,
  2027. "result": {
  2028. "auto_download": false,
  2029. "error": "none",
  2030. "desc": "",
  2031. "status": "ready",
  2032. "nb_read": 0,
  2033. "title": "",
  2034. "image_url": "",
  2035. "feed_id": 6,
  2036. "url": "http://www.nzb-rss.com/rss/Debian-unstable.rss",
  2037. "nb_unread": 0,
  2038. "fetch_ts": 0,
  2039. "pub_ts": 1350583600
  2040. }
  2041.  
  2042. }
  2043.  
  2044. Delete Download Feed
  2045.  
  2046. DELETE /api/v8/downloads/feeds/{id}
  2047.  
  2048. Deletes the DownloadFeed and all the associated items.
  2049.  
  2050. This will not alter the Download tasks.
  2051.  
  2052. Example request:
  2053.  
  2054. DELETE /api/v8/downloads/feeds/1 HTTP/1.1
  2055. Host: mafreebox.freebox.fr
  2056.  
  2057. Example response:
  2058.  
  2059. HTTP/1.1 200 OK
  2060. Content-Type: application/json; charset=utf-8
  2061.  
  2062. {
  2063. "success": true
  2064. }
  2065.  
  2066. Update a Download Feed
  2067.  
  2068. PUT /api/v8/downloads/feeds/{id}
  2069.  
  2070. Updates the DownloadFeed task with the given id
  2071.  
  2072. Example request:
  2073.  
  2074. PUT /api/v8/downloads/feeds/2 HTTP/1.1
  2075. Host: mafreebox.freebox.fr
  2076.  
  2077. {
  2078. "auto_download": true
  2079. }
  2080.  
  2081. Example response:
  2082.  
  2083. HTTP/1.1 200 OK
  2084. Content-Type: application/json; charset=utf-8
  2085.  
  2086. {
  2087. "success": true,
  2088. "result": {
  2089. "auto_download": true,
  2090. "error": "none",
  2091. "desc": "Latest nzb for Debian",
  2092. "title": "Debian NZB RSS",
  2093. "status": "ready",
  2094. "nb_read": 0,
  2095. "image_url": "",
  2096. "feed_id": 2,
  2097. "url": "http://www.nzb-rss.com/rss/Debian.rss",
  2098. "nb_unread": 13,
  2099. "fetch_ts": 1350583674,
  2100. "pub_ts": 1350583600
  2101. }
  2102. }
  2103.  
  2104. Refresh a Download Feed
  2105.  
  2106. POST /api/v8/downloads/feeds/{id}/fetch
  2107.  
  2108. Remotely fetches the RSS feed and updates it.
  2109.  
  2110. Note that if the remote feed specifies a TTL, trying to update before the ttl will result in feed_is_recent error
  2111.  
  2112. Example request:
  2113.  
  2114. POST /api/v8/downloads/feeds/2/fetch HTTP/1.1
  2115. Host: mafreebox.freebox.fr
  2116.  
  2117. Example response:
  2118.  
  2119. HTTP/1.1 200 OK
  2120. Content-Type: application/json; charset=utf-8
  2121.  
  2122. {
  2123. "success": true
  2124. }
  2125.  
  2126. Refresh all Download Feeds
  2127.  
  2128. POST /api/v8/downloads/feeds/fetch
  2129.  
  2130. Remotely fetches all the RSS feeds.
  2131.  
  2132. Example request:
  2133.  
  2134. POST /api/v8/downloads/feeds/fetch HTTP/1.1
  2135. Host: mafreebox.freebox.fr
  2136.  
  2137. Example response:
  2138.  
  2139. HTTP/1.1 200 OK
  2140. Content-Type: application/json; charset=utf-8
  2141.  
  2142. {
  2143. "success": true
  2144. }
  2145.  
  2146. Download Feed Item object
  2147.  
  2148. Each RSS DownloadFeed contains feed items object
  2149.  
  2150. DownloadFeedItem
  2151.  
  2152. id int Read-only
  2153.  
  2154. id
  2155.  
  2156. feed_id int Read-only
  2157.  
  2158. id of the DownloadFeed
  2159.  
  2160. title string[ro]
  2161.  
  2162. item title
  2163.  
  2164. desc string[ro]
  2165.  
  2166. item description
  2167.  
  2168. author string Read-only
  2169.  
  2170. item author
  2171.  
  2172. link string Read-only
  2173.  
  2174. URL of the RSS feed attachment
  2175.  
  2176. is_read bool
  2177.  
  2178. you can mark the item as read manually, or it is marked as read automatically when the item is downloaded
  2179.  
  2180. is_downloaded bool Read-only
  2181.  
  2182. mark downloaded items, automatically set to true when RSS item is downloaded
  2183.  
  2184. fetch_ts timestamp Read-only
  2185.  
  2186. timestamp of the item creation
  2187.  
  2188. pub_ts timestamp Read-only
  2189.  
  2190. item publish timestamp
  2191.  
  2192. enclosure_url string Read-only
  2193.  
  2194. enclosure URL (if specified in RSS feed)
  2195.  
  2196. enclosure_type string Read-only
  2197.  
  2198. enclosure mime type (if specified in RSS feed)
  2199.  
  2200. enclosure_length int Read-only
  2201.  
  2202. enclosure size in bytes (if specified in RSS feed)
  2203.  
  2204. Get the items of a given RSS feed
  2205.  
  2206. GET /api/v8/downloads/feeds/{feed_id}/items/
  2207.  
  2208. Returns the collection of all DownloadFeedItems for a given DownloadFeed
  2209.  
  2210. Example request:
  2211.  
  2212. GET /api/v8/downloads/feeds/2/items/ HTTP/1.1
  2213. Host: mafreebox.freebox.fr
  2214.  
  2215. Example response:
  2216.  
  2217. HTTP/1.1 200 OK
  2218. Content-Type: application/json; charset=utf-8
  2219.  
  2220. {
  2221. "success": true,
  2222. "result": [
  2223. {
  2224. "pub_ts": 1350657300,
  2225. "fetch_ts": 1350657317,
  2226. "is_read": true,
  2227. "title": "debian-6.0.4-amd64-CD-1.iso",
  2228. "link": "http://bttracker.debian.org:6969/file/debian-6.0.4-amd64-CD-1.iso.torrent?info_hash=95ce23e889cc26901740f87ac25270da725bfd36",
  2229. "id": 2845,
  2230. "author": "debian",
  2231. "feed_id": 2,
  2232. "desc": ""
  2233. },
  2234. {
  2235. "pub_ts": 1350657300,
  2236. "fetch_ts": 1350657318,
  2237. "is_read": false,
  2238. "title": "debian-6.0.4-amd64-CD-2.iso",
  2239. "link": "http://bttracker.debian.org:6969/file/debian-6.0.4-amd64-CD-2.iso.torrent?info_hash=34583a8e25ef1528a8bfce99d24f401acb24d982",
  2240. "id": 2846,
  2241. "author": "debian",
  2242. "feed_id": 2,
  2243. "desc": ""
  2244. }
  2245. ]
  2246. }
  2247.  
  2248. Update a feed item
  2249.  
  2250. PUT /api/v8/downloads/feeds/{feed_id}/items/{item_id}
  2251.  
  2252. Returns the collection of all DownloadFeedItems for a given DownloadFeed
  2253.  
  2254. Example request:
  2255.  
  2256. PUT /api/v8/downloads/feeds/2/items/2846 HTTP/1.1
  2257. Host: mafreebox.freebox.fr
  2258.  
  2259. {
  2260. "is_read": true
  2261. }
  2262.  
  2263. Example response:
  2264.  
  2265. HTTP/1.1 200 OK
  2266. Content-Type: application/json; charset=utf-8
  2267.  
  2268. {
  2269. "success": true
  2270. }
  2271.  
  2272. Download a feed item
  2273.  
  2274. POST /api/v8/downloads/feeds/{feed_id}/items/{item_id}/download
  2275.  
  2276. This method will enqueue the RSS item to the download list
  2277.  
  2278. Example request:
  2279.  
  2280. POST /api/v8/downloads/feeds/2/items/2846/download HTTP/1.1
  2281. Host: mafreebox.freebox.fr
  2282.  
  2283. Example response:
  2284.  
  2285. HTTP/1.1 200 OK
  2286. Content-Type: application/json; charset=utf-8
  2287.  
  2288. {
  2289. "success": true
  2290. }
  2291.  
  2292. Mark all items as read
  2293.  
  2294. POST /api/v8/downloads/feeds/{feed_id}/items/mark_all_as_read
  2295.  
  2296. This method will mark each items as read
  2297.  
  2298. Example request:
  2299.  
  2300. POST /api/v8/downloads/feeds/2/items/mark_all_as_read HTTP/1.1
  2301. Host: mafreebox.freebox.fr
  2302.  
  2303. Example response:
  2304.  
  2305. HTTP/1.1 200 OK
  2306. Content-Type: application/json; charset=utf-8
  2307.  
  2308. {
  2309. "success": true
  2310. }
  2311.  
  2312. Download Configuration
  2313. Download configuration object
  2314.  
  2315. The download configuration is a singleton used to store the downloader preferences.
  2316. Global config
  2317.  
  2318. DownloadConfiguration
  2319.  
  2320. max_downloading_tasks int
  2321.  
  2322. max concurrent download tasks
  2323.  
  2324. download_dir string
  2325.  
  2326. the default path where downloads will be stored (base64 encoded)
  2327.  
  2328. watch_dir string
  2329.  
  2330. special folder that will be monitored. When a new supported file (.nzb, .torrent) is copied in that folder, the task is automatically added to the download queue.
  2331.  
  2332. (base64 encoded)
  2333.  
  2334. use_watch_dir bool
  2335.  
  2336. if set to false, the watch_dir will not be monitored
  2337.  
  2338. throttling DlThrottlingConfig
  2339.  
  2340. throttling configuration
  2341.  
  2342. news DlNewsConfig
  2343.  
  2344. newsgroups configuration
  2345.  
  2346. bt DlBtConfig
  2347.  
  2348. bittorrent configuration
  2349.  
  2350. feed DlFeedConfig
  2351.  
  2352. RSS feed configuration
  2353.  
  2354. blocklist DlBlockListConfig
  2355.  
  2356. block list configuration
  2357.  
  2358. dns1 string
  2359.  
  2360. dns server ip to use for downloader (leave blank for default dns server)
  2361.  
  2362. dns2 string
  2363.  
  2364. dns server ip to use for downloader
  2365.  
  2366. Throttling config
  2367.  
  2368. DlThrottlingConfig
  2369.  
  2370. normal DlRate
  2371.  
  2372. download rate for normal time slot (in B/s)
  2373.  
  2374. slow DlRate
  2375.  
  2376. download rate for normal slow slot (in B/s)
  2377.  
  2378. schedule enum[168]
  2379.  
  2380. The schedule array represent the list of week hours timeslot, starting on monday a midnight. Therefore the complete week is represented in a array of 168 elements (24 * 7)
  2381.  
  2382. Each slot can have the following value:
  2383.  
  2384. Type
  2385.  
  2386. Description
  2387.  
  2388. normal
  2389.  
  2390. downloads will use normal DlRate config for this timeslot
  2391.  
  2392. slow
  2393.  
  2394. downloads will use slow DlRate config for this timeslot
  2395.  
  2396. hibernate
  2397.  
  2398. downloads will be paused for this timeslot
  2399.  
  2400. mode enum
  2401.  
  2402. Throttling mode can have to following values
  2403.  
  2404. Type
  2405.  
  2406. Description
  2407.  
  2408. normal
  2409.  
  2410. force use of normal rate limits (not using the scheduler)
  2411.  
  2412. slow
  2413.  
  2414. force use of slow rate limits (not using the scheduler)
  2415.  
  2416. hibernate
  2417.  
  2418. force hibernate (not using the scheduler)
  2419.  
  2420. schedule
  2421.  
  2422. use scheduded rate limit
  2423.  
  2424. DlRate
  2425.  
  2426. tx_rate int
  2427.  
  2428. maximum transmit rate (in byte/s) 0 means no limit
  2429.  
  2430. rx_rate int
  2431.  
  2432. maximum receive rate (in byte/s) 0 means no limit
  2433.  
  2434. Newsgroups config
  2435.  
  2436. DlNewsConfig
  2437.  
  2438. server string
  2439.  
  2440. NNTP server hostname
  2441.  
  2442. port int
  2443.  
  2444. NNTP server port
  2445.  
  2446. ssl bool
  2447.  
  2448. Use SSL to connect to server if set to true
  2449.  
  2450. user string
  2451.  
  2452. NNTP auth username (can be empty if no auth is required)
  2453.  
  2454. password string Write-only
  2455.  
  2456. NNTP auth password (can be empty if no auth is required)
  2457.  
  2458. nthreads int
  2459.  
  2460. maximum concurrent connections to the NNTP server
  2461.  
  2462. auto_repair bool
  2463.  
  2464. automatically check and repair downloaded files using the provided par2 files
  2465.  
  2466. lazy_par2 bool
  2467.  
  2468. if set to true the downloader will download the par2 files only if the download is corrupted
  2469.  
  2470. auto_extract bool
  2471.  
  2472. automatically attempt to extract downloaded files
  2473.  
  2474. erase_tmp bool
  2475.  
  2476. if auto_extract is enabled, delete archive files once successfully extracted
  2477.  
  2478. Bittorrent config
  2479.  
  2480. DlBtConfig
  2481.  
  2482. max_peers int
  2483.  
  2484. maximum number of peers at a given time
  2485.  
  2486. stop_ratio int
  2487.  
  2488. default stop_ratio for bt Download tasks
  2489.  
  2490. This value is scaled by a factor 100, for instance a stop_ratio of 200 means that the task will stop once tx_bytes = 2 * size
  2491.  
  2492. A value of 0 means that the task will continue seeding until it is manually stopped
  2493.  
  2494. crypto_support enum
  2495.  
  2496. The crypto_support can have the following values
  2497.  
  2498. Type
  2499.  
  2500. Description
  2501.  
  2502. unsupported
  2503.  
  2504. will never use bittorrent crypto
  2505.  
  2506. allowed
  2507.  
  2508. will select plain during handshake
  2509.  
  2510. preferred
  2511.  
  2512. will select crypto during handshake
  2513.  
  2514. required
  2515.  
  2516. will allow plain bittorrent
  2517.  
  2518. enable_dht bool
  2519.  
  2520. enable the dht protocol
  2521.  
  2522. enable_pex bool
  2523.  
  2524. enable the peer exchange protocol
  2525.  
  2526. announce_timeout int
  2527.  
  2528. timeout in seconds for announcing to tracker
  2529.  
  2530. main_port int
  2531.  
  2532. main bittorrent port
  2533.  
  2534. dht_port int
  2535.  
  2536. bittorrent dht port
  2537.  
  2538. Rss Feeds config
  2539.  
  2540. DlFeedConfig
  2541.  
  2542. fetch_interval int
  2543.  
  2544. interval between automatic RSS refresh (in minutes)
  2545.  
  2546. max_items int
  2547.  
  2548. maximum feed item to keep
  2549.  
  2550. BlockList config
  2551.  
  2552. DlBlockListConfig
  2553.  
  2554. sources[] string
  2555.  
  2556. list of block list URL source
  2557.  
  2558. The block list should be in cidr format
  2559.  
  2560. e.g.: http://list.iblocklist.com/?list=bt_level1&fileformat=cidr&archiveformat=
  2561.  
  2562. Get the current Download configuration
  2563.  
  2564. GET /api/v8/downloads/config/
  2565.  
  2566. Returns the current DownloadConfiguration
  2567.  
  2568. Example request:
  2569.  
  2570. GET /api/v8/downloads/config/ HTTP/1.1
  2571. Host: mafreebox.freebox.fr
  2572.  
  2573. Example response:
  2574.  
  2575. HTTP/1.1 200 OK
  2576. Content-Type: application/json; charset=utf-8
  2577.  
  2578. {
  2579. "success": true,
  2580. "result": {
  2581. "feed": {
  2582. "max_items": 0,
  2583. "fetch_interval": 60
  2584. },
  2585. "use_watch_dir": true,
  2586. "watch_dir": "L0Rpc3F1ZSBkdXIvLnF1ZXVl", /* /Disque dur/.queue */
  2587. "news": {
  2588. "user": "",
  2589. "erase_tmp": true,
  2590. "port": 119,
  2591. "nthreads": 1,
  2592. "auto_repair": true,
  2593. "ssl": false,
  2594. "auto_extract": true,
  2595. "lazy_par2": true,
  2596. "server": "news.free.fr"
  2597. },
  2598. "bt": {
  2599. "max_peers": 50,
  2600. "stop_ratio": 150,
  2601. "crypto_support": "allowed"
  2602. },
  2603. "max_downloading_tasks": 5,
  2604. "download_dir": "L0Rpc3F1ZSBkdXIvVMOpbMOpY2hhcmdlbWVudHMv", /* /Disque dur/Téléchargements/ */
  2605. "throttling": {
  2606. "normal": {
  2607. "rx_rate": 0,
  2608. "tx_rate": 0
  2609. },
  2610. "slow": {
  2611. "rx_rate": 512,
  2612. "tx_rate": 42
  2613. },
  2614. "schedule": [
  2615. "slow",
  2616. "normal",
  2617. "normal",
  2618.  
  2619. [ ... ]
  2620.  
  2621. "normal",
  2622. "normal",
  2623. "normal",
  2624. "slow"
  2625. ],
  2626. "mode": "normal"
  2627. }
  2628. }
  2629. }
  2630.  
  2631. Update the Download configuration
  2632.  
  2633. PUT /api/v8/downloads/config/
  2634.  
  2635. Updates the DownloadConfiguration
  2636.  
  2637. Example request:
  2638.  
  2639. PUT /api/v8/downloads/config/ HTTP/1.1
  2640. Host: mafreebox.freebox.fr
  2641.  
  2642. {
  2643. "throttling": {
  2644. "normal": {
  2645. "rx_rate": 512,
  2646. "tx_rate": 40
  2647. },
  2648. "slow": {
  2649. "rx_rate": 128,
  2650. "tx_rate": 10
  2651. },
  2652. "mode": "normal",
  2653. "schedule": [
  2654. "slow",
  2655. "normal",
  2656. "normal",
  2657.  
  2658. [ ... ]
  2659.  
  2660. "normal",
  2661. "normal",
  2662. "normal",
  2663. "normal",
  2664. "slow"
  2665. ]
  2666. },
  2667. "max_downloading_tasks": 5,
  2668. "download_dir": "L0Rpc3F1ZSBkdXIvVMOpbMOpY2hhcmdlbWVudHMv", /* /Disque dur/Téléchargements/ */
  2669. "use_watch_dir": true,
  2670. "watch_dir": "L0Rpc3F1ZSBkdXIvLnF1ZXVl", /* /Disque dur/.queue */
  2671. "news": {
  2672. "server": "news.free.fr",
  2673. "port": "119",
  2674. "ssl": false,
  2675. "nthreads": 1,
  2676. "user": "",
  2677. "lazy_par2": true,
  2678. "auto_repair": true,
  2679. "auto_extract": true,
  2680. "erase_tmp": true
  2681. },
  2682. "bt": {
  2683. "max_peers": 50,
  2684. "stop_ratio": 150,
  2685. "crypto_support": "allowed"
  2686. },
  2687. "feed": {
  2688. "fetch_interval": 60
  2689. }
  2690. }
  2691.  
  2692. Example response:
  2693.  
  2694. HTTP/1.1 200 OK
  2695. Content-Type: application/json; charset=utf-8
  2696.  
  2697. {
  2698. "success": true,
  2699. "result": {
  2700. "feed": {
  2701. "max_items": 0,
  2702. "fetch_interval": 60
  2703. },
  2704. "use_watch_dir": true,
  2705. "watch_dir": "L0Rpc3F1ZSBkdXIvLnF1ZXVl", /* /Disque dur/.queue */
  2706. "news": {
  2707. "user": "",
  2708. "erase_tmp": true,
  2709. "port": 119,
  2710. "nthreads": 1,
  2711. "auto_repair": true,
  2712. "ssl": false,
  2713. "auto_extract": true,
  2714. "lazy_par2": true,
  2715. "server": "news.free.fr"
  2716. },
  2717. "bt": {
  2718. "max_peers": 50,
  2719. "stop_ratio": 150,
  2720. "crypto_support": "allowed"
  2721. },
  2722. "max_downloading_tasks": 5,
  2723. "download_dir": "L0Rpc3F1ZSBkdXIvVMOpbMOpY2hhcmdlbWVudHMv", /* /Disque dur/Téléchargements/ */
  2724. "throttling": {
  2725. "normal": {
  2726. "rx_rate": 512,
  2727. "tx_rate": 40
  2728. },
  2729. "slow": {
  2730. "rx_rate": 128,
  2731. "tx_rate": 10
  2732. },
  2733. "schedule": [
  2734. "slow",
  2735. "normal",
  2736. "normal",
  2737. "normal",
  2738.  
  2739. [ ... ]
  2740.  
  2741. "normal",
  2742. "normal",
  2743. "normal",
  2744. "slow"
  2745. ],
  2746. "mode": "normal"
  2747. }
  2748. }
  2749.  
  2750. }
  2751.  
  2752. Updating the current Throttling mode
  2753.  
  2754. PUT /api/v8/downloads/throttling
  2755.  
  2756. You can force the throttling mode using this method. You can use any of the throttling modes defined in DlThrottlingConfig. Setting to schedule will automatically set correct throttling mode. Other values will force the throttling mode until you set it back to schedule.
  2757.  
  2758. Example request:
  2759.  
  2760. PUT /api/v8/downloads/throttling HTTP/1.1
  2761. Host: mafreebox.freebox.fr
  2762.  
  2763. {
  2764. throttling: "slow"
  2765. }
  2766.  
  2767. Example response:
  2768.  
  2769. HTTP/1.1 200 OK
  2770. Content-Type: application/json; charset=utf-8
  2771.  
  2772. {
  2773. "success": true,
  2774. "result": {
  2775. "is_scheduled": false,
  2776. "throttling": "slow"
  2777. }
  2778. }
  2779.  
  2780. File System Api
  2781. File System
  2782.  
  2783. With the file system API you can access files on Freebox internal disk and disks connected to the Freebox.
  2784. Path encoding
  2785.  
  2786. NOTE:
  2787.  
  2788. For maximum compatibility issues path are encoded in base64, you should use the path as it is returned by the ls API call.
  2789.  
  2790. For instance this will solve problems with unicode equivalence .
  2791.  
  2792. Although “Spécial” (0x53 0x70 0xc3 0xa9 0x63 0x69 0x61 0x6c) and “Spécial” (0x53 0x70 0x65 0xcc 0x81 0x63 0x69 0x61 0x6c) are utf8 equivalent, it is represents two different path.
  2793.  
  2794. Some software/libraries will replace the original string with its normalized form, causing issues. The use of base64 encoded path will ensure the original path will be preserved.
  2795. File System Errors
  2796.  
  2797. When attempting to access the file system API, you may encounter the following errors:
  2798.  
  2799. error_code
  2800.  
  2801. Description
  2802.  
  2803. invalid_id
  2804.  
  2805. Invalid object id
  2806.  
  2807. path_not_found
  2808.  
  2809. File or folder not found
  2810.  
  2811. internal_error
  2812.  
  2813. Internal error
  2814.  
  2815. disk_unavailable
  2816.  
  2817. The disk is not mounted
  2818.  
  2819. invalid_request
  2820.  
  2821. Invalid request
  2822.  
  2823. invalid_conflict_mode
  2824.  
  2825. The conflict mode specified is invalid (see below)
  2826.  
  2827. exec_failed
  2828.  
  2829. Internal error
  2830.  
  2831. out_of_memory
  2832.  
  2833. Out of memory
  2834.  
  2835. task_not_found
  2836.  
  2837. Invalid task id
  2838.  
  2839. invalid_state
  2840.  
  2841. You tried to set an invalid state
  2842.  
  2843. invalid_task_type
  2844.  
  2845. This operation cannot be performed on this task
  2846.  
  2847. destination_conflict
  2848.  
  2849. The destination file/folder already exists
  2850.  
  2851. access_denied
  2852.  
  2853. Access to this file is denied
  2854.  
  2855. disk_full
  2856.  
  2857. The destination disk is full
  2858. Task
  2859.  
  2860. File system tasks have the following attributes:
  2861.  
  2862. FsTask
  2863.  
  2864. id int Read-only
  2865.  
  2866. id
  2867.  
  2868. type enum Read-only
  2869.  
  2870. The valid task types are:
  2871.  
  2872. Type
  2873.  
  2874. Description
  2875.  
  2876. cat
  2877.  
  2878. Concatenate multiple files
  2879.  
  2880. cp
  2881.  
  2882. Copy files
  2883.  
  2884. mv
  2885.  
  2886. Move files
  2887.  
  2888. rm
  2889.  
  2890. Remove files
  2891.  
  2892. archive
  2893.  
  2894. Creates an archive
  2895.  
  2896. extract
  2897.  
  2898. Extract an archive
  2899.  
  2900. repair
  2901.  
  2902. Check and repair files
  2903.  
  2904. state enum
  2905.  
  2906. State
  2907.  
  2908. Description
  2909.  
  2910. queued
  2911.  
  2912. Queued (only one task is active at a given time)
  2913.  
  2914. running
  2915.  
  2916. Running
  2917.  
  2918. paused
  2919.  
  2920. Paused (user suspended)
  2921.  
  2922. done
  2923.  
  2924. Done
  2925.  
  2926. failed
  2927.  
  2928. Failed (see error)
  2929.  
  2930. error enum Read-only
  2931.  
  2932. Error
  2933.  
  2934. Description
  2935.  
  2936. none
  2937.  
  2938. No error
  2939.  
  2940. archive_read_failed
  2941.  
  2942. Error reading archive
  2943.  
  2944. archive_open_failed
  2945.  
  2946. Error opening archive
  2947.  
  2948. archive_write_failed
  2949.  
  2950. Error writing archive
  2951.  
  2952. chdir_failed
  2953.  
  2954. Error changing directory
  2955.  
  2956. dest_is_not_dir
  2957.  
  2958. The destination is not a directory
  2959.  
  2960. file_exists
  2961.  
  2962. File already exists
  2963.  
  2964. file_not_found
  2965.  
  2966. File not found
  2967.  
  2968. mkdir_failed
  2969.  
  2970. Unable to create directory
  2971.  
  2972. open_input_failed
  2973.  
  2974. Error opening input file
  2975.  
  2976. open_output_failed
  2977.  
  2978. Error opening output file
  2979.  
  2980. opendir_failed
  2981.  
  2982. Error opening directory
  2983.  
  2984. overwrite_failed
  2985.  
  2986. Error overwriting file
  2987.  
  2988. path_too_big
  2989.  
  2990. Path is too long
  2991.  
  2992. repair_failed
  2993.  
  2994. Failed to repair corrupted files
  2995.  
  2996. rmdir_failed
  2997.  
  2998. Error removing directory
  2999.  
  3000. same_file
  3001.  
  3002. Source and Destination are the same file
  3003.  
  3004. unlink_failed
  3005.  
  3006. Error removing file
  3007.  
  3008. unsupported_file_type
  3009.  
  3010. This file type is not supported
  3011.  
  3012. write_failed
  3013.  
  3014. Error writing file
  3015.  
  3016. disk_full
  3017.  
  3018. Disk is full
  3019.  
  3020. internal
  3021.  
  3022. Internal error
  3023.  
  3024. invalid_format
  3025.  
  3026. Invalid file format (corrupted ?)
  3027.  
  3028. incorrect_password
  3029.  
  3030. Invalid or missing password for extraction
  3031.  
  3032. permission_denied
  3033.  
  3034. Permission denied
  3035.  
  3036. readlink_failed
  3037.  
  3038. Failed to read the target of a symbolic link
  3039.  
  3040. symlink_failed
  3041.  
  3042. Failed to create a symbolic link
  3043.  
  3044. created_ts timestamp Read-only
  3045.  
  3046. task creation timestamp
  3047.  
  3048. started_ts timestamp Read-only
  3049.  
  3050. task start timestamp
  3051.  
  3052. done_ts timestamp Read-only
  3053.  
  3054. task end timestamp
  3055.  
  3056. duration int Read-only
  3057.  
  3058. task duration in seconds
  3059.  
  3060. progress int Read-only
  3061.  
  3062. task progress in percent (scaled by 100)
  3063.  
  3064. eta int Read-only
  3065.  
  3066. estimated time remaining before the task completion (in seconds)
  3067.  
  3068. from string Read-only
  3069.  
  3070. current source file (if available)
  3071.  
  3072. to string Read-only
  3073.  
  3074. current destination file (if available)
  3075.  
  3076. nfiles int Read-only
  3077.  
  3078. number of files to process
  3079.  
  3080. nfiles_done int Read-only
  3081.  
  3082. number of files processed
  3083.  
  3084. total_bytes int Read-only
  3085.  
  3086. total bytes to process
  3087.  
  3088. total_bytes_done int Read-only
  3089.  
  3090. number of bytes processed
  3091.  
  3092. curr_bytes int Read-only
  3093.  
  3094. size of the file currently processed
  3095.  
  3096. curr_bytes_done int Read-only
  3097.  
  3098. number of bytes processed for the current file
  3099.  
  3100. rate int Read-only
  3101.  
  3102. processing rate in byte/s
  3103.  
  3104. src[] array of string Read-only
  3105.  
  3106. task source files
  3107.  
  3108. dst string Read-only
  3109.  
  3110. task destination path
  3111.  
  3112. List every tasks
  3113.  
  3114. GET /api/v8/fs/tasks/
  3115.  
  3116. Returns the collection of all FsTask tasks
  3117.  
  3118. Example request:
  3119.  
  3120. GET /api/v8/fs/tasks/ HTTP/1.1
  3121. Host: mafreebox.freebox.fr
  3122.  
  3123. Example response:
  3124.  
  3125. HTTP/1.1 200 OK
  3126. Content-Type: application/json; charset=utf-8
  3127.  
  3128. {
  3129. success: true,
  3130. result: [
  3131. {
  3132. curr_bytes_done: 0,
  3133. total_bytes: 0,
  3134. nfiles_done: 0,
  3135. started_ts: 1355834253,
  3136. duration: 3,
  3137. done_ts: 0,
  3138. curr_bytes: 0,
  3139. type: "extract",
  3140. to: "oxygennosvg/128x128/mimetypes/application_x_nzb.png",
  3141. id: 12,
  3142. nfiles: 0,
  3143. created_ts: 1355834253,
  3144. state: "paused",
  3145. total_bytes_done: 0,
  3146. from: "/Disque dur/tests/oxygennosvg.tar.gz",
  3147. rate: 0,
  3148. eta: 0,
  3149. error: "none",
  3150. progress: 0
  3151. src: [
  3152. "/Disque dur/tests/oxygennosvg.tar.gz"
  3153. ],
  3154. dst: "/Disque dur/tests/oxygennosvg"
  3155. },
  3156. {
  3157. id: 11,
  3158. curr_bytes_done: 0,
  3159. total_bytes: 0,
  3160. nfiles_done: 0,
  3161. started_ts: 1355834187,
  3162. duration: 0,
  3163. done_ts: 1355834187,
  3164. curr_bytes: 0,
  3165. type: "rm",
  3166. to: "",
  3167. nfiles: 0,
  3168. created_ts: 1355834187,
  3169. state: "done",
  3170. total_bytes_done: 0,
  3171. from: "/Disque dur/test/testiso.1.iso",
  3172. rate: 0,
  3173. eta: 0,
  3174. error: "none",
  3175. progress: 100,
  3176. src: [
  3177. "/Disque dur/test/testiso.1.iso"
  3178. ]
  3179. }
  3180. ]
  3181. }
  3182.  
  3183. List a task
  3184.  
  3185. GET /api/v8/fs/tasks/{id}
  3186.  
  3187. Returns the FsTask task with the given id
  3188.  
  3189. Example request:
  3190.  
  3191. GET /api/v8/fs/tasks/12 HTTP/1.1
  3192. Host: mafreebox.freebox.fr
  3193.  
  3194. Example response:
  3195.  
  3196. HTTP/1.1 200 OK
  3197. Content-Type: application/json; charset=utf-8
  3198.  
  3199. {
  3200. success: true,
  3201. result: {
  3202. curr_bytes_done: 0,
  3203. total_bytes: 0,
  3204. nfiles_done: 0,
  3205. started_ts: 1355834253,
  3206. duration: 268,
  3207. done_ts: 0,
  3208. curr_bytes: 0,
  3209. type: "extract",
  3210. to: "oxygennosvg/16x16/actions/format_stroke_color.png",
  3211. id: 12,
  3212. nfiles: 0,
  3213. created_ts: 1355834253,
  3214. state: "running",
  3215. total_bytes_done: 0,
  3216. from: "/Disque dur/tests/oxygennosvg.tar.gz",
  3217. rate: 0,
  3218. eta: 0,
  3219. error: "none",
  3220. progress: 0,
  3221. src: [
  3222. "/Disque dur/tests/oxygennosvg.tar.gz"
  3223. ],
  3224. dst: "/Disque dur/tests/oxygennosvg"
  3225. }
  3226. }
  3227.  
  3228. Delete a task
  3229.  
  3230. DELETE /api/v8/fs/tasks/{id}
  3231.  
  3232. Deletes the FsTask task with the given id, if the task was running, stop it.
  3233.  
  3234. No rollback is done, if a file as already been processed it will be left as is.
  3235.  
  3236. Example request:
  3237.  
  3238. DELETE /api/v8/fs/tasks/12 HTTP/1.1
  3239. Host: mafreebox.freebox.fr
  3240.  
  3241. Example response:
  3242.  
  3243. HTTP/1.1 200 OK
  3244. Content-Type: application/json; charset=utf-8
  3245.  
  3246. {
  3247. "success": true
  3248. }
  3249.  
  3250. Update a task
  3251.  
  3252. PUT /api/v8/fs/tasks/{id}
  3253.  
  3254. Updates the FsTask task with the given id
  3255.  
  3256. Example request:
  3257.  
  3258. PUT /api/v8/fs/tasks/15 HTTP/1.1
  3259. Host: mafreebox.freebox.fr
  3260.  
  3261. {
  3262. "state": "paused"
  3263. }
  3264.  
  3265. Example response:
  3266.  
  3267. HTTP/1.1 200 OK
  3268. Content-Type: application/json; charset=utf-8
  3269.  
  3270. {
  3271. "success": true,
  3272. "result": {
  3273. "curr_bytes_done": 0,
  3274. "total_bytes": 2410125312,
  3275. "nfiles_done": 0,
  3276. "started_ts": 1355835094,
  3277. "duration": 27,
  3278. "done_ts": 0,
  3279. "curr_bytes": 0,
  3280. "type": "cp",
  3281. "to": "/Disque dur/old_hdd/testiso.1.iso",
  3282. "id": 15,
  3283. "nfiles": 1,
  3284. "created_ts": 1355835094,
  3285. "state": "paused",
  3286. "total_bytes_done": 595591168,
  3287. "from": "/Disque dur/old_hdd/testiso.iso",
  3288. "rate": 0,
  3289. "eta": 85,
  3290. "error": "none",
  3291. "progress": 24,
  3292. "src": [
  3293. "/Disque dur/old_hdd/testiso.iso"
  3294. ],
  3295. "dst": "/Disque dur/old_hdd"
  3296. }
  3297. }
  3298.  
  3299. Listing
  3300. File info
  3301.  
  3302. FileInfo
  3303.  
  3304. path string Read-only
  3305.  
  3306. file path (encoded in base64 as explained in Path Encoding)
  3307.  
  3308. name string Read-only
  3309.  
  3310. file name (in clear text)
  3311.  
  3312. mimetype string Read-only
  3313.  
  3314. file mimetype
  3315.  
  3316. type enum
  3317.  
  3318. Type
  3319.  
  3320. Description
  3321.  
  3322. dir
  3323.  
  3324. Directory
  3325.  
  3326. file
  3327.  
  3328. Regular file
  3329.  
  3330. size int Read-only
  3331.  
  3332. file size in bytes
  3333.  
  3334. modification int Read-only
  3335.  
  3336. file modification timestamp
  3337.  
  3338. index int Read-only
  3339.  
  3340. display order for natural sort
  3341.  
  3342. link boolean Read-only
  3343.  
  3344. is this file a link
  3345.  
  3346. target string Read-only
  3347.  
  3348. symlink target path (encoded in base64 as explained in Path Encoding) (only present when link is set to true)
  3349.  
  3350. hidden boolean Read-only
  3351.  
  3352. should the file be hidden to user
  3353.  
  3354. foldercount int Read-only
  3355.  
  3356. number of subfolders
  3357.  
  3358. only relevant for dir, only provided if “countSubFolder” parameter is set
  3359.  
  3360. filecount int Read-only
  3361.  
  3362. number of files inside directory
  3363.  
  3364. only relevant for dir, only provided if “countSubFolder” parameter is set
  3365.  
  3366. List files
  3367.  
  3368. GET /api/v8/fs/ls/{path}
  3369.  
  3370. Returns the list of FileInfos for the given path
  3371.  
  3372. Parameters
  3373.  
  3374. onlyFolder (bool) – Only list folders
  3375.  
  3376. countSubFolder (bool) – Return files and subfolder count for folders
  3377.  
  3378. removeHidden (bool) – Don’t return hidden files in directory listing
  3379.  
  3380. Example request:
  3381.  
  3382. GET /api/v8/fs/ls/L0Rpc3F1ZSBkdXI= HTTP/1.1
  3383. Host: mafreebox.freebox.fr
  3384.  
  3385. Example response:
  3386.  
  3387. HTTP/1.1 200 OK
  3388. Content-Type: application/json; charset=utf-8
  3389.  
  3390. {
  3391.  
  3392. "success": true,
  3393. "result": [
  3394. {
  3395. "path": "L0Rpc3F1ZSBkdXIvRW5yZWdpc3RyZW1lbnRz",
  3396. "filecount": 0,
  3397. "link": false,
  3398. "modification": 1362005535,
  3399. "foldercount": 0,
  3400. "name": "Enregistrements",
  3401. "index": 1,
  3402. "mimetype": "inode/directory",
  3403. "hidden": false,
  3404. "type": "dir",
  3405. "size": 4096
  3406. },
  3407.  
  3408. /* Note: for the two following folders path are different, but name is utf8 equivalent */
  3409.  
  3410. {
  3411. "path": "L0Rpc3F1ZSBkdXIvTGUgU3DDqWNpYWwgMg==",
  3412. "filecount": 0,
  3413. "link": false,
  3414. "modification": 1362492511,
  3415. "foldercount": 0,
  3416. "name": "Le Spécial 2",
  3417. "index": 3,
  3418. "mimetype": "inode/directory",
  3419. "hidden": false,
  3420. "type": "dir",
  3421. "size": 4096
  3422. },
  3423. {
  3424. "path": "L0Rpc3F1ZSBkdXIvTGUgU3BlzIFjaWFsIDI=",
  3425. "filecount": 4,
  3426. "link": false,
  3427. "modification": 1361995307,
  3428. "foldercount": 1,
  3429. "name": "Le Spécial 2",
  3430. "index": 4,
  3431. "mimetype": "inode/directory",
  3432. "hidden": false,
  3433. "type": "dir",
  3434. "size": 4096
  3435. },
  3436.  
  3437. [ ... ]
  3438.  
  3439. {
  3440. "path": "L0Rpc3F1ZSBkdXIvVmlkw6lvcw==",
  3441. "filecount": 8,
  3442. "link": false,
  3443. "modification": 1361887598,
  3444. "foldercount": 2,
  3445. "name": "Vidéos",
  3446. "index": 16,
  3447. "mimetype": "inode/directory",
  3448. "hidden": false,
  3449. "type": "dir",
  3450. "size": 4096
  3451. }
  3452. ]
  3453.  
  3454. }
  3455.  
  3456. Get file information
  3457.  
  3458. GET /api/v8/fs/info/{path}
  3459.  
  3460. Returns the FileInfos for the given path
  3461.  
  3462. Example request:
  3463.  
  3464. GET /api/v8/fs/info/L0Rpc3F1ZSBkdXIvdG90bw== HTTP/1.1
  3465. Host: mafreebox.freebox.fr
  3466.  
  3467. Example response:
  3468.  
  3469. HTTP/1.1 200 OK
  3470. Content-Type: application/json; charset=utf-8
  3471.  
  3472. {
  3473. "success": true,
  3474. "result": {
  3475. "type": "dir",
  3476. "link": true,
  3477. "parent": "L0Rpc3F1ZSBkdXI=",
  3478. "modification": 1370354349,
  3479. "hidden": false,
  3480. "mimetype": "inode/directory",
  3481. "name": "toto",
  3482. "target": "L0Rpc3F1ZSBkdXIvUGhvdG9z",
  3483. "path": "L0Rpc3F1ZSBkdXIvdG90bw==",
  3484. "size": 4096
  3485. }
  3486. }
  3487.  
  3488. Operations
  3489.  
  3490. Each time you want to perform a modification on the file system you will have to create a new FsTask that you will be able to monitor.
  3491.  
  3492. NOTE: The requested operation may be en-queued to avoid performance drop because of excessive disk io
  3493. Conflict resolution
  3494.  
  3495. For certain file operations where a file name conflict can happen, you must specify a conflict resolution mode.
  3496.  
  3497. Valid resolution modes are:
  3498.  
  3499. Conflict mode
  3500.  
  3501. Description
  3502.  
  3503. overwrite
  3504.  
  3505. Overwrite the destination file
  3506.  
  3507. both
  3508.  
  3509. Keep both files (rename the file adding a suffix)
  3510.  
  3511. recent
  3512.  
  3513. Only overwrite if newer than destination file
  3514.  
  3515. skip
  3516.  
  3517. Keep the destination file
  3518. Move files
  3519.  
  3520. POST /api/v8/fs/mv/
  3521.  
  3522. Parameters
  3523.  
  3524. files (string[]) – The list of files to move
  3525.  
  3526. dst (string) – The destination
  3527.  
  3528. mode (enum) – The conflict resolution mode
  3529.  
  3530. Example request for moving files:
  3531.  
  3532. POST /api/v8/fs/mv/ HTTP/1.1
  3533. Host: mafreebox.freebox.fr
  3534.  
  3535. {
  3536. "files":
  3537. [
  3538. "L0Rpc3F1ZSBkdXIvUGhvdG9zL0RTQ18zNDkxLmpwZw==", /* /Disque dur/Photos/DSC_3491.jpg */
  3539. "L0Rpc3F1ZSBkdXIvUGhvdG9zL0RTQ18zNTAwLmpwZw==" /* /Disque dur/Photos/DSC_3500.jpg */
  3540. ],
  3541. "dst": "L0Rpc3F1ZSBkdXIvUGhvdG9zL0xhdW5jaHBhZA==", /* /Disque dur/Photos/Launchpad */
  3542. "mode": "overwrite"
  3543. }
  3544.  
  3545. Example response:
  3546.  
  3547. {
  3548. "success": true,
  3549. "result": {
  3550. "curr_bytes_done": 0,
  3551. "total_bytes": 0,
  3552. "nfiles_done": 0,
  3553. "started_ts": 1355840585,
  3554. "duration": 0,
  3555. "done_ts": 0,
  3556. "curr_bytes": 0,
  3557. "type": "mv",
  3558. "to": "",
  3559. "id": 39,
  3560. "nfiles": 0,
  3561. "created_ts": 1355840585,
  3562. "state": "running",
  3563. "total_bytes_done": 0,
  3564. "from": "",
  3565. "rate": 0,
  3566. "eta": 0,
  3567. "error": "none",
  3568. "progress": 0,
  3569. "src": [
  3570. "/Disque dur/Photos/DSC_3491.jpg",
  3571. "/Disque dur/Photos/DSC_3500.jpg"
  3572. ],
  3573. "dst": "/Disque dur/Photos/Launchpad"
  3574. }
  3575. }
  3576.  
  3577. Copy files
  3578.  
  3579. POST /api/v8/fs/cp/
  3580.  
  3581. Parameters
  3582.  
  3583. files (string[]) – The list of files to copy
  3584.  
  3585. dst (string) – The destination
  3586.  
  3587. mode (enum) – The conflict resolution mode
  3588.  
  3589. Example request:
  3590.  
  3591. POST /api/v8/fs/cp/ HTTP/1.1
  3592. Host: mafreebox.freebox.fr
  3593.  
  3594. {
  3595. "files":
  3596. [
  3597. "L0Rpc3F1ZSBkdXIvUGhvdG9zL0xhdW5jaHBhZC9EU0NfMzQ5MS5qcGcK", /* /Disque dur/Photos/Launchpad/DSC_3491.jpg */
  3598. "L0Rpc3F1ZSBkdXIvUGhvdG9zL0xhdW5jaHBhZC9EU0NfMzUwMC5qcGcK", /* /Disque dur/Photos/Launchpad/DSC_3500.jpg */
  3599. ],
  3600. "dst": "L0Rpc3F1ZSBkdXIvUGhvdG9zL1JvY2tldHMK", /* /Disque dur/Photos/Rockets */
  3601. "mode": "both"
  3602. }
  3603.  
  3604. Example response:
  3605.  
  3606. {
  3607. "success": true,
  3608. "result": {
  3609. "curr_bytes_done": 0,
  3610. "total_bytes": 0,
  3611. "nfiles_done": 0,
  3612. "started_ts": 1355840943,
  3613. "duration": 0,
  3614. "done_ts": 0,
  3615. "curr_bytes": 0,
  3616. "type": "cp",
  3617. "to": "",
  3618. "id": 43,
  3619. "nfiles": 0,
  3620. "created_ts": 1355840943,
  3621. "state": "running",
  3622. "total_bytes_done": 0,
  3623. "from": "",
  3624. "rate": 0,
  3625. "eta": 0,
  3626. "error": "none",
  3627. "progress": 0,
  3628. "src": [
  3629. "/Disque dur/Photos/Launchpad/DSC_3491.jpg",
  3630. "/Disque dur/Photos/Launchpad/DSC_3500.jpg"
  3631. ],
  3632. "dst": "/Disque dur/Photos/Rockets"
  3633. }
  3634. }
  3635.  
  3636. Remove files
  3637.  
  3638. POST /api/v8/fs/rm/
  3639.  
  3640. Parameters
  3641.  
  3642. files (string[]) – The list of files to remove
  3643.  
  3644. Example request:
  3645.  
  3646. POST /api/v8/fs/rm/ HTTP/1.1
  3647. Host: mafreebox.freebox.fr
  3648.  
  3649. {
  3650. "files":
  3651. [
  3652. "L0Rpc3F1ZSBkdXIvUGhvdG9zL1JvY2tldHMvRFNDXzM0OTEuanBnCg==", /* /Disque dur/Photos/Rockets/DSC_3491.jpg */
  3653. "L0Rpc3F1ZSBkdXIvUGhvdG9zL1JvY2tldHMvRFNDXzM1MDAuanBnCg==" /* /Disque dur/Photos/Rockets/DSC_3500.jpg */
  3654. ]
  3655. }
  3656.  
  3657. Example response:
  3658.  
  3659. {
  3660. "success": true,
  3661. "result": {
  3662. "curr_bytes_done": 0,
  3663. "total_bytes": 0,
  3664. "nfiles_done": 0,
  3665. "started_ts": 1355841064,
  3666. "duration": 0,
  3667. "done_ts": 0,
  3668. "curr_bytes": 0,
  3669. "type": "rm",
  3670. "to": "",
  3671. "id": 45,
  3672. "nfiles": 0,
  3673. "created_ts": 1355841064,
  3674. "state": "running",
  3675. "total_bytes_done": 0,
  3676. "from": "/Disque dur/Photos/Rockets/DSC_3491.jpg",
  3677. "rate": 0,
  3678. "eta": 0,
  3679. "error": "none",
  3680. "progress": 0,
  3681. "src": [
  3682. "/Disque dur/Photos/Rockets/DSC_3491.jpg",
  3683. "/Disque dur/Photos/Rockets/DSC_3500.jpg"
  3684. ]
  3685. }
  3686. }
  3687.  
  3688. Cat files
  3689.  
  3690. POST /api/v8/fs/cat/
  3691.  
  3692. Parameters
  3693.  
  3694. files (string[]) – The list of files to concatenate
  3695.  
  3696. dst (string) – The destination
  3697.  
  3698. multi_volumes (bool) – Enable multi-volumes mode, it will start at XXX001 and concatenate XXX002, XXX003, …
  3699.  
  3700. delete_files (bool) – Deletes source files
  3701.  
  3702. overwrite (bool) – Overwrites the destination
  3703.  
  3704. append (bool) – Append to the destination
  3705.  
  3706. Example request:
  3707.  
  3708. POST /api/v8/fs/cat/ HTTP/1.1
  3709. Host: mafreebox.freebox.fr
  3710.  
  3711. {
  3712. "files":
  3713. [
  3714. "L0Rpc3F1ZSBkdXIvZmlsZTE=", /* /Disque dur/file1 */
  3715. "L0Rpc3F1ZSBkdXIvZmlsZTI=" /* /Disque dur/file2 */
  3716. ],
  3717. "dst": "L0Rpc3F1ZSBkdXIvZmlsZTEy", /* /Disque dur/file12 */
  3718. "multi_volumes": false,
  3719. "delete_files": false,
  3720. "append": true,
  3721. "overwrite": false
  3722. }
  3723.  
  3724. Or if you want to do a multi-volumes concatenation:
  3725.  
  3726. {
  3727. "files":
  3728. [
  3729. // You don't need to specify file002, file003, ...
  3730. // They'll be found by cat.
  3731. "L0Rpc3F1ZSBkdXIvZmlsZTAwMQ==", /* /Disque dur/file001 */
  3732. ],
  3733. "dst": "L0Rpc3F1ZSBkdXIvZmlsZQ==", /* /Disque dur/file */
  3734. "multi_volumes": true,
  3735. "delete_files": true,
  3736. "append": false,
  3737. "overwrite": true
  3738. }
  3739.  
  3740. Example response:
  3741.  
  3742. {
  3743. "success": true,
  3744. "result": {
  3745. "curr_bytes_done": 0,
  3746. "total_bytes": 0,
  3747. "nfiles_done": 0,
  3748. "started_ts": 1355840943,
  3749. "duration": 0,
  3750. "done_ts": 0,
  3751. "curr_bytes": 0,
  3752. "type": "cat",
  3753. "to": "",
  3754. "id": 43,
  3755. "nfiles": 0,
  3756. "created_ts": 1355840943,
  3757. "state": "running",
  3758. "total_bytes_done": 0,
  3759. "from": "",
  3760. "rate": 0,
  3761. "eta": 0,
  3762. "error": "none",
  3763. "progress": 0
  3764. }
  3765. }
  3766.  
  3767. Create an archive
  3768.  
  3769. POST /api/v8/fs/archive/
  3770.  
  3771. Parameters
  3772.  
  3773. files (string[]) – The list of files to archive
  3774.  
  3775. dst (string) – The destination
  3776.  
  3777. Example request:
  3778.  
  3779. POST /api/v8/fs/archive/ HTTP/1.1
  3780. Host: mafreebox.freebox.fr
  3781.  
  3782. {
  3783. "files":
  3784. [
  3785. "L0Rpc3F1ZSBkdXIvUGhvdG9zL0xhdW5jaHBhZC9EU0NfMzQ5MS5qcGc=", /* /Disque dur/Photos/Launchpad/DSC_3491.jpg */
  3786. "L0Rpc3F1ZSBkdXIvUGhvdG9zL0xhdW5jaHBhZC9EU0NfMzUwMC5qcGc=" /* /Disque dur/Photos/Launchpad/DSC_3500.jpg */
  3787. ],
  3788. "dst": "L0Rpc3F1ZSBkdXIvUGhvdG9zL3JvY2tldHMuemlw" /* /Disque dur/Photos/rockets.zip */
  3789. }
  3790.  
  3791. Example response:
  3792.  
  3793. {
  3794. "success": true,
  3795. "result": {
  3796. "curr_bytes_done": 0,
  3797. "total_bytes": 0,
  3798. "nfiles_done": 0,
  3799. "started_ts": 1355840943,
  3800. "duration": 0,
  3801. "done_ts": 0,
  3802. "curr_bytes": 0,
  3803. "type": "archive",
  3804. "to": "",
  3805. "id": 42,
  3806. "nfiles": 0,
  3807. "created_ts": 1355840943,
  3808. "state": "running",
  3809. "total_bytes_done": 0,
  3810. "from": "",
  3811. "rate": 0,
  3812. "eta": 0,
  3813. "error": "none",
  3814. "progress": 0,
  3815. "src": [
  3816. "/Disque dur/Photos/Launchpad/DSC_3491.jpg",
  3817. "/Disque dur/Photos/Launchpad/DSC_3500.jpg"
  3818. ],
  3819. "dst": "/Disque dur/Photos/rockets.zip"
  3820. }
  3821. }
  3822.  
  3823. Extract a file
  3824.  
  3825. POST /api/v8/fs/extract/
  3826.  
  3827. Parameters
  3828.  
  3829. src (string) – The archive file
  3830.  
  3831. dst (string) – The destination folder
  3832.  
  3833. password (string) – The archive password
  3834.  
  3835. delete_archive (boolean) – Delete archive after extraction
  3836.  
  3837. overwrite (boolean) – Overwrite files on conflict
  3838.  
  3839. Example request:
  3840.  
  3841. POST /api/v8/fs/extract/ HTTP/1.1
  3842. Host: mafreebox.freebox.fr
  3843.  
  3844. {
  3845. "src": "L0Rpc3F1ZSBkdXIvb2xkX2hkZC90ZXN0aXNvLjEuaXNv", /* /Disque dur/old_hdd/testiso.1.iso */
  3846. "dst": "L0Rpc3F1ZSBkdXIvb2xkX2hkZA==" /* /Disque dur/old_hdd */
  3847. "password": "",
  3848. "delete_archive": false,
  3849. "overwrite": true
  3850. }
  3851.  
  3852. Example response:
  3853.  
  3854. {
  3855. "success": true,
  3856. "result": {
  3857. "curr_bytes_done": 0,
  3858. "total_bytes": 0,
  3859. "nfiles_done": 0,
  3860. "started_ts": 1355842252,
  3861. "duration": 0,
  3862. "done_ts": 0,
  3863. "curr_bytes": 0,
  3864. "type": "extract",
  3865. "to": "/Disque dur/old_hdd",
  3866. "id": 48,
  3867. "nfiles": 0,
  3868. "created_ts": 1355842252,
  3869. "state": "running",
  3870. "total_bytes_done": 0,
  3871. "from": "/Disque dur/old_hdd/testiso.1.iso",
  3872. "rate": 0,
  3873. "eta": 0,
  3874. "error": "none",
  3875. "progress": 0,
  3876. "src": [
  3877. "/Disque dur/old_hdd/testiso.1.iso"
  3878. ],
  3879. "dst": "/Disque dur/old_hdd"
  3880. }
  3881. }
  3882.  
  3883. Repair a file
  3884.  
  3885. POST /api/v8/fs/repair/
  3886.  
  3887. Parameters
  3888.  
  3889. src (string) – The .par2 file
  3890.  
  3891. delete_archive (boolean) – Delete par2 files after repair
  3892.  
  3893. Example request:
  3894.  
  3895. POST /api/v8/fs/repair/ HTTP/1.1
  3896. Host: mafreebox.freebox.fr
  3897.  
  3898. {
  3899. "src": "L0Rpc3F1ZSBkdXIvdGVzdHMvcGFyMi9saWNlbnNlLnR4dC5wYXIy", /* /Disque dur/tests/par2/license.txt.par2 */
  3900. "delete_archive": false
  3901. }
  3902.  
  3903. Example response:
  3904.  
  3905. {
  3906. "success": true,
  3907. "result": {
  3908. "curr_bytes_done": 0,
  3909. "total_bytes": 0,
  3910. "nfiles_done": 0,
  3911. "started_ts": 1355842559,
  3912. "duration": 0,
  3913. "done_ts": 0,
  3914. "curr_bytes": 0,
  3915. "type": "repair",
  3916. "to": "",
  3917. "id": 50,
  3918. "nfiles": 0,
  3919. "created_ts": 1355842559,
  3920. "state": "running",
  3921. "total_bytes_done": 0,
  3922. "from": "",
  3923. "rate": 0,
  3924. "eta": 0,
  3925. "error": "none",
  3926. "progress": 0
  3927. }
  3928. }
  3929.  
  3930. Hash a file
  3931.  
  3932. POST /api/v8/fs/hash/
  3933.  
  3934. Parameters
  3935.  
  3936. src (string) – The file to hash
  3937.  
  3938. hash_type (string) – The type of hash (md5, sha1, …)
  3939.  
  3940. Example request:
  3941.  
  3942. POST /api/v8/fs/hash/ HTTP/1.1
  3943. Host: mafreebox.freebox.fr
  3944.  
  3945. {
  3946. "src": "L0Rpc3F1ZSBkdXIvbXlfZmlsZQ==", /* /Disque dur/my_file */
  3947. "hash_type": "md5"
  3948. }
  3949.  
  3950. Example response:
  3951.  
  3952. {
  3953. "success": true,
  3954. "result": {
  3955. "curr_bytes_done": 0,
  3956. "total_bytes": 4242,
  3957. "nfiles_done": 0,
  3958. "started_ts": 1355842559,
  3959. "duration": 0,
  3960. "done_ts": 0,
  3961. "curr_bytes": 4242,
  3962. "type": "hash",
  3963. "to": "",
  3964. "id": 50,
  3965. "nfiles": 1,
  3966. "created_ts": 1355842559,
  3967. "state": "running",
  3968. "total_bytes_done": 0,
  3969. "from": "/Disque dur/my_file",
  3970. "rate": 0,
  3971. "eta": 0,
  3972. "error": "none",
  3973. "progress": 0
  3974. }
  3975. }
  3976.  
  3977. Get the hash value
  3978.  
  3979. To get the hash, the task must have succeed and be in the state “done”.
  3980.  
  3981. GET /api/v8/fs/tasks/{id}/hash
  3982.  
  3983. Example request:
  3984.  
  3985. GET /api/v8/fs/tasks/50/hash HTTP/1.1
  3986. Host: mafreebox.freebox.fr
  3987.  
  3988. Example response:
  3989.  
  3990. HTTP/1.1 200 OK
  3991. Content-Type: application/json; charset=utf-8
  3992.  
  3993. {
  3994. "success": true,
  3995. "result": {
  3996. "hash": "94baaad4d1347ec6e15ae35c88ee8bc8"
  3997. }
  3998. }
  3999.  
  4000. Create a directory
  4001.  
  4002. Contrary to other file system tasks, this operation is done synchronously.
  4003.  
  4004. Instead of a returning a FsTask a call to this API will only return success status
  4005.  
  4006. POST /api/v8/fs/mkdir/
  4007.  
  4008. Parameters
  4009.  
  4010. parent (string) – The parent directory path (base64 encoded)
  4011.  
  4012. dirname (string) – The name of the directory to create
  4013.  
  4014. Example request:
  4015.  
  4016. POST /api/v8/fs/mkdir/ HTTP/1.1
  4017. Host: mafreebox.freebox.fr
  4018.  
  4019. {
  4020. "parent": "L0Rpc3F1ZSBkdXI=", /* /Disque dur */
  4021. "dirname": "Test"
  4022. }
  4023.  
  4024. Example response:
  4025.  
  4026. {
  4027. "success": true
  4028. }
  4029.  
  4030. Rename a file/folder
  4031.  
  4032. Contrary to other file system tasks, this operation is done synchronously.
  4033.  
  4034. Instead of a returning a FsTask a call to this API will only return success status and the new path as a result
  4035.  
  4036. POST /api/v8/fs/rename/
  4037.  
  4038. Parameters
  4039.  
  4040. src (string) – The source file path (base64 encoded)
  4041.  
  4042. dst (string) – The new name of the file (clear text, without path)
  4043.  
  4044. Example request:
  4045.  
  4046. POST /api/v8/fs/rename/ HTTP/1.1
  4047. Host: mafreebox.freebox.fr
  4048.  
  4049. {
  4050. "src": "L0Rpc3F1ZSBkdXIvdGVzdC50eHQ=", /* /Disque dur/test.txt */
  4051. "dst": "plop.txt"
  4052. }
  4053.  
  4054. Example response:
  4055.  
  4056. {
  4057. "success": true,
  4058. "result": "L0Rpc3F1ZSBkdXIvcGxvcC50eHQ=" /* /Disque dur/plop.txt */
  4059. }
  4060.  
  4061. Download a file
  4062.  
  4063. GET /api/v8/dl/{path}
  4064.  
  4065. Example request:
  4066.  
  4067. GET /api/v8/dl/L0Rpc3F1ZSBkdXIvUGhvdG9zL1BsYW5zIHNlY3JldHMuanBn HTTP/1.1
  4068. Host: mafreebox.freebox.fr
  4069.  
  4070. Example response:
  4071.  
  4072. HTTP/1.1 200 OK
  4073. Content-Type: image/jpeg
  4074. Content-Length: 600864
  4075. Content-Disposition: attachment; filename="Plans secrets.jpg"
  4076.  
  4077. [ ... ]
  4078.  
  4079. File Sharing Link
  4080.  
  4081. This API allows you to create a unique link to share content hosted on you Freebox.
  4082.  
  4083. NOTE: this feature is available only if you enable HTTP remote access to your Freebox.
  4084. File Sharing Errors
  4085.  
  4086. When attempting to access the file sharing API, you may encounter the following errors:
  4087.  
  4088. error_code
  4089.  
  4090. Description
  4091.  
  4092. invalid_id
  4093.  
  4094. Invalid object id
  4095.  
  4096. path_not_found
  4097.  
  4098. File or folder not found
  4099.  
  4100. internal_error
  4101.  
  4102. Internal error
  4103. File Sharing Link object
  4104.  
  4105. Share link have the following attributes:
  4106.  
  4107. ShareLink
  4108.  
  4109. token string Read-only
  4110.  
  4111. The link unique sharing token
  4112.  
  4113. path string Read-only
  4114.  
  4115. The root path of the share, if the path is a regular file, only this file will be shared
  4116.  
  4117. name string Read-only
  4118.  
  4119. The readable name of the shared file/folder
  4120.  
  4121. expire timestamp Read-only
  4122.  
  4123. Link expiration timestamp, 0 means no expiration.
  4124.  
  4125. fullurl string Read-only
  4126.  
  4127. Full URL to use for remote access. If remote access is disabled, the field will be empty.
  4128.  
  4129. File Sharing Link API
  4130. Retrieve a File Sharing link
  4131.  
  4132. GET /api/v8/share_link/
  4133.  
  4134. Returns the collection of all ShareLink
  4135.  
  4136. Example request:
  4137.  
  4138. GET /api/v8/share_link/ HTTP/1.1
  4139. Host: mafreebox.freebox.fr
  4140.  
  4141. Example response:
  4142.  
  4143. HTTP/1.1 200 OK
  4144. Content-Type: application/json; charset=utf-8
  4145.  
  4146. {
  4147. success: true,
  4148. result: [
  4149. {
  4150. "path": "L0Rpc3F1ZSBkdXIvUGhvdG9zL01lcyB2YWNhbmNlcyBlbiByb3Vsb3R0ZQ==" /* /Disque dur/Photos/Mes vacances en roulotte */
  4151. "name": "Mes vacances en roulotte",
  4152. "token": "gAnweF2Xg5OwcJWn",
  4153. "expire": 1355852344,
  4154. "fullurl": "http://13.37.42.69/api/v8/share/gAnweF2Xg5OwcJWn/"
  4155. },
  4156. {
  4157. "path": "L0Rpc3F1ZSBkdXIvc2hhcmVk", /* /Disque dur/shared */
  4158. "name": "shared",
  4159. "token": "s8a+4VtOQNkkQ55f",
  4160. "expire": 1355866268,
  4161. "fullurl": "http://13.37.42.69/api/v8/share/s8a+4VtOQNkkQ55f/"
  4162. }
  4163. ]
  4164. }
  4165.  
  4166. GET /api/v8/share_link/{token}
  4167.  
  4168. Returns the ShareLink task with the given id
  4169.  
  4170. Example request:
  4171.  
  4172. GET /api/v8/share_link/gAnweF2Xg5OwcJWn HTTP/1.1
  4173. Host: mafreebox.freebox.fr
  4174.  
  4175. Example response:
  4176.  
  4177. HTTP/1.1 200 OK
  4178. Content-Type: application/json; charset=utf-8
  4179.  
  4180. {
  4181. "success": true,
  4182. "result": {
  4183. "path": "L0Rpc3F1ZSBkdXIvUGhvdG9zL01lcyB2YWNhbmNlcyBlbiByb3Vsb3R0ZQ==" /* /Disque dur/Photos/Mes vacances en roulotte */
  4184. "name": "Mes vacances en roulotte",
  4185. "token": "gAnweF2Xg5OwcJWn",
  4186. "expire": 1355852344,
  4187. "fullurl": "http://13.37.42.69/api/v8/share/gAnweF2Xg5OwcJWn/"
  4188. }
  4189. }
  4190.  
  4191. Delete a File Sharing link
  4192.  
  4193. DELETE /api/v8/share_link/{token}
  4194.  
  4195. Deletes the ShareLink task with the given token, if the task was running, stop it.
  4196.  
  4197. No rollback is done, if a file as already been processed it will be left as is.
  4198.  
  4199. Example request:
  4200.  
  4201. DELETE /api/v8/share_link/gAnweF2Xg5OwcJWn HTTP/1.1
  4202. Host: mafreebox.freebox.fr
  4203.  
  4204. Example response:
  4205.  
  4206. HTTP/1.1 200 OK
  4207. Content-Type: application/json; charset=utf-8
  4208.  
  4209. {
  4210. "success": true
  4211. }
  4212.  
  4213. Create a File Sharing link
  4214.  
  4215. POST /api/v8/share_link/
  4216.  
  4217. Create a new ShareLink
  4218.  
  4219. Example request:
  4220.  
  4221. POST /api/v8/share_link/ HTTP/1.1
  4222. Host: mafreebox.freebox.fr
  4223.  
  4224. {
  4225. "path": "L0Rpc3F1ZSBkdXIvVMOpbMOpY2hhcmdlbWVudHM=", /* /Disque dur/Téléchargements */
  4226. "expire": 1355932880,
  4227. "fullurl": ""
  4228. }
  4229.  
  4230. Example response:
  4231.  
  4232. HTTP/1.1 200 OK
  4233. Content-Type: application/json; charset=utf-8
  4234.  
  4235. {
  4236. "success": true,
  4237. "result": {
  4238. "path": "L0Rpc3F1ZSBkdXIvVMOpbMOpY2hhcmdlbWVudHM=", /* /Disque dur/Téléchargements */
  4239. "name": "Téléchargements",
  4240. "token": "6Hj57zgTfoQqb_vH",
  4241. "expire": 1355932880,
  4242. "fullurl": "http://13.37.42.69/api/v8/share/6Hj57zgTfoQqb_vH/"
  4243. }
  4244. }
  4245.  
  4246. File Upload
  4247.  
  4248. This API allows you to upload files to the Freebox Server.
  4249.  
  4250. NOTE: for large transfer files, you should prefer FTP over HTTP transfer
  4251.  
  4252. WARNING the previous http upload method is now deprecated since api v4, you must now use the new WebSocket upload Api. If you can’t support WebSocket, you must use ftp for file transfer
  4253. File Upload Errors
  4254.  
  4255. When attempting to access the file upload API, you may encounter the following errors:
  4256.  
  4257. error_code
  4258.  
  4259. Description
  4260.  
  4261. invalid_request
  4262.  
  4263. Invalid request
  4264.  
  4265. path_not_found
  4266.  
  4267. File or folder not found
  4268.  
  4269. access_denied
  4270.  
  4271. Write permission denied in the destination folder
  4272.  
  4273. destination_conflict
  4274.  
  4275. A file with same name already exists
  4276.  
  4277. invalid_id
  4278.  
  4279. Invalid file upload id
  4280.  
  4281. cancelled
  4282.  
  4283. Someone on a side channel as cancelled the upload
  4284.  
  4285. noent
  4286.  
  4287. No upload with this id
  4288. File Upload object
  4289.  
  4290. File uploads have the following attributes:
  4291.  
  4292. FileUpload
  4293.  
  4294. id int Read-only
  4295.  
  4296. upload id
  4297.  
  4298. size int Read-only
  4299.  
  4300. Upload file size in bytes
  4301.  
  4302. uploaded int Read-only
  4303.  
  4304. Uploaded bytes
  4305.  
  4306. status enum Read-only
  4307.  
  4308. upload status can have the following values
  4309.  
  4310. status
  4311.  
  4312. Description
  4313.  
  4314. authorized
  4315.  
  4316. Upload authorization is valid, upload has not started yet
  4317.  
  4318. in_progress
  4319.  
  4320. Upload in progress
  4321.  
  4322. done
  4323.  
  4324. Upload done
  4325.  
  4326. failed
  4327.  
  4328. Upload failed
  4329.  
  4330. conflict
  4331.  
  4332. Destination file conflict
  4333.  
  4334. timeout
  4335.  
  4336. Upload authorization is no longer valid
  4337.  
  4338. cancelled
  4339.  
  4340. Upload cancelled by user
  4341.  
  4342. start_date timestamp Read-only
  4343.  
  4344. upload start date
  4345.  
  4346. last_update timestamp Read-only
  4347.  
  4348. last update of file upload object
  4349.  
  4350. upload_name string Read-only
  4351.  
  4352. name of the file uploaded
  4353.  
  4354. dirname string Read-only
  4355.  
  4356. upload destination directory
  4357.  
  4358. WebSocket File Upload API
  4359.  
  4360. The file upload WebSocket path is /api/v8/ws/upload
  4361.  
  4362. With this new API, the need for creating a ‘file upload authorization’ has now been removed.
  4363.  
  4364. To be able to upload a file to the Freebox, you must open a WebSocket connection to the upload api, then for each file you want to upload you must :
  4365.  
  4366. send a FileUploadStartAction with the action ‘upload_start’
  4367.  
  4368. wait for the associated WebSocketResponse that indicates success, then start transferring the file content by chunks, each chunk being a binary WebSocket frame.
  4369.  
  4370. For each chunk you send, you’ll get a WsUploadProgress response indicating that the associated chunk has been received and processed. Note that you should not wait for this response before sending the next data chunk in order to get good bandwidth performance.
  4371.  
  4372. once all chunks have been transferred, you should send a FileUploadFinalizeAction with the action ‘upload_finalize’ and wait for the associated WebSocketResponse indicating success
  4373.  
  4374. Note that if you have multiple files to send, you should reuse the same WebSocket connection, and repeat the upload steps again.
  4375.  
  4376. If for any reason the WebSocket is closed during upload, the partially sent file will be left as-is on the Freebox to allow resuming upload at a later point.
  4377.  
  4378. If you want to cancel an ongoing upload ou can send a FileUploadCancelAction. The partially uploaded file will then be deleted
  4379. File Upload Start Action
  4380.  
  4381. FileUploadStartAction
  4382.  
  4383. request_id int
  4384.  
  4385. optional request_id
  4386.  
  4387. action string
  4388.  
  4389. must be ‘upload_start’
  4390.  
  4391. size int
  4392.  
  4393. optional file size
  4394.  
  4395. dirname string
  4396.  
  4397. the destination directory (encoded value)
  4398.  
  4399. filename string
  4400.  
  4401. the destination filename
  4402.  
  4403. force enum
  4404.  
  4405. select the way conflicts are handled
  4406.  
  4407. Force mode
  4408.  
  4409. Description
  4410.  
  4411. missing
  4412.  
  4413. The response to the FileUploadStartAction will be an error with ‘destination_conflict’ if the destination file already exists. The response will also contain a file_size attribute containing the existing file length (useful for resuming upload)
  4414.  
  4415. overwrite
  4416.  
  4417. If the target file already exists it will be overridden
  4418.  
  4419. resume
  4420.  
  4421. The upload will resume, all sent chunks will then be appended to the existing file.
  4422.  
  4423. File Upload Finalize action
  4424.  
  4425. FileUploadFinalizeAction
  4426.  
  4427. request_id int
  4428.  
  4429. optional request_id
  4430.  
  4431. action string
  4432.  
  4433. must be ‘upload_finalize’
  4434.  
  4435. File Upload Cancel action
  4436.  
  4437. FileUploadCancelAction
  4438.  
  4439. request_id int
  4440.  
  4441. optional request_id
  4442.  
  4443. action string
  4444.  
  4445. must be ‘upload_cancel’
  4446.  
  4447. File Upload Chunk
  4448.  
  4449. File upload chunk are just Binary WebSocket frames containing raw file content.
  4450. File Upload Chunk Response
  4451.  
  4452. For each received chunk, the Freebox will send a chunk response containing upload progress information the request_id used in response will be the one from the FileUploadStartAction, and ‘action’ value will be ‘upload_data’
  4453.  
  4454. FileUploadChunkResponse
  4455.  
  4456. total_len int
  4457.  
  4458. target file current length
  4459.  
  4460. complete bool
  4461.  
  4462. will be true in a reply to FileUploadFinalizeAction or FileUploadCancelAction
  4463.  
  4464. cancelled bool
  4465.  
  4466. will be true in a reply FileUploadCancelAction
  4467.  
  4468. File Upload example
  4469.  
  4470. GET /api/v8/ws/upload
  4471.  
  4472. Start the WebSocket handshake:
  4473.  
  4474. Client ==> Freebox
  4475.  
  4476. GET ws://mafreebox.freebox.fr/api/v8/ws/upload HTTP/1.1
  4477. Host: mafreebox.freebox.fr
  4478. Connection: Upgrade
  4479. Upgrade: websocket
  4480. Sec-WebSocket-Version: 13
  4481. Sec-WebSocket-Key: LhYCx4FBJE6pqrIL3tDC3g==
  4482. X-Fbx-App-Auth: 35JYdQSvkcBYK84IFMU7H86clfhS75OzwlQrKlQN1gBch\/Dd62RGzDpgC7YB9jB2
  4483.  
  4484. Handshake response:
  4485.  
  4486. Client <== Freebox
  4487.  
  4488. HTTP/1.1 101 Switching Protocols
  4489. Connection: upgrade
  4490. Upgrade: websocket
  4491. Sec-WebSocket-Accept: IqwCz8z8sON/eWQqkYKLu6iLkzo=
  4492.  
  4493. Start upload:
  4494.  
  4495. Client ==> Freebox
  4496.  
  4497. {
  4498. "action": "upload_start",
  4499. "request_id": 3615,
  4500. "size": 8526224,
  4501. "dirname": "L0Rpc3F1ZSBkdXIvMF91cGxvYWRfdGVzdA==",
  4502. "filename": "test_file.bin"
  4503. }
  4504.  
  4505. Start upload response:
  4506.  
  4507. Client <== Freebox
  4508.  
  4509. {
  4510. "success": false,
  4511. "action": "upload_start",
  4512. "request_id": 3615,
  4513. "msg": "Le fichier existe déjà",
  4514. "file_size": 8526224,
  4515. "error_code": "conflict"
  4516. }
  4517.  
  4518. Start upload with overwrite force mode:
  4519.  
  4520. Client ==> Freebox
  4521.  
  4522. {
  4523. "action": "upload_start",
  4524. "request_id": 6969,
  4525. "size": 8526224,
  4526. "dirname": "L0Rpc3F1ZSBkdXIvMF91cGxvYWRfdGVzdA==",
  4527. "filename": "test_file.bin",
  4528. "force": "overwrite"
  4529. }
  4530.  
  4531. Start upload response:
  4532.  
  4533. Client <== Freebox
  4534.  
  4535. {
  4536. "action": "upload_start",
  4537. "success": true,
  4538. "request_id": 6969
  4539. }
  4540.  
  4541. Send data chunk:
  4542.  
  4543. Client ==> Freebox
  4544.  
  4545. [ BINARY WEBSOCKET FRAME MESSAGE containing file offset: 0, length: 512k ]
  4546.  
  4547. [ BINARY WEBSOCKET FRAME MESSAGE containing file offset: 512k, length: 512k ]
  4548.  
  4549. [ BINARY WEBSOCKET FRAME MESSAGE containing file offset: 1024k, length: 512k ]
  4550.  
  4551. [ … ]
  4552.  
  4553. Receive upload response:
  4554.  
  4555. Client <== Freebox
  4556.  
  4557. {
  4558. "request_id": 6969
  4559. "action": "upload_data",
  4560. "success": true,
  4561. "result": {
  4562. "total_len": 524288,
  4563. "complete": false
  4564. },
  4565. }
  4566.  
  4567. {
  4568. "request_id": 6969,
  4569. "action": "upload_data",
  4570. "success": true,
  4571. "result": {
  4572. "total_len": 1048576,
  4573. "complete": false
  4574. }
  4575. }
  4576.  
  4577. [ ... ]
  4578.  
  4579. This will be received for each sent data chunk
  4580.  
  4581. Send upload finalize:
  4582.  
  4583. Client ==> Freebox
  4584.  
  4585. {
  4586. "action": "upload_finalize",
  4587. "request_id":3615
  4588. }
  4589.  
  4590. Receive upload finalize confirmation:
  4591.  
  4592. Client <== Freebox
  4593.  
  4594. {
  4595. "request_id": 3615,
  4596. "action": "upload_finalize",
  4597. "success": true,
  4598. "result": {
  4599. "total_len": 8526224,
  4600. "complete": true
  4601. }
  4602. }
  4603.  
  4604. At this point you can start uploading a new file by repeating the previous steps starting from Start upload step
  4605. Upload Progress tracking API
  4606. Get the list of uploads
  4607.  
  4608. GET /api/v8/upload/
  4609.  
  4610. Example request:
  4611.  
  4612. GET /api/v8/upload/ HTTP/1.1
  4613. Host: mafreebox.freebox.fr
  4614.  
  4615. Example response:
  4616.  
  4617. HTTP/1.1 200 OK
  4618. Content-Type: application/json; charset=utf-8
  4619.  
  4620. {
  4621. "success": true,
  4622. "result": [
  4623. {
  4624. "id": 1678139709,
  4625. "size": 54960,
  4626. "uploaded": 54960,
  4627. "status": "done",
  4628. "last_update": 1361465608,
  4629. "start_date": 1361465608,
  4630. "upload_name": "playlist.m3u",
  4631. "dirname": "/Disque 1"
  4632. }
  4633. ]
  4634. }
  4635.  
  4636. Track an upload status
  4637.  
  4638. GET /api/v8/upload/{id}
  4639.  
  4640. With this API you can track the progress of your FileUpload task
  4641.  
  4642. Example request:
  4643.  
  4644. GET /api/v8/upload/1678139709 HTTP/1.1
  4645. Host: mafreebox.freebox.fr
  4646.  
  4647. Example response:
  4648.  
  4649. HTTP/1.1 200 OK
  4650. Content-Type: application/json; charset=utf-8
  4651.  
  4652. {
  4653. "success": true,
  4654. "result": {
  4655. "id": 1678139709,
  4656. "size": 54960,
  4657. "uploaded": 54960,
  4658. "status": "done",
  4659. "last_update": 1361465608,
  4660. "start_date": 1361465608,
  4661. "upload_name": "playlist.m3u",
  4662. "dirname": "/Disque 1"
  4663. }
  4664. }
  4665.  
  4666. Cancel an upload
  4667.  
  4668. DELETE /api/v8/upload/{id}/cancel
  4669.  
  4670. Cancel the given FileUpload closing the connection The upload status must be in_progress
  4671.  
  4672. Example request:
  4673.  
  4674. DELETE /api/v8/upload/136419941/cancel HTTP/1.1
  4675. Host: mafreebox.freebox.fr
  4676.  
  4677. Example response:
  4678.  
  4679. HTTP/1.1 200 OK
  4680. Content-Type: application/json; charset=utf-8
  4681.  
  4682. {
  4683. "success": true
  4684. }
  4685.  
  4686. Delete an upload
  4687.  
  4688. DELETE /api/v8/upload/{id}
  4689.  
  4690. Delete the given FileUpload closing the connection if needed
  4691.  
  4692. Example request:
  4693.  
  4694. DELETE /api/v8/upload/136419941 HTTP/1.1
  4695. Host: mafreebox.freebox.fr
  4696.  
  4697. Example response:
  4698.  
  4699. HTTP/1.1 200 OK
  4700. Content-Type: application/json; charset=utf-8
  4701.  
  4702. {
  4703. "success": true
  4704. }
  4705.  
  4706. Air Media
  4707. AirMedia API
  4708.  
  4709. This API allows you to multimedia stream to any airmedia device reachable by the Freebox, as well as configuring the airmedia server hosted on the Freebox Server.
  4710. AirMedia Errors
  4711.  
  4712. When attempting to access the file airmedia API, you may encounter the following errors:
  4713.  
  4714. error_code
  4715.  
  4716. Description
  4717.  
  4718. unknown_target
  4719.  
  4720. No airmedia device with this name in range
  4721.  
  4722. no_client
  4723.  
  4724. No airmedia client connected
  4725.  
  4726. set_pass
  4727.  
  4728. Unable to update password
  4729.  
  4730. set_onscreen_code
  4731.  
  4732. Unable to activate onscreen code
  4733.  
  4734. no_ctrl
  4735.  
  4736. Remote control is unavailable
  4737.  
  4738. http
  4739.  
  4740. Internal HTTP error
  4741.  
  4742. bad_session
  4743.  
  4744. No stream session found
  4745.  
  4746. bad_name
  4747.  
  4748. Invalid airmedia name
  4749.  
  4750. bad_device_id
  4751.  
  4752. No device with this id
  4753.  
  4754. bad_remote_id
  4755.  
  4756. No remote control with this id
  4757.  
  4758. req_in_progress
  4759.  
  4760. You should try again, another request is still processing
  4761.  
  4762. fetch
  4763.  
  4764. Unable to get slideshow information
  4765.  
  4766. no_display
  4767.  
  4768. No screen available
  4769.  
  4770. playback_state
  4771.  
  4772. Invalid playback state
  4773.  
  4774. no_slideshow_srv
  4775.  
  4776. Slideshow is not supported
  4777.  
  4778. no_mem
  4779.  
  4780. Internal error
  4781.  
  4782. inout_file
  4783.  
  4784. Unable to read input file
  4785.  
  4786. no_volume_control
  4787.  
  4788. Volume control is not available
  4789.  
  4790. connect
  4791.  
  4792. Error connecting to the airmedia device
  4793.  
  4794. unauthorized
  4795.  
  4796. This device requests a password
  4797.  
  4798. unsupported_media
  4799.  
  4800. The device does not support this format
  4801.  
  4802. bad_type
  4803.  
  4804. Invalid file type
  4805.  
  4806. unimplemented
  4807.  
  4808. Unimplemented
  4809. AirMedia Config Object
  4810.  
  4811. AirMedia config has the following attributes:
  4812.  
  4813. AirMediaConfig
  4814.  
  4815. enabled bool
  4816.  
  4817. Enable/Disable the airmedia server
  4818.  
  4819. password string Write-only
  4820.  
  4821. If not empty, the client will have to enter a password to be able to use this airmedia server
  4822.  
  4823. AirMedia Configuration API
  4824. Get the current AirMedia configuration
  4825.  
  4826. GET /api/v8/airmedia/config/
  4827.  
  4828. Returns the current AirMediaConfig
  4829.  
  4830. Example request:
  4831.  
  4832. GET /api/v8/airmedia/config/ HTTP/1.1
  4833. Host: mafreebox.freebox.fr
  4834.  
  4835. Example response:
  4836.  
  4837. HTTP/1.1 200 OK
  4838. Content-Type: application/json; charset=utf-8
  4839.  
  4840. {
  4841. success: true,
  4842. result: {
  4843. enabled: true
  4844. }
  4845. }
  4846.  
  4847. Update the current AirMedia configuration
  4848.  
  4849. PUT /api/v8/airmedia/config/
  4850.  
  4851. Update the current AirMediaConfig
  4852.  
  4853. Example request:
  4854.  
  4855. PUT /api/v8/airmedia/ HTTP/1.1
  4856. Host: mafreebox.freebox.fr
  4857.  
  4858. {
  4859. "enabled": true,
  4860. "password": "3615"
  4861. }
  4862.  
  4863. Example response:
  4864.  
  4865. HTTP/1.1 200 OK
  4866. Content-Type: application/json; charset=utf-8
  4867.  
  4868. {
  4869. success: true,
  4870. result: {
  4871. enabled: true
  4872. }
  4873. }
  4874.  
  4875. AirMedia Receiver Object
  4876.  
  4877. AirMedia receivers have the following attributes
  4878.  
  4879. AirMediaReceiver
  4880.  
  4881. name string Read-only
  4882.  
  4883. AirMedia name
  4884.  
  4885. password_protected bool Read-only
  4886.  
  4887. Is set to true the receiver is protected by a password
  4888.  
  4889. capabilities map Read-only
  4890.  
  4891. List of receiver capabilities from the following list
  4892.  
  4893. Capability
  4894.  
  4895. Description
  4896.  
  4897. photo
  4898.  
  4899. can display photos
  4900.  
  4901. audio
  4902.  
  4903. can play audio files
  4904.  
  4905. video
  4906.  
  4907. can play video files
  4908.  
  4909. screen
  4910.  
  4911. can display remote screen
  4912.  
  4913. Get the list of available AirMedia receivers
  4914.  
  4915. You can get the list of AirMediaReceiver connected to the Freebox Server using this API
  4916.  
  4917. GET /api/v8/airmedia/receivers/
  4918.  
  4919. Get the list of AirMediaReceiver connected to the Freebox Server
  4920.  
  4921. Example request:
  4922.  
  4923. GET /api/v8/airmedia/receivers/ HTTP/1.1
  4924. Host: mafreebox.freebox.fr
  4925.  
  4926. Example response:
  4927.  
  4928. HTTP/1.1 200 OK
  4929. Content-Type: application/json; charset=utf-8
  4930.  
  4931. {
  4932. success: true,
  4933. result: [
  4934. {
  4935. capabilities: {
  4936. photo: true,
  4937. screen: false,
  4938. audio: true,
  4939. video: true
  4940. },
  4941. name: "Freebox Player",
  4942. password_protected: true
  4943. },
  4944. {
  4945. capabilities: {
  4946. photo: false,
  4947. screen: false,
  4948. audio: true,
  4949. video: false
  4950. },
  4951. name: "Freebox Server",
  4952. password_protected: false
  4953. }
  4954. ]
  4955. }
  4956.  
  4957. Interacting with an AirMedia receiver
  4958.  
  4959. Once you have selected an available AirMediaReceiver you can start interacting with it by sending media with the following API.
  4960. AirMedia receiver request
  4961.  
  4962. AirMediaReceiverRequest
  4963.  
  4964. action enum
  4965.  
  4966. Action
  4967.  
  4968. Description
  4969.  
  4970. start
  4971.  
  4972. start playing a media
  4973.  
  4974. stop
  4975.  
  4976. stop playing a media
  4977.  
  4978. media_type string
  4979.  
  4980. Media Type
  4981.  
  4982. Description
  4983.  
  4984. photo
  4985.  
  4986. display a photo
  4987.  
  4988. video
  4989.  
  4990. display a video
  4991.  
  4992. password string
  4993.  
  4994. Optional receiver password.
  4995.  
  4996. position int
  4997.  
  4998. Start position for a video.
  4999.  
  5000. The start position is expressed in percent * 1000, for instance 50000 means 50% of the video
  5001.  
  5002. media string
  5003.  
  5004. The media to play.
  5005.  
  5006. For video media, you have to specify the media URL, for instance http://anon.nasa-global.edgesuite.net/HD_downloads/GRAIL_launch_480.mov
  5007.  
  5008. For photo media, you have to specify the file path on the Freebox Server (base64 encoded as returned in fs/ls call), for instance L0Rpc3F1ZSBkdXIvUGhvdG9zL1JvY2tldHMvRFNDXzM0OTEuanBn
  5009.  
  5010. Sending a new request to an AirMedia receiver
  5011.  
  5012. POST /api/v8/airmedia/receviers/{receiver_name}/
  5013.  
  5014. Example: display a photo on the Freebox Player:
  5015.  
  5016. POST /api/v8/airmedia/receivers/Freebox%20Player/ HTTP/1.1
  5017. Host: mafreebox.freebox.fr
  5018.  
  5019. {
  5020. "action": "start",
  5021. "media_type": "photo",
  5022. "media": "L0Rpc3F1ZSBkdXIvUGhvdG9zL1JvY2tldHMvRFNDXzM0OTEuanBn",
  5023. "password": "1111"
  5024. }
  5025.  
  5026. Example response:
  5027.  
  5028. HTTP/1.1 200 OK
  5029. Content-Type: application/json; charset=utf-8
  5030.  
  5031. {
  5032. "success": true,
  5033. }
  5034.  
  5035. Example: play a video the Freebox Player:
  5036.  
  5037. POST /api/v8/airmedia/receivers/Freebox%20Player/ HTTP/1.1
  5038. Host: mafreebox.freebox.fr
  5039.  
  5040. {
  5041. "action": "start",
  5042. "media_type": "video",
  5043. "media": "http://anon.nasa-global.edgesuite.net/HD_downloads/GRAIL_launch_480.mov",
  5044. "password": "1111"
  5045. }
  5046.  
  5047. Example response:
  5048.  
  5049. HTTP/1.1 200 OK
  5050. Content-Type: application/json; charset=utf-8
  5051.  
  5052. {
  5053. "success": true,
  5054. }
  5055.  
  5056. Example: stop the current AirMedia video on Freebox Player:
  5057.  
  5058. POST /api/v8/airmedia/receivers/Freebox%20Player/ HTTP/1.1
  5059. Host: mafreebox.freebox.fr
  5060.  
  5061. {
  5062. "action": "stop",
  5063. "media_type": "video"
  5064. }
  5065.  
  5066. Example response:
  5067.  
  5068. HTTP/1.1 200 OK
  5069. Content-Type: application/json; charset=utf-8
  5070.  
  5071. {
  5072. "success": true,
  5073. }
  5074.  
  5075. RRD
  5076. RRD [UNSTABLE]
  5077.  
  5078. With the rrd API you can retrieve stats collected on the Freebox. Right now the stats available are: network stats, switch stats, dsl stats, and temperature stats.
  5079. RRD Fetch Object
  5080.  
  5081. This is the object used to get stats
  5082.  
  5083. RRDFetch
  5084.  
  5085. db enum
  5086.  
  5087. Name of the rrd database to read. It can take one of the following values
  5088.  
  5089. Db
  5090.  
  5091. Description
  5092.  
  5093. net
  5094.  
  5095. network stats
  5096.  
  5097. temp
  5098.  
  5099. temperature stats
  5100.  
  5101. dsl
  5102.  
  5103. xDSL stats
  5104.  
  5105. switch
  5106.  
  5107. switch stats
  5108.  
  5109. date_start int Optionnal
  5110.  
  5111. The requested start timestamp of the stats to get
  5112.  
  5113. NOTE: this can be adjusted to fit the best available resolution
  5114.  
  5115. date_end int Optionnal
  5116.  
  5117. The requested end timestamp of the stats to get
  5118.  
  5119. NOTE: this can be adjusted to fit the best available resolution
  5120.  
  5121. precision int Optionnal
  5122.  
  5123. By default all values are cast to int, if you need floating point precision you can provide a precision factor that will be applied to all values before being returned.
  5124.  
  5125. For instance if you want 2 digit precision you should use a precision of 100, and divide the obtained results by 100.
  5126.  
  5127. fields[] array of string Optionnal
  5128.  
  5129. If you are only interested in getting some fields you can provide the list of fields you want to get.
  5130.  
  5131. For the net database the fields are:
  5132.  
  5133. Field
  5134.  
  5135. Description
  5136.  
  5137. bw_up
  5138.  
  5139. upload available bandwidth (in byte/s)
  5140.  
  5141. bw_down
  5142.  
  5143. download available bandwidth (in byte/s)
  5144.  
  5145. rate_up
  5146.  
  5147. upload rate (in byte/s)
  5148.  
  5149. rate_down
  5150.  
  5151. download rate (in byte/s)
  5152.  
  5153. vpn_rate_up
  5154.  
  5155. vpn client upload rate (in byte/s)
  5156.  
  5157. vpn_rate_down
  5158.  
  5159. vpn client download rate (in byte/s)
  5160.  
  5161. For the temp database the fields are:
  5162.  
  5163. Field
  5164.  
  5165. Description
  5166.  
  5167. cpum
  5168.  
  5169. temperature cpum (in °C)
  5170.  
  5171. cpub
  5172.  
  5173. temperature cpub (in °C)
  5174.  
  5175. sw
  5176.  
  5177. temperature sw (in °C)
  5178.  
  5179. hdd
  5180.  
  5181. temperature hdd (in °C)
  5182.  
  5183. fan_speed
  5184.  
  5185. fan rpm
  5186.  
  5187. temp1
  5188.  
  5189. temperature sensor 1 (in °C) [DEPRECATED, use cpum]
  5190.  
  5191. temp2
  5192.  
  5193. temperature sensor 2 (in °C) [DEPRECATED, use cpub]
  5194.  
  5195. temp3
  5196.  
  5197. temperature sensor 3 (in °C) [DEPRECATED, use sw]
  5198.  
  5199. For the dsl database the fields are:
  5200.  
  5201. Field
  5202.  
  5203. Description
  5204.  
  5205. rate_up
  5206.  
  5207. dsl available upload bandwidth (in byte/s)
  5208.  
  5209. rate_down
  5210.  
  5211. dsl available download bandwidth (in byte/s)
  5212.  
  5213. snr_up
  5214.  
  5215. dsl upload signal/noise ratio (in 1/10 dB)
  5216.  
  5217. snr_down
  5218.  
  5219. dsl download signal/noise ratio (in 1/10 dB)
  5220.  
  5221. For the switch database the fields are:
  5222.  
  5223. Field
  5224.  
  5225. Description
  5226.  
  5227. rx_1
  5228.  
  5229. receive rate on port 1 (in byte/s)
  5230.  
  5231. tx_1
  5232.  
  5233. transmit on port 1 (in byte/s)
  5234.  
  5235. rx_2
  5236.  
  5237. receive rate on port 2 (in byte/s)
  5238.  
  5239. tx_2
  5240.  
  5241. transmit on port 2 (in byte/s)
  5242.  
  5243. rx_3
  5244.  
  5245. receive rate on port 3 (in byte/s)
  5246.  
  5247. tx_3
  5248.  
  5249. transmit on port 3 (in byte/s)
  5250.  
  5251. rx_4
  5252.  
  5253. receive rate on port 4 (in byte/s)
  5254.  
  5255. tx_4
  5256.  
  5257. transmit on port 4 (in byte/s)
  5258.  
  5259. Get RRD stats [UNSTABLE]
  5260.  
  5261. POST /api/v8/rrd/
  5262.  
  5263. Example request:
  5264.  
  5265. POST /api/v8/rrd/ HTTP/1.1
  5266. Host: mafreebox.freebox.fr
  5267.  
  5268. {
  5269. "db": "temp",
  5270. "fields": [ "temp1" ],
  5271. "precision": 10
  5272. }
  5273.  
  5274. Example response:
  5275.  
  5276. HTTP/1.1 200 OK
  5277. Content-Type: application/json; charset=utf-8
  5278.  
  5279. {
  5280. "success": true,
  5281. "result": {
  5282. "date_start": 1353048060,
  5283. "data": [
  5284. {
  5285. "temp1": 540,
  5286. "time": 1353060840
  5287. },
  5288. {
  5289. "temp1": 545,
  5290. "time": 1353060900
  5291. },
  5292.  
  5293. [ ... ],
  5294.  
  5295. {
  5296. "temp1": 540,
  5297. "time": 1353069600
  5298. }
  5299. ],
  5300. "date_end": 1353069660
  5301. }
  5302. }
  5303.  
  5304. GET /api/v8/rrd/
  5305.  
  5306. Same as post request, but allowed without ‘settings’ permission
  5307.  
  5308. Calls / Contacts
  5309. Call
  5310.  
  5311. With the call API you access the Freebox call logs.
  5312. Call Errors
  5313.  
  5314. When attempting to access the call API, you may encounter the following errors:
  5315.  
  5316. error_code
  5317.  
  5318. Description
  5319.  
  5320. internal_error
  5321.  
  5322. Internal error
  5323.  
  5324. invalid_id
  5325.  
  5326. No call with this id
  5327. Call Object
  5328.  
  5329. Call entries have the following properties
  5330.  
  5331. CallEntry
  5332.  
  5333. id int Read-only
  5334.  
  5335. id
  5336.  
  5337. type enum Read-only
  5338.  
  5339. The valid call types are:
  5340.  
  5341. Type
  5342.  
  5343. Description
  5344.  
  5345. missed
  5346.  
  5347. Missed incoming call
  5348.  
  5349. accepted
  5350.  
  5351. Incoming call
  5352.  
  5353. outgoing
  5354.  
  5355. Outgoing call
  5356.  
  5357. datetime timestamp Read-only
  5358.  
  5359. Call creation timestamp.
  5360.  
  5361. number string Read-only
  5362.  
  5363. Callee number for outgoing calls. Caller number for incoming calls.
  5364.  
  5365. name string Read-only
  5366.  
  5367. Callee name for outgoing calls. Caller name for incoming calls.
  5368.  
  5369. For incoming call if the network does not provide a contact name, we try to use the contact database to find a suitable name
  5370.  
  5371. duration int Read-only
  5372.  
  5373. Call duration in seconds.
  5374.  
  5375. new bool
  5376.  
  5377. Call entry as not been acknowledged yet.
  5378.  
  5379. contact_id int Read-only
  5380.  
  5381. If the number matches an entry in the contact database, the id of the matching contact.
  5382.  
  5383. Call API
  5384.  
  5385. This is the call API
  5386. List every calls
  5387.  
  5388. GET /api/v8/call/log/
  5389.  
  5390. Returns the collection of all CallEntry call entries
  5391.  
  5392. Example request:
  5393.  
  5394. GET /api/v8/call/log/ HTTP/1.1
  5395. Host: mafreebox.freebox.fr
  5396.  
  5397. Example response:
  5398.  
  5399. HTTP/1.1 200 OK
  5400. Content-Type: application/json; charset=utf-8
  5401.  
  5402. {
  5403. success: true,
  5404. result: [
  5405. {
  5406. number: "0102030405",
  5407. type: "missed",
  5408. id: 69,
  5409. duration: 1,
  5410. datetime: 1359546363,
  5411. contact_id: 56,
  5412. line_id: 0,
  5413. name: "r0ro (Freebox)",
  5414. new: true
  5415. },
  5416. {
  5417. number: "**1",
  5418. type: "outgoing",
  5419. id: 68,
  5420. duration: 5,
  5421. datetime: 1359545960,
  5422. contact_id: 0,
  5423. line_id: 0,
  5424. name: "**1",
  5425. new: false
  5426. }
  5427. ]
  5428. }
  5429.  
  5430. Delete every calls
  5431.  
  5432. POST /api/v8/call/log/delete_all/
  5433.  
  5434. Remove all CallEntry call entries
  5435.  
  5436. Example request:
  5437.  
  5438. GET /api/v8/call/log/delete_all HTTP/1.1
  5439. Host: mafreebox.freebox.fr
  5440.  
  5441. Example response:
  5442.  
  5443. HTTP/1.1 200 OK
  5444. Content-Type: application/json; charset=utf-8
  5445.  
  5446. Mark every calls as read
  5447.  
  5448. POST /api/v8/call/log/mark_all_as_read/
  5449.  
  5450. Mark all CallEntry call entries as read
  5451.  
  5452. Example request:
  5453.  
  5454. GET /api/v8/call/log/mark_all_as_read HTTP/1.1
  5455. Host: mafreebox.freebox.fr
  5456.  
  5457. Example response:
  5458.  
  5459. HTTP/1.1 200 OK
  5460. Content-Type: application/json; charset=utf-8
  5461.  
  5462. Access a given call entry
  5463.  
  5464. GET /api/v8/call/log/{id}
  5465.  
  5466. Returns the CallEntry task with the given id
  5467.  
  5468. Example request:
  5469.  
  5470. GET /api/v8/call/log/69 HTTP/1.1
  5471. Host: mafreebox.freebox.fr
  5472.  
  5473. Example response:
  5474.  
  5475. HTTP/1.1 200 OK
  5476. Content-Type: application/json; charset=utf-8
  5477.  
  5478. {
  5479. success: true,
  5480. result: {
  5481. number: "0102030405",
  5482. type: "missed",
  5483. id: 69,
  5484. duration: 1,
  5485. datetime: 1359546363,
  5486. contact_id: 56,
  5487. line_id: 0,
  5488. name: "Romain Bureau",
  5489. new: true
  5490. }
  5491. }
  5492.  
  5493. Delete a call
  5494.  
  5495. DELETE /api/v8/call/log/{id}
  5496.  
  5497. Deletes the CallEntry with the given id.
  5498.  
  5499. Example request:
  5500.  
  5501. DELETE /api/v8/call/log/69 HTTP/1.1
  5502. Host: mafreebox.freebox.fr
  5503.  
  5504. Example response:
  5505.  
  5506. HTTP/1.1 200 OK
  5507. Content-Type: application/json; charset=utf-8
  5508.  
  5509. {
  5510. "success": true
  5511. }
  5512.  
  5513. Update a call entry
  5514.  
  5515. PUT /api/v8/call/log/{id}
  5516.  
  5517. Updates the CallEntry task with the given id
  5518.  
  5519. Example request:
  5520.  
  5521. PUT /api/v8/call/log/69 HTTP/1.1
  5522. Host: mafreebox.freebox.fr
  5523.  
  5524. {
  5525. "new": "false"
  5526. }
  5527.  
  5528. Example response:
  5529.  
  5530. HTTP/1.1 200 OK
  5531. Content-Type: application/json; charset=utf-8
  5532.  
  5533. {
  5534. success: true,
  5535. result: {
  5536. number: "0102030405",
  5537. type: "missed",
  5538. id: 69,
  5539. duration: 1,
  5540. datetime: 1359546363,
  5541. contact_id: 56,
  5542. line_id: 0,
  5543. name: "Romain Bureau",
  5544. new: false
  5545. }
  5546. }
  5547.  
  5548. Contacts
  5549.  
  5550. The contact API allow to interact with the contact list stored on the Freebox
  5551. Contacts Errors
  5552.  
  5553. When attempting to access the contact API, you may encounter the following errors:
  5554.  
  5555. error_code
  5556.  
  5557. Description
  5558.  
  5559. noent
  5560.  
  5561. no entry with this id
  5562.  
  5563. exists
  5564.  
  5565. an entry already exists
  5566.  
  5567. no_match
  5568.  
  5569. no entry matched your request
  5570. Contact Objects
  5571. Contact Entry
  5572.  
  5573. Contact entries have the following properties
  5574.  
  5575. ContactEntry
  5576.  
  5577. id int
  5578.  
  5579. contact id
  5580.  
  5581. display_name string
  5582.  
  5583. contact display name
  5584.  
  5585. first_name string
  5586.  
  5587. contact first name
  5588.  
  5589. last_name string
  5590.  
  5591. contact last name
  5592.  
  5593. company string
  5594.  
  5595. contact company name
  5596.  
  5597. photo_url string
  5598.  
  5599. contact photo URL
  5600.  
  5601. NOTE the photo URL can be embedded (for instance “data:image/jpeg;base64,/9j/4AA [ … ]”)
  5602.  
  5603. last_update timestamp
  5604.  
  5605. contact last modification timestamp
  5606.  
  5607. notes string
  5608.  
  5609. contact last modification timestamp
  5610.  
  5611. addresses[] array of ContactAddress
  5612.  
  5613. list of contact postal addresses
  5614.  
  5615. emails[] array of ContactEmail
  5616.  
  5617. list of contact email addresses
  5618.  
  5619. numbers[] array of ContactNumber
  5620.  
  5621. list of contact phone numbers
  5622.  
  5623. urls[] array of ContactUrl
  5624.  
  5625. list of contact URL
  5626.  
  5627. Contact Number
  5628.  
  5629. Contact number have the following properties
  5630.  
  5631. ContactNumber
  5632.  
  5633. id int
  5634.  
  5635. address id
  5636.  
  5637. contact_id int
  5638.  
  5639. id of the related contact
  5640.  
  5641. type enum
  5642.  
  5643. Type of number
  5644.  
  5645. Type
  5646.  
  5647. Description
  5648.  
  5649. fixed
  5650.  
  5651. fixed phone
  5652.  
  5653. mobile
  5654.  
  5655. mobile phone
  5656.  
  5657. work
  5658.  
  5659. work
  5660.  
  5661. fax
  5662.  
  5663. fax
  5664.  
  5665. other
  5666.  
  5667. other
  5668.  
  5669. number string
  5670.  
  5671. is_default bool
  5672.  
  5673. is this number the preferred contact phone number
  5674.  
  5675. is_own bool
  5676.  
  5677. is this number the Freebox owner number
  5678.  
  5679. Contact Address
  5680.  
  5681. Contact address have the following properties
  5682.  
  5683. ContactAddress
  5684.  
  5685. id int
  5686.  
  5687. address id
  5688.  
  5689. contact_id int
  5690.  
  5691. id of the related contact
  5692.  
  5693. type enum
  5694.  
  5695. Type of email
  5696.  
  5697. Type
  5698.  
  5699. Description
  5700.  
  5701. home
  5702.  
  5703. home address
  5704.  
  5705. work
  5706.  
  5707. work address
  5708.  
  5709. other
  5710.  
  5711. other
  5712.  
  5713. number string
  5714.  
  5715. street string
  5716.  
  5717. street2 string
  5718.  
  5719. city string
  5720.  
  5721. zipcode string
  5722.  
  5723. country string
  5724.  
  5725. Contact Url
  5726.  
  5727. Contact URL have the following properties
  5728.  
  5729. ContactUrl
  5730.  
  5731. id int
  5732.  
  5733. address id
  5734.  
  5735. contact_id int
  5736.  
  5737. id of the related contact
  5738.  
  5739. type enum
  5740.  
  5741. Type of URL
  5742.  
  5743. Type
  5744.  
  5745. Description
  5746.  
  5747. profile
  5748.  
  5749. profile address
  5750.  
  5751. blog
  5752.  
  5753. blog address
  5754.  
  5755. site
  5756.  
  5757. website address
  5758.  
  5759. other
  5760.  
  5761. other
  5762.  
  5763. url string
  5764.  
  5765. URL address
  5766.  
  5767. Contact Email
  5768.  
  5769. Contact email have the following properties
  5770.  
  5771. ContactEmail
  5772.  
  5773. id int
  5774.  
  5775. address id
  5776.  
  5777. contact_id int
  5778.  
  5779. id of the related contact
  5780.  
  5781. type enum
  5782.  
  5783. Type of address
  5784.  
  5785. Type
  5786.  
  5787. Description
  5788.  
  5789. home
  5790.  
  5791. home address
  5792.  
  5793. work
  5794.  
  5795. work address
  5796.  
  5797. other
  5798.  
  5799. other
  5800.  
  5801. email string
  5802.  
  5803. email address
  5804.  
  5805. Contact API
  5806. Get a list of contacts
  5807.  
  5808. GET /api/v8/contact/
  5809.  
  5810. Returns the collection of all ContactEntry
  5811.  
  5812. Parameters
  5813.  
  5814. start (int) – Offset
  5815.  
  5816. limit (int) – Limit of contact to return (-1 means no limit)
  5817.  
  5818. group_id (int) – Return only the contacts that belong to this group
  5819.  
  5820. Example request:
  5821.  
  5822. GET /api/v8/contact/ HTTP/1.1
  5823. Host: mafreebox.freebox.fr
  5824.  
  5825. Example response:
  5826.  
  5827. HTTP/1.1 200 OK
  5828. Content-Type: application/json; charset=utf-8
  5829.  
  5830. {
  5831. "success": true,
  5832. "result": [
  5833. {
  5834. "last_name": "Niel",
  5835. "company": "Free",
  5836. "photo_url": "data:image/jpeg;base64,/9j/4AA [ ... ]",
  5837. "id": 2,
  5838. "birthday": "",
  5839. "last_update": 1363964483,
  5840. "display_name": "",
  5841. "emails": [
  5842. {
  5843. "id": 2,
  5844. "contact_id": 2,
  5845. "type": "home",
  5846. "email": "rocket@launchpad.free"
  5847. }
  5848. ],
  5849. "urls": [
  5850. {
  5851. "id": 1,
  5852. "contact_id": 2,
  5853. "url": "http://www.free.fr/",
  5854. "type": "site"
  5855. }
  5856. ],
  5857. "notes": "",
  5858. "first_name": "Xavier"
  5859. },
  5860.  
  5861. [ ... ],
  5862.  
  5863. {
  5864. "last_name": "Mamie",
  5865. "first_name": "Kipic",
  5866. "company": "",
  5867. "photo_url": "data:image/jpeg;base64,/9j/4A [ ... ] ",
  5868. "id": 1,
  5869. "birthday": "",
  5870. "numbers": [
  5871. {
  5872. "number": "0612345678",
  5873. "type": "fixed",
  5874. "id": 1,
  5875. "contact_id": 1,
  5876. "is_default": false,
  5877. "is_own": false
  5878. }
  5879. ],
  5880. "last_update": 1363973599,
  5881. "display_name": "Mamie",
  5882. "emails": [
  5883. {
  5884. "id": 1,
  5885. "contact_id": 1,
  5886. "type": "home",
  5887. "email": "mamie@example.org"
  5888. }
  5889. ],
  5890. "urls": [
  5891. {
  5892. "id": 3,
  5893. "contact_id": 1,
  5894. "url": "ftp://free.fr",
  5895. "type": "site"
  5896. }
  5897. ],
  5898. "addresses": [
  5899. {
  5900. "street2": "",
  5901. "type": "home",
  5902. "country": "France",
  5903. "id": 1,
  5904. "street": "8 rue du pont",
  5905. "contact_id": 1,
  5906. "city": "Paris",
  5907. "zipcode": "75008",
  5908. "number": "11"
  5909. }
  5910. ],
  5911. "notes": ""
  5912. }
  5913. }
  5914.  
  5915. Access a given contact entry
  5916.  
  5917. GET /api/v8/contact/{id}
  5918.  
  5919. Returns the ContactEntry with the given id
  5920.  
  5921. Example request:
  5922.  
  5923. GET /api/v8/contact/1 HTTP/1.1
  5924. Host: mafreebox.freebox.fr
  5925.  
  5926. Example response:
  5927.  
  5928. HTTP/1.1 200 OK
  5929. Content-Type: application/json; charset=utf-8
  5930.  
  5931. {
  5932. "success": true,
  5933. "result": {
  5934. "last_name": "Mamie",
  5935. "first_name": "Kipic",
  5936. "company": "",
  5937. "photo_url": "data:image/jpeg;base64,/9j/4A [ ... ] ",
  5938. "id": 1,
  5939. "birthday": "",
  5940. "numbers": [
  5941. {
  5942. "number": "0612345678",
  5943. "type": "fixed",
  5944. "id": 1,
  5945. "contact_id": 1,
  5946. "is_default": false,
  5947. "is_own": false
  5948. }
  5949. ],
  5950. "last_update": 1363973599,
  5951. "display_name": "Mamie",
  5952. "emails": [
  5953. {
  5954. "id": 1,
  5955. "contact_id": 1,
  5956. "type": "home",
  5957. "email": "mamie@example.org"
  5958. }
  5959. ],
  5960. "urls": [
  5961. {
  5962. "id": 3,
  5963. "contact_id": 1,
  5964. "url": "ftp://free.fr",
  5965. "type": "site"
  5966. }
  5967. ],
  5968. "addresses": [
  5969. {
  5970. "street2": "",
  5971. "type": "home",
  5972. "country": "France",
  5973. "id": 1,
  5974. "street": "8 rue du pont",
  5975. "contact_id": 1,
  5976. "city": "Paris",
  5977. "zipcode": "75008",
  5978. "number": "11"
  5979. }
  5980. ],
  5981. "notes": ""
  5982. }
  5983. }
  5984.  
  5985. Create a contact
  5986.  
  5987. POST /api/v8/contact/
  5988.  
  5989. Creates a new ContactEntry
  5990.  
  5991. Example request:
  5992.  
  5993. POST /api/v8/contact/ HTTP/1.1
  5994. Host: mafreebox.freebox.fr
  5995.  
  5996. {
  5997. "display_name": "Sandy Kilo",
  5998. "first_name": "Sandy",
  5999. "last_name":"Kilo"
  6000. }
  6001.  
  6002. Example response:
  6003.  
  6004. HTTP/1.1 200 OK
  6005. Content-Type: application/json; charset=utf-8
  6006.  
  6007. {
  6008. "success": true,
  6009. "result": {
  6010. "last_name": "Kilo",
  6011. "company": "",
  6012. "photo_url": "",
  6013. "id": 10,
  6014. "birthday": "",
  6015. "last_update": 1372433423,
  6016. "display_name": "Sandy Kilo",
  6017. "notes": "",
  6018. "first_name": "Sandy"
  6019. }
  6020. }
  6021.  
  6022. Delete a contact
  6023.  
  6024. DELETE /api/v8/contact/{id}
  6025.  
  6026. Deletes the ContactEntry with the given id.
  6027.  
  6028. Example request:
  6029.  
  6030. DELETE /api/v8/contact/1 HTTP/1.1
  6031. Host: mafreebox.freebox.fr
  6032.  
  6033. Example response:
  6034.  
  6035. HTTP/1.1 200 OK
  6036. Content-Type: application/json; charset=utf-8
  6037.  
  6038. {
  6039. "success": true
  6040. }
  6041.  
  6042. Update a contact entry
  6043.  
  6044. PUT /api/v8/contact/{id}
  6045.  
  6046. Updates the ContactEntry with the given id
  6047.  
  6048. Example request:
  6049.  
  6050. PUT /api/v8/contact/4 HTTP/1.1
  6051. Host: mafreebox.freebox.fr
  6052.  
  6053. {
  6054. "company": "Freebox"
  6055. }
  6056.  
  6057. Example response:
  6058.  
  6059. HTTP/1.1 200 OK
  6060. Content-Type: application/json; charset=utf-8
  6061.  
  6062. {
  6063. "success": true,
  6064. "result": {
  6065. "last_name": "Anderson",
  6066. "company": "Freebox",
  6067. "photo_url": "data:image/jpeg;base64,/9j/4AAQ [ ... ]",
  6068. "id": 4,
  6069. "birthday": "",
  6070. "last_update": 1363977825,
  6071. "display_name": "Thomas A. Anderson",
  6072. "emails": [
  6073. {
  6074. "id": 3,
  6075. "contact_id": 4,
  6076. "type": "home",
  6077. "email": "neo@matrix.com"
  6078. }
  6079. ],
  6080. "notes": "",
  6081. "first_name": "Thomas"
  6082. }
  6083. }
  6084.  
  6085. Contact Related objects API
  6086.  
  6087. Contact related entries such as phone numbers, addresses, URLs and emails are all handled the same way.
  6088.  
  6089. Below we’ll document the numbers API, you can use the same calls with addresses, URL and emails.
  6090. Get the list of numbers for a given contact
  6091.  
  6092. GET /api/v8/contact/{contact_id}/[numbers|addresses|urls|emails]/
  6093.  
  6094. Returns the collection of all ContactNumber for a given contact
  6095.  
  6096. Example request:
  6097.  
  6098. GET /api/v8/contact/4/numbers/ HTTP/1.1
  6099. Host: mafreebox.freebox.fr
  6100.  
  6101. Example response:
  6102.  
  6103. HTTP/1.1 200 OK
  6104. Content-Type: application/json; charset=utf-8
  6105.  
  6106. {
  6107. "success": true,
  6108. "result": [
  6109. {
  6110. "number": "+13374242",
  6111. "type": "fixed",
  6112. "id": 6,
  6113. "contact_id": 4,
  6114. "is_default": false,
  6115. "is_own": false
  6116. },
  6117. {
  6118. "number": "0611223344",
  6119. "type": "mobile",
  6120. "id": 5,
  6121. "contact_id": 4,
  6122. "is_default": false,
  6123. "is_own": false
  6124. }
  6125. ]
  6126. }
  6127.  
  6128. Access a given contact number
  6129.  
  6130. GET /api/v8/[number,address,url,email]/{id}
  6131.  
  6132. Returns the ContactNumber with the given id
  6133.  
  6134. Example request:
  6135.  
  6136. GET /api/v8/number/6 HTTP/1.1
  6137. Host: mafreebox.freebox.fr
  6138.  
  6139. Example response:
  6140.  
  6141. HTTP/1.1 200 OK
  6142. Content-Type: application/json; charset=utf-8
  6143.  
  6144. {
  6145. "success": true,
  6146. "result": {
  6147. "number": "+13374242",
  6148. "type": "fixed",
  6149. "id": 6,
  6150. "contact_id": 4,
  6151. "is_default": false,
  6152. "is_own": false
  6153. }
  6154. }
  6155.  
  6156. Create a contact number
  6157.  
  6158. POST /api/v8/[number,address,url,email]/
  6159.  
  6160. Creates the ContactNumber
  6161.  
  6162. Example request:
  6163.  
  6164. POST /api/v8/number/ HTTP/1.1
  6165. Host: mafreebox.freebox.fr
  6166.  
  6167. {
  6168. "contact_id":9,
  6169. "number":"0144456789",
  6170. "type":"fixed"
  6171. }
  6172.  
  6173. Example response:
  6174.  
  6175. HTTP/1.1 200 OK
  6176. Content-Type: application/json; charset=utf-8
  6177.  
  6178. {
  6179. "success": true,
  6180. "result": {
  6181. "number": "0144456789",
  6182. "type": "fixed",
  6183. "id": 18,
  6184. "contact_id": 9,
  6185. "is_default": false,
  6186. "is_own": false
  6187. }
  6188. }
  6189.  
  6190. Delete a contact number
  6191.  
  6192. DELETE /api/v8/[number,address,url,email]/{id}
  6193.  
  6194. Deletes the ContactNumber with the given id.
  6195.  
  6196. Example request:
  6197.  
  6198. DELETE /api/v8/number/6 HTTP/1.1
  6199. Host: mafreebox.freebox.fr
  6200.  
  6201. Example response:
  6202.  
  6203. HTTP/1.1 200 OK
  6204. Content-Type: application/json; charset=utf-8
  6205.  
  6206. {
  6207. "success": true
  6208. }
  6209.  
  6210. Update a contact number
  6211.  
  6212. PUT /api/v8/[number,address,url,email]/{id}
  6213.  
  6214. Updates the ContactNumber with the given id
  6215.  
  6216. Example request:
  6217.  
  6218. PUT /api/v8/number/5 HTTP/1.1
  6219. Host: mafreebox.freebox.fr
  6220.  
  6221. {
  6222. "number": "0655667788",
  6223. "type": "mobile"
  6224. }
  6225.  
  6226. Example response:
  6227.  
  6228. HTTP/1.1 200 OK
  6229. Content-Type: application/json; charset=utf-8
  6230.  
  6231. {
  6232. "success": true,
  6233. "result": {
  6234. "number": "0655667788",
  6235. "type": "mobile",
  6236. "id": 5,
  6237. "contact_id": 4,
  6238. "is_default": false,
  6239. "is_own": false
  6240. }
  6241. }
  6242.  
  6243. Configuration
  6244. Connection API
  6245.  
  6246. This API provides Freebox connection settings information.
  6247. Connection Errors
  6248.  
  6249. When attempting to access the file connection API, you may encounter the following errors:
  6250.  
  6251. error_code
  6252.  
  6253. Description
  6254.  
  6255. inval
  6256.  
  6257. invalid request
  6258.  
  6259. nodev
  6260.  
  6261. no device found with this name
  6262.  
  6263. noent
  6264.  
  6265. no entity found with this name
  6266.  
  6267. netdown
  6268.  
  6269. network is down
  6270.  
  6271. busy
  6272.  
  6273. device is busy
  6274.  
  6275. invalid_port
  6276.  
  6277. invalid port
  6278.  
  6279. insecure_password
  6280.  
  6281. the password is too weak to enable remote access
  6282.  
  6283. invalid_provider
  6284.  
  6285. invalid ddns provider name
  6286.  
  6287. invalid_next_hop
  6288.  
  6289. invalid next hop address (should be a link local address)
  6290. Connection status
  6291. Connection status object
  6292.  
  6293. ConnectionStatus
  6294.  
  6295. state enum Read-only
  6296.  
  6297. State
  6298.  
  6299. Description
  6300.  
  6301. going_up
  6302.  
  6303. connection is initializing
  6304.  
  6305. up
  6306.  
  6307. connection is active
  6308.  
  6309. going_down
  6310.  
  6311. connection is about to become inactive
  6312.  
  6313. down
  6314.  
  6315. connection is inactive
  6316.  
  6317. type enum Read-only
  6318.  
  6319. Type
  6320.  
  6321. Description
  6322.  
  6323. ethernet
  6324.  
  6325. FTTH/ethernet
  6326.  
  6327. rfc2684
  6328.  
  6329. xDSL (unbundled)
  6330.  
  6331. pppoatm
  6332.  
  6333. xDSL
  6334.  
  6335. media enum Read-only
  6336.  
  6337. Media
  6338.  
  6339. Description
  6340.  
  6341. ftth
  6342.  
  6343. FTTH
  6344.  
  6345. ethernet
  6346.  
  6347. ethernet
  6348.  
  6349. xdsl
  6350.  
  6351. xDSL
  6352.  
  6353. ipv4 string Read-only
  6354.  
  6355. Freebox IPv4 address
  6356.  
  6357. NOTE: this field is only available when connection state is up
  6358.  
  6359. ipv6 string Read-only
  6360.  
  6361. Freebox IPv6 address
  6362.  
  6363. NOTE: this field is only available when connection state is up
  6364.  
  6365. rate_up int Read-only
  6366.  
  6367. current upload rate in byte/s
  6368.  
  6369. rate_down int Read-only
  6370.  
  6371. current download rate in byte/s
  6372.  
  6373. bandwidth_up int Read-only
  6374.  
  6375. available upload bandwidth in bit/s
  6376.  
  6377. bandwidth_down int Read-only
  6378.  
  6379. available download bandwidth in bit/s
  6380.  
  6381. bytes_up int Read-only
  6382.  
  6383. total uploaded bytes since last connection
  6384.  
  6385. bytes_down int Read-only
  6386.  
  6387. total downloaded bytes since last connection
  6388.  
  6389. ipv4_port_range int[2] Read-only
  6390.  
  6391. Some customers share the same IPv4 and each customer is then assigned a port range. The first value is the first port of the assigned range and the second value is the last port (inclusive).
  6392.  
  6393. All PortForwardingConfig must use ports in this range to be effective.
  6394.  
  6395. Get the current Connection status
  6396.  
  6397. GET /api/v8/connection/
  6398.  
  6399. Returns the current ConnectionStatus
  6400.  
  6401. Example request:
  6402.  
  6403. GET /api/v8/connection/ HTTP/1.1
  6404. Host: mafreebox.freebox.fr
  6405.  
  6406. Example response:
  6407.  
  6408. HTTP/1.1 200 OK
  6409. Content-Type: application/json; charset=utf-8
  6410.  
  6411. {
  6412. "success": true,
  6413. "result": {
  6414. "type": "ethernet",
  6415. "rate_down": 61,
  6416. "bytes_up": 5489542,
  6417. "rate_up": 0,
  6418. "bandwidth_up": 100000000,
  6419. "ipv4": "13.37.42.42",
  6420. "ipv4_port_range": [
  6421. 0,
  6422. 65535
  6423. ],
  6424. "ipv6": "2a01:e30:d252:a2a0::1",
  6425. "bandwidth_down": 100000000,
  6426. "state": "up",
  6427. "bytes_down": 13332830,
  6428. "media": "ftth"
  6429. }
  6430. }
  6431.  
  6432. Connection configuration
  6433. Connection configuration object
  6434.  
  6435. ConnectionConfiguration
  6436.  
  6437. ping bool
  6438.  
  6439. should the Freebox respond to external ping requests
  6440.  
  6441. is_secure_pass bool Read-only
  6442.  
  6443. is the admin password secure enough to enable remote access
  6444.  
  6445. remote_access bool
  6446.  
  6447. enable/disable HTTP remote access
  6448.  
  6449. remote_access_port int
  6450.  
  6451. port number to use for remote HTTP access
  6452.  
  6453. remote_access_min_port int Read-only
  6454.  
  6455. This field indicate the minimum possible value for remote_access_port (see ConnectionStatus ipv4_port_range)
  6456.  
  6457. remote_access_max_port int Read-only
  6458.  
  6459. This field indicate the maximum possible value for remote_access_port (see ConnectionStatus ipv4_port_range)
  6460.  
  6461. remote_access_ip string Read-only
  6462.  
  6463. IPv4 to use for remote access (can be missing if connection is down)
  6464.  
  6465. api_remote_access bool Read-only
  6466.  
  6467. is remote access enabled for apps, or share link
  6468.  
  6469. wol bool
  6470.  
  6471. enable/disable Wake-on-lan proxy
  6472.  
  6473. adblock bool
  6474.  
  6475. is ads blocking feature enabled
  6476.  
  6477. adblock_not_set bool Read-only
  6478.  
  6479. if set to true adblock setting has never been set by the user
  6480.  
  6481. allow_token_request bool
  6482.  
  6483. if false, user has disabled new token request. New apps can’t request a new token. Apps that already have a token are still allowed
  6484.  
  6485. sip_alg enum
  6486.  
  6487. Status
  6488.  
  6489. Description
  6490.  
  6491. disabled
  6492.  
  6493. Fully disable SIP ALG
  6494.  
  6495. direct_media
  6496.  
  6497. Enable SIP ALG, RTP only allowed between SIP UA
  6498.  
  6499. any_media
  6500.  
  6501. Enable SIP ALG, RTP allowed between any host (dangerous for untrusted hosts)
  6502.  
  6503. Get the current Connection configuration
  6504.  
  6505. GET /api/v8/connection/config/
  6506.  
  6507. Returns the current ConnectionConfiguration
  6508.  
  6509. Example request:
  6510.  
  6511. GET /api/v8/connection/config/ HTTP/1.1
  6512. Host: mafreebox.freebox.fr
  6513.  
  6514. Example response:
  6515.  
  6516. HTTP/1.1 200 OK
  6517. Content-Type: application/json; charset=utf-8
  6518.  
  6519. {
  6520. "success": true,
  6521. "result": {
  6522. "ping": true,
  6523. "is_secure_pass": false,
  6524. "remote_access_port": 80,
  6525. "remote_access": false,
  6526. "wol": false,
  6527. "adblock": false,
  6528. "adblock_not_set": false,
  6529. "api_remote_access": true,
  6530. "allow_token_request": true,
  6531. "remote_access_ip": "312.13.37.42"
  6532. }
  6533. }
  6534.  
  6535. Update the Connection configuration
  6536.  
  6537. PUT /api/v8/connection/config/
  6538.  
  6539. Updates the ConnectionConfiguration
  6540.  
  6541. Example request:
  6542.  
  6543. PUT /api/v8/connection/config/ HTTP/1.1
  6544. Host: mafreebox.freebox.fr
  6545.  
  6546. {
  6547. "ping": true,
  6548. "wol": false
  6549. }
  6550.  
  6551. Example response:
  6552.  
  6553. HTTP/1.1 200 OK
  6554. Content-Type: application/json; charset=utf-8
  6555.  
  6556. {
  6557. "success": true,
  6558. "result": {
  6559. "ping": true,
  6560. "is_secure_pass": false,
  6561. "remote_access_port": 80,
  6562. "remote_access": false,
  6563. "wol": false,
  6564. "adblock": false,
  6565. "adblock_not_set": false,
  6566. "api_remote_access": true,
  6567. "allow_token_request": true,
  6568. "remote_access_ip": "312.13.37.42"
  6569. }
  6570. }
  6571.  
  6572. Connection IPv6 configuration
  6573. Connection IPv6 configuration object
  6574.  
  6575. ConnectionIpv6Delegation
  6576.  
  6577. prefix string
  6578.  
  6579. IPv6 prefix
  6580.  
  6581. next_hop ipv6
  6582.  
  6583. the next hop for the prefix
  6584.  
  6585. ConnectionIpv6Configuration
  6586.  
  6587. ipv6_enabled bool
  6588.  
  6589. is IPv6 enabled
  6590.  
  6591. ipv6_firewall bool
  6592.  
  6593. is IPv6 firewall enabled
  6594.  
  6595. ipv6ll string Read-only
  6596.  
  6597. Freebox IPv6 link local address
  6598.  
  6599. delegations ConnectionIpv6Delegation[8]
  6600.  
  6601. list of IPv6 delegations
  6602.  
  6603. Get the current IPv6 Connection configuration
  6604.  
  6605. GET /api/v8/connection/ipv6/config/
  6606.  
  6607. Returns the current ConnectionIpv6Configuration
  6608.  
  6609. Example request:
  6610.  
  6611. GET /api/v8/connection/ipv6/config/ HTTP/1.1
  6612. Host: mafreebox.freebox.fr
  6613.  
  6614. Example response:
  6615.  
  6616. HTTP/1.1 200 OK
  6617. Content-Type: application/json; charset=utf-8
  6618.  
  6619. {
  6620. "success": true,
  6621. "result": {
  6622. "ipv6_enabled": true,
  6623. "delegations": [
  6624. {
  6625. "prefix": "2a01:e30:d252:a2a0::/64",
  6626. "next_hop": ""
  6627. },
  6628. {
  6629. "prefix": "2a01:e30:d252:a2a1::/64",
  6630. "next_hop": ""
  6631. },
  6632. {
  6633. "prefix": "2a01:e30:d252:a2a2::/64",
  6634. "next_hop": ""
  6635. },
  6636. {
  6637. "prefix": "2a01:e30:d252:a2a3::/64",
  6638. "next_hop": ""
  6639. },
  6640. {
  6641. "prefix": "2a01:e30:d252:a2a4::/64",
  6642. "next_hop": ""
  6643. },
  6644. {
  6645. "prefix": "2a01:e30:d252:a2a5::/64",
  6646. "next_hop": ""
  6647. },
  6648. {
  6649. "prefix": "2a01:e30:d252:a2a6::/64",
  6650. "next_hop": ""
  6651. },
  6652. {
  6653. "prefix": "2a01:e30:d252:a2a7::/64",
  6654. "next_hop": ""
  6655. }
  6656. ]
  6657. }
  6658. }
  6659.  
  6660. Update the IPv6 Connection configuration
  6661.  
  6662. PUT /api/v8/connection/ipv6/config/
  6663.  
  6664. Updates the ConnectionIpv6Configuration
  6665.  
  6666. Example request:
  6667.  
  6668. PUT /api/v8/connection/config/ HTTP/1.1
  6669. Host: mafreebox.freebox.fr
  6670.  
  6671. {
  6672. "delegations": [
  6673. {
  6674. "prefix": "2a01:e30:d252:a2a2::/64",
  6675. "next_hop": "fe80::be30:5bff:feb5:fcc7"
  6676. }
  6677. ]
  6678. }
  6679.  
  6680. Example response:
  6681.  
  6682. HTTP/1.1 200 OK
  6683. Content-Type: application/json; charset=utf-8
  6684.  
  6685. {
  6686. "success": true,
  6687. "result": {
  6688. "ipv6_enabled": true,
  6689. "ipv6ll": "fe80::224:d4ff:acac:ecec",
  6690. "delegations": [
  6691. {
  6692. "prefix": "2a01:e30:d252:a2a0::/64",
  6693. "next_hop": ""
  6694. },
  6695. {
  6696. "prefix": "2a01:e30:d252:a2a1::/64",
  6697. "next_hop": ""
  6698. },
  6699. {
  6700. "prefix": "2a01:e30:d252:a2a2::/64",
  6701. "next_hop": "fe80::d252:5bff:feb5:fcc7"
  6702. },
  6703. {
  6704. "prefix": "2a01:e30:d252:a2a3::/64",
  6705. "next_hop": ""
  6706. },
  6707. {
  6708. "prefix": "2a01:e30:d252:a2a4::/64",
  6709. "next_hop": ""
  6710. },
  6711. {
  6712. "prefix": "2a01:e30:d252:a2a5::/64",
  6713. "next_hop": ""
  6714. },
  6715. {
  6716. "prefix": "2a01:e30:d252:a2a6::/64",
  6717. "next_hop": ""
  6718. },
  6719. {
  6720. "prefix": "2a01:e30:d252:a2a7::/64",
  6721. "next_hop": ""
  6722. }
  6723. ]
  6724. }
  6725. }
  6726.  
  6727. Connection xDSL status [UNSTABLE]
  6728. xDSL status object [UNSTABLE]
  6729.  
  6730. XdslStatus
  6731.  
  6732. status enum Read-only
  6733.  
  6734. Status
  6735.  
  6736. Description
  6737.  
  6738. down
  6739.  
  6740. unsynchronized
  6741.  
  6742. training
  6743.  
  6744. synchronizing step 1/4
  6745.  
  6746. started
  6747.  
  6748. synchronizing step 2/4
  6749.  
  6750. chan_analysis
  6751.  
  6752. synchronizing step 3/4
  6753.  
  6754. msg_exchange
  6755.  
  6756. synchronizing step 4/4
  6757.  
  6758. showtime
  6759.  
  6760. Ready
  6761.  
  6762. disabled
  6763.  
  6764. Disabled
  6765.  
  6766. protocol enum Read-only
  6767.  
  6768. Protocol
  6769.  
  6770. Description
  6771.  
  6772. t1413
  6773.  
  6774. T1.413
  6775.  
  6776. adsl1_a
  6777.  
  6778. ADSL
  6779.  
  6780. adsl2_a
  6781.  
  6782. ADSL2
  6783.  
  6784. adsl2plus_a
  6785.  
  6786. ADSL2+
  6787.  
  6788. readsl2
  6789.  
  6790. ReachDSL
  6791.  
  6792. adsl2_m
  6793.  
  6794. ADSL2 annex M
  6795.  
  6796. adsl2plus_m
  6797.  
  6798. ADSL2+ annex M
  6799.  
  6800. unknown
  6801.  
  6802. Unknown
  6803.  
  6804. modulation enum Read-only
  6805.  
  6806. Protocol
  6807.  
  6808. Description
  6809.  
  6810. adsl
  6811.  
  6812. ADSL
  6813.  
  6814. vdsl
  6815.  
  6816. VDSL
  6817.  
  6818. uptime int Read-only
  6819.  
  6820. uptime in seconds
  6821.  
  6822. xDSL stats object [UNSTABLE]
  6823.  
  6824. XdslStats
  6825.  
  6826. maxrate int Read-only
  6827.  
  6828. ATM max rate in kbit/s
  6829.  
  6830. rate int Read-only
  6831.  
  6832. ATM rate in kbit/s
  6833.  
  6834. snr int Read-only
  6835.  
  6836. in dB
  6837.  
  6838. attn int Read-only
  6839.  
  6840. in dB
  6841.  
  6842. snr_10 int Read-only
  6843.  
  6844. in dB/10
  6845.  
  6846. attn_10 int Read-only
  6847.  
  6848. in dB/10
  6849.  
  6850. fec int Read-only
  6851.  
  6852. crc int Read-only
  6853.  
  6854. hec int Read-only
  6855.  
  6856. es int Read-only
  6857.  
  6858. ses int Read-only
  6859.  
  6860. phyr bool Read-only
  6861.  
  6862. ginp bool Read-only
  6863.  
  6864. nitro bool Read-only
  6865.  
  6866. rxmt int Read-only
  6867.  
  6868. only available when phyr is on
  6869.  
  6870. rxmt_corr int Read-only
  6871.  
  6872. only available when phyr is on
  6873.  
  6874. rxmt_uncorr int Read-only
  6875.  
  6876. only available when phyr is on
  6877.  
  6878. rtx_tx int Read-only
  6879.  
  6880. only available when ginp is on
  6881.  
  6882. rtx_c int Read-only
  6883.  
  6884. only available when ginp is on
  6885.  
  6886. rtx_uc int Read-only
  6887.  
  6888. only available when ginp is on
  6889.  
  6890. xDSL infos object [UNSTABLE]
  6891.  
  6892. XdslInfos
  6893.  
  6894. status XdslStatus
  6895.  
  6896. down XdslStats
  6897.  
  6898. up XdslStats
  6899.  
  6900. Get the current xDSL infos
  6901.  
  6902. GET /api/v8/connection/xdsl/
  6903.  
  6904. Returns the current XdslInfos
  6905.  
  6906. Example request:
  6907.  
  6908. GET /api/v8/connection/xdsl/ HTTP/1.1
  6909. Host: mafreebox.freebox.fr
  6910.  
  6911. Example response:
  6912.  
  6913. HTTP/1.1 200 OK
  6914. Content-Type: application/json; charset=utf-8
  6915.  
  6916. {
  6917. "success": true,
  6918. "result": {
  6919. "status": {
  6920. "status": "showtime",
  6921. "protocol": "adsl2plus_a",
  6922. "uptime": 5017,
  6923. "modulation": "adsl"
  6924. },
  6925. "down": {
  6926. "es": 43,
  6927. "phyr": true,
  6928. "attn": 0,
  6929. "snr": 7,
  6930. "nitro": true,
  6931. "rate": 28031,
  6932. "hec": 0,
  6933. "crc": 0,
  6934. "rxmt_uncorr": 0,
  6935. "rxmt_corr": 0,
  6936. "ses": 43,
  6937. "fec": 0,
  6938. "maxrate": 30636,
  6939. "rxmt": 0
  6940. },
  6941. "up": {
  6942. "es": 0,
  6943. "phyr": false,
  6944. "attn": 23,
  6945. "snr": 15,
  6946. "nitro": true,
  6947. "rate": 1022,
  6948. "hec": 0,
  6949. "crc": 0,
  6950. "rxmt_uncorr": 0,
  6951. "rxmt_corr": 0,
  6952. "ses": 0,
  6953. "fec": 0,
  6954. "maxrate": 1022,
  6955. "rxmt": 0
  6956. }
  6957. }
  6958.  
  6959. }
  6960.  
  6961. LTE radio band object
  6962.  
  6963. LteRadioBand
  6964.  
  6965. enabled bool
  6966.  
  6967. bandwidth int
  6968.  
  6969. rsrq int
  6970.  
  6971. rsrp int
  6972.  
  6973. rssi int
  6974.  
  6975. band int
  6976.  
  6977. pci i
  6978.  
  6979. LTE radio object
  6980.  
  6981. LteRadio
  6982.  
  6983. associated bool
  6984.  
  6985. plmn int
  6986.  
  6987. signal_level int
  6988.  
  6989. gcid string
  6990.  
  6991. bands [ro]
  6992.  
  6993. ue_active bool
  6994.  
  6995. LTE network object
  6996.  
  6997. LteNetwork
  6998.  
  6999. pdn_up bool
  7000.  
  7001. has_ipv6 bool
  7002.  
  7003. ipv6_dns string
  7004.  
  7005. ipv6 string
  7006.  
  7007. ipv6_netmask string
  7008.  
  7009. has_ipv4 bool
  7010.  
  7011. ipv4_dns string
  7012.  
  7013. ipv4 string
  7014.  
  7015. ipv4_netmask string
  7016.  
  7017. LTE sim object
  7018.  
  7019. LteSim
  7020.  
  7021. present bool
  7022.  
  7023. pin_locked bool
  7024.  
  7025. puk_remaining int
  7026.  
  7027. iccid string
  7028.  
  7029. puk_locked bool
  7030.  
  7031. pin_remaining int
  7032.  
  7033. LTE tunnel details object
  7034.  
  7035. LteTunnelDetails
  7036.  
  7037. connected bool
  7038.  
  7039. last_error string
  7040.  
  7041. tx_flows_rate int
  7042.  
  7043. tx_max_rate int
  7044.  
  7045. tx_used_rate int
  7046.  
  7047. rx_flows_rate int
  7048.  
  7049. rx_max_rate int
  7050.  
  7051. rx_used_rate int
  7052.  
  7053. LTE tunnel object
  7054.  
  7055. LteTunnel
  7056.  
  7057. lte LteTunnelDetails
  7058.  
  7059. xdsl LteTunnelDetails
  7060.  
  7061. LTE configuration object
  7062.  
  7063. LteConfiguration
  7064.  
  7065. enabled bool
  7066.  
  7067. radio LteRadio
  7068.  
  7069. state string
  7070.  
  7071. network LteNetwork
  7072.  
  7073. fsm_state string
  7074.  
  7075. sim LteSim
  7076.  
  7077. tunnel LteTunnelDetails
  7078.  
  7079. Get the current LTE infos
  7080.  
  7081. GET /api/v8/connection/lte/config
  7082.  
  7083. Returns the current LteConfiguration
  7084.  
  7085. Example request:
  7086.  
  7087. GET /api/v8/connection/lte/config HTTP/1.1
  7088. Host: mafreebox.freebox.fr
  7089.  
  7090. Example response:
  7091.  
  7092. HTTP/1.1 200 OK
  7093. Content-Type: application/json; charset=utf-8
  7094.  
  7095. {
  7096. "success": true,
  7097. "result": {
  7098. "enabled": true,
  7099. "radio": {
  7100. "associated": true,
  7101. "plmn": 20202,
  7102. "signal_level": 5,
  7103. "gcid": "202020202020",
  7104. "bands": [],
  7105. "ue_active": false
  7106. },
  7107. "state": "connected",
  7108. "network": {
  7109. "ipv6_dns": "",
  7110. "ipv6": "2a2a:e0e:beeb:eded::1",
  7111. "ipv4_netmask": "0.0.0.0",
  7112. "has_ipv6": true,
  7113. "ipv4_dns": "0.0.0.0",
  7114. "has_ipv4": alse,
  7115. "pdn_up": true,
  7116. "ipv6_netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ff00",
  7117. "ipv4": "0.0.0.0"
  7118. },
  7119. "fsm_state": "poll_network",
  7120. "sim": {
  7121. "present": true,
  7122. "pin_locked": alse,
  7123. "puk_remaining": 10,
  7124. "iccid": "1234567890123456789",
  7125. "puk_locked":f alse,
  7126. "pin_remaining": 3
  7127. },
  7128. "tunnel": {
  7129. "lte": {
  7130. "tx_flows_rate": 0,
  7131. "connected": true,
  7132. "last_error": "no_error",
  7133. "rx_flows_rate": 0,
  7134. "tx_max_rate": 0,
  7135. "tx_used_rate": 0,
  7136. "rx_max_rate": 0,
  7137. "rx_used_rate": 0
  7138. }
  7139. "xdsl": {
  7140. "tx_flows_rate": 2187,
  7141. "connected": true,
  7142. "last_error": "no_error",
  7143. "rx_flows_rate": 244,
  7144. "tx_max_rate": 4428750,
  7145. "tx_used_rate": 2757,
  7146. "rx_max_rate": 12502000,
  7147. "rx_used_rate": 644
  7148. }
  7149. }
  7150. }
  7151. }
  7152.  
  7153. Update the current LTE configuration
  7154.  
  7155. PUT /api/v8/connection/lte/config/
  7156.  
  7157. Updates the LteConfiguration
  7158.  
  7159. Example request:
  7160.  
  7161. PUT /api/v8/connection/lte/config/ HTTP/1.1
  7162. Host: mafreebox.freebox.fr
  7163.  
  7164. {
  7165. "enabled": true
  7166. }
  7167.  
  7168. Connection FTTH status [UNSTABLE]
  7169. FTTH status object [UNSTABLE]
  7170.  
  7171. FtthStatus
  7172.  
  7173. sfp_present boolean Read-only
  7174.  
  7175. sfp_alim_ok boolean Read-only
  7176.  
  7177. sfp_has_power_report boolean Read-only
  7178.  
  7179. sfp_has_signal boolean Read-only
  7180.  
  7181. link boolean Read-only
  7182.  
  7183. sfp_serial string Read-only
  7184.  
  7185. sfp_model string Read-only
  7186.  
  7187. sfp_vendor string Read-only
  7188.  
  7189. sfp_vendor string Read-only
  7190.  
  7191. sfp_pwr_tx int Read-only
  7192.  
  7193. scaled by 100 (in dBm)
  7194.  
  7195. sfp_pwr_rx int Read-only
  7196.  
  7197. scaled by 100 (in dBm)
  7198.  
  7199. Get the current FTTH status
  7200.  
  7201. GET /api/v8/connection/ftth/
  7202.  
  7203. Returns the current FtthStatus
  7204.  
  7205. Example request:
  7206.  
  7207. GET /api/v8/connection/ftth/ HTTP/1.1
  7208. Host: mafreebox.freebox.fr
  7209.  
  7210. Example response:
  7211.  
  7212. HTTP/1.1 200 OK
  7213. Content-Type: application/json; charset=utf-8
  7214.  
  7215. {
  7216. "success": true,
  7217. "result": {
  7218. "sfp_has_power_report": true,
  7219. "sfp_has_signal": false,
  7220. "sfp_model": "SPBD-1250E4H2RDB",
  7221. "sfp_vendor": "DELTA",
  7222. "sfp_pwr_tx": -1172,
  7223. "sfp_pwr_rx": -3698,
  7224. "link": false,
  7225. "sfp_alim_ok": true,
  7226. "sfp_serial": "DE104900000471",
  7227. "sfp_present": true
  7228. }
  7229. }
  7230.  
  7231. Connection DynDNS status
  7232. DynDnsProvider status object
  7233.  
  7234. DDNSStatus
  7235.  
  7236. status enum
  7237.  
  7238. Status
  7239.  
  7240. Description
  7241.  
  7242. disabled
  7243.  
  7244. Disabled
  7245.  
  7246. ok
  7247.  
  7248. Ok
  7249.  
  7250. wait
  7251.  
  7252. Updating
  7253.  
  7254. reqfail
  7255.  
  7256. Request failed
  7257.  
  7258. authfail
  7259.  
  7260. Authentication error
  7261.  
  7262. nocredential
  7263.  
  7264. Invalid credential
  7265.  
  7266. ipinval
  7267.  
  7268. Invalid IP
  7269.  
  7270. hostinval
  7271.  
  7272. Invalid hostname
  7273.  
  7274. abuse
  7275.  
  7276. Blocked because of abuse
  7277.  
  7278. dnserror
  7279.  
  7280. DNS error
  7281.  
  7282. unavailable
  7283.  
  7284. Service unavailable
  7285.  
  7286. nowan
  7287.  
  7288. Unable to get wan IP
  7289.  
  7290. unknown
  7291.  
  7292. Unknown
  7293.  
  7294. next_refresh int
  7295.  
  7296. next refresh timestamp
  7297.  
  7298. last_refresh int
  7299.  
  7300. last refresh timestamp
  7301.  
  7302. next_retry int
  7303.  
  7304. next retry timestamp
  7305.  
  7306. last_error int
  7307.  
  7308. last error timestamp
  7309.  
  7310. Get the status of a DynDNS service
  7311.  
  7312. Right now the supported dynamic dns providers are:
  7313.  
  7314. ovh
  7315.  
  7316. dyndns
  7317.  
  7318. noip
  7319.  
  7320. GET /api/v8/connection/ddns/{provider}/status/
  7321.  
  7322. Returns the current DDNSStatus
  7323.  
  7324. Example request:
  7325.  
  7326. GET /api/v8/connection/ddns/dyndns/status/ HTTP/1.1
  7327. Host: mafreebox.freebox.fr
  7328.  
  7329. Example response:
  7330.  
  7331. HTTP/1.1 200 OK
  7332. Content-Type: application/json; charset=utf-8
  7333.  
  7334. {
  7335.  
  7336. "success": true,
  7337. "result": {
  7338. "last_error": 1354127350,
  7339. "status": "hostinval",
  7340. "next_refresh": 0,
  7341. "last_refresh": 0,
  7342. "next_retry": 0
  7343. }
  7344.  
  7345. }
  7346.  
  7347. Connection DynDNS configuration
  7348. DynDns config object
  7349.  
  7350. DDNSConfig
  7351.  
  7352. enabled bool
  7353.  
  7354. hostname string
  7355.  
  7356. dns name to use to register
  7357.  
  7358. password string Write-only
  7359.  
  7360. password to use to register
  7361.  
  7362. user string
  7363.  
  7364. username to use to register
  7365.  
  7366. Get the config of a DynDNS service
  7367.  
  7368. GET /api/v8/connection/ddns/{provider}/
  7369.  
  7370. Returns the current DDNSConfig
  7371.  
  7372. Example request:
  7373.  
  7374. GET /api/v8/connection/ddns/dyndns/ HTTP/1.1
  7375. Host: mafreebox.freebox.fr
  7376.  
  7377. Example response:
  7378.  
  7379. HTTP/1.1 200 OK
  7380. Content-Type: application/json; charset=utf-8
  7381.  
  7382. {
  7383.  
  7384. "success": true,
  7385. "result": {
  7386. "enabled": true,
  7387. "hostname": "test",
  7388. "user": "test"
  7389. }
  7390.  
  7391. }
  7392.  
  7393. Set the config of a DynDNS service
  7394.  
  7395. PUT /api/v8/connection/ddns/{provider}/
  7396.  
  7397. Set the DDNSConfig
  7398.  
  7399. Example request:
  7400.  
  7401. PUT /api/v8/connection/ddns/dyndns/ HTTP/1.1
  7402. Host: mafreebox.freebox.fr
  7403.  
  7404. {
  7405. "enabled": false,
  7406. "user": "test",
  7407. "password": "ssss",
  7408. "hostname": "ttt"
  7409. }
  7410.  
  7411. Example response:
  7412.  
  7413. HTTP/1.1 200 OK
  7414. Content-Type: application/json; charset=utf-8
  7415.  
  7416. {
  7417.  
  7418. "success": true,
  7419. "result": {
  7420. "enabled": false,
  7421. "hostname": "ttt",
  7422. "user": "test"
  7423. }
  7424.  
  7425. }
  7426.  
  7427. Lan
  7428.  
  7429. With the LAN API you get information and modify the Freebox Server network configuration.
  7430. Lan Errors
  7431.  
  7432. When attempting to access the LAN API, you may encounter the following errors:
  7433.  
  7434. error_code
  7435.  
  7436. Description
  7437.  
  7438. noent
  7439.  
  7440. Invalid id
  7441.  
  7442. internal_error
  7443.  
  7444. Internal error
  7445.  
  7446. ioerror
  7447.  
  7448. Internal error
  7449.  
  7450. inval
  7451.  
  7452. Invalid parameter
  7453.  
  7454. inval_gateway_ip
  7455.  
  7456. Invalid Gateway IP
  7457. Lan Config
  7458.  
  7459. Lan config has the following attributes:
  7460.  
  7461. LanConfig
  7462.  
  7463. ip string
  7464.  
  7465. Freebox Server IPv4 address
  7466.  
  7467. name string
  7468.  
  7469. Freebox Server name
  7470.  
  7471. name_dns string
  7472.  
  7473. Freebox Server DNS name
  7474.  
  7475. name_mdns string
  7476.  
  7477. Freebox Server mDNS name
  7478.  
  7479. name_netbios string
  7480.  
  7481. Freebox Server netbios name
  7482.  
  7483. type enum
  7484.  
  7485. The valid LAN modes are:
  7486.  
  7487. Type
  7488.  
  7489. Description
  7490.  
  7491. router
  7492.  
  7493. The Freebox acts as a network router
  7494.  
  7495. bridge
  7496.  
  7497. The Freebox acts as a network bridge
  7498.  
  7499. NOTE: in bridge mode, most of Freebox services are disabled. It is recommended to use the router mode, and third party apps should not change this setting
  7500.  
  7501. Lan Config API
  7502. Get the current Lan configuration
  7503.  
  7504. GET /api/v8/lan/config/
  7505.  
  7506. Returns the current LanConfig
  7507.  
  7508. Example request:
  7509.  
  7510. GET /api/v8/lan/config/ HTTP/1.1
  7511. Host: mafreebox.freebox.fr
  7512.  
  7513. Example response:
  7514.  
  7515. HTTP/1.1 200 OK
  7516. Content-Type: application/json; charset=utf-8
  7517.  
  7518. {
  7519. "success": true,
  7520. "result": {
  7521. "name_dns": "freebox-r0ro",
  7522. "name_mdns": "Freebox-r0ro",
  7523. "name": "Freebox r0ro",
  7524. "mode": "router",
  7525. "name_netbios": "Freebox_r0ro",
  7526. "ip": "192.168.1.254"
  7527. }
  7528. }
  7529.  
  7530. Update the current Lan configuration
  7531.  
  7532. PUT /api/v8/lan/config/
  7533.  
  7534. Update the current LanConfig
  7535.  
  7536. Example request:
  7537.  
  7538. PUT /api/v8/lan/config/ HTTP/1.1
  7539. Host: mafreebox.freebox.fr
  7540.  
  7541. {
  7542. "mode":"router",
  7543. "ip":"192.168.69.254",
  7544. "name":"Freebox de r0ro",
  7545. "name_dns":"freebox-de-r0ro",
  7546. "name_mdns":"Freebox-de-r0ro",
  7547. "name_netbios":"Freebox_de_r0ro"
  7548. }
  7549.  
  7550. Example response:
  7551.  
  7552. HTTP/1.1 200 OK
  7553. Content-Type: application/json; charset=utf-8
  7554.  
  7555. {
  7556. "success":true,
  7557. "result": {
  7558. "name_dns":"freebox-de-r0ro",
  7559. "name_mdns":"Freebox-de-r0ro",
  7560. "name":"Freebox de r0ro",
  7561. "mode":"router",
  7562. "name_netbios":"Freebox_de_r0ro",
  7563. "ip":"192.168.69.254"
  7564. }
  7565. }
  7566.  
  7567. Lan Browser
  7568.  
  7569. With the LAN browser API you get information on hosts on the Freebox Server local network.
  7570. Errors
  7571.  
  7572. When attempting to access the LAN browser API, you may encounter the following errors:
  7573.  
  7574. error_code
  7575.  
  7576. Description
  7577.  
  7578. inval
  7579.  
  7580. Invalid parameter
  7581.  
  7582. nodev
  7583.  
  7584. Invalid interface
  7585.  
  7586. nohost
  7587.  
  7588. Invalid host id
  7589.  
  7590. nomem
  7591.  
  7592. Internal error
  7593.  
  7594. netdown
  7595.  
  7596. Network is down
  7597. Lan Browser API
  7598.  
  7599. Lan browser API allow you to discover hosts on the local network
  7600. Getting the list of browsable LAN interfaces
  7601.  
  7602. GET /api/v8/lan/browser/interfaces/
  7603.  
  7604. Example request:
  7605.  
  7606. GET /api/v8/lan/browser/interfaces/ HTTP/1.1
  7607. Host: mafreebox.freebox.fr
  7608.  
  7609. Example response:
  7610.  
  7611. HTTP/1.1 200 OK
  7612. Content-Type: application/json; charset=utf-8
  7613.  
  7614. {
  7615. success: true,
  7616. result: [
  7617. {
  7618. name: "pub",
  7619. host_count: 3
  7620. }
  7621. ]
  7622. }
  7623.  
  7624. Lan Host object
  7625.  
  7626. Lan Host has the following attributes:
  7627.  
  7628. LanHost
  7629.  
  7630. id string Read-only
  7631.  
  7632. Host id (unique on this interface)
  7633.  
  7634. primary_name string
  7635.  
  7636. Host primary name (chosen from the list of available names, or manually set by user)
  7637.  
  7638. host_type enum
  7639.  
  7640. When possible, the Freebox will try to guess the host_type, but you can manually override this to the correct value
  7641.  
  7642. Possible values are:
  7643.  
  7644. source
  7645.  
  7646. Description
  7647.  
  7648. workstation
  7649.  
  7650. Workstation
  7651.  
  7652. laptop
  7653.  
  7654. Laptop
  7655.  
  7656. smartphone
  7657.  
  7658. Smartphone
  7659.  
  7660. tablet
  7661.  
  7662. Tablet
  7663.  
  7664. printer
  7665.  
  7666. Printer
  7667.  
  7668. vg_console
  7669.  
  7670. Video game console
  7671.  
  7672. television
  7673.  
  7674. TV
  7675.  
  7676. nas
  7677.  
  7678. Nas
  7679.  
  7680. ip_camera
  7681.  
  7682. IP Camera
  7683.  
  7684. ip_phone
  7685.  
  7686. IP Phone
  7687.  
  7688. freebox_player
  7689.  
  7690. Freebox Player
  7691.  
  7692. freebox_hd
  7693.  
  7694. Freebox HD
  7695.  
  7696. freebox_crystal
  7697.  
  7698. Freebox Crystal
  7699.  
  7700. freebox_mini
  7701.  
  7702. Freebox Mini 4k
  7703.  
  7704. freebox_delta
  7705.  
  7706. Freebox Delta
  7707.  
  7708. freebox_one
  7709.  
  7710. Freebox One
  7711.  
  7712. freebox_wifi
  7713.  
  7714. Freebox Wi-Fi Pop
  7715.  
  7716. freebox_pop
  7717.  
  7718. Freebox Pop
  7719.  
  7720. networking_device
  7721.  
  7722. Networking device
  7723.  
  7724. multimedia_device
  7725.  
  7726. Multimedia device
  7727.  
  7728. car
  7729.  
  7730. Connected car
  7731.  
  7732. other
  7733.  
  7734. Other
  7735.  
  7736. primary_name_manual bool Read-only
  7737.  
  7738. If true the primary name has been set manually
  7739.  
  7740. l2ident[] array of LanHostL2Ident Read-only
  7741.  
  7742. Layer 2 network id and its type
  7743.  
  7744. vendor_name string Read-only
  7745.  
  7746. Host vendor name (from the mac address)
  7747.  
  7748. persistent bool
  7749.  
  7750. If true the host is always shown even if it has not been active since the Freebox startup
  7751.  
  7752. reachable bool Read-only
  7753.  
  7754. If true the host can receive traffic from the Freebox
  7755.  
  7756. last_time_reachable timestamp Read-only
  7757.  
  7758. Last time the host was reached
  7759.  
  7760. active bool Read-only
  7761.  
  7762. If true the host sends traffic to the Freebox
  7763.  
  7764. last_activity timestamp Read-only
  7765.  
  7766. Last time the host sent traffic
  7767.  
  7768. first_activity timestamp Read-only
  7769.  
  7770. First time the host sent traffic, or 0 (Unix Epoch) if it wasn’t seen before this field was added.
  7771.  
  7772. names[] array of LanHostName Read-only
  7773.  
  7774. List of available names, and their source
  7775.  
  7776. l3connectivities[] array of LanHostL3Connectivity Read-only
  7777.  
  7778. List of available layer 3 network connections
  7779.  
  7780. network_control LanHostNetworkControl Read-only
  7781.  
  7782. If device is associated with a profile, contains profile summary.
  7783.  
  7784. LanHostName
  7785.  
  7786. name string Read-only
  7787.  
  7788. Host name
  7789.  
  7790. source enum Read-only
  7791.  
  7792. source of the name
  7793.  
  7794. LanHostL2Ident
  7795.  
  7796. id string Read-only
  7797.  
  7798. Layer 2 id
  7799.  
  7800. type string Read-only
  7801.  
  7802. Type of layer 2 address
  7803.  
  7804. source
  7805.  
  7806. Description
  7807.  
  7808. dhcp
  7809.  
  7810. DHCP
  7811.  
  7812. netbios
  7813.  
  7814. Netbios
  7815.  
  7816. mdns
  7817.  
  7818. mDNS hostname
  7819.  
  7820. mdns_srv
  7821.  
  7822. mDNS service
  7823.  
  7824. upnp
  7825.  
  7826. UPnP
  7827.  
  7828. wsd
  7829.  
  7830. WS-Discovery
  7831.  
  7832. LanHostL3Connectivity
  7833.  
  7834. addr string Read-only
  7835.  
  7836. Layer 3 address
  7837.  
  7838. af enum Read-only
  7839.  
  7840. af
  7841.  
  7842. Description
  7843.  
  7844. ipv4
  7845.  
  7846. IPv4
  7847.  
  7848. ipv6
  7849.  
  7850. IPv6
  7851.  
  7852. active bool Read-only
  7853.  
  7854. is the connection active
  7855.  
  7856. reachable bool Read-only
  7857.  
  7858. is the connection reachable
  7859.  
  7860. last_activity timestamp Read-only
  7861.  
  7862. last activity timestamp
  7863.  
  7864. last_time_reachable timestamp Read-only
  7865.  
  7866. last reachable timestamp
  7867.  
  7868. model string Read-only
  7869.  
  7870. device model if known
  7871.  
  7872. LanHostNetworkControl
  7873.  
  7874. profile_id int Read-only
  7875.  
  7876. Id of profile this device is associated with.
  7877.  
  7878. name string Read-only
  7879.  
  7880. Name of profile this device is associated with.
  7881.  
  7882. current_mode enum Read-only
  7883.  
  7884. Mode described in Network Control Object
  7885.  
  7886. Getting the list of hosts on a given interface
  7887.  
  7888. GET /api/v8/lan/browser/{interface}/
  7889.  
  7890. Returns the list of LanHost on this interface
  7891.  
  7892. Example request:
  7893.  
  7894. GET /api/v8/lan/browser/pub/ HTTP/1.1
  7895. Host: mafreebox.freebox.fr
  7896.  
  7897. Example response:
  7898.  
  7899. HTTP/1.1 200 OK
  7900. Content-Type: application/json; charset=utf-8
  7901.  
  7902. {
  7903. "success": true,
  7904. "result": [
  7905. {
  7906. "l2ident": {
  7907. "id": "d0:23:db:36:15:aa",
  7908. "type": "mac_address"
  7909. },
  7910. "active": true,
  7911. "id": "ether-d0:23:db:36:15:aa",
  7912. "last_time_reachable": 1360669498,
  7913. "persistent": true,
  7914. "names": [
  7915. {
  7916. "name": "iPhone-r0ro",
  7917. "source": "dhcp"
  7918. }
  7919. ],
  7920. "vendor_name": "Apple, Inc.",
  7921. "l3connectivities": [
  7922. {
  7923. "addr": "192.168.69.20",
  7924. "active": true,
  7925. "af": "ipv4",
  7926. "reachable": true,
  7927. "last_activity": 1360669498,
  7928. "last_time_reachable": 1360669498
  7929. }
  7930. ],
  7931. "reachable": true,
  7932. "last_activity": 1360669498,
  7933. "primary_name_manual": true,
  7934. "primary_name": "iPhone r0ro"
  7935. },
  7936. {
  7937. "l2ident": {
  7938. "id": "00:24:d4:7e:00:4c",
  7939. "type": "mac_address"
  7940. },
  7941. "active": true,
  7942. "id": "ether-00:24:d4:7e:00:4c",
  7943. "last_time_reachable": 1360669491,
  7944. "persistent": false,
  7945. "names": [
  7946. {
  7947. "name": "Freebox Player",
  7948. "source": "dhcp"
  7949. }
  7950. ],
  7951. "vendor_name": "FREEBOX SA",
  7952. "l3connectivities": [
  7953. {
  7954. "addr": "192.168.69.30",
  7955. "active": true,
  7956. "af": "ipv4",
  7957. "reachable": true,
  7958. "last_activity": 1360669491,
  7959. "last_time_reachable": 1360669491
  7960. }
  7961. ],
  7962. "reachable": true,
  7963. "last_activity": 1360669491,
  7964. "primary_name_manual": false,
  7965. "primary_name": "Freebox Player"
  7966. }
  7967. ]
  7968. }
  7969.  
  7970. Getting an host information
  7971.  
  7972. GET /api/v8/lan/browser/{interface}/{hostid}/
  7973.  
  7974. Returns the requested LanHost properties
  7975.  
  7976. Example request:
  7977.  
  7978. GET /api/v8/lan/browser/pub/ether-00:24:d4:7e:00:4c/ HTTP/1.1
  7979. Host: mafreebox.freebox.fr
  7980.  
  7981. Example response:
  7982.  
  7983. HTTP/1.1 200 OK
  7984. Content-Type: application/json; charset=utf-8
  7985.  
  7986. {
  7987. "success": true,
  7988. "result": {
  7989. "l2ident": {
  7990. "id": "00:24:d4:7e:00:4c",
  7991. "type": "mac_address"
  7992. },
  7993. "active": true,
  7994. "id": "ether-00:24:d4:7e:00:4c",
  7995. "last_time_reachable": 1360669611,
  7996. "persistent": false,
  7997. "names": [
  7998. {
  7999. "name": "Freebox Player",
  8000. "source": "dhcp"
  8001. }
  8002. ],
  8003. "vendor_name": "FREEBOX SA",
  8004. "l3connectivities": [
  8005. {
  8006. "addr": "192.168.69.30",
  8007. "active": true,
  8008. "af": "ipv4",
  8009. "reachable": true,
  8010. "last_activity": 1360669611,
  8011. "last_time_reachable": 1360669611
  8012. }
  8013. ],
  8014. "reachable": true,
  8015. "last_activity": 1360669611,
  8016. "primary_name_manual": false,
  8017. "primary_name": "Freebox Player"
  8018. }
  8019. }
  8020.  
  8021. Updating an host information
  8022.  
  8023. PUT /api/v8/lan/browser/{interface}/{hostid}/
  8024.  
  8025. Update a LanHost properties
  8026.  
  8027. Example request:
  8028.  
  8029. PUT /api/v8/lan/browser/pub/ether-00:24:d4:7e:00:4c/ HTTP/1.1
  8030. Host: mafreebox.freebox.fr
  8031.  
  8032. {
  8033. "id":"ether-00:24:d4:7e:00:4c",
  8034. "primary_name":"Freebox Tv"
  8035. }
  8036.  
  8037. Example response:
  8038.  
  8039. HTTP/1.1 200 OK
  8040. Content-Type: application/json; charset=utf-8
  8041.  
  8042. {
  8043. "success": true,
  8044. "result": {
  8045. "l2ident": {
  8046. "id": "00:24:d4:7e:00:4c",
  8047. "type": "mac_address"
  8048. },
  8049. "active": true,
  8050. "id": "ether-00:24:d4:7e:00:4c",
  8051. "last_time_reachable": 1360669851,
  8052. "persistent": true,
  8053. "names": [
  8054. {
  8055. "name": "Freebox Player",
  8056. "source": "dhcp"
  8057. }
  8058. ],
  8059. "vendor_name": "FREEBOX SA",
  8060. "l3connectivities": [
  8061. {
  8062. "addr": "192.168.69.30",
  8063. "active": true,
  8064. "af": "ipv4",
  8065. "reachable": true,
  8066. "last_activity": 1360669851,
  8067. "last_time_reachable": 1360669851
  8068. }
  8069. ],
  8070. "reachable": true,
  8071. "last_activity": 1360669851,
  8072. "primary_name_manual": true,
  8073. "primary_name": "Freebox Tv"
  8074. }
  8075. }
  8076.  
  8077. Wake on LAN
  8078. Send Wake ok Lan packet to an host
  8079.  
  8080. POST /api/v8/lan/wol/{interface}/
  8081.  
  8082. Send a wake on LAN packet to the specified host with an optional password
  8083.  
  8084. Example request:
  8085.  
  8086. POST /api/v8/lan/wol/pub/ HTTP/1.1
  8087. Host: mafreebox.freebox.fr
  8088.  
  8089. {
  8090. "mac": "00:24:d4:7e:00:4c",
  8091. "password": ""
  8092. }
  8093.  
  8094. Example response:
  8095.  
  8096. HTTP/1.1 200 OK
  8097. Content-Type: application/json; charset=utf-8
  8098.  
  8099. {
  8100. "success": true
  8101. }
  8102.  
  8103. Freeplug
  8104.  
  8105. The freeplug API allow you to list the freeplugs on the Freebox network and get stats
  8106. Freeplug Errors
  8107.  
  8108. When attempting to access the freeplug API, you may encounter the following errors:
  8109.  
  8110. error_code
  8111.  
  8112. Description
  8113.  
  8114. inval
  8115.  
  8116. Invalid request
  8117.  
  8118. nomem
  8119.  
  8120. Internal error
  8121.  
  8122. nosta
  8123.  
  8124. No freeplug with this id
  8125.  
  8126. nopeer
  8127.  
  8128. No freeplug with this id
  8129. Freeplug Network
  8130.  
  8131. FreeplugNetwork has the following attributes:
  8132.  
  8133. FreeplugNetwork
  8134.  
  8135. id string Read-only
  8136.  
  8137. Network unique id
  8138.  
  8139. members[] array of Freeplug Read-only
  8140.  
  8141. List of freeplugs member of this network
  8142.  
  8143. Freeplug Object
  8144.  
  8145. Freeplug has the following attributes:
  8146.  
  8147. Freeplug
  8148.  
  8149. id string Read-only
  8150.  
  8151. Freeplug unique id
  8152.  
  8153. local bool Read-only
  8154.  
  8155. if true the Freeplug is connected directly to the Freebox
  8156.  
  8157. net_role enum Read-only
  8158.  
  8159. Freeplug network role
  8160.  
  8161. Type
  8162.  
  8163. Description
  8164.  
  8165. sta
  8166.  
  8167. Freeplug Station
  8168.  
  8169. pco
  8170.  
  8171. Freeplug proxy coordinator
  8172.  
  8173. cco
  8174.  
  8175. Central coordinator
  8176.  
  8177. model string Read-only
  8178.  
  8179. Freebox Server netbios name
  8180.  
  8181. eth_port_status enum Read-only
  8182.  
  8183. Type
  8184.  
  8185. Description
  8186.  
  8187. up
  8188.  
  8189. The ethernet port is up
  8190.  
  8191. down
  8192.  
  8193. The ethernet port is down
  8194.  
  8195. unknown
  8196.  
  8197. The ethernet port state is unknown
  8198.  
  8199. eth_full_duplex bool Read-only
  8200.  
  8201. ethernet link is full duplex
  8202.  
  8203. has_network bool Read-only
  8204.  
  8205. is connected to the network
  8206.  
  8207. eth_speed int Read-only
  8208.  
  8209. ethernet port speed
  8210.  
  8211. inactive int Read-only
  8212.  
  8213. seconds since last activity
  8214.  
  8215. net_id string Read-only
  8216.  
  8217. network id
  8218.  
  8219. rx_rate int Read-only
  8220.  
  8221. rx rate (from the freeplugs to the “cco” freeplug) (in Mb/s) -1 if not available
  8222.  
  8223. tx_rate int Read-only
  8224.  
  8225. tx rate (from the “cco” freeplug to the freeplugs) (in Mb/s) -1 if not available
  8226.  
  8227. Freeplug API
  8228. Get the current Freeplugs networks
  8229.  
  8230. GET /api/v8/freeplug/
  8231.  
  8232. Returns the list of FreeplugNetwork
  8233.  
  8234. Example request:
  8235.  
  8236. GET /api/v8/freeplug/ HTTP/1.1
  8237. Host: mafreebox.freebox.fr
  8238.  
  8239. Example response:
  8240.  
  8241. HTTP/1.1 200 OK
  8242. Content-Type: application/json; charset=utf-8
  8243.  
  8244. {
  8245. "success": true,
  8246. "result": [
  8247. {
  8248. "id": "c8:f7:b9:83:f5:10:01",
  8249. "members": [
  8250. {
  8251. "id": "00:24:D4:36:4C:CF",
  8252. "tx_rate": 148,
  8253. "eth_port_status": "up",
  8254. "rx_rate": 148,
  8255. "net_role": "sta",
  8256. "inactive": 1,
  8257. "net_id": "c8:f7:b9:83:f5:10:01",
  8258. "model": "int6400",
  8259. "eth_speed": 100,
  8260. "local": true,
  8261. "eth_full_duplex": true,
  8262. "has_network": true
  8263. },
  8264. {
  8265. "id": "F4:CA:E5:1D:46:AE",
  8266. "tx_rate": 149,
  8267. "eth_port_status": "up",
  8268. "rx_rate": 148,
  8269. "net_role": "sta",
  8270. "inactive": 1,
  8271. "net_id": "c8:f7:b9:83:f5:10:01",
  8272. "model": "int6400",
  8273. "eth_speed": 100,
  8274. "local": true,
  8275. "eth_full_duplex": true,
  8276. "has_network": true
  8277. },
  8278. {
  8279. "id": "00:24:D4:1B:15:D0",
  8280. "tx_rate": -1,
  8281. "eth_port_status": "up",
  8282. "rx_rate": -1,
  8283. "net_role": "cco",
  8284. "inactive": 1,
  8285. "net_id": "c8:f7:b9:83:f5:10:01",
  8286. "model": "int6400",
  8287. "eth_speed": 100,
  8288. "local": false,
  8289. "eth_full_duplex": true,
  8290. "has_network": true
  8291. }
  8292. ]
  8293. }
  8294. ]
  8295. }
  8296.  
  8297. Get a particular Freeplug information
  8298.  
  8299. GET /api/v8/freeplug/{id}/
  8300.  
  8301. Returns the list of Freeplug
  8302.  
  8303. Example request:
  8304.  
  8305. GET /api/v8/freeplug/F4:CA:E5:1D:46:AE/ HTTP/1.1
  8306. Host: mafreebox.freebox.fr
  8307.  
  8308. Example response:
  8309.  
  8310. HTTP/1.1 200 OK
  8311. Content-Type: application/json; charset=utf-8
  8312.  
  8313. {
  8314. "success": true,
  8315. "result": {
  8316. "id": "00:24:D4:36:4C:CF",
  8317. "tx_rate": -1,
  8318. "eth_port_status": "up",
  8319. "rx_rate": -1,
  8320. "net_role": "sta",
  8321. "inactive": 1,
  8322. "net_id": "c8:f7:b9:83:f5:10:01",
  8323. "model": "int6400",
  8324. "eth_speed": 100,
  8325. "local": true,
  8326. "eth_full_duplex": true,
  8327. "has_network": true
  8328. }
  8329. }
  8330.  
  8331. Reset a Freeplug
  8332.  
  8333. POST /api/v8/freeplug/{id}/reset/
  8334.  
  8335. reset the given Freeplug
  8336.  
  8337. Example request:
  8338.  
  8339. POST /api/v8/freeplug/F4:CA:E5:1D:46:AE/reset/ HTTP/1.1
  8340. Host: mafreebox.freebox.fr
  8341.  
  8342. Example response:
  8343.  
  8344. HTTP/1.1 200 OK
  8345. Content-Type: application/json; charset=utf-8
  8346.  
  8347. {
  8348. "success":true,
  8349. }
  8350.  
  8351. DHCP
  8352.  
  8353. With the DHCP API you configure the Freebox dhcp server, and access its status.
  8354. DHCP Errors
  8355.  
  8356. When attempting to access the DHCP API, you may encounter the following errors:
  8357.  
  8358. error_code
  8359.  
  8360. Description
  8361.  
  8362. inval
  8363.  
  8364. invalid argument
  8365.  
  8366. inval_netmask
  8367.  
  8368. invalid netmask
  8369.  
  8370. inval_ip_range
  8371.  
  8372. invalid IP range
  8373.  
  8374. inval_ip_range_net
  8375.  
  8376. IP range & netmask mismatch
  8377.  
  8378. inval_gw_net
  8379.  
  8380. gateway & netmask mismatch
  8381.  
  8382. exist
  8383.  
  8384. already exists
  8385.  
  8386. nodev
  8387.  
  8388. no such device
  8389.  
  8390. noent
  8391.  
  8392. no such entry
  8393.  
  8394. netdown
  8395.  
  8396. network is down
  8397.  
  8398. busy
  8399.  
  8400. device or resource busy
  8401. DHCP Config Object
  8402.  
  8403. DHCP config has the following attributes:
  8404.  
  8405. DhcpConfig
  8406.  
  8407. enabled bool
  8408.  
  8409. Enable/Disable the DHCP server
  8410.  
  8411. sticky_assign bool
  8412.  
  8413. Always assign the same IP to a given host
  8414.  
  8415. gateway string Read-only
  8416.  
  8417. Gateway IP address
  8418.  
  8419. netmask string Read-only
  8420.  
  8421. Gateway subnet netmask
  8422.  
  8423. ip_range_start string
  8424.  
  8425. DHCP range start IP
  8426.  
  8427. ip_range_end string
  8428.  
  8429. DHCP range end IP
  8430.  
  8431. always_broadcast bool
  8432.  
  8433. Always broadcast DHCP responses
  8434.  
  8435. dns[] array of string
  8436.  
  8437. List of dns servers to include in DHCP reply
  8438.  
  8439. DHCP Configuration API
  8440. Get the current DHCP configuration
  8441.  
  8442. GET /api/v8/dhcp/config/
  8443.  
  8444. Returns the current DhcpConfig
  8445.  
  8446. Example request:
  8447.  
  8448. GET /api/v8/dhcp/config/ HTTP/1.1
  8449. Host: mafreebox.freebox.fr
  8450.  
  8451. Example response:
  8452.  
  8453. HTTP/1.1 200 OK
  8454. Content-Type: application/json; charset=utf-8
  8455.  
  8456. {
  8457. "success": true,
  8458. "result": {
  8459. "enabled": true,
  8460. "gateway": "192.168.1.254",
  8461. "sticky_assign": true,
  8462. "ip_range_end": "192.168.1.50",
  8463. "netmask": "255.255.255.0",
  8464. "dns": [
  8465. "192.168.1.254",
  8466. "",
  8467. "",
  8468. "",
  8469. ""
  8470. ],
  8471. "always_broadcast": false,
  8472. "ip_range_start": "192.168.1.2"
  8473. }
  8474. }
  8475.  
  8476. Update the current DHCP configuration
  8477.  
  8478. PUT /api/v8/dhcp/config/
  8479.  
  8480. Update the current DhcpConfig
  8481.  
  8482. Example request:
  8483.  
  8484. PUT /api/v8/dhcp/config/ HTTP/1.1
  8485. Host: mafreebox.freebox.fr
  8486.  
  8487. {
  8488. "enabled": false,
  8489. }
  8490.  
  8491. Example response:
  8492.  
  8493. HTTP/1.1 200 OK
  8494. Content-Type: application/json; charset=utf-8
  8495.  
  8496. {
  8497. "success": true,
  8498. "result": {
  8499. "enabled": false,
  8500. "gateway": "192.168.1.254",
  8501. "sticky_assign": true,
  8502. "ip_range_end": "192.168.1.50",
  8503. "netmask": "255.255.255.0",
  8504. "dns": [
  8505. "192.168.1.254",
  8506. "",
  8507. "",
  8508. "",
  8509. ""
  8510. ],
  8511. "always_broadcast": false,
  8512. "ip_range_start": "192.168.1.2"
  8513. }
  8514. }
  8515.  
  8516. DHCP Static Lease Object
  8517.  
  8518. DHCP static lease have the following attributes
  8519.  
  8520. DhcpStaticLease
  8521.  
  8522. id string
  8523.  
  8524. DHCP static lease object id
  8525.  
  8526. mac string
  8527.  
  8528. Host mac address
  8529.  
  8530. comment string
  8531.  
  8532. an optional comment
  8533.  
  8534. hostname string Read-only
  8535.  
  8536. hostname matching the mac address
  8537.  
  8538. ip string
  8539.  
  8540. IPv4 to assign to the host
  8541.  
  8542. host LanHost Read-only
  8543.  
  8544. LAN host information from LAN browser (refer to LanHost documentation)
  8545.  
  8546. DHCP Static Lease API
  8547. Get the list of DHCP static leases
  8548.  
  8549. You can get the list of DhcpStaticLease using this API
  8550.  
  8551. GET /api/v8/dhcp/static_lease/
  8552.  
  8553. Example request:
  8554.  
  8555. GET /api/v8/dhcp/static_lease/ HTTP/1.1
  8556. Host: mafreebox.freebox.fr
  8557.  
  8558. Example response:
  8559.  
  8560. HTTP/1.1 200 OK
  8561. Content-Type: application/json; charset=utf-8
  8562.  
  8563. {
  8564. "success": true,
  8565. "result": [
  8566. {
  8567. "mac": "00:DE:AD:B0:0B:55",
  8568. "comment": "",
  8569. "hostname": "Pc de r0ro",
  8570. "id": "00:DE:AD:B0:0B:55",
  8571. "host": {
  8572. [ ... ]
  8573. },
  8574. "ip": "192.168.1.1"
  8575. },
  8576. {
  8577. "mac": "00:DE:AD:B0:0B:69",
  8578. "comment": "",
  8579. "hostname": "Imprimante",
  8580. "id": "00:DE:AD:B0:0B:69",
  8581. "host": {
  8582. [ ... ]
  8583. },
  8584. "ip": "192.168.1.2"
  8585. }
  8586. ]
  8587. }
  8588.  
  8589. Get a given DHCP static lease
  8590.  
  8591. You can get a specific DhcpStaticLease with its id
  8592.  
  8593. GET /api/v8/dhcp/static_lease/{id}
  8594.  
  8595. Example request:
  8596.  
  8597. GET /api/v8/dhcp/static_lease/00:DE:AD:B0:0B:55 HTTP/1.1
  8598. Host: mafreebox.freebox.fr
  8599.  
  8600. Example response:
  8601.  
  8602. HTTP/1.1 200 OK
  8603. Content-Type: application/json; charset=utf-8
  8604.  
  8605. {
  8606. "success": true,
  8607. "result": {
  8608. "mac": "00:DE:AD:B0:0B:55",
  8609. "comment": "",
  8610. "hostname": "Pc de r0ro",
  8611. "id": "00:DE:AD:B0:0B:55",
  8612. "host": {
  8613. [ ... ]
  8614. },
  8615. "ip": "192.168.1.1"
  8616. }
  8617. }
  8618.  
  8619. Update DHCP static lease
  8620.  
  8621. You can update a DhcpStaticLease with this method
  8622.  
  8623. PUT /api/v8/dhcp/static_lease/{id}
  8624.  
  8625. Example request:
  8626.  
  8627. PUT /api/v8/dhcp/static_lease/00:DE:AD:B0:0B:55 HTTP/1.1
  8628. Host: mafreebox.freebox.fr
  8629.  
  8630. {
  8631. "comment": "Mon PC"
  8632. }
  8633.  
  8634. Example response:
  8635.  
  8636. HTTP/1.1 200 OK
  8637. Content-Type: application/json; charset=utf-8
  8638.  
  8639. {
  8640. "success": true,
  8641. "result": {
  8642. "mac": "00:DE:AD:B0:0B:55",
  8643. "comment": "Mon PC",
  8644. "hostname": "Pc de r0ro",
  8645. "id": "00:DE:AD:B0:0B:55",
  8646. "host": {
  8647. [ ... ]
  8648. },
  8649. "ip": "192.168.1.1"
  8650. }
  8651. }
  8652.  
  8653. Delete a DHCP static lease
  8654.  
  8655. Deletes the DhcpStaticLease with this id
  8656.  
  8657. DELETE /api/v8/dhcp/static_lease/{id}
  8658.  
  8659. Example request:
  8660.  
  8661. DELETE /api/v8/dhcp/static_lease/00:DE:AD:B0:0B:55 HTTP/1.1
  8662. Host: mafreebox.freebox.fr
  8663.  
  8664. Example response:
  8665.  
  8666. HTTP/1.1 200 OK
  8667. Content-Type: application/json; charset=utf-8
  8668.  
  8669. {
  8670. "success": true,
  8671. }
  8672.  
  8673. Add a DHCP static lease
  8674.  
  8675. POST /api/v8/dhcp/static_lease/
  8676.  
  8677. Example request:
  8678.  
  8679. POST /api/v8/dhcp/static_lease/ HTTP/1.1
  8680. Host: mafreebox.freebox.fr
  8681.  
  8682. {
  8683. "ip": "192.168.1.222",
  8684. "mac": "00:00:00:11:11:11"
  8685. }
  8686.  
  8687. Example response:
  8688.  
  8689. HTTP/1.1 200 OK
  8690. Content-Type: application/json; charset=utf-8
  8691.  
  8692. {
  8693. "success": true,
  8694. "result": {
  8695. "mac": "00:00:00:11:11:11",
  8696. "comment": "",
  8697. "hostname": "00:00:00:11:11:11",
  8698. "id": "00:00:00:11:11:11",
  8699. "ip": "192.168.1.222"
  8700. }
  8701. }
  8702.  
  8703. DHCP Dynamic Lease Object
  8704.  
  8705. DHCP dynamic lease have the following attributes
  8706.  
  8707. DhcpDynamicLease
  8708.  
  8709. mac string Read-only
  8710.  
  8711. Host mac address
  8712.  
  8713. hostname string Read-only
  8714.  
  8715. hostname matching the mac address
  8716.  
  8717. ip string Read-only
  8718.  
  8719. IPv4 assigned to the host
  8720.  
  8721. lease_remaining int Read-only
  8722.  
  8723. time left before lease needs to be refreshed
  8724.  
  8725. assign_time timestamp Read-only
  8726.  
  8727. timestamp of the lease first assignment
  8728.  
  8729. refresh_time timestamp Read-only
  8730.  
  8731. timestamp of the last lease refresh
  8732.  
  8733. is_static bool Read-only
  8734.  
  8735. is the lease static
  8736.  
  8737. host LanHost Read-only
  8738.  
  8739. LAN host information from LAN browser (refer to LanHost documentation)
  8740.  
  8741. Get the list of DHCP dynamic leases
  8742.  
  8743. You can get the list of DhcpDynamicLease using this API
  8744.  
  8745. GET /api/v8/dhcp/dynamic_lease/
  8746.  
  8747. Example request:
  8748.  
  8749. GET /api/v8/dhcp/dynamic_lease/ HTTP/1.1
  8750. Host: mafreebox.freebox.fr
  8751.  
  8752. Example response:
  8753.  
  8754. HTTP/1.1 200 OK
  8755. Content-Type: application/json; charset=utf-8
  8756.  
  8757. {
  8758. "success": true,
  8759. "result": [
  8760. {
  8761. "mac": "13:37:00:00:01:03",
  8762. "host": {
  8763. "l2ident": {
  8764. "id": "13:37:00:00:01:03",
  8765. "type": "mac_address"
  8766. },
  8767. "active": true,
  8768. "id": "ether-13:37:00:00:01:03",
  8769. "last_time_reachable": 1555555555,
  8770. "persistent": false,
  8771. "names": [],
  8772. "vendor_name": "",
  8773. "host_type": "",
  8774. "primary_name": "",
  8775. "l3connectivities": [
  8776. {
  8777. "addr": "192.168.1.1",
  8778. "active": true,
  8779. "reachable": true,
  8780. "last_activity": 1555555555,
  8781. "af": "ipv4",
  8782. "last_time_reachable": 1555555555
  8783. },
  8784. {
  8785. "addr": "fe80::ffff:3333:eeee:eee",
  8786. "active": false,
  8787. "reachable": false,
  8788. "last_activity": 1555585108,
  8789. "af": "ipv6",
  8790. "last_time_reachable": 1555585103
  8791. }
  8792. ],
  8793. "reachable": true,
  8794. "last_activity": 1555555555,
  8795. "primary_name_manual": false,
  8796. "interface": "pub"
  8797. }
  8798. "refresh_time": 1555555555,
  8799. "hostname": "android r0ro",
  8800. "assign_time": 1555555555,
  8801. "lease_remaining": 123456,
  8802. "is_static": false,
  8803. "ip": "192.168.1.22"
  8804. }
  8805. ]
  8806. }
  8807.  
  8808. DHCPv6
  8809.  
  8810. With the DHCPv6 API you configure the Freebox DHCPv6 server, and access its status.
  8811. DHCPv6 Errors
  8812.  
  8813. When attempting to access the DHCPv6 API, you may encounter the following errors:
  8814.  
  8815. error_code
  8816.  
  8817. Description
  8818.  
  8819. inval
  8820.  
  8821. invalid parameter
  8822.  
  8823. noent
  8824.  
  8825. no such entry
  8826.  
  8827. nospc
  8828.  
  8829. too many entries
  8830.  
  8831. exist
  8832.  
  8833. already exists
  8834.  
  8835. conflict
  8836.  
  8837. conflict with another rule
  8838.  
  8839. nomem
  8840.  
  8841. internal error
  8842. DHCPv6 Config Object
  8843.  
  8844. DHCPv6 config has the following attributes:
  8845.  
  8846. DHCPv6Config
  8847.  
  8848. enabled bool
  8849.  
  8850. Enable/Disable the DHCPv6 server
  8851.  
  8852. NOTE: on some Android devices, enabling the DHCPv6 server may cause IPv6 to stop working on those devices
  8853.  
  8854. use_custom_dns bool
  8855.  
  8856. if set to true, the user provided IPv6 dns servers will be used instead of Free default IPv6 dns servers
  8857.  
  8858. NOTE: even if DHCPv6 server is disabled the custom dns can be used to replace Free dns in RA RDNSS
  8859.  
  8860. dns[] array of ipv6 Read-only
  8861.  
  8862. list of ipv6 dns servers to use instead of Free dns servers in case use_custom_dns is set to true
  8863.  
  8864. DHCPv6 Configuration API
  8865. Get the current DHCPv6 configuration
  8866.  
  8867. GET /api/v8/dhcpv6/config/
  8868.  
  8869. Returns the current DHCPv6Config
  8870.  
  8871. Example request:
  8872.  
  8873. GET /api/v8/dhcpv6/config/ HTTP/1.1
  8874. Host: mafreebox.freebox.fr
  8875.  
  8876. Example response:
  8877.  
  8878. HTTP/1.1 200 OK
  8879. Content-Type: application/json; charset=utf-8
  8880.  
  8881. {
  8882. "success": true,
  8883. "result": {
  8884. "enabled": true,
  8885. "use_custom_dns": false,
  8886. "dns": [
  8887. "2620:0:ccc::a",
  8888. "2620:0:ccc::1"
  8889. ]
  8890. }
  8891. }
  8892.  
  8893. Update the current DHCPv6 configuration
  8894.  
  8895. PUT /api/v8/dhcpv6/config/
  8896.  
  8897. Update the current DHCPv6Config
  8898.  
  8899. Example request:
  8900.  
  8901. PUT /api/v8/dhcpv6/config/ HTTP/1.1
  8902. Host: mafreebox.freebox.fr
  8903.  
  8904. {
  8905. "use_custom_dns": true,
  8906. }
  8907.  
  8908. Example response:
  8909.  
  8910. HTTP/1.1 200 OK
  8911. Content-Type: application/json; charset=utf-8
  8912.  
  8913. {
  8914. "success": true,
  8915. "result": {
  8916. "enabled": true,
  8917. "use_custom_dns": true,
  8918. "dns": [
  8919. "2620:0:ccc::a",
  8920. "2620:0:ccc::1"
  8921. ]
  8922. }
  8923. }
  8924.  
  8925. Ftp
  8926.  
  8927. The FTP API allow you to control the Freebox ftp server settings
  8928. Ftp Errors
  8929.  
  8930. When attempting to access the FTP API, you may encounter the following errors:
  8931.  
  8932. error_code
  8933.  
  8934. Description
  8935.  
  8936. internal_error
  8937.  
  8938. Internal error
  8939.  
  8940. weak_password
  8941.  
  8942. Password is too weak for remote access
  8943. Ftp Config
  8944.  
  8945. FtpConfig has the following attributes:
  8946.  
  8947. FtpConfig
  8948.  
  8949. enabled bool
  8950.  
  8951. is the FTP server enabled
  8952.  
  8953. allow_anonymous bool
  8954.  
  8955. can anonymous user log in
  8956.  
  8957. allow_anonymous_write bool
  8958.  
  8959. can anonymous user write data
  8960.  
  8961. username string Read-only
  8962.  
  8963. default user name to use. Cannot be changed
  8964.  
  8965. password string Write-only
  8966.  
  8967. user password
  8968.  
  8969. allow_remote_access bool
  8970.  
  8971. enable ftp server remote access
  8972.  
  8973. NOTE: to be able to enable the remote access the password must be strong enough
  8974.  
  8975. weak_password bool Read-only
  8976.  
  8977. is the ftp password weak (in this case remote access is disabled)
  8978.  
  8979. port_ctrl int
  8980.  
  8981. ftp control port to use for remote access
  8982.  
  8983. port_data int
  8984.  
  8985. ftp data port to use for remote access
  8986.  
  8987. remote_domain string
  8988.  
  8989. domain name to use for remote access
  8990.  
  8991. Ftp config API
  8992. Get the current Ftp configuration
  8993.  
  8994. GET /api/v8/ftp/config/
  8995.  
  8996. Get the FtpConfig
  8997.  
  8998. Example request:
  8999.  
  9000. GET /api/v8/ftp/config/ HTTP/1.1
  9001. Host: mafreebox.freebox.fr
  9002.  
  9003. Example response:
  9004.  
  9005. HTTP/1.1 200 OK
  9006. Content-Type: application/json; charset=utf-8
  9007.  
  9008. {
  9009. "success": true,
  9010. "result": {
  9011. "enabled": false,
  9012. "allow_anonymous": false,
  9013. "allow_remote_access": false,
  9014. "port_ctrl": 3615,
  9015. "port_data": 1337,
  9016. "weak_password": true,
  9017. "allow_anonymous_write": false
  9018. }
  9019. }
  9020.  
  9021. Update the FTP configuration
  9022.  
  9023. PUT /api/v8/ftp/config/
  9024.  
  9025. Update the FtpConfig
  9026.  
  9027. Example request:
  9028.  
  9029. PUT /api/v8/ftp/config/ HTTP/1.1
  9030. Host: mafreebox.freebox.fr
  9031.  
  9032. {
  9033. "enabled": true
  9034. }
  9035.  
  9036. Example response:
  9037.  
  9038. HTTP/1.1 200 OK
  9039. Content-Type: application/json; charset=utf-8
  9040.  
  9041. {
  9042. "success": true,
  9043. "result": {
  9044. "enabled": true,
  9045. "allow_anonymous": false,
  9046. "allow_anonymous_write": false
  9047. }
  9048. }
  9049.  
  9050. NAT
  9051.  
  9052. With the nat API you control port forwarding on your network
  9053. NAT Errors
  9054.  
  9055. When attempting to access the LAN API, you may encounter the following errors:
  9056.  
  9057. error_code
  9058.  
  9059. Description
  9060.  
  9061. noent
  9062.  
  9063. Invalid id
  9064.  
  9065. internal_error
  9066.  
  9067. Internal error
  9068.  
  9069. exist
  9070.  
  9071. Conflict with an existing redirection
  9072. Dmz Config
  9073.  
  9074. Dmz config has the following attributes:
  9075.  
  9076. DmzConfig
  9077.  
  9078. ip string
  9079.  
  9080. dmz host IP
  9081.  
  9082. enabled bool
  9083.  
  9084. is dmz enabled
  9085.  
  9086. Dmz Config API
  9087. Get the current Dmz configuration
  9088.  
  9089. GET /api/v8/fw/dmz/
  9090.  
  9091. Returns the current DmzConfig
  9092.  
  9093. Example request:
  9094.  
  9095. GET /api/v8/fw/dmz/ HTTP/1.1
  9096. Host: mafreebox.freebox.fr
  9097.  
  9098. Example response:
  9099.  
  9100. HTTP/1.1 200 OK
  9101. Content-Type: application/json; charset=utf-8
  9102.  
  9103. {
  9104. "success": true,
  9105. "result": {
  9106. "enabled": false,
  9107. "ip": ""
  9108. }
  9109. }
  9110.  
  9111. Update the current Dmz configuration
  9112.  
  9113. PUT /api/v8/fw/dmz/
  9114.  
  9115. Update the current LanConfig
  9116.  
  9117. Example request:
  9118.  
  9119. PUT /api/v8/lan/config/ HTTP/1.1
  9120. Host: mafreebox.freebox.fr
  9121.  
  9122. {
  9123. "enabled": true,
  9124. "ip": "192.168.1.42"
  9125. }
  9126.  
  9127. Example response:
  9128.  
  9129. HTTP/1.1 200 OK
  9130. Content-Type: application/json; charset=utf-8
  9131.  
  9132. {
  9133. "success": true,
  9134. "result": {
  9135. "enabled": true,
  9136. "ip": "192.168.1.42"
  9137. }
  9138. }
  9139.  
  9140. Port Forwarding
  9141. Port Forwarding Config
  9142.  
  9143. Port forwarding config has the following attributes:
  9144.  
  9145. PortForwardingConfig
  9146.  
  9147. id int
  9148.  
  9149. forwarding id
  9150.  
  9151. enabled bool
  9152.  
  9153. is forwarding enabled
  9154.  
  9155. ip_proto enum
  9156.  
  9157. ip_proto
  9158.  
  9159. Description
  9160.  
  9161. tcp
  9162.  
  9163. TCP
  9164.  
  9165. udp
  9166.  
  9167. UDP
  9168.  
  9169. wan_port_start string
  9170.  
  9171. forwarding range start
  9172.  
  9173. wan_port_end int
  9174.  
  9175. forwarding range end
  9176.  
  9177. lan_ip string
  9178.  
  9179. forwarding target on LAN
  9180.  
  9181. lan_port int
  9182.  
  9183. forwarding target start port on LAN, (last port is lan_port + wan_port_end - wan_port_start)
  9184.  
  9185. hostname string Read-only
  9186.  
  9187. forwarding target host name
  9188.  
  9189. host LanHost Read-only
  9190.  
  9191. forwarding target host information (see: LanHost)
  9192.  
  9193. src_ip string
  9194.  
  9195. if src_ip == 0.0.0.0 this rule will apply to any src ip otherwise it will only apply to the specified ip address
  9196.  
  9197. comment string
  9198.  
  9199. comment
  9200.  
  9201. Port Forwarding API
  9202. Getting the list of port forwarding
  9203.  
  9204. GET /api/v8/fw/redir/
  9205.  
  9206. Example request:
  9207.  
  9208. GET /api/v8/fw/redir/ HTTP/1.1
  9209. Host: mafreebox.freebox.fr
  9210.  
  9211. Example response:
  9212.  
  9213. HTTP/1.1 200 OK
  9214. Content-Type: application/json; charset=utf-8
  9215.  
  9216. {
  9217. "success": true,
  9218. "result": [
  9219. {
  9220. "enabled": true,
  9221. "comment": "",
  9222. "id": 1,
  9223. "host": {
  9224. [ ... ]
  9225. },
  9226. "hostname": "android-c5fe44a2c27be1e2",
  9227. "lan_port": 69,
  9228. "wan_port_end": 69,
  9229. "wan_port_start": 69,
  9230. "lan_ip": "192.168.1.22",
  9231. "ip_proto": "tcp",
  9232. "src_ip": "8.8.8.8"
  9233. },
  9234. {
  9235. "enabled": true,
  9236. "comment": "",
  9237. "id": 2,
  9238. "host": {
  9239. [ ... ]
  9240. },
  9241. "hostname": "android-c5fe44a2c27be1e2",
  9242. "lan_port": 1337,
  9243. "wan_port_end": 1340,
  9244. "wan_port_start": 1337,
  9245. "lan_ip": "192.168.1.22",
  9246. "ip_proto": "udp",
  9247. "src_ip": "0.0.0.0"
  9248. }
  9249. ]
  9250. }
  9251.  
  9252. Getting a specific port forwarding
  9253.  
  9254. GET /api/v8/fw/redir/{redir_id}
  9255.  
  9256. Returns the requested PortForwardingConfig properties
  9257.  
  9258. Example request:
  9259.  
  9260. GET /api/v8/fw/redir/1 HTTP/1.1
  9261. Host: mafreebox.freebox.fr
  9262.  
  9263. Example response:
  9264.  
  9265. HTTP/1.1 200 OK
  9266. Content-Type: application/json; charset=utf-8
  9267.  
  9268. {
  9269. "success": true,
  9270. "result": {
  9271. "enabled": true,
  9272. "comment": "",
  9273. "id": 1,
  9274. "host": {
  9275. [ ... ]
  9276. },
  9277. "hostname": "android-c5fe44a2c27be1e2",
  9278. "lan_port": 69,
  9279. "wan_port_end": 69,
  9280. "wan_port_start": 69,
  9281. "lan_ip": "192.168.1.22",
  9282. "ip_proto": "tcp",
  9283. "src_ip": "0.0.0.0"
  9284. }
  9285.  
  9286. }
  9287.  
  9288. Updating a port forwarding
  9289.  
  9290. PUT /api/v8/fw/redir/{redir_id}
  9291.  
  9292. Update a PortForwardingConfig properties
  9293.  
  9294. Example request:
  9295.  
  9296. PUT /api/v8/fw/redir/1 HTTP/1.1
  9297. Host: mafreebox.freebox.fr
  9298.  
  9299. {
  9300. "enabled": false
  9301. }
  9302.  
  9303. Example response:
  9304.  
  9305. HTTP/1.1 200 OK
  9306. Content-Type: application/json; charset=utf-8
  9307.  
  9308. {
  9309. "success": true,
  9310. "result": {
  9311. "enabled": false,
  9312. "comment": "",
  9313. "id": 1,
  9314. "host": {
  9315. [ ... ]
  9316. },
  9317. "hostname": "android-c5fe44a2c27be1e2",
  9318. "lan_port": 69,
  9319. "wan_port_end": 69,
  9320. "wan_port_start": 69,
  9321. "lan_ip": "192.168.1.22",
  9322. "ip_proto": "tcp",
  9323. "src_ip": "0.0.0.0"
  9324. }
  9325.  
  9326. }
  9327.  
  9328. Add a port forwarding
  9329.  
  9330. POST /api/v8/fw/redir/
  9331.  
  9332. Create a PortForwardingConfig
  9333.  
  9334. Example request:
  9335.  
  9336. POST /api/v8/fw/redir/ HTTP/1.1
  9337. Host: mafreebox.freebox.fr
  9338.  
  9339. {
  9340. "enabled": true,
  9341. "comment": "test",
  9342. "lan_port": 4242,
  9343. "wan_port_end": 4242,
  9344. "wan_port_start": 4242,
  9345. "lan_ip": "192.168.1.42",
  9346. "ip_proto": "tcp",
  9347. "src_ip": "0.0.0.0"
  9348. }
  9349.  
  9350. Example response:
  9351.  
  9352. HTTP/1.1 200 OK
  9353. Content-Type: application/json; charset=utf-8
  9354.  
  9355. {
  9356. "success": true,
  9357. "result": {
  9358. "enabled": true,
  9359. "comment": "test",
  9360. "id": 3,
  9361. "host": {
  9362. [ ... ]
  9363. },
  9364. "hostname": "Mac-mini-de-Romain",
  9365. "lan_port": 4242,
  9366. "wan_port_end": 4242,
  9367. "wan_port_start": 4242,
  9368. "lan_ip": "192.168.1.42",
  9369. "ip_proto": "tcp",
  9370. "src_ip": "0.0.0.0"
  9371. }
  9372. }
  9373.  
  9374. Delete a port forwarding
  9375.  
  9376. DELETE /api/v8/fw/redir/{redir_id}
  9377.  
  9378. Delete a PortForwardingConfig
  9379.  
  9380. Example request:
  9381.  
  9382. DELETE /api/v8/fw/redir/3 HTTP/1.1
  9383. Host: mafreebox.freebox.fr
  9384.  
  9385. Example response:
  9386.  
  9387. HTTP/1.1 200 OK
  9388. Content-Type: application/json; charset=utf-8
  9389.  
  9390. {
  9391. "success": true
  9392. }
  9393.  
  9394. Incoming port configuration
  9395.  
  9396. Some services hosted on the Freebox Server need to listen to public ip address port. Incoming port api allow to enable/disable incoming port binding, and select the bind port to prevent conflit with your own nat port forwarding rules.
  9397.  
  9398. NOTE: you can’t add or remove incoming ports, this ports are managed by Freebox services.
  9399.  
  9400. NOTE: in case of conflict with a nat port forwarding rule, this rule will have a higher priority and override the port forwarding rule.
  9401. Incoming port Config
  9402.  
  9403. Incoming port config has the following attributes:
  9404.  
  9405. IncomingPortConfig
  9406.  
  9407. id string Read-only
  9408.  
  9409. incoming port id
  9410.  
  9411. id
  9412.  
  9413. Description
  9414.  
  9415. http
  9416.  
  9417. http port for remote access to Freebox OS
  9418.  
  9419. https
  9420.  
  9421. https port for tls remote access to Freebox OS
  9422.  
  9423. bittorrent-main
  9424.  
  9425. main bittorrent port for Freebox downloader
  9426.  
  9427. bittorrent-dht
  9428.  
  9429. bittorrent port for DHT
  9430.  
  9431. openvpn_routed
  9432.  
  9433. routed openvpn port
  9434.  
  9435. openvpn_bridge
  9436.  
  9437. bridged openvpn port
  9438.  
  9439. ipsec_ike
  9440.  
  9441. ipsec ikev2 vpn port
  9442.  
  9443. ipsec_nat
  9444.  
  9445. ipsec nat vpn port
  9446.  
  9447. pptp
  9448.  
  9449. pptp vpn server port
  9450.  
  9451. ftp
  9452.  
  9453. ftp control port for FTP remote access
  9454.  
  9455. ftp_pasv
  9456.  
  9457. ftp data port for FTP remote access
  9458.  
  9459. enabled bool
  9460.  
  9461. is the port binding allowed
  9462.  
  9463. active bool Read-only
  9464.  
  9465. is the port binding currently active
  9466.  
  9467. type enum Read-only
  9468.  
  9469. ip_proto
  9470.  
  9471. Description
  9472.  
  9473. tcp
  9474.  
  9475. TCP
  9476.  
  9477. udp
  9478.  
  9479. UDP
  9480.  
  9481. tcp_udp
  9482.  
  9483. both TCP and UDP
  9484.  
  9485. in_port int
  9486.  
  9487. binding port
  9488.  
  9489. netns string Read-only
  9490.  
  9491. network namespace. The service may be running on a different namespace (for instance if the service uses the vpn client).
  9492.  
  9493. in_port int
  9494.  
  9495. binding port
  9496.  
  9497. min_port int Read-only
  9498.  
  9499. This field indicate the minimum possible value for in_port (see ConnectionStatus ipv4_port_range)
  9500.  
  9501. max_port int Read-only
  9502.  
  9503. This field indicate the maximum possible value for in_port (see ConnectionStatus ipv4_port_range)
  9504.  
  9505. readonly bool Read-only
  9506.  
  9507. If set to true, the in_port field cannot be changed because of the underlying protocol does not allow it
  9508.  
  9509. Incoming port API
  9510. Getting the list of incoming ports
  9511.  
  9512. GET /api/v8/fw/incoming/
  9513.  
  9514. Example request:
  9515.  
  9516. GET /api/v8/fw/incoming/ HTTP/1.1
  9517. Host: mafreebox.freebox.fr
  9518.  
  9519. Example response:
  9520.  
  9521. HTTP/1.1 200 OK
  9522. Content-Type: application/json; charset=utf-8
  9523.  
  9524. {
  9525. "success": true,
  9526. "result": [
  9527. {
  9528. "enabled": false,
  9529. "type": "tcp",
  9530. "in_port": 80,
  9531. "id": "http",
  9532. "netns": "init",
  9533. "max_port": 65535,
  9534. "min_port": 0
  9535. },
  9536. {
  9537. "enabled": true,
  9538. "type": "tcp",
  9539. "in_port": 17591,
  9540. "id": "bittorrent-main",
  9541. "netns": "vpn",
  9542. "max_port": 65535,
  9543. "min_port": 0
  9544. },
  9545. {
  9546. "enabled": true,
  9547. "type": "udp",
  9548. "in_port": 28946,
  9549. "id": "bittorrent-dht",
  9550. "netns": "vpn",
  9551. "max_port": 65535,
  9552. "min_port": 0
  9553. }
  9554. ]
  9555. }
  9556.  
  9557. Getting a specific incoming port
  9558.  
  9559. GET /api/v8/fw/incoming/{port_id}
  9560.  
  9561. Returns the requested IncomingPortConfig properties
  9562.  
  9563. Example request:
  9564.  
  9565. GET /api/v8/fw/incoming/bittorrent-main HTTP/1.1
  9566. Host: mafreebox.freebox.fr
  9567.  
  9568. Example response:
  9569.  
  9570. HTTP/1.1 200 OK
  9571. Content-Type: application/json; charset=utf-8
  9572.  
  9573. {
  9574. "success": true,
  9575. "result": {
  9576. "enabled": true,
  9577. "type": "tcp",
  9578. "in_port": 17591,
  9579. "id": "bittorrent-main",
  9580. "netns": "vpn",
  9581. "max_port": 65535,
  9582. "min_port": 0
  9583. }
  9584. }
  9585.  
  9586. Updating an incoming port
  9587.  
  9588. PUT /api/v8/fw/incoming/{port_id}
  9589.  
  9590. Update a IncomingPortConfig properties
  9591.  
  9592. Example request:
  9593.  
  9594. PUT /api/v8/lan/fw/incoming/bittorrent-main HTTP/1.1
  9595. Host: mafreebox.freebox.fr
  9596.  
  9597. {
  9598. "in_port": 3615
  9599. }
  9600.  
  9601. Example response:
  9602.  
  9603. HTTP/1.1 200 OK
  9604. Content-Type: application/json; charset=utf-8
  9605.  
  9606. {
  9607. "success": true,
  9608. "result": {
  9609. "enabled": true,
  9610. "type": "tcp",
  9611. "in_port": 3615,
  9612. "id": "bittorrent-main",
  9613. "netns": "vpn",
  9614. "max_port": 65535,
  9615. "min_port": 0
  9616. }
  9617. }
  9618.  
  9619. UPnP IGD
  9620.  
  9621. The UPnP IGD API allow you to control the settings of the Universal Plug n’ Play Internet Gateway Device service. This service allow hosts on your local network to manage nat redirections.
  9622. UPnP IGD Errors
  9623.  
  9624. When attempting to access the UPnP IGD API, you may encounter the following errors:
  9625.  
  9626. error_code
  9627.  
  9628. Description
  9629.  
  9630. disabled
  9631.  
  9632. the service is disabled
  9633.  
  9634. noent
  9635.  
  9636. invalid rule id
  9637. UPnP IGD Config
  9638.  
  9639. UPnPIGDConfig has the following attributes:
  9640.  
  9641. UPnPIGDConfig
  9642.  
  9643. enabled bool
  9644.  
  9645. is the UPnP IGD service enabled
  9646.  
  9647. version int
  9648.  
  9649. UPnP IGD protocol version Supported values are 1 / 2
  9650.  
  9651. UPnP IGD config API
  9652. Get the current UPnP IGD configuration
  9653.  
  9654. GET /api/v8/upnpigd/config/
  9655.  
  9656. Get the UPnPIGDConfig
  9657.  
  9658. Example request:
  9659.  
  9660. GET /api/v8/upnpigd/config/ HTTP/1.1
  9661. Host: mafreebox.freebox.fr
  9662.  
  9663. Example response:
  9664.  
  9665. HTTP/1.1 200 OK
  9666. Content-Type: application/json; charset=utf-8
  9667.  
  9668. {
  9669. "success": true,
  9670. "result": {
  9671. "enabled": false,
  9672. "version": 1
  9673. }
  9674. }
  9675.  
  9676. Update the UPnP IGD configuration
  9677.  
  9678. PUT /api/v8/upnpigd/config/
  9679.  
  9680. Update the UPnPIGDConfig
  9681.  
  9682. Example request:
  9683.  
  9684. PUT /api/v8/upnpigd/config/ HTTP/1.1
  9685. Host: mafreebox.freebox.fr
  9686.  
  9687. {
  9688. "enabled": true,
  9689. "version": 2
  9690. }
  9691.  
  9692. Example response:
  9693.  
  9694. HTTP/1.1 200 OK
  9695. Content-Type: application/json; charset=utf-8
  9696.  
  9697. {
  9698. "success": true,
  9699. "result": {
  9700. "enabled": true,
  9701. "version": 2
  9702. }
  9703. }
  9704.  
  9705. UPnP IGD Redirection
  9706.  
  9707. UPnPRedir has the following attributes:
  9708.  
  9709. UPnPRedir
  9710.  
  9711. id string Read-only
  9712.  
  9713. the redirection id
  9714.  
  9715. enabled bool Read-only
  9716.  
  9717. is the redirection enabled
  9718.  
  9719. ext_src_ip string Read-only
  9720.  
  9721. source IP
  9722.  
  9723. ext_port int Read-only
  9724.  
  9725. external port
  9726.  
  9727. int_ip string Read-only
  9728.  
  9729. the target IP on your LAN
  9730.  
  9731. int_port int Read-only
  9732.  
  9733. the target port on your LAN
  9734.  
  9735. proto string Read-only
  9736.  
  9737. the IP protocol to redirect
  9738.  
  9739. desc string Read-only
  9740.  
  9741. a description
  9742.  
  9743. remaining int Read-only
  9744.  
  9745. seconds remaining before redirection expire
  9746.  
  9747. host LanHost Read-only
  9748.  
  9749. lan host if available
  9750.  
  9751. UPnP IGD Redirection API
  9752. Get the list of current redirection
  9753.  
  9754. GET /api/v8/upnpigd/redir/
  9755.  
  9756. Get the list of UPnPRedir redirections
  9757.  
  9758. Example request:
  9759.  
  9760. GET /api/v8/upnpigd/redir/ HTTP/1.1
  9761. Host: mafreebox.freebox.fr
  9762.  
  9763. Example response:
  9764.  
  9765. HTTP/1.1 200 OK
  9766. Content-Type: application/json; charset=utf-8
  9767.  
  9768. {
  9769. "success": true,
  9770. "result": [
  9771. {
  9772. "enabled": true,
  9773. "proto": "udp",
  9774. "id": "0.0.0.0-53644-udp",
  9775. "desc": "iC53644",
  9776. "remaining": 0,
  9777. "ext_src_ip": "0.0.0.0",
  9778. "int_port": 16402,
  9779. "int_ip": "192.168.1.44",
  9780. "ext_port": 53644
  9781. }
  9782. ]
  9783. }
  9784.  
  9785. Delete a redirection
  9786.  
  9787. DELETE /api/v8/upnpigd/redir/{id}
  9788.  
  9789. Deletes the given UPnPRedir
  9790.  
  9791. Example request:
  9792.  
  9793. GET /api/v8/upnpigd/redir/0.0.0.0-53644-udp HTTP/1.1
  9794. Host: mafreebox.freebox.fr
  9795.  
  9796. Example response:
  9797.  
  9798. HTTP/1.1 200 OK
  9799. Content-Type: application/json; charset=utf-8
  9800.  
  9801. {
  9802. "success": true
  9803. }
  9804.  
  9805. LCD
  9806.  
  9807. The lcd API allow you to control the Freebox lcd screen settings
  9808. LCD Errors
  9809.  
  9810. When attempting to access the lcd API, you may encounter the following errors:
  9811.  
  9812. error_code
  9813.  
  9814. Description
  9815.  
  9816. inval
  9817.  
  9818. Invalid parameters
  9819.  
  9820. no_panel
  9821.  
  9822. No screen detected
  9823.  
  9824. setup
  9825.  
  9826. Unable to setup screen
  9827.  
  9828. notsup
  9829.  
  9830. Operation is not supported
  9831. LCD Config
  9832.  
  9833. LcdConfig has the following attributes:
  9834.  
  9835. LcdConfig
  9836.  
  9837. brightness int
  9838.  
  9839. the screen brightness (range from 0 to 100)
  9840.  
  9841. orientation_forced bool
  9842.  
  9843. is the screen orientation forced
  9844.  
  9845. orientation int
  9846.  
  9847. the screen orientation angle
  9848.  
  9849. hide_wifi_key bool
  9850.  
  9851. hide wifi key information (including qrcode) - optional
  9852.  
  9853. LCD config API
  9854. Get the current LCD configuration
  9855.  
  9856. GET /api/v8/lcd/config/
  9857.  
  9858. Get the LcdConfig
  9859.  
  9860. Example request:
  9861.  
  9862. GET /api/v8/lcd/config/ HTTP/1.1
  9863. Host: mafreebox.freebox.fr
  9864.  
  9865. Example response:
  9866.  
  9867. HTTP/1.1 200 OK
  9868. Content-Type: application/json; charset=utf-8
  9869.  
  9870. {
  9871. "success": true,
  9872. "result": {
  9873. "brightness": 100,
  9874. "orientation": 0,
  9875. "orientation_forced": false
  9876. "hide_wifi_key": false
  9877. }
  9878. }
  9879.  
  9880. Update the lcd configuration
  9881.  
  9882. PUT /api/v8/lcd/config/
  9883.  
  9884. Update the LcdConfig
  9885.  
  9886. Example request:
  9887.  
  9888. PUT /api/v8/lcd/config/ HTTP/1.1
  9889. Host: mafreebox.freebox.fr
  9890.  
  9891. {
  9892. "brightness": 50
  9893. }
  9894.  
  9895. Example response:
  9896.  
  9897. HTTP/1.1 200 OK
  9898. Content-Type: application/json; charset=utf-8
  9899.  
  9900. {
  9901. "success": true,
  9902. "result": {
  9903. "brightness": 50,
  9904. "orientation": 0,
  9905. "orientation_forced": false
  9906. "hide_wifi_key": false
  9907. }
  9908. }
  9909.  
  9910. Network Share
  9911.  
  9912. The network share API allow you to control the file sharing services running on the Freebox.
  9913. Network Share Errors
  9914.  
  9915. When attempting to access this API, you may encounter the following errors:
  9916.  
  9917. error_code
  9918.  
  9919. Description
  9920.  
  9921. invalid_workgroup_name
  9922.  
  9923. Invalid workgroup name
  9924.  
  9925. invalid_logon_user
  9926.  
  9927. Invalid samba user name
  9928.  
  9929. invalid_logon_password
  9930.  
  9931. Invalid samba user password
  9932.  
  9933. invalid_afp_login_name
  9934.  
  9935. Invalid AFP user name
  9936.  
  9937. invalid_afp_login_password
  9938.  
  9939. Invalid AFP user password
  9940. Samba Config
  9941.  
  9942. SambaConfig has the following attributes:
  9943.  
  9944. SambaConfig
  9945.  
  9946. file_share_enabled bool
  9947.  
  9948. is file sharing enabled
  9949.  
  9950. print_share_enabled bool
  9951.  
  9952. is printer sharing enabled
  9953.  
  9954. logon_enabled bool
  9955.  
  9956. is login/password required to access shares
  9957.  
  9958. logon_user string
  9959.  
  9960. samba user name
  9961.  
  9962. logon_password string Write-only
  9963.  
  9964. samba user password
  9965.  
  9966. workgroup string
  9967.  
  9968. name of the workgroup
  9969.  
  9970. smbv2_enabled bool
  9971.  
  9972. Set to true to enable SMBv2/v3
  9973.  
  9974. Samba config API
  9975. Get the current Samba configuration
  9976.  
  9977. GET /api/v8/netshare/samba/
  9978.  
  9979. Get the SambaConfig
  9980.  
  9981. Example request:
  9982.  
  9983. GET /api/v8/netshare/samba/ HTTP/1.1
  9984. Host: mafreebox.freebox.fr
  9985.  
  9986. Example response:
  9987.  
  9988. HTTP/1.1 200 OK
  9989. Content-Type: application/json; charset=utf-8
  9990.  
  9991. {
  9992. "success": true,
  9993. "result": {
  9994. "workgroup": "WORKGROUP",
  9995. "print_share_enabled": true,
  9996. "file_share_enabled": true,
  9997. "logon_enabled": false,
  9998. "logon_user": "freebox"
  9999. }
  10000. }
  10001.  
  10002. Update the Samba configuration
  10003.  
  10004. PUT /api/v8/netshare/samba/
  10005.  
  10006. Update the SambaConfig
  10007.  
  10008. Example request:
  10009.  
  10010. PUT /api/v8/netshare/samba/ HTTP/1.1
  10011. Host: mafreebox.freebox.fr
  10012.  
  10013. {
  10014. "print_share_enabled": false
  10015. }
  10016.  
  10017. Example response:
  10018.  
  10019. HTTP/1.1 200 OK
  10020. Content-Type: application/json; charset=utf-8
  10021.  
  10022. {
  10023. "success": true,
  10024. "result": {
  10025. "workgroup": "WORKGROUP",
  10026. "print_share_enabled": false,
  10027. "file_share_enabled": true,
  10028. "logon_enabled": false,
  10029. "logon_user": "freebox"
  10030. }
  10031. }
  10032.  
  10033. Afp Config
  10034.  
  10035. AfpConfig has the following attributes:
  10036.  
  10037. AfpConfig
  10038.  
  10039. enabled bool
  10040.  
  10041. is afp service enabled
  10042.  
  10043. guest_allow bool
  10044.  
  10045. allow guest to access shared files
  10046.  
  10047. server_type enum
  10048.  
  10049. Afp server type (to display proper icon) in MacOS
  10050.  
  10051. valid server types are:
  10052.  
  10053. server_type
  10054.  
  10055. powerbook
  10056.  
  10057. powermac
  10058.  
  10059. macmini
  10060.  
  10061. imac
  10062.  
  10063. macbook
  10064.  
  10065. macbookpro
  10066.  
  10067. macbookair
  10068.  
  10069. macpro
  10070.  
  10071. appletv
  10072.  
  10073. airport
  10074.  
  10075. xserve
  10076.  
  10077. login_name string
  10078.  
  10079. Afp user name
  10080.  
  10081. login_password string Write-only
  10082.  
  10083. Afp user password
  10084.  
  10085. Afp config API
  10086. Get the current Afp configuration
  10087.  
  10088. GET /api/v8/netshare/afp/
  10089.  
  10090. Get the AfpConfig
  10091.  
  10092. Example request:
  10093.  
  10094. GET /api/v8/netshare/afp/ HTTP/1.1
  10095. Host: mafreebox.freebox.fr
  10096.  
  10097. Example response:
  10098.  
  10099. HTTP/1.1 200 OK
  10100. Content-Type: application/json; charset=utf-8
  10101.  
  10102. {
  10103. "success": true,
  10104. "result": {
  10105. "enabled": false,
  10106. "guest_allow": true,
  10107. "login_name": "freebox",
  10108. "server_type": "airport"
  10109. }
  10110. }
  10111.  
  10112. Update the Afp configuration
  10113.  
  10114. PUT /api/v8/netshare/afp/
  10115.  
  10116. Update the AfpConfig
  10117.  
  10118. Example request:
  10119.  
  10120. PUT /api/v8/netshare/afp/ HTTP/1.1
  10121. Host: mafreebox.freebox.fr
  10122.  
  10123. {
  10124. "guest_allow": false
  10125. }
  10126.  
  10127. Example response:
  10128.  
  10129. HTTP/1.1 200 OK
  10130. Content-Type: application/json; charset=utf-8
  10131.  
  10132. {
  10133. "success": true,
  10134. "result": {
  10135. "enabled": false,
  10136. "guest_allow": false,
  10137. "login_name": "freebox",
  10138. "server_type": "airport"
  10139. }
  10140. }
  10141.  
  10142. UPnP AV
  10143.  
  10144. The UPnP AV API allow you to control the settings of the Freebox UPnP AV service.
  10145. UPnP AV Errors
  10146.  
  10147. When attempting to access the UPnP AV API, you may encounter the following errors:
  10148.  
  10149. error_code
  10150.  
  10151. Description
  10152.  
  10153. internal_error
  10154.  
  10155. internal error
  10156. UPnP AV Config
  10157.  
  10158. UPnPAVConfig has the following attributes:
  10159.  
  10160. UPnPAVConfig
  10161.  
  10162. enabled bool
  10163.  
  10164. is the UPnP AV service enabled
  10165.  
  10166. UPnP AV config API
  10167. Get the current UPnP AV configuration
  10168.  
  10169. GET /api/v8/upnpav/config/
  10170.  
  10171. Get the UPnPAVConfig
  10172.  
  10173. Example request:
  10174.  
  10175. GET /api/v8/upnpav/config/ HTTP/1.1
  10176. Host: mafreebox.freebox.fr
  10177.  
  10178. Example response:
  10179.  
  10180. HTTP/1.1 200 OK
  10181. Content-Type: application/json; charset=utf-8
  10182.  
  10183. {
  10184. "success": true,
  10185. "result": {
  10186. "enabled": true
  10187. }
  10188. }
  10189.  
  10190. Update the UPnP AV configuration
  10191.  
  10192. PUT /api/v8/upnpav/config/
  10193.  
  10194. Update the UPnPAVConfig
  10195.  
  10196. Example request:
  10197.  
  10198. PUT /api/v8/upnpigd/config/ HTTP/1.1
  10199. Host: mafreebox.freebox.fr
  10200.  
  10201. {
  10202. "enabled": false
  10203. }
  10204.  
  10205. Example response:
  10206.  
  10207. HTTP/1.1 200 OK
  10208. Content-Type: application/json; charset=utf-8
  10209.  
  10210. {
  10211. "success": true,
  10212. "result": {
  10213. "enabled": false
  10214. }
  10215. }
  10216.  
  10217. Switch
  10218.  
  10219. The Switch API allow you to control the settings of the Freebox integrated switch.
  10220. Switch Errors
  10221.  
  10222. When attempting to access the switch API, you may encounter the following errors:
  10223.  
  10224. error_code
  10225.  
  10226. Description
  10227.  
  10228. bad_port
  10229.  
  10230. invalid port number
  10231.  
  10232. bad_speed
  10233.  
  10234. unable to set port speed
  10235.  
  10236. bad_link
  10237.  
  10238. unable to set port link mode
  10239.  
  10240. bad_mac_entry_type
  10241.  
  10242. invalid mac entry type
  10243. Switch Port Status Object
  10244.  
  10245. SwitchPortStatus has the following attributes:
  10246.  
  10247. SwitchPortStatus
  10248.  
  10249. id int Read-only
  10250.  
  10251. switch port id
  10252.  
  10253. link enum Read-only
  10254.  
  10255. link
  10256.  
  10257. Description
  10258.  
  10259. up
  10260.  
  10261. port is up
  10262.  
  10263. down
  10264.  
  10265. port is down
  10266.  
  10267. duplex enum
  10268.  
  10269. duplex
  10270.  
  10271. Description
  10272.  
  10273. half
  10274.  
  10275. force in half duplex mode
  10276.  
  10277. full
  10278.  
  10279. force in full duplex mode
  10280.  
  10281. speed enum
  10282.  
  10283. duplex
  10284.  
  10285. Description
  10286.  
  10287. 10
  10288.  
  10289. 10Base-T
  10290.  
  10291. 100
  10292.  
  10293. 100Base-TX
  10294.  
  10295. 1000
  10296.  
  10297. 1000Base-T
  10298.  
  10299. mode string Read-only
  10300.  
  10301. display form of speed and duplex mode
  10302.  
  10303. mac_list[] array of object Read-only
  10304.  
  10305. list of { mac, name } of hosts connected to this port
  10306.  
  10307. Switch Port Configuration Object
  10308.  
  10309. SwitchPortConfig has the following attributes:
  10310.  
  10311. SwitchPortConfig
  10312.  
  10313. id int Read-only
  10314.  
  10315. switch port id
  10316.  
  10317. duplex enum
  10318.  
  10319. duplex
  10320.  
  10321. Description
  10322.  
  10323. auto
  10324.  
  10325. auto negotiate duplex mode
  10326.  
  10327. half
  10328.  
  10329. force in half duplex mode
  10330.  
  10331. full
  10332.  
  10333. force in full duplex mode
  10334.  
  10335. speed enum
  10336.  
  10337. duplex
  10338.  
  10339. Description
  10340.  
  10341. auto
  10342.  
  10343. auto negotiate speed
  10344.  
  10345. 10
  10346.  
  10347. 10Base-T
  10348.  
  10349. 100
  10350.  
  10351. 100Base-TX
  10352.  
  10353. 1000
  10354.  
  10355. 1000Base-T
  10356.  
  10357. Switch Port Stats Object [UNSTABLE]
  10358.  
  10359. SwitchPortStats has the following attributes:
  10360.  
  10361. SwitchPortStats
  10362.  
  10363. rx_bad_bytes int Read-only
  10364.  
  10365. rx_broadcast_packets int Read-only
  10366.  
  10367. rx_bytes_rate int Read-only
  10368.  
  10369. rx_err_packets int Read-only
  10370.  
  10371. rx_fcs_packets int Read-only
  10372.  
  10373. rx_fragments_packets int Read-only
  10374.  
  10375. rx_good_bytes int Read-only
  10376.  
  10377. rx_good_packets int Read-only
  10378.  
  10379. rx_jabber_packets int Read-only
  10380.  
  10381. rx_multicast_packets int Read-only
  10382.  
  10383. rx_oversize_packets int Read-only
  10384.  
  10385. rx_packets_rate int Read-only
  10386.  
  10387. rx_pause int Read-only
  10388.  
  10389. rx_undersize_packets int Read-only
  10390.  
  10391. rx_unicast_packets int Read-only
  10392.  
  10393. tx_broadcast_packets int Read-only
  10394.  
  10395. tx_bytes int Read-only
  10396.  
  10397. tx_bytes_rate int Read-only
  10398.  
  10399. tx_collisions int Read-only
  10400.  
  10401. tx_deferred int Read-only
  10402.  
  10403. tx_excessive int Read-only
  10404.  
  10405. tx_fcs int Read-only
  10406.  
  10407. tx_late int Read-only
  10408.  
  10409. tx_multicast_packets int Read-only
  10410.  
  10411. tx_multiple int Read-only
  10412.  
  10413. tx_packets int Read-only
  10414.  
  10415. tx_packets_rate int Read-only
  10416.  
  10417. tx_pause int Read-only
  10418.  
  10419. tx_single int Read-only
  10420.  
  10421. tx_unicast_packets int Read-only
  10422.  
  10423. Switch API
  10424. Get the current switch status
  10425.  
  10426. GET /api/v8/switch/status/
  10427.  
  10428. Return the list of swith port status SwitchPortStatus
  10429.  
  10430. Example request:
  10431.  
  10432. GET /api/v8/switch/status/ HTTP/1.1
  10433. Host: mafreebox.freebox.fr
  10434.  
  10435. Example response:
  10436.  
  10437. HTTP/1.1 200 OK
  10438. Content-Type: application/json; charset=utf-8
  10439.  
  10440. {
  10441. "success": true,
  10442. "result": [
  10443. {
  10444. "duplex": "half",
  10445. "link": "down",
  10446. "id": 3,
  10447. "mode": "10BaseT-HD",
  10448. "speed": "10"
  10449. },
  10450. {
  10451. "duplex": "full",
  10452. "link": "up",
  10453. "id": 1,
  10454. "mode": "1000BaseT-FD",
  10455. "speed": "1000"
  10456. },
  10457. {
  10458. "duplex": "half",
  10459. "link": "down",
  10460. "id": 2,
  10461. "mode": "10BaseT-HD",
  10462. "speed": "10"
  10463. },
  10464. {
  10465. "duplex": "full",
  10466. "mac_list": [
  10467. {
  10468. "mac": "00:24:D4:7E:00:4C",
  10469. "hostname": "r0ro's player"
  10470. }
  10471. ],
  10472. "link": "up",
  10473. "id": 4,
  10474. "mode": "1000BaseT-FD",
  10475. "speed": "1000"
  10476. }
  10477. ]
  10478. }
  10479.  
  10480. Get a port configuration
  10481.  
  10482. GET /api/v8/switch/port/{id}
  10483.  
  10484. Get the SwitchPortConfig for the given port id
  10485.  
  10486. Example request:
  10487.  
  10488. GET /api/v8/switch/port/1 HTTP/1.1
  10489. Host: mafreebox.freebox.fr
  10490.  
  10491. Example response:
  10492.  
  10493. HTTP/1.1 200 OK
  10494. Content-Type: application/json; charset=utf-8
  10495.  
  10496. {
  10497. "success": true,
  10498. "result": {
  10499. "id": 1,
  10500. "speed": "auto",
  10501. "duplex": "auto"
  10502. }
  10503. }
  10504.  
  10505. Update a port configuration
  10506.  
  10507. PUT /api/v8/switch/port/{id}
  10508.  
  10509. Update the SwitchPortConfig for the given port id
  10510.  
  10511. Example request:
  10512.  
  10513. PUT /api/v8/switch/port/1 HTTP/1.1
  10514. Host: mafreebox.freebox.fr
  10515.  
  10516. {
  10517. "speed": "10"
  10518. }
  10519.  
  10520. Example response:
  10521.  
  10522. HTTP/1.1 200 OK
  10523. Content-Type: application/json; charset=utf-8
  10524.  
  10525. {
  10526. "success": true,
  10527. "result": {
  10528. "id": 4,
  10529. "speed": "10",
  10530. "duplex": "auto"
  10531. }
  10532. }
  10533.  
  10534. Get a port stats
  10535.  
  10536. GET /api/v8/switch/port/{id}/stats
  10537.  
  10538. Get the SwitchPortStats for the given port id
  10539.  
  10540. Example request:
  10541.  
  10542. GET /api/v8/switch/port/4/stats HTTP/1.1
  10543. Host: mafreebox.freebox.fr
  10544.  
  10545. Example response:
  10546.  
  10547. HTTP/1.1 200 OK
  10548. Content-Type: application/json; charset=utf-8
  10549.  
  10550. {
  10551. "success": true,
  10552. "result": {
  10553. "rx_packets_rate": 4,
  10554. "rx_good_bytes": 20018805,
  10555. "rx_oversize_packets": 0,
  10556. "rx_unicast_packets": 113034,
  10557. "tx_bytes_rate": 736,
  10558. "tx_unicast_packets": 112409,
  10559. "rx_bytes_rate": 608,
  10560. "tx_packets": 166266,
  10561. "tx_collisions": 0,
  10562. "tx_packets_rate": 6,
  10563. "tx_fcs": 0,
  10564. "tx_bytes": 25316860,
  10565. "rx_jabber_packets": 0,
  10566. "tx_single": 0,
  10567. "tx_excessive": 0,
  10568. "rx_pause": 0,
  10569. "rx_multicast_packets": 1217,
  10570. "tx_pause": 0,
  10571. "rx_good_packets": 114296,
  10572. "rx_broadcast_packets": 45,
  10573. "tx_multiple": 0,
  10574. "tx_deferred": 0,
  10575. "tx_late": 0,
  10576. "tx_multicast_packets": 27962,
  10577. "rx_fcs_packets": 0,
  10578. "tx_broadcast_packets": 25895,
  10579. "rx_err_packets": 0,
  10580. "rx_fragments_packets": 0,
  10581. "rx_bad_bytes": 0,
  10582. "rx_undersize_packets": 0
  10583. }
  10584. }
  10585.  
  10586. Wi-Fi
  10587.  
  10588. The Wi-Fi API allow you to control the settings of the Freebox Wi-Fi.
  10589. Wi-Fi Errors
  10590.  
  10591. When attempting to access this API, you may encounter the following errors:
  10592.  
  10593. error_code
  10594.  
  10595. Description
  10596.  
  10597. inval
  10598.  
  10599. invalid parameters
  10600.  
  10601. exist
  10602.  
  10603. entry already exists
  10604.  
  10605. nospc
  10606.  
  10607. maximum entry count reached
  10608.  
  10609. nodev
  10610.  
  10611. invalid device id
  10612.  
  10613. noent
  10614.  
  10615. invalid id
  10616.  
  10617. busy
  10618.  
  10619. device busy
  10620.  
  10621. inval_band
  10622.  
  10623. invalid wifi band
  10624.  
  10625. inval_ssid
  10626.  
  10627. invalid ssid
  10628.  
  10629. inval_freq
  10630.  
  10631. invalid wifi frequency
  10632.  
  10633. inval_cipher
  10634.  
  10635. invalid cipher mod
  10636.  
  10637. inval_key_len
  10638.  
  10639. invalid key length
  10640.  
  10641. inval_key
  10642.  
  10643. invalid key
  10644.  
  10645. inval_ht_needs_wmm
  10646.  
  10647. wmm must be enabled for 802.11n
  10648.  
  10649. inval_ac_needs_ht
  10650.  
  10651. invalid configuration 802.11ac need ht support
  10652.  
  10653. inval_ac_not_2d4g
  10654.  
  10655. invalid configuration 802.11ac is not supported on 2.4G band
  10656.  
  10657. inval_wps_needs_ccmp
  10658.  
  10659. wps need WPA2/AES to be enabled
  10660.  
  10661. inval_wps_macfilter
  10662.  
  10663. wps cannot work when mac filter is enabled
  10664.  
  10665. inval_wps_hidden_ssid
  10666.  
  10667. wps cannot work with hidden ssid
  10668. Wi-Fi Global Config
  10669.  
  10670. Global config gives quick access to major configuration settings (eg: toggle Wi-Fi)
  10671.  
  10672. WifiGlobalConfig has the following attributes:
  10673.  
  10674. WifiGlobalConfig
  10675.  
  10676. enabled bool
  10677.  
  10678. is wifi enabled
  10679.  
  10680. mac_filter_state enum
  10681.  
  10682. mac_filter_state
  10683.  
  10684. Description
  10685.  
  10686. disabled
  10687.  
  10688. mac filter is disabled
  10689.  
  10690. whitelist
  10691.  
  10692. mac filter is enabled, using a whitelist
  10693.  
  10694. blacklist
  10695.  
  10696. mac filter is enabled, using a blacklist
  10697.  
  10698. Wi-Fi global config API
  10699. Get the current Wi-Fi global configuration
  10700.  
  10701. GET /api/v8/wifi/config/
  10702.  
  10703. Get the WifiGlobalConfig
  10704.  
  10705. Example request:
  10706.  
  10707. GET /api/v8/wifi/config/ HTTP/1.1
  10708. Host: mafreebox.freebox.fr
  10709.  
  10710. Example response:
  10711.  
  10712. HTTP/1.1 200 OK
  10713. Content-Type: application/json; charset=utf-8
  10714.  
  10715. {
  10716. "success": true,
  10717. "result": {
  10718. "enabled": true,
  10719. "mac_filter_state": "blacklist"
  10720. }
  10721. }
  10722.  
  10723. Update the Wi-Fi global configuration
  10724.  
  10725. PUT /api/v8/wifi/config/
  10726.  
  10727. Update the WifiGlobalConfig
  10728.  
  10729. Example request:
  10730.  
  10731. PUT /api/v8/wifi/config/ HTTP/1.1
  10732. Host: mafreebox.freebox.fr
  10733.  
  10734. {
  10735. "enabled": false
  10736. }
  10737.  
  10738. Example response:
  10739.  
  10740. HTTP/1.1 200 OK
  10741. Content-Type: application/json; charset=utf-8
  10742.  
  10743. {
  10744. "success": true,
  10745. "result": {
  10746. "enabled": false,
  10747. "mac_filter_state": "blacklist"
  10748. }
  10749. }
  10750.  
  10751. Wi-Fi Access Point
  10752. Wi-Fi AP objects
  10753.  
  10754. The Freebox may have one or more access points, you can configure each access point with this api.
  10755.  
  10756. WifiAp
  10757.  
  10758. id int Read-only
  10759.  
  10760. wifi ap id
  10761.  
  10762. name string Read-only
  10763.  
  10764. wifi ap name
  10765.  
  10766. status WifiApStatus Read-only
  10767.  
  10768. ap status
  10769.  
  10770. capabilites WifiApCapabilities Read-only
  10771.  
  10772. ap capabilities
  10773.  
  10774. config WifiApConfig
  10775.  
  10776. ap configuration
  10777.  
  10778. WifiApStatus
  10779.  
  10780. state enum Read-only
  10781.  
  10782. state
  10783.  
  10784. Description
  10785.  
  10786. scanning
  10787.  
  10788. Ap is probing wifi channels
  10789.  
  10790. no_param
  10791.  
  10792. Ap is not configured
  10793.  
  10794. bad_param
  10795.  
  10796. Ap has an invalid configuration
  10797.  
  10798. disabled
  10799.  
  10800. Ap is permanently disabled
  10801.  
  10802. disabled_planning
  10803.  
  10804. Ap is currently disabled according to planning
  10805.  
  10806. no_active_bss
  10807.  
  10808. Ap has no active BSS
  10809.  
  10810. starting
  10811.  
  10812. Ap is starting
  10813.  
  10814. acs
  10815.  
  10816. Ap is selecting the best available channel
  10817.  
  10818. ht_scan
  10819.  
  10820. Ap is scanning for other access point
  10821.  
  10822. dfs
  10823.  
  10824. Ap is performing dynamic frequency selection
  10825.  
  10826. active
  10827.  
  10828. Ap is active
  10829.  
  10830. failed
  10831.  
  10832. Ap has failed to start
  10833.  
  10834. channel_width int Read-only
  10835.  
  10836. effective channel width (in MHz)
  10837.  
  10838. primary_channel int Read-only
  10839.  
  10840. effective primary channel
  10841.  
  10842. secondary_channel int Read-only
  10843.  
  10844. effective secondary channel
  10845.  
  10846. dfs_cac_remaining_time int Read-only
  10847.  
  10848. time left in dfs state
  10849.  
  10850. dfs_disabled bool Read-only
  10851.  
  10852. Indicates if DFS channels are unaviable regardless of how the WifiApConfig is configured for this phy. This is enabled when your freeboox is in compatibility mode for other Freebox wifi products.
  10853.  
  10854. WifiApCapabilities
  10855.  
  10856. [UNSTABLE]
  10857.  
  10858. 2d4g int Read-only
  10859.  
  10860. map of capabilites in 2.4 GHz band
  10861.  
  10862. 5g int Read-only
  10863.  
  10864. map of capabilites in 5 GHz band
  10865.  
  10866. 60g int Read-only
  10867.  
  10868. map of capabilites in 60 GHz band
  10869.  
  10870. NOTE: before enabling some feature in ap config, you should ensure that AP supports the feature using its provided capabilities.
  10871.  
  10872. WifiApHtConfig
  10873.  
  10874. ac_enabled bool
  10875.  
  10876. enable 802.11ac
  10877.  
  10878. ht_enabled bool
  10879.  
  10880. enable 802.11n
  10881.  
  10882. [UNSTABLE]
  10883.  
  10884. WifiApConfig
  10885.  
  10886. band enum
  10887.  
  10888. band
  10889.  
  10890. Description
  10891.  
  10892. 2d4g
  10893.  
  10894. 2.4 GHz
  10895.  
  10896. 5g
  10897.  
  10898. 5 GHz
  10899.  
  10900. 60g
  10901.  
  10902. 60 GHz
  10903.  
  10904. channel_width int
  10905.  
  10906. wanted channel width (in MHz) :
  10907.  
  10908. 20 MHz
  10909.  
  10910. 40 MHz
  10911.  
  10912. 80 MHz
  10913.  
  10914. 160 MHz
  10915.  
  10916. primary_channel int
  10917.  
  10918. wanted primary channel, value of 0 means automatic selection
  10919.  
  10920. secondary_channel int
  10921.  
  10922. wanted secondary channel, value of 0 means automatic selection
  10923.  
  10924. dfs_enabled bool
  10925.  
  10926. enable channels that require DFS
  10927.  
  10928. ht WifiApHtConfig
  10929.  
  10930. wifi ht config
  10931.  
  10932. Wi-Fi AP API
  10933. Get the ap list
  10934.  
  10935. GET /api/v8/wifi/ap/
  10936.  
  10937. Get the list of Freebox Access Points WifiAp
  10938.  
  10939. Example request:
  10940.  
  10941. GET /api/v8/wifi/ap/ HTTP/1.1
  10942. Host: mafreebox.freebox.fr
  10943.  
  10944. Example response:
  10945.  
  10946. HTTP/1.1 200 OK
  10947. Content-Type: application/json; charset=utf-8
  10948.  
  10949. {
  10950. "success": true,
  10951. "result": [
  10952. {
  10953. "capabilities": {
  10954. "2d4g": {
  10955. "shortgi20": true,
  10956. "vht_rx_ldpc": false,
  10957.  
  10958. [ ... ]
  10959.  
  10960. "shortgi40": true,
  10961. },
  10962. "60g": {
  10963. [ ... ]
  10964. },
  10965. "5g": {
  10966. [ ... ]
  10967. }
  10968. },
  10969. "name": "2.4G",
  10970. "id": 0,
  10971. "config": {
  10972. "channel_width": "40",
  10973. "ht": {
  10974. "ht_enabled": true,
  10975. "ac_enabled": false,
  10976.  
  10977. [ ... ]
  10978. },
  10979. "dfs_enabled": false,
  10980. "band": "2d4g",
  10981. "secondary_channel": 13,
  10982. "primary_channel": 9
  10983. },
  10984. "status": {
  10985. "channel_width": "20",
  10986. "primary_channel": 9,
  10987. "dfs_cac_remaining_time": 0,
  10988. "secondary_channel": 0,
  10989. "state": "active"
  10990. }
  10991. }
  10992. ]
  10993. }
  10994.  
  10995. Get a particular AP
  10996.  
  10997. GET /api/v8/wifi/ap/{id}
  10998.  
  10999. Get the WifiAp with the requested id
  11000.  
  11001. Example request:
  11002.  
  11003. GET /api/v8/wifi/ap/0 HTTP/1.1
  11004. Host: mafreebox.freebox.fr
  11005.  
  11006. Example response:
  11007.  
  11008. HTTP/1.1 200 OK
  11009. Content-Type: application/json; charset=utf-8
  11010.  
  11011. {
  11012. "success": true,
  11013. "result": {
  11014. "capabilities": {
  11015. "2d4g": {
  11016. "shortgi20": true,
  11017. "vht_rx_ldpc": false,
  11018.  
  11019. [ ... ]
  11020.  
  11021. "shortgi40": true,
  11022. },
  11023. "60g": {
  11024. [ ... ]
  11025. },
  11026. "5g": {
  11027. [ ... ]
  11028. }
  11029. },
  11030. "name": "2.4G",
  11031. "id": 0,
  11032. "config": {
  11033. "channel_width": "40",
  11034. "ht": {
  11035. "ht_enabled": true,
  11036. "ac_enabled": false,
  11037.  
  11038. [ ... ]
  11039. },
  11040. "dfs_enabled": false,
  11041. "band": "2d4g",
  11042. "secondary_channel": 13,
  11043. "primary_channel": 9
  11044. },
  11045. "status": {
  11046. "channel_width": "20",
  11047. "primary_channel": 9,
  11048. "dfs_cac_remaining_time": 0,
  11049. "secondary_channel": 0,
  11050. "state": "active"
  11051. }
  11052. }
  11053. }
  11054.  
  11055. Update an AP
  11056.  
  11057. PUT /api/v8/wifi/ap/{id}
  11058.  
  11059. Update the WifiAp
  11060.  
  11061. Example request:
  11062.  
  11063. PUT /api/v8/wifi/ap/0 HTTP/1.1
  11064. Host: mafreebox.freebox.fr
  11065.  
  11066. {
  11067. "config": {
  11068. "channel_width": "20",
  11069. "ht": {
  11070. "ht_enabled": false
  11071. },
  11072. "primary_channel": 0,
  11073. "secondary_channel": 0
  11074. }
  11075. }
  11076.  
  11077. Example response:
  11078.  
  11079. HTTP/1.1 200 OK
  11080. Content-Type: application/json; charset=utf-8
  11081.  
  11082. {
  11083. "success": true,
  11084. "result": {
  11085. "capabilities": [ ... ],
  11086. "name": "2.4G",
  11087. "id": 0,
  11088. "config": {
  11089. "channel_width": "20",
  11090. "ht": {
  11091. "ht_enabled": false,
  11092. "ac_enabled": false
  11093.  
  11094. [ ... ]
  11095. },
  11096. "dfs_enabled": false,
  11097. "band": "2d4g",
  11098. "secondary_channel": 0,
  11099. "primary_channel": 0
  11100. },
  11101. "status": {
  11102. "channel_width": "20",
  11103. "primary_channel": 0,
  11104. "dfs_cac_remaining_time": 0,
  11105. "secondary_channel": 0,
  11106. "state": "scanning"
  11107. }
  11108. }
  11109. }
  11110.  
  11111. Wi-Fi AP allowed channels
  11112.  
  11113. To be able to allow user to pick a valid channel combination for a given AP you should use the following api to retreive the list of allowed channel combination.
  11114.  
  11115. WifiAllowedComb
  11116.  
  11117. band enum Read-only
  11118.  
  11119. the band for which the combination can be used
  11120.  
  11121. band
  11122.  
  11123. Description
  11124.  
  11125. 2d4g
  11126.  
  11127. 2.4 GHz
  11128.  
  11129. 5g
  11130.  
  11131. 5 GHz
  11132.  
  11133. 60g
  11134.  
  11135. 60 GHz
  11136.  
  11137. channel_width string Read-only
  11138.  
  11139. the channel_width for which the combination can be used
  11140.  
  11141. need_dfs bool Read-only
  11142.  
  11143. does this combination requires DFS.
  11144.  
  11145. You should only allow this combination if ap has allowed dfs.
  11146.  
  11147. dfs_cac_time int Read-only
  11148.  
  11149. time required in dfs state before behing able to start the AP.
  11150.  
  11151. primary int Read-only
  11152.  
  11153. primary channel
  11154.  
  11155. secondary int Read-only
  11156.  
  11157. secondary channel (zero means that secondary channel will not be used)
  11158.  
  11159. GET /api/v8/wifi/ap/{id}/allowed_channel_comb
  11160.  
  11161. Get the WifiAllowedComb for the given ap id
  11162.  
  11163. Example request:
  11164.  
  11165. GET /api/v8/wifi/ap/0/allowed_channel_comb HTTP/1.1
  11166. Host: mafreebox.freebox.fr
  11167.  
  11168. Example response:
  11169.  
  11170. HTTP/1.1 200 OK
  11171. Content-Type: application/json; charset=utf-8
  11172.  
  11173. {
  11174. "success": true,
  11175. "result": [
  11176. {
  11177. "channel_width": "20",
  11178. "dfs_cac_time": 0,
  11179. "need_dfs": false,
  11180. "primary": 1,
  11181. "band": "2d4g",
  11182. "secondary": 0
  11183. },
  11184.  
  11185. [ ... ]
  11186.  
  11187. {
  11188. "channel_width": "20",
  11189. "dfs_cac_time": 0,
  11190. "need_dfs": false,
  11191. "primary": 13,
  11192. "band": "2d4g",
  11193. "secondary": 0
  11194. },
  11195. {
  11196. "channel_width": "40",
  11197. "dfs_cac_time": 0,
  11198. "need_dfs": false,
  11199. "primary": 1,
  11200. "band": "2d4g",
  11201. "secondary": 5
  11202. },
  11203.  
  11204. [ ... ]
  11205.  
  11206. {
  11207. "channel_width": "40",
  11208. "dfs_cac_time": 0,
  11209. "need_dfs": false,
  11210. "primary": 13,
  11211. "band": "2d4g",
  11212. "secondary": 9
  11213. }
  11214. ]
  11215. }
  11216.  
  11217. Wi-Fi AP stations
  11218. Wi-Fi AP Stations objects
  11219.  
  11220. WifiStation has the following attributes:
  11221.  
  11222. WifiStation
  11223.  
  11224. id string Read-only
  11225.  
  11226. station id
  11227.  
  11228. mac string Read-only
  11229.  
  11230. client MAC address
  11231.  
  11232. bssid string Read-only
  11233.  
  11234. bssid on which the client is associated
  11235.  
  11236. hostname string Read-only
  11237.  
  11238. client host name
  11239.  
  11240. host LanHost Read-only
  11241.  
  11242. client host information
  11243.  
  11244. state enum Read-only
  11245.  
  11246. state
  11247.  
  11248. Description
  11249.  
  11250. associated
  11251.  
  11252. station is associated
  11253.  
  11254. authenticated
  11255.  
  11256. station is authenticated
  11257.  
  11258. inactive int Read-only
  11259.  
  11260. inactive duration (in seconds)
  11261.  
  11262. conn_duration int Read-only
  11263.  
  11264. connection duration (in seconds)
  11265.  
  11266. rx_bytes int Read-only
  11267.  
  11268. received bytes (from station to Freebox)
  11269.  
  11270. tx_bytes int Read-only
  11271.  
  11272. transmitted bytes (from Freebox to station)
  11273.  
  11274. tx_rate int Read-only
  11275.  
  11276. reception data rate (in bytes/s)
  11277.  
  11278. rx_rate int Read-only
  11279.  
  11280. transmission data rate (in bytes/s)
  11281.  
  11282. signal int Read-only
  11283.  
  11284. signal attenuation (in dB)
  11285.  
  11286. flags WifiStationFlags Read-only
  11287.  
  11288. station flags
  11289.  
  11290. last_rx WifiStationStats Read-only
  11291.  
  11292. last rx stats
  11293.  
  11294. last_tx WifiStationStats Read-only
  11295.  
  11296. last tx stats
  11297.  
  11298. WifiStationFlags
  11299.  
  11300. [UNSTABLE]
  11301.  
  11302. legacy bool Read-only
  11303.  
  11304. does station uses legacy wifi (802.11a, 802.11b)
  11305.  
  11306. ht bool Read-only
  11307.  
  11308. does station support ht (802.11n)
  11309.  
  11310. vht bool Read-only
  11311.  
  11312. does station support vht (802.11ac)
  11313.  
  11314. authorized bool Read-only
  11315.  
  11316. is the station authenticated
  11317.  
  11318. WifiStationStats
  11319.  
  11320. [UNSTABLE]
  11321.  
  11322. bitrate int Read-only
  11323.  
  11324. physical link rate (in 1/10th of MBit/s), -1 if unknown
  11325.  
  11326. mcs int Read-only
  11327.  
  11328. current link mcs, -1 if not used
  11329.  
  11330. vht_mcs int Read-only
  11331.  
  11332. current link vht mcs, -1 if not used
  11333.  
  11334. width string Read-only
  11335.  
  11336. current channel width
  11337.  
  11338. shortgi bool Read-only
  11339.  
  11340. is shortgi enabled
  11341.  
  11342. Get Wi-Fi Stations List
  11343.  
  11344. GET /api/v8/wifi/ap/{id}/stations/
  11345.  
  11346. Get the list of WifiStation associated to the AP
  11347.  
  11348. Example request:
  11349.  
  11350. GET /api/v8/wifi/ap/0/stations/ HTTP/1.1
  11351. Host: mafreebox.freebox.fr
  11352.  
  11353. Example response:
  11354.  
  11355. HTTP/1.1 200 OK
  11356. Content-Type: application/json; charset=utf-8
  11357.  
  11358. {
  11359. "success": true,
  11360. "result": [
  11361. {
  11362. "mac": "18:AF:36:15:69:42",
  11363. "last_rx": {
  11364. "bitrate": 110,
  11365. "mcs": -1,
  11366. "shortgi": false,
  11367. "vht_mcs": -1,
  11368. "width": "20"
  11369. },
  11370. "tx_bytes": 2651,
  11371. "last_tx": {
  11372. "bitrate": 360,
  11373. "mcs": -1,
  11374. "shortgi": false,
  11375. "vht_mcs": -1,
  11376. "width": "20"
  11377. },
  11378. "id": "00:24:D4:AC:DC:88-18:AF:36:15:69:42",
  11379. "bssid": "00:24:D4:AC:DC:88",
  11380. "flags": {
  11381. "vht": false,
  11382. "legacy": false,
  11383. "authorized": true,
  11384. "ht": false
  11385. },
  11386. "tx_rate": 0,
  11387. "host": {
  11388. [ ... ]
  11389. },
  11390. "inactive": 168,
  11391. "conn_duration": 263,
  11392. "hostname": "iPhone-de-r0ro",
  11393. "state": "authenticated",
  11394. "rx_bytes": 781,
  11395. "rx_rate": 0,
  11396. "signal": -38
  11397. }
  11398. ]
  11399. }
  11400.  
  11401. Get Wi-Fi Station
  11402.  
  11403. GET /api/v8/wifi/ap/{id}/stations/{mac}
  11404.  
  11405. Get a WifiStation associated to the AP
  11406.  
  11407. Example request:
  11408.  
  11409. GET /api/v8/wifi/ap/0/stations/18:AF:36:15:69:42 HTTP/1.1
  11410. Host: mafreebox.freebox.fr
  11411.  
  11412. Example response:
  11413.  
  11414. HTTP/1.1 200 OK
  11415. Content-Type: application/json; charset=utf-8
  11416.  
  11417. {
  11418. "success": true,
  11419. "result": {
  11420. "mac": "18:AF:36:15:69:42",
  11421. "last_rx": {
  11422. "bitrate": 110,
  11423. "mcs": -1,
  11424. "shortgi": false,
  11425. "vht_mcs": -1,
  11426. "width": "20"
  11427. },
  11428. "tx_bytes": 2651,
  11429. "last_tx": {
  11430. "bitrate": 360,
  11431. "mcs": -1,
  11432. "shortgi": false,
  11433. "vht_mcs": -1,
  11434. "width": "20"
  11435. },
  11436. "id": "00:24:D4:AC:DC:88-18:AF:36:15:69:42",
  11437. "bssid": "00:24:D4:AC:DC:88",
  11438. "flags": {
  11439. "vht": false,
  11440. "legacy": false,
  11441. "authorized": true,
  11442. "ht": false
  11443. },
  11444. "tx_rate": 0,
  11445. "host": {
  11446. [ ... ]
  11447. },
  11448. "inactive": 168,
  11449. "conn_duration": 263,
  11450. "hostname": "iPhone-de-r0ro",
  11451. "state": "authenticated",
  11452. "rx_bytes": 781,
  11453. "rx_rate": 0,
  11454. "signal": -38
  11455. }
  11456. }
  11457.  
  11458. Restart an AP
  11459.  
  11460. WARNING durring the restart the AP will be unavailable. You may not receive the response if you restart the Wifi card you are using to call the api
  11461.  
  11462. This will restart an AP, this is usefull when an AP is in failed state. This is the same as disabling/re-enabling the BSS on an AP.
  11463.  
  11464. POST /api/v8/wifi/ap/{id}/restart
  11465.  
  11466. Restarts the AP
  11467.  
  11468. Example request:
  11469.  
  11470. POST /api/v8/wifi/ap/0/restart HTTP/1.1
  11471. Host: mafreebox.freebox.fr
  11472.  
  11473. Example response:
  11474.  
  11475. HTTP/1.1 200 OK
  11476. Content-Type: application/json; charset=utf-8
  11477.  
  11478. {
  11479. "success": true
  11480. }
  11481.  
  11482. Wi-Fi BSS
  11483.  
  11484. Each AP can manage a set of BSS, with this api you can manage BSS settings
  11485. Wi-Fi BSS objects
  11486.  
  11487. WifiBss
  11488.  
  11489. id int Read-only
  11490.  
  11491. bss id
  11492.  
  11493. phy_id string Read-only
  11494.  
  11495. associated AP id
  11496.  
  11497. status WifiBssStatus Read-only
  11498.  
  11499. bss status
  11500.  
  11501. use_shared_params bool
  11502.  
  11503. if set to True the bss will use the shared parameters stored under shared_bss_params
  11504.  
  11505. if not the bss will use a configuration specific to this bss stored under bss_params
  11506.  
  11507. when you want to edit the bss config you should change the config values using values from bss_params or shared_bss_params as a source and update use_shared_params accordingly.
  11508.  
  11509. config WifiBssConfig
  11510.  
  11511. bss configuration (use this field for editing)
  11512.  
  11513. bss_params WifiBssConfig Read-only
  11514.  
  11515. current configuration specific to this bss
  11516.  
  11517. shared_bss_params WifiBssConfig Read-only
  11518.  
  11519. current configuration for shared bss config
  11520.  
  11521. WifiBssStatus
  11522.  
  11523. state enum Read-only
  11524.  
  11525. state
  11526.  
  11527. Description
  11528.  
  11529. phy_stopped
  11530.  
  11531. associated AP is stopped
  11532.  
  11533. no_param
  11534.  
  11535. bss is missing config
  11536.  
  11537. bad_param
  11538.  
  11539. bss has an invalid config
  11540.  
  11541. disabled
  11542.  
  11543. bss is disabled
  11544.  
  11545. starting
  11546.  
  11547. bss is starting
  11548.  
  11549. active
  11550.  
  11551. bss is active
  11552.  
  11553. failed
  11554.  
  11555. bss has failed to start
  11556.  
  11557. sta_count int Read-only
  11558.  
  11559. number of stations for this bss
  11560.  
  11561. authorized_sta_count int Read-only
  11562.  
  11563. number of authenticated stations for this bss
  11564.  
  11565. is_main_bss bool Deprecated
  11566.  
  11567. this as been replaced by use_shared_params in WifiBss
  11568.  
  11569. WifiBssConfig
  11570.  
  11571. enabled bool
  11572.  
  11573. enable this BSS. Note that if you want the AP to completely stop emitting wifi you should use WifiGlobalConfig enabled attribute.
  11574.  
  11575. use_default_config bool Deprecated
  11576.  
  11577. this as been replaced by use_shared_params in WifiBss
  11578.  
  11579. ssid str
  11580.  
  11581. bss displayed name
  11582.  
  11583. hide_ssid str
  11584.  
  11585. don’t show bss in bss list
  11586.  
  11587. encryption enum
  11588.  
  11589. encryption
  11590.  
  11591. Description
  11592.  
  11593. wep
  11594.  
  11595. wep (should not use)
  11596.  
  11597. wpa_psk_auto
  11598.  
  11599. wpa1 CCMP+TKIP (should not use)
  11600.  
  11601. wpa_psk_tkip
  11602.  
  11603. wpa1 TKIP (should not use)
  11604.  
  11605. wpa_psk_ccmp
  11606.  
  11607. wpa1 CCMP (should not use)
  11608.  
  11609. wpa12_psk_auto
  11610.  
  11611. wpa1+wpa2 CCMP+TKIP (should not use)
  11612.  
  11613. wpa2_psk_auto
  11614.  
  11615. wpa2 CCMP+TKIP (should not use)
  11616.  
  11617. wpa2_psk_tkip
  11618.  
  11619. wpa2 TKIP (should not use)
  11620.  
  11621. wpa2_psk_ccmp
  11622.  
  11623. wpa2 CCMP
  11624.  
  11625. wpa23_psk_ccmp
  11626.  
  11627. wpa2+wpa3 CCMP
  11628.  
  11629. key string Write-only
  11630.  
  11631. wifi key
  11632.  
  11633. eapol_version int Read-only
  11634.  
  11635. eapol version
  11636.  
  11637. Wi-Fi BSS API
  11638. Get the bss list
  11639.  
  11640. GET /api/v8/wifi/bss/
  11641.  
  11642. Get the list of Freebox Access Points WifiBss
  11643.  
  11644. Example request:
  11645.  
  11646. GET /api/v8/wifi/bss/ HTTP/1.1
  11647. Host: mafreebox.freebox.fr
  11648.  
  11649. Example response:
  11650.  
  11651. HTTP/1.1 200 OK
  11652. Content-Type: application/json; charset=utf-8
  11653.  
  11654. {
  11655. "success": true,
  11656. "result": [
  11657. {
  11658. "id": "00:24:D4:AA:BB:CC",
  11659. "phy_id": 0,
  11660. "use_shared_params": false,
  11661. "config": {
  11662. "enabled": true,
  11663. "ssid": "r0ro 2.4",
  11664. "encryption": "wpa2_psk_ccmp",
  11665. "use_default_config": false,
  11666. "hide_ssid": false,
  11667. "eapol_version": 2,
  11668. "wps_enabled": true,
  11669. "wps_uuid": "37f5c24a-4d8f-4dfc-9321-c40c42e588c0",
  11670. "key": "jesaispasdevine!"
  11671. },
  11672. "bss_params": {
  11673. "enabled": true,
  11674. "ssid": "r0ro 2.4",
  11675. "encryption": "wpa2_psk_ccmp",
  11676. "hide_ssid": false,
  11677. "eapol_version": 2,
  11678. "wps_enabled": true,
  11679. "wps_uuid": "37f5c24a-4d8f-4dfc-9321-c40c42e588c0",
  11680. "key": "jesaispasdevine!"
  11681. },
  11682. "shared_bss_params": {
  11683. "enabled": true,
  11684. "ssid": "r0ro",
  11685. "encryption": "wpa2_psk_ccmp",
  11686. "hide_ssid": false,
  11687. "eapol_version": 2,
  11688. "wps_enabled": true,
  11689. "wps_uuid": "37f5c24a-4d8f-4dfc-9321-c40c42e588c0",
  11690. "key": "lav7lav7!"
  11691. },
  11692. "status": {
  11693. "state": "active",
  11694. "sta_count": 1,
  11695. "authorized_sta_count": 1,
  11696. "is_main_bss": true
  11697. }
  11698. },
  11699.  
  11700. [ ... ]
  11701. ]
  11702. }
  11703.  
  11704. Get a particular BSS
  11705.  
  11706. GET /api/v8/wifi/bss/{id}
  11707.  
  11708. Get the WifiBss with the requested id
  11709.  
  11710. Example request:
  11711.  
  11712. GET /api/v8/wifi/bss/00:24:D4:AA:BB:CC HTTP/1.1
  11713. Host: mafreebox.freebox.fr
  11714.  
  11715. Example response:
  11716.  
  11717. HTTP/1.1 200 OK
  11718. Content-Type: application/json; charset=utf-8
  11719.  
  11720. {
  11721. "success": true,
  11722. "result": {
  11723. "id": "00:24:D4:AA:BB:CC",
  11724. "phy_id": 0,
  11725. "use_shared_params": false,
  11726. "config": {
  11727. "enabled": true,
  11728. "ssid": "r0ro 2.4",
  11729. "encryption": "wpa2_psk_ccmp",
  11730. "use_default_config": false,
  11731. "hide_ssid": false,
  11732. "eapol_version": 2,
  11733. "wps_enabled": true,
  11734. "wps_uuid": "37f5c24a-4d8f-4dfc-9321-c40c42e588c0",
  11735. "key": "jesaispasdevine!"
  11736. },
  11737. "bss_params": {
  11738. "enabled": true,
  11739. "ssid": "r0ro 2.4",
  11740. "encryption": "wpa2_psk_ccmp",
  11741. "hide_ssid": false,
  11742. "eapol_version": 2,
  11743. "wps_enabled": true,
  11744. "wps_uuid": "37f5c24a-4d8f-4dfc-9321-c40c42e588c0",
  11745. "key": "jesaispasdevine!"
  11746. },
  11747. "shared_bss_params": {
  11748. "enabled": true,
  11749. "ssid": "r0ro",
  11750. "encryption": "wpa2_psk_ccmp",
  11751. "hide_ssid": false,
  11752. "eapol_version": 2,
  11753. "wps_enabled": true,
  11754. "wps_uuid": "37f5c24a-4d8f-4dfc-9321-c40c42e588c0",
  11755. "key": "lav7lav7!"
  11756. },
  11757. "status": {
  11758. "state": "active",
  11759. "sta_count": 1,
  11760. "authorized_sta_count": 1,
  11761. "is_main_bss": true
  11762. }
  11763. }
  11764. }
  11765.  
  11766. Update an BSS
  11767.  
  11768. PUT /api/v8/wifi/bss/{id}
  11769.  
  11770. Update the WifiAp
  11771.  
  11772. Example request:
  11773.  
  11774. PUT /api/v8/wifi//bss/00:24:D4:AA:BB:CC HTTP/1.1
  11775. Host: mafreebox.freebox.fr
  11776.  
  11777. {
  11778. "config": {
  11779. "key": "c'était trop facile"
  11780. }
  11781. }
  11782.  
  11783. Example response:
  11784.  
  11785. HTTP/1.1 200 OK
  11786. Content-Type: application/json; charset=utf-8
  11787.  
  11788. {
  11789. "success": true,
  11790. "result": {
  11791. "id": "00:24:D4:AA:BB:CC",
  11792. "phy_id": 0,
  11793. "use_shared_params": false,
  11794. "config": {
  11795. "enabled": true,
  11796. "ssid": "r0ro 2.4",
  11797. "encryption": "wpa2_psk_ccmp",
  11798. "use_default_config": false,
  11799. "hide_ssid": false,
  11800. "eapol_version": 2,
  11801. "wps_enabled": true,
  11802. "wps_uuid": "37f5c24a-4d8f-4dfc-9321-c40c42e588c0",
  11803. "key": "jesaispasdevine!"
  11804. },
  11805. "bss_params": {
  11806. "enabled": true,
  11807. "ssid": "r0ro 2.4",
  11808. "encryption": "wpa2_psk_ccmp",
  11809. "hide_ssid": false,
  11810. "eapol_version": 2,
  11811. "wps_enabled": true,
  11812. "wps_uuid": "37f5c24a-4d8f-4dfc-9321-c40c42e588c0",
  11813. "key": "c'était trop facile"
  11814. },
  11815. "shared_bss_params": {
  11816. "enabled": true,
  11817. "ssid": "r0ro",
  11818. "encryption": "wpa2_psk_ccmp",
  11819. "hide_ssid": false,
  11820. "eapol_version": 2,
  11821. "wps_enabled": true,
  11822. "wps_uuid": "37f5c24a-4d8f-4dfc-9321-c40c42e588c0",
  11823. "key": "lav7lav7!"
  11824. },
  11825. "status": {
  11826. "state": "active",
  11827. "sta_count": 1,
  11828. "authorized_sta_count": 1,
  11829. "is_main_bss": true
  11830. }
  11831. }
  11832. }
  11833.  
  11834. Wi-Fi Radar
  11835.  
  11836. With this api you can list the surrounding Wi-Fi access points, and Wi-fi channel usage.
  11837.  
  11838. This a new feature introduced in firmware 2.1.0 (api v2).
  11839.  
  11840. A scan is automatically done at AP startup, if you need to refresh the information you can use the scan api
  11841. Wi-Fi Neighbor Object
  11842.  
  11843. WifiNeighbor has the following attributes:
  11844.  
  11845. WifiNeighbor
  11846.  
  11847. bssid string Read-only
  11848.  
  11849. neighbor bssid
  11850.  
  11851. ssid string Read-only
  11852.  
  11853. neighbor ssid
  11854.  
  11855. band enum Read-only
  11856.  
  11857. the band for which the combination can be used
  11858.  
  11859. band
  11860.  
  11861. Description
  11862.  
  11863. 2d4g
  11864.  
  11865. 2.4 GHz
  11866.  
  11867. 5g
  11868.  
  11869. 5 GHz
  11870.  
  11871. 60g
  11872.  
  11873. 60 GHz
  11874.  
  11875. channel_width int Read-only
  11876.  
  11877. neighbor channel_width
  11878.  
  11879. channel int Read-only
  11880.  
  11881. neighbor primary channel
  11882.  
  11883. secondary_channel int Read-only
  11884.  
  11885. neighbor secondary channel (0 for unused)
  11886.  
  11887. signal int Read-only
  11888.  
  11889. signal attenuation in dB
  11890.  
  11891. capabilities WifiNeighborCap Read-only
  11892.  
  11893. neighbor capabilities
  11894.  
  11895. WifiNeighborCap
  11896.  
  11897. legacy bool Read-only
  11898.  
  11899. neighbor uses legacy wifi (802.11a, 802.11b)
  11900.  
  11901. ht bool Read-only
  11902.  
  11903. neighbor supports ht (802.11n)
  11904.  
  11905. vht bool Read-only
  11906.  
  11907. neighbor supports vht (802.11ac)
  11908.  
  11909. List AP neighbors
  11910.  
  11911. GET /api/v8/wifi/ap/{id}/neighbors/
  11912.  
  11913. Get the list of WifiNeighbor seen by the AP
  11914.  
  11915. Example request:
  11916.  
  11917. GET /api/v8/wifi/ap/0/neighbors/ HTTP/1.1
  11918. Host: mafreebox.freebox.fr
  11919.  
  11920. Example response:
  11921.  
  11922. HTTP/1.1 200 OK
  11923. Content-Type: application/json; charset=utf-8
  11924.  
  11925. {
  11926. "success": true,
  11927. "result": [
  11928. {
  11929. "channel_width": "20",
  11930. "capabilities": {
  11931. "legacy": false,
  11932. "vht": false,
  11933. "ht": true
  11934. },
  11935. "ssid": "Freebox-future",
  11936. "channel": 1,
  11937. "band": "2d4g",
  11938. "bssid": "00:24:D4:BA:BB:EE",
  11939. "secondary_channel": 0,
  11940. "signal": -27
  11941. },
  11942.  
  11943. [ ... ]
  11944.  
  11945. {
  11946. "channel_width": "20",
  11947. "capabilities": {
  11948. "legacy": false,
  11949. "vht": false,
  11950. "ht": true
  11951. },
  11952. "ssid": "Encore une freebox",
  11953. "channel": 1,
  11954. "band": "2d4g",
  11955. "bssid": "F4:CA:E5:5E:AC:4F",
  11956. "secondary_channel": 0,
  11957. "signal": -33
  11958. },
  11959. {
  11960. "channel_width": "20",
  11961. "capabilities": {
  11962. "legacy": false,
  11963. "vht": false,
  11964. "ht": true
  11965. },
  11966. "ssid": "lav6-140c76670212",
  11967. "channel": 1,
  11968. "band": "2d4g",
  11969. "bssid": "00:07:CB:00:00:FD",
  11970. "secondary_channel": 0,
  11971. "signal": -33
  11972. }
  11973. ]
  11974. }
  11975.  
  11976. Wi-Fi Channel usage Object
  11977.  
  11978. WifiChannelUsage
  11979.  
  11980. channel int Read-only
  11981.  
  11982. channel number
  11983.  
  11984. band enum Read-only
  11985.  
  11986. band
  11987.  
  11988. Description
  11989.  
  11990. 2d4g
  11991.  
  11992. 2.4 GHz
  11993.  
  11994. 5g
  11995.  
  11996. 5 GHz
  11997.  
  11998. 60g
  11999.  
  12000. 60 GHz
  12001.  
  12002. noise_level int Read-only
  12003.  
  12004. noise level on channel in dB
  12005.  
  12006. rx_busy_percent int Read-only
  12007.  
  12008. rx channel busy time percentage
  12009.  
  12010. List Wi-Fi channels usage
  12011.  
  12012. GET /api/v8/wifi/ap/{id}/channel_usage/
  12013.  
  12014. Get the list of WifiChannelUsage for the given AP
  12015.  
  12016. Example request:
  12017.  
  12018. GET /api/v8/wifi/ap/0/channel_usage/ HTTP/1.1
  12019. Host: mafreebox.freebox.fr
  12020.  
  12021. Example response:
  12022.  
  12023. HTTP/1.1 200 OK
  12024. Content-Type: application/json; charset=utf-8
  12025.  
  12026. {
  12027. "success": true,
  12028. "result": "result": [
  12029. {
  12030. "band": "2d4g",
  12031. "noise_level": -66,
  12032. "rx_busy_percent": 35,
  12033. "channel": 1
  12034. },
  12035.  
  12036. [ ... ]
  12037.  
  12038. {
  12039. "band": "2d4g",
  12040. "noise_level": -58,
  12041. "rx_busy_percent": 46,
  12042. "channel": 13
  12043. }
  12044. ]
  12045. }
  12046.  
  12047. Refresh radar informations
  12048.  
  12049. WARNING durring the scan the AP will be unavailable. Therefore, you should ask for user confirmation prior to launching a scan.
  12050.  
  12051. Once launched you should wait until the ap state comes back from scanning to get updated info.
  12052.  
  12053. POST /api/v8/wifi/ap/{id}/neighbors/scan
  12054.  
  12055. Launch a wifi scan on given ap
  12056.  
  12057. Example request:
  12058.  
  12059. POST /api/v8/wifi/ap/0/neighbors/scan HTTP/1.1
  12060. Host: mafreebox.freebox.fr
  12061.  
  12062. Example response:
  12063.  
  12064. HTTP/1.1 200 OK
  12065. Content-Type: application/json; charset=utf-8
  12066.  
  12067. {
  12068. "success": true
  12069. }
  12070.  
  12071. Wi-Fi Planning
  12072.  
  12073. With api v2 you can now specify time range when you want to enable your wifi.
  12074. Wi-Fi Planning Object
  12075.  
  12076. WifiPlanning
  12077.  
  12078. use_planning bool
  12079.  
  12080. is the planning enabled
  12081.  
  12082. resolution int Read-only
  12083.  
  12084. planning resolution (number of slots per day)
  12085.  
  12086. mapping[] array of str
  12087.  
  12088. mapping for planning : “on” or “off” mapping[0] is monday at 0:0 mapping[7 * resolution - 1] is sunday last slot
  12089.  
  12090. (each slot has a duration of 60 * 24 / resolution minutes)
  12091.  
  12092. Get Wi-Fi Planning
  12093.  
  12094. GET /api/v8/wifi/planning/
  12095.  
  12096. Get the list of WifiChannelUsage for the given AP
  12097.  
  12098. Example request:
  12099.  
  12100. GET /api/v8/wifi/planning/ HTTP/1.1
  12101. Host: mafreebox.freebox.fr
  12102.  
  12103. Example response:
  12104.  
  12105. HTTP/1.1 200 OK
  12106. Content-Type: application/json; charset=utf-8
  12107.  
  12108. {
  12109. "success": true,
  12110. "result": {
  12111. "use_planning": false,
  12112. "resolution": 48,
  12113. "mapping": [
  12114. "on",
  12115. "on",
  12116. "on",
  12117. "on",
  12118.  
  12119. [ ... ]
  12120.  
  12121. "on",
  12122. "on",
  12123. "on",
  12124. "on"
  12125. ]
  12126. }
  12127. }
  12128.  
  12129. Update Wi-Fi Planning
  12130.  
  12131. PUT /api/v8/wifi/planning/
  12132.  
  12133. Get the list of WifiChannelUsage for the given AP
  12134.  
  12135. Example request:
  12136.  
  12137. PUT /api/v8/wifi/planning/ HTTP/1.1
  12138. Host: mafreebox.freebox.fr
  12139.  
  12140. {
  12141. "use_planning": true
  12142. }
  12143.  
  12144. Example response:
  12145.  
  12146. HTTP/1.1 200 OK
  12147. Content-Type: application/json; charset=utf-8
  12148.  
  12149. {
  12150. "success": true,
  12151. "result": {
  12152. "use_planning": true,
  12153. "resolution": 48,
  12154. "mapping": [
  12155. "on",
  12156. "on",
  12157. "on",
  12158. "on",
  12159.  
  12160. [ ... ]
  12161.  
  12162. "on",
  12163. "on",
  12164. "on",
  12165. "on"
  12166. ]
  12167. }
  12168. }
  12169.  
  12170. Wi-Fi MAC Filter API
  12171. Wi-Fi MAC Filter object
  12172.  
  12173. WifiMacFilter has the following attributes:
  12174.  
  12175. WifiMacFilter
  12176.  
  12177. id string Read-only
  12178.  
  12179. filter id
  12180.  
  12181. mac string Read-only
  12182.  
  12183. MAC address to filter
  12184.  
  12185. comment string
  12186.  
  12187. comment
  12188.  
  12189. type enum
  12190.  
  12191. type
  12192.  
  12193. Description
  12194.  
  12195. whitelist
  12196.  
  12197. if mac_filter is set to whitelist this station will be allowed
  12198.  
  12199. blacklist
  12200.  
  12201. if mac_filter is set to blacklist this station will be rejected
  12202.  
  12203. hostname string Read-only
  12204.  
  12205. host name when available
  12206.  
  12207. host LanHost Read-only
  12208.  
  12209. host information when available
  12210.  
  12211. Get the MAC filter list
  12212.  
  12213. GET /api/v8/wifi/mac_filter/
  12214.  
  12215. Get the list of WifiMacFilter
  12216.  
  12217. Example request:
  12218.  
  12219. GET /api/v8/wifi/mac_filter/ HTTP/1.1
  12220. Host: mafreebox.freebox.fr
  12221.  
  12222. Example response:
  12223.  
  12224. HTTP/1.1 200 OK
  12225. Content-Type: application/json; charset=utf-8
  12226.  
  12227. {
  12228. "success": true,
  12229. "result": [
  12230. {
  12231. "mac": "00:07:CB:01:02:03",
  12232. "type": "whitelist",
  12233. "comment": "test",
  12234. "hostname": "00:07:CB:01:02:03",
  12235. "id": "00:07:CB:01:02:03"
  12236. },
  12237. {
  12238. "mac": "00:24:D4:00:00:69",
  12239. "type": "blacklist",
  12240. "comment": "plop",
  12241. "hostname": "r0ro's iPad",
  12242. "id": "00:24:D4:00:00:69",
  12243. "host": {
  12244. [ ... ]
  12245. }
  12246. }
  12247. ]
  12248. }
  12249.  
  12250. Getting a particular MAC filter
  12251.  
  12252. GET /api/v8/wifi/mac_filter/{filter_id}
  12253.  
  12254. Returns the requested WifiMacFilter properties
  12255.  
  12256. Example request:
  12257.  
  12258. GET /api/v8/wifi/mac_filter/00:07:CB:01:02:03 HTTP/1.1
  12259. Host: mafreebox.freebox.fr
  12260.  
  12261. Example response:
  12262.  
  12263. HTTP/1.1 200 OK
  12264. Content-Type: application/json; charset=utf-8
  12265.  
  12266. {
  12267. "success": true,
  12268. "result": {
  12269. "mac": "00:07:CB:01:02:03",
  12270. "type": "whitelist",
  12271. "comment": "test",
  12272. "hostname": "00:07:CB:01:02:03",
  12273. "id": "00:07:CB:01:02:03"
  12274. }
  12275. }
  12276.  
  12277. Updating a MAC filter
  12278.  
  12279. PUT /api/v8/wifi/mac_filter/{filter_id}
  12280.  
  12281. Update a WifiMacFilter properties
  12282.  
  12283. Example request:
  12284.  
  12285. PUT /api/v8/wifi/mac_filter/ HTTP/1.1
  12286. Host: mafreebox.freebox.fr
  12287.  
  12288. {
  12289. "comment": "filtre de test",
  12290. "type": "blacklist"
  12291. }
  12292.  
  12293. Example response:
  12294.  
  12295. HTTP/1.1 200 OK
  12296. Content-Type: application/json; charset=utf-8
  12297.  
  12298. {
  12299. "success": true,
  12300. "result": {
  12301. "mac": "00:07:CB:01:02:03",
  12302. "type": "blacklist",
  12303. "comment": "filtre de test",
  12304. "hostname": "00:07:CB:01:02:03",
  12305. "id": "00:07:CB:01:02:03"
  12306. }
  12307. }
  12308.  
  12309. Delete a MAC filter
  12310.  
  12311. DELETE /api/v8/wifi/mac_filter/{filter_id}
  12312.  
  12313. Delete the WifiMacFilter with the given id
  12314.  
  12315. Example request:
  12316.  
  12317. DELETE /api/v8/wifi/mac_filter/00:07:CB:01:02:03 HTTP/1.1
  12318. Host: mafreebox.freebox.fr
  12319.  
  12320. Example response:
  12321.  
  12322. HTTP/1.1 200 OK
  12323. Content-Type: application/json; charset=utf-8
  12324.  
  12325. {
  12326. "success": true
  12327. }
  12328.  
  12329. Create a new MAC filter
  12330.  
  12331. POST /api/v8/wifi/mac_filter/
  12332.  
  12333. Crate a new the WifiMacFilter
  12334.  
  12335. Example request:
  12336.  
  12337. POST /api/v8/wifi/mac_filter/00:07:CB:01:02:03 HTTP/1.1
  12338. Host: mafreebox.freebox.fr
  12339.  
  12340. {
  12341. "comment": "filtre de test",
  12342. "type": "blacklist",
  12343. "mac": "00:07:CB:CB:07:00"
  12344. }
  12345.  
  12346. Example response:
  12347.  
  12348. HTTP/1.1 200 OK
  12349. Content-Type: application/json; charset=utf-8
  12350.  
  12351. {
  12352. "success": true,
  12353. "result": {
  12354. "mac": "00:07:CB:CB:07:00",
  12355. "type": "blacklist",
  12356. "comment": "filtre de test",
  12357. "hostname": "00:07:CB:CB:07:00",
  12358. "id": "00:07:CB:CB:07:00"
  12359. }
  12360. }
  12361.  
  12362. Wifi Config reset
  12363. Global reset
  12364.  
  12365. You can reset Wifi to default configuration with this api
  12366.  
  12367. POST /api/v8/wifi/config/reset/
  12368.  
  12369. Create a new the WifiMacFilter
  12370.  
  12371. Example request:
  12372.  
  12373. POST /api/v8/wifi/config/reset/ HTTP/1.1
  12374. Host: mafreebox.freebox.fr
  12375.  
  12376. Example response:
  12377.  
  12378. HTTP/1.1 200 OK
  12379. Content-Type: application/json; charset=utf-8
  12380.  
  12381. {
  12382. "success": true
  12383. }
  12384.  
  12385. Config reset value of an AP
  12386.  
  12387. You can get the default config value of a given AP.
  12388.  
  12389. GET /api/v8/wifi/ap/{id}/default
  12390.  
  12391. Get the WifiApConfig with the requested id
  12392.  
  12393. Example request:
  12394.  
  12395. GET /api/v8/wifi/ap/0/default HTTP/1.1
  12396. Host: mafreebox.freebox.fr
  12397.  
  12398. Example response:
  12399.  
  12400. HTTP/1.1 200 OK
  12401. Content-Type: application/json; charset=utf-8
  12402.  
  12403. {
  12404. "success": true,
  12405. "result": {
  12406. "channel_width": "20",
  12407. "ht": {
  12408. [ ... ]
  12409. },
  12410. "dfs_enabled": false,
  12411. "band": "2d4g",
  12412. "secondary_channel": 0,
  12413. "primary_channel": 0
  12414. }
  12415. }
  12416.  
  12417. Config reset value of a BSS
  12418.  
  12419. You can get the default config value for a given BSS.
  12420.  
  12421. GET /api/v8/wifi/bss/{id}/default
  12422.  
  12423. Get the WifiBssConfig with the requested bssid
  12424.  
  12425. Example request:
  12426.  
  12427. GET /api/v8/wifi/bss/02:00:00:00:00:00/default HTTP/1.1
  12428. Host: mafreebox.freebox.fr
  12429.  
  12430. Example response:
  12431.  
  12432. HTTP/1.1 200 OK
  12433. Content-Type: application/json; charset=utf-8
  12434.  
  12435. {
  12436. "success": true,
  12437. "result": {
  12438. "enabled": true,
  12439. "wps_uuid": "7ace9cb4-3aec-486e-b487-28df4998ff46",
  12440. "ssid": "super_ssid",
  12441. "encryption": "wpa2_psk_ccmp",
  12442. "wps_enabled": true,
  12443. "hide_ssid": false,
  12444. "eapol_version": 2,
  12445. "key": "motdepasse"
  12446. }
  12447. }
  12448.  
  12449. Config reset value (bulk)
  12450.  
  12451. This api gets the same data as the per AP/BSS ones but in one call only
  12452.  
  12453. GET /api/v8/wifi/default
  12454.  
  12455. Get the WifiBssConfig or WifiApConfig of all cards
  12456.  
  12457. Example request:
  12458.  
  12459. GET /api/v8/wifi/default HTTP/1.1
  12460. Host: mafreebox.freebox.fr
  12461.  
  12462. Example response:
  12463.  
  12464. HTTP/1.1 200 OK
  12465. Content-Type: application/json; charset=utf-8
  12466.  
  12467. {
  12468. "success": true,
  12469. "result": {
  12470. "aps": [
  12471. {
  12472. "params": {
  12473. "channel_width": "20",
  12474. "ht": { ... },
  12475. "dfs_enabled": false,
  12476. "band": "2d4g",
  12477. "secondary_channel": 0,
  12478. "primary_channel": 0
  12479. },
  12480. "ap_id": 0
  12481. },
  12482. {
  12483. "params": {
  12484. "channel_width": "80",
  12485. "ht": { ... },
  12486. "dfs_enabled": true,
  12487. "band": "5g",
  12488. "secondary_channel": 0,
  12489. "primary_channel": 0
  12490. },
  12491. "ap_id": 1
  12492. }
  12493. ],
  12494. "bsss": [
  12495. {
  12496. "params": {
  12497. "enabled": true,
  12498. "wps_uuid": "cbf5826c-25b2-4795-a7c7-cbd8f9454431",
  12499. "ssid": "super_ssid",
  12500. "encryption": "wpa2_psk_ccmp",
  12501. "wps_enabled": true,
  12502. "hide_ssid": false,
  12503. "eapol_version": 2,
  12504. "key": "lolzme"
  12505. },
  12506. "bssid": "00:00:00:00:00:08"
  12507. },
  12508. {
  12509. "params": {
  12510. "enabled": true,
  12511. "wps_uuid": "1d77f4c0-9544-4478-a8f0-cccb77031b94",
  12512. "ssid": "super_ssid",
  12513. "encryption": "wpa2_psk_ccmp",
  12514. "wps_enabled": true,
  12515. "hide_ssid": false,
  12516. "eapol_version": 2,
  12517. "key": "lolzme"
  12518. },
  12519. "bssid": "00:00:00:00:00:0C"
  12520. }
  12521. ]
  12522. }
  12523. }
  12524.  
  12525. Diagnostic API
  12526.  
  12527. This API is intended to simplify detecting problems or suboptimal configs on bsss or aps. This API is articulated around the WifiDiagItem
  12528.  
  12529. WifiDiagItem
  12530.  
  12531. ap_id int
  12532.  
  12533. When this item relates to an AP, this indicates the AP’s index When this item relates to a BSS, this field is unset
  12534.  
  12535. bssid str
  12536.  
  12537. When this item relates to a BSS, this field indicates the bss’s id When this item relates to an AP, this field is unset
  12538.  
  12539. code enum
  12540.  
  12541. The code identifying which param is faulty/suboptimal
  12542.  
  12543. Code
  12544.  
  12545. Description
  12546.  
  12547. all
  12548.  
  12549. This is a the same as doing a full reset of this AP/BSS
  12550.  
  12551. network_disabled
  12552.  
  12553. This changes the ‘enabled’ field in WifiBssConfig
  12554.  
  12555. network_security
  12556.  
  12557. This changes the ‘encryption’ field in WifiBssConfig
  12558.  
  12559. network_visibility
  12560.  
  12561. This changes the ‘hide_ssid’ field in WifiBssConfig
  12562.  
  12563. channel_width
  12564.  
  12565. This changes the ‘channel_width’ field in WifiApConfig
  12566.  
  12567. channel_value
  12568.  
  12569. This changes the ‘channel’ & ‘secondary_channel’ fields in WifiApConfig
  12570.  
  12571. severity enum
  12572.  
  12573. Severity
  12574.  
  12575. Description
  12576.  
  12577. minor
  12578.  
  12579. minor problems don’t have performance/compatibility implications
  12580.  
  12581. major
  12582.  
  12583. major problems do
  12584.  
  12585. Global diagnostic
  12586.  
  12587. The global diagnostics evaluates/works on all AP/BSS at once. This is good for bulk access
  12588.  
  12589. GET /api/v8/wifi/diag
  12590.  
  12591. Get the WifiDiagItem for the box
  12592.  
  12593. Example request:
  12594.  
  12595. GET /api/v8/wifi/diag HTTP/1.1
  12596. Host: mafreebox.freebox.fr
  12597.  
  12598. Example response:
  12599.  
  12600. HTTP/1.1 200 OK
  12601. Content-Type: application/json; charset=utf-8
  12602.  
  12603. {
  12604. "success": true,
  12605. "result": {
  12606. "aps": [
  12607. {
  12608. "severity": "minor",
  12609. "ap_id": 0,
  12610. "code": "channel_width"
  12611. },
  12612. {
  12613. "severity": "major",
  12614. "ap_id": 1,
  12615. "code": "channel_value"
  12616. }
  12617. ],
  12618. "bsss": [
  12619. {
  12620. "severity": "major",
  12621. "bssid": "02:00:00:00:00:08",
  12622. "code": "network_security"
  12623. },
  12624. {
  12625. "severity": "major",
  12626. "bssid": "02:00:00:00:00:0C",
  12627. "code": "network_visibility"
  12628. }
  12629. ]
  12630. }
  12631. }
  12632.  
  12633. POST /api/v8/wifi/diag
  12634.  
  12635. Fix a few of the WifiDiagItem at once. ‘aps’ & ‘bsss’ are arrays in which you can put any items. You can also omit ‘aps’ and/or ‘bsss’
  12636.  
  12637. Example request:
  12638.  
  12639. POST /api/v8/wifi/diag HTTP/1.1
  12640. Host: mafreebox.freebox.fr
  12641.  
  12642. {
  12643. "aps": [
  12644. {
  12645. "ap_id": 0,
  12646. "code": "channel_width"
  12647. },
  12648. [ ... ]
  12649. ],
  12650. "bsss": [
  12651. {
  12652. "bssid": "02:00:00:00:00:08",
  12653. "code": "all"
  12654. },
  12655. [ ... ]
  12656. ]
  12657. }
  12658.  
  12659. Example response:
  12660.  
  12661. HTTP/1.1 200 OK
  12662. Content-Type: application/json; charset=utf-8
  12663.  
  12664. {
  12665. "success": true
  12666. }
  12667.  
  12668. Per AP/BSS diagnostic
  12669.  
  12670. Same as the global API there also is a per AP/BSS api to get/fix the problems.
  12671.  
  12672. GET /api/v8/wifi/ap/{id}/diag & /api/v8/wifi/bss/{id}/diag
  12673.  
  12674. Get the WifiDiagItem for the AP/BSS
  12675.  
  12676. Example request:
  12677.  
  12678. GET /api/v8/wifi/ap/0/bss HTTP/1.1
  12679. Host: mafreebox.freebox.fr
  12680.  
  12681. Example response:
  12682.  
  12683. HTTP/1.1 200 OK
  12684. Content-Type: application/json; charset=utf-8
  12685.  
  12686. {
  12687. "success": true,
  12688. "result": [
  12689. {
  12690. "severity": "minor",
  12691. "ap_id": 0,
  12692. "code": "channel_width"
  12693. },
  12694. {
  12695. "severity": "major",
  12696. "ap_id": 0,
  12697. "code": "channel_value"
  12698. },
  12699. ]
  12700. }
  12701.  
  12702. POST /api/v8/wifi/ap/{id}/diag & /api/v8/wifi/bss/{id}/diag
  12703.  
  12704. Fix a few of the WifiDiagItem at once for a given AP/BSS
  12705.  
  12706. Example request:
  12707.  
  12708. POST /api/v8/wifi/bss/02:00:00:00:00:08/diag HTTP/1.1
  12709. Host: mafreebox.freebox.fr
  12710.  
  12711. [ "network_visibility", "network_visibility", ... ]
  12712.  
  12713. Example response:
  12714.  
  12715. HTTP/1.1 200 OK
  12716. Content-Type: application/json; charset=utf-8
  12717.  
  12718. {
  12719. "success": true
  12720. }
  12721.  
  12722. Wifi WPS API
  12723.  
  12724. This api lets you open wps sessions on wifi a bss to allow a device to connect to Wifi using WPS
  12725.  
  12726. To be able to open wps session, you first need to make sure that the bss is properly configured (with WifiBssConfig field ‘wps_enabled’ set to true)
  12727.  
  12728. Note that wps_enabled requires the encryption to either be wpa2_psk_ccmp or wpa2_psk_auto
  12729.  
  12730. You should call the WifiWpsCandidate api help to check which bss can be used for wps
  12731.  
  12732. Also, only one WPS session can be active at a given time
  12733. Wifi Wps Candidate object
  12734.  
  12735. WifiWpsCandidate has the following attributes:
  12736.  
  12737. WifiWpsCandidate
  12738.  
  12739. bssid string Read-only
  12740.  
  12741. bss id
  12742.  
  12743. ssid string Read-only
  12744.  
  12745. wifi network name
  12746.  
  12747. bss_uuid string Read-only
  12748.  
  12749. bss uuid for wps
  12750.  
  12751. band string Read-only
  12752.  
  12753. band
  12754.  
  12755. Description
  12756.  
  12757. 2d4g
  12758.  
  12759. 2.4 GHz
  12760.  
  12761. 5g
  12762.  
  12763. 5 GHz
  12764.  
  12765. 60g
  12766.  
  12767. 60 GHz
  12768.  
  12769. encryption enum Read-only
  12770.  
  12771. currently configured encryption mode see WifiBssConfig encryption field
  12772.  
  12773. wps_enabled bool Read-only
  12774.  
  12775. is wps enabled for this bss
  12776.  
  12777. state enum Read-only
  12778.  
  12779. the current state of the associated ap see WifiBssStatus state
  12780.  
  12781. Enable/disable WPS on all Wi-Fi cards
  12782.  
  12783. GET /api/v8/wifi/wps/config/
  12784.  
  12785. Get the global WPS state. WPS is globally enabled if at least one BSS has WPS enabled.
  12786.  
  12787. Example request:
  12788.  
  12789. GET /api/v8/wifi/wps/config/ HTTP/1.1
  12790. Host: mafreebox.freebox.fr
  12791.  
  12792. Example response:
  12793.  
  12794. HTTP/1.1 200 OK
  12795. Content-Type: application/json; charset=utf-8
  12796.  
  12797. {
  12798. "success": true,
  12799. "result": {
  12800. "enabled": true
  12801. }
  12802. }
  12803.  
  12804. PUT /api/v8/wifi/wps/config/
  12805.  
  12806. Set the global WPS state. It will update each BSS config with the provided state.
  12807.  
  12808. Example request:
  12809.  
  12810. PUT /api/v8/wifi/wps/config/ HTTP/1.1
  12811. Host: mafreebox.freebox.fr
  12812.  
  12813. {
  12814. "enabled": false
  12815. }
  12816.  
  12817. Example response:
  12818.  
  12819. HTTP/1.1 200 OK
  12820. Content-Type: application/json; charset=utf-8
  12821.  
  12822. {
  12823. "success": true,
  12824. "result": {
  12825. "enabled": false
  12826. }
  12827. }
  12828.  
  12829. Wifi WPS Session object
  12830.  
  12831. WifiWpsSession has the following attributes:
  12832.  
  12833. WifiWpsSession
  12834.  
  12835. id int Read-only
  12836.  
  12837. wps session id
  12838.  
  12839. bss_uuid string Read-only
  12840.  
  12841. bss wps uuid
  12842.  
  12843. ssid string Read-only
  12844.  
  12845. ssid
  12846.  
  12847. active bool Read-only
  12848.  
  12849. is the session active
  12850.  
  12851. result enum Read-only
  12852.  
  12853. result of the wps session
  12854.  
  12855. result
  12856.  
  12857. Description
  12858.  
  12859. success
  12860.  
  12861. success
  12862.  
  12863. user_canceled
  12864.  
  12865. canceled by user
  12866.  
  12867. self_canceled
  12868.  
  12869. canceled by restart of bss
  12870.  
  12871. failed_timeout
  12872.  
  12873. timeout while waiting for station
  12874.  
  12875. failed_overlap
  12876.  
  12877. another wps session was active
  12878.  
  12879. failed_unknown
  12880.  
  12881. unknown failure
  12882.  
  12883. start_date int Read-only
  12884.  
  12885. session start date (timestamp)
  12886.  
  12887. end_date enum Read-only
  12888.  
  12889. session end date (timestamp)
  12890.  
  12891. mac string Read-only
  12892.  
  12893. mac of the associated client (in case of success)
  12894.  
  12895. Start a Wps session on a bss
  12896.  
  12897. POST /api/v8/wifi/wps/start/
  12898.  
  12899. Once you identified a WifiWpsCandidate eligible for wps you can start a WifiWpsSession on the associated bss. In return you’ll get the id of the created session.
  12900.  
  12901. Example request:
  12902.  
  12903. POST /api/v8/wifi/wps/start/ HTTP/1.1
  12904. Host: mafreebox.freebox.fr
  12905.  
  12906. {
  12907. "bssid":"14:0C:76:87:04:38"
  12908. }
  12909.  
  12910. Example response:
  12911.  
  12912. HTTP/1.1 200 OK
  12913. Content-Type: application/json; charset=utf-8
  12914.  
  12915. {
  12916. "success": true,
  12917. "result": 1
  12918. }
  12919.  
  12920. Stop a Wps session
  12921.  
  12922. This lets you close an open session
  12923.  
  12924. Example request:
  12925.  
  12926. POST /api/v8/wifi/wps/stop/ HTTP/1.1
  12927. Host: mafreebox.freebox.fr
  12928.  
  12929. {
  12930. "session_id": 1
  12931. }
  12932.  
  12933. Example response:
  12934.  
  12935. HTTP/1.1 200 OK
  12936. Content-Type: application/json; charset=utf-8
  12937.  
  12938. {
  12939. "success": true
  12940. }
  12941.  
  12942. List the Wps session
  12943.  
  12944. GET /api/v8/wifi/wps/sessions/
  12945.  
  12946. Get the list of WifiWpsSession
  12947.  
  12948. Example request:
  12949.  
  12950. GET /api/v8/wifi/wps/sessions/ HTTP/1.1
  12951. Host: mafreebox.freebox.fr
  12952.  
  12953. Example response:
  12954.  
  12955. HTTP/1.1 200 OK
  12956. Content-Type: application/json; charset=utf-8
  12957.  
  12958. {
  12959. "success": true,
  12960. "result": [
  12961. {
  12962. "mac": "00:00:00:00:00:00",
  12963. "end_date": 1516012651,
  12964. "ssid": "r0ro 5G",
  12965. "active": false,
  12966. "id": 1,
  12967. "start_date": 1516012531,
  12968. "result": "failed_timeout",
  12969. "bss_uuid": "6a55ea3d-29fa-4bd9-b1e3-22a49a3ca134"
  12970. }
  12971. ]
  12972. }
  12973.  
  12974. Clear all Wps Sessions
  12975.  
  12976. DELETE /api/v8/wifi/wps/sessions/
  12977.  
  12978. Clear all the existing wps sessions
  12979.  
  12980. Example request:
  12981.  
  12982. DELETE /api/v8/wifi/wps/sessions/ HTTP/1.1
  12983. Host: mafreebox.freebox.fr
  12984.  
  12985. Example response:
  12986.  
  12987. HTTP/1.1 200 OK
  12988. Content-Type: application/json; charset=utf-8
  12989.  
  12990. {
  12991. "success": true
  12992. }
  12993.  
  12994. Wifi guest
  12995.  
  12996. This api lets you create “custom key” (guest Wi-Fi access) that can be used on your existing bss to allow someone to connect to your Wi-Fi network without knowing your actual Wi-Fi password.
  12997.  
  12998. When creating a “custom key” you can select if the associated access should be restricted to WAN only access, or if the guest can also access your local network. You can also define how long the access should be available.
  12999. Wifi Custom Key object
  13000.  
  13001. WifiCustomKey has the following attributes:
  13002.  
  13003. WifiCustomKeyHost
  13004.  
  13005. hostname string Read-only
  13006.  
  13007. host name
  13008.  
  13009. host LanHost Read-only
  13010.  
  13011. optional host information from Lan Browser (if available)
  13012.  
  13013. WifiCustomKeyParams
  13014.  
  13015. description string
  13016.  
  13017. description of the custom key
  13018.  
  13019. key string
  13020.  
  13021. Wi-Fi password for this custom access
  13022.  
  13023. max_use_count int
  13024.  
  13025. Number of different hosts that can connect to this network (maximum 127)
  13026.  
  13027. duration int
  13028.  
  13029. Number of seconds before the custom access is revoked
  13030.  
  13031. access_type enum
  13032.  
  13033. access_type
  13034.  
  13035. Description
  13036.  
  13037. full
  13038.  
  13039. stations will get full access to local network + internet
  13040.  
  13041. net_only
  13042.  
  13043. stations connected using this custom key will be isolated and won’t have access to local network devices
  13044.  
  13045. WifiCustomKey
  13046.  
  13047. id int Read-only
  13048.  
  13049. custom key id
  13050.  
  13051. remaining int Read-only
  13052.  
  13053. time remaining before the access (seconds) if 0 then it does not expire
  13054.  
  13055. params WifiCustomKeyParams
  13056.  
  13057. custom key parameters
  13058.  
  13059. users[] array of WifiCustomKeyHost Read-only
  13060.  
  13061. list of hosts that used the custom key
  13062.  
  13063. Get the list of wifi custom key
  13064.  
  13065. GET /api/v8/wifi/custom_key/
  13066.  
  13067. Get the list of WifiCustomKey
  13068.  
  13069. Example request:
  13070.  
  13071. GET /api/v8/wifi/custom_key/ HTTP/1.1
  13072. Host: mafreebox.freebox.fr
  13073.  
  13074. Example response:
  13075.  
  13076. HTTP/1.1 200 OK
  13077. Content-Type: application/json; charset=utf-8
  13078.  
  13079. {
  13080. "success": true,
  13081. "result": [
  13082. {
  13083. "id": 8,
  13084. "remaining": 86376,
  13085. "params": {
  13086. "max_use_count": 100,
  13087. "description": "soirée mario kart",
  13088. "duration": 86400,
  13089. "access_type": "full",
  13090. "key": "YY5Sg74W3VNxrmfwAz7aCY7OVqRVG2JN"
  13091. }
  13092. }
  13093. ]
  13094.  
  13095. }
  13096.  
  13097. Getting a particular wifi custom key
  13098.  
  13099. GET /api/v8/wifi/custom_key/{key_id}
  13100.  
  13101. Returns the requested WifiCustomKey properties
  13102.  
  13103. Example request:
  13104.  
  13105. GET /api/v8/wifi/custom_key/8 HTTP/1.1
  13106. Host: mafreebox.freebox.fr
  13107.  
  13108. Example response:
  13109.  
  13110. HTTP/1.1 200 OK
  13111. Content-Type: application/json; charset=utf-8
  13112.  
  13113. {
  13114. "success": true,
  13115. "result": {
  13116. "id": 8,
  13117. "remaining": 86376,
  13118. "params": {
  13119. "max_use_count": 100,
  13120. "description": "soirée mario kart",
  13121. "duration": 86400,
  13122. "access_type": "full",
  13123. "key": "YY5Sg74W3VNxrmfwAz7aCY7OVqRVG2JN"
  13124. }
  13125. }
  13126. }
  13127.  
  13128. Delete a wifi custom key
  13129.  
  13130. DELETE /api/v8/wifi/custom_key/{key_id}
  13131.  
  13132. Delete the WifiCustomKey with the given id It will automatically disconnect any connected stations using this custom key
  13133.  
  13134. Example request:
  13135.  
  13136. DELETE /api/v8/wifi/custom_key/8 HTTP/1.1
  13137. Host: mafreebox.freebox.fr
  13138.  
  13139. Example response:
  13140.  
  13141. HTTP/1.1 200 OK
  13142. Content-Type: application/json; charset=utf-8
  13143.  
  13144. {
  13145. "success": true
  13146. }
  13147.  
  13148. Create a new wifi custom key
  13149.  
  13150. POST /api/v8/wifi/custom_key/
  13151.  
  13152. Create a new the WifiCustomKey Post the parameters of the custom key
  13153.  
  13154. Example request:
  13155.  
  13156. POST /api/v8/wifi/custom_key HTTP/1.1
  13157. Host: mafreebox.freebox.fr
  13158.  
  13159. {
  13160. "description": "zuper",
  13161. "key": "rzR18eLeh6D8B7n1DtMbeDxwo2d4O9fB",
  13162. "max_use_count": "100",
  13163. "duration":86400,
  13164. "access_type":"net_only"
  13165. }
  13166.  
  13167. Example response:
  13168.  
  13169. HTTP/1.1 200 OK
  13170. Content-Type: application/json; charset=utf-8
  13171.  
  13172. {
  13173. "success":true,
  13174. "result": {
  13175. "id": 11,
  13176. "remaining": 86399,
  13177. "params": {
  13178. "max_use_count": 100,
  13179. "description": "zuper",
  13180. "duration": 86400,
  13181. "access_type": "full",
  13182. "key":"rzR18eLeh6D8B7n1DtMbeDxwo2d4O9fB"
  13183. }
  13184. }
  13185. }
  13186.  
  13187. System
  13188. System Config
  13189.  
  13190. SystemConfig has the following attributes:
  13191.  
  13192. SystemConfig
  13193.  
  13194. firmware_version string Read-only
  13195.  
  13196. freebox firmware version
  13197.  
  13198. mac string Read-only
  13199.  
  13200. freebox mac address
  13201.  
  13202. serial string Read-only
  13203.  
  13204. freebox serial number
  13205.  
  13206. uptime string Read-only
  13207.  
  13208. readable freebox uptime
  13209.  
  13210. uptime_val int Read-only
  13211.  
  13212. freebox uptime (in seconds)
  13213.  
  13214. board_name string Read-only
  13215.  
  13216. freebox hardware revision
  13217.  
  13218. box_authenticated bool Read-only
  13219.  
  13220. is the box authenticated (“étape 6”)
  13221.  
  13222. disk_status enum Read-only
  13223.  
  13224. the internal disk status
  13225.  
  13226. Value
  13227.  
  13228. Description
  13229.  
  13230. not_detected
  13231.  
  13232. The disk as not been detected
  13233.  
  13234. disabled
  13235.  
  13236. The disk is disabled
  13237.  
  13238. initializing
  13239.  
  13240. The disk is initializing
  13241.  
  13242. error
  13243.  
  13244. The disk failed to mount
  13245.  
  13246. active
  13247.  
  13248. The disk is ready
  13249.  
  13250. user_main_storage string
  13251.  
  13252. The label of the storage partition to use for user data. (Matches the label of the DiskPartition) In case of ‘light’ box flavor, it must be set by to a permanently attached external storage
  13253.  
  13254. expansions[] array of SystemConfigSensor Read-only
  13255.  
  13256. List of thermal sensors on the system
  13257.  
  13258. model_info SystemModelInfo Read-only
  13259.  
  13260. Device informations
  13261.  
  13262. fans[] array of SystemConfigFan Read-only
  13263.  
  13264. List of fans on the system
  13265.  
  13266. expansions[] array of SystemConfigExpansion Read-only
  13267.  
  13268. List of expansions slots modules
  13269.  
  13270. SystemModelInfo
  13271.  
  13272. name enum Read-only
  13273.  
  13274. name
  13275.  
  13276. Description
  13277.  
  13278. fbxgw-r1/full
  13279.  
  13280. Freebox Server (v6) revision 1
  13281.  
  13282. fbxgw-r2/full
  13283.  
  13284. Freebox Server (v6) revision 2
  13285.  
  13286. fbxgw-r1/mini
  13287.  
  13288. Freebox Mini revision 1
  13289.  
  13290. fbxgw-r2/mini
  13291.  
  13292. Freebox Mini revision 2
  13293.  
  13294. fbxgw-r1/one
  13295.  
  13296. Freebox One revision 1
  13297.  
  13298. fbxgw-r2/one
  13299.  
  13300. Freebox One revision 2
  13301.  
  13302. fbxgw7-r1/full
  13303.  
  13304. Freebox v7 revision 1
  13305.  
  13306. pretty_name string Read-only
  13307.  
  13308. Display name for the box model
  13309.  
  13310. has_expansions bool Read-only
  13311.  
  13312. if present and true, the box has expansions
  13313.  
  13314. has_lan_sfp bool Read-only
  13315.  
  13316. if present and true, the box has an SFP port for lan
  13317.  
  13318. has_dect bool Read-only
  13319.  
  13320. if present and true, the box has a DECT base station
  13321.  
  13322. has_home_automation bool Read-only
  13323.  
  13324. if present and true, the box has a Home automation module
  13325.  
  13326. has_femtocell_exp bool Read-only
  13327.  
  13328. if present and true, the box has a femtocell expansion slot
  13329.  
  13330. has_fixed_femtocell bool Read-only
  13331.  
  13332. if present and true, the box has an internal femtocell
  13333.  
  13334. has_vm bool Read-only
  13335.  
  13336. if present and true, the box supports virtual machines
  13337.  
  13338. SystemConfigSensor
  13339.  
  13340. id string Read-only
  13341.  
  13342. sensor id
  13343.  
  13344. name string Read-only
  13345.  
  13346. sensor display name
  13347.  
  13348. value int Read-only
  13349.  
  13350. sensor current value (in celsius degree)
  13351.  
  13352. SystemConfigFan
  13353.  
  13354. id string Read-only
  13355.  
  13356. fan id
  13357.  
  13358. name string Read-only
  13359.  
  13360. fan display name
  13361.  
  13362. value int Read-only
  13363.  
  13364. fan current speed (RPM)
  13365.  
  13366. SystemConfigExpansion
  13367.  
  13368. slot int Read-only
  13369.  
  13370. expansion slot id
  13371.  
  13372. probe_done bool Read-only
  13373.  
  13374. has the module presence been probed yet
  13375.  
  13376. present bool Read-only
  13377.  
  13378. has an expansion module been detected in the slot
  13379.  
  13380. supported bool Read-only
  13381.  
  13382. is the module supported in this slot
  13383.  
  13384. bundle string Read-only
  13385.  
  13386. module serial number
  13387.  
  13388. type enum Read-only
  13389.  
  13390. module type
  13391.  
  13392. Value
  13393.  
  13394. Description
  13395.  
  13396. unknown
  13397.  
  13398. unknown module
  13399.  
  13400. dsl_lte
  13401.  
  13402. xDSL + LTE
  13403.  
  13404. dsl_lte_external_antennas
  13405.  
  13406. xDSL + LTE with external antennas switch
  13407.  
  13408. ftth_p2p
  13409.  
  13410. FTTH P2P
  13411.  
  13412. ftth_pon
  13413.  
  13414. FTTH PON
  13415.  
  13416. security
  13417.  
  13418. Security module
  13419.  
  13420. System Config V5 (DEPRECATED)
  13421.  
  13422. SystemConfigV5 has the following attributes:
  13423.  
  13424. SystemConfigV5
  13425.  
  13426. firmware_version string Read-only
  13427.  
  13428. freebox firmware version
  13429.  
  13430. mac string Read-only
  13431.  
  13432. freebox mac address
  13433.  
  13434. serial string Read-only
  13435.  
  13436. freebox serial number
  13437.  
  13438. uptime string Read-only
  13439.  
  13440. readable freebox uptime
  13441.  
  13442. uptime_val int Read-only
  13443.  
  13444. freebox uptime (in seconds)
  13445.  
  13446. board_name string Read-only
  13447.  
  13448. freebox hardware revision
  13449.  
  13450. temp_cpum int Read-only
  13451.  
  13452. temp cpum (°C)
  13453.  
  13454. temp_sw int Read-only
  13455.  
  13456. temp sw (°C)
  13457.  
  13458. temp_cpub int Read-only
  13459.  
  13460. temp cpub (°C)
  13461.  
  13462. fan_rpm int Read-only
  13463.  
  13464. fan rpm
  13465.  
  13466. box_authenticated bool Read-only
  13467.  
  13468. is the box authenticated (“étape 6”)
  13469.  
  13470. disk_status enum Read-only
  13471.  
  13472. the internal disk status
  13473.  
  13474. Value
  13475.  
  13476. Description
  13477.  
  13478. not_detected
  13479.  
  13480. The disk as not been detected
  13481.  
  13482. disabled
  13483.  
  13484. The disk is disabled
  13485.  
  13486. initializing
  13487.  
  13488. The disk is initializing
  13489.  
  13490. error
  13491.  
  13492. The disk failed to mount
  13493.  
  13494. active
  13495.  
  13496. The disk is ready
  13497.  
  13498. box_flavor enum Read-only
  13499.  
  13500. the box ‘flavor’ for a given model
  13501.  
  13502. Value
  13503.  
  13504. Description
  13505.  
  13506. full
  13507.  
  13508. The box has an internal storage
  13509.  
  13510. light
  13511.  
  13512. The box has no internal storage
  13513.  
  13514. user_main_storage string
  13515.  
  13516. The label of the storage partition to use for user data. (Matches the label of the DiskPartition) In case of ‘light’ box flavor, it must be set by to a permanently attached external storage
  13517.  
  13518. System API
  13519. Get the current system info [UNSTABLE]
  13520. Current version (api >= v6)
  13521.  
  13522. GET /api/v8/system/
  13523.  
  13524. Get the SystemConfig
  13525.  
  13526. Example request:
  13527.  
  13528. GET /api/v8/system/ HTTP/1.1
  13529. Host: mafreebox.freebox.fr
  13530.  
  13531. Example response:
  13532.  
  13533. HTTP/1.1 200 OK
  13534. Content-Type: application/json; charset=utf-8
  13535.  
  13536. {
  13537. "success": true,
  13538. "result": {
  13539. "mac": "34:27:92:60:0B:9E",
  13540. "sensors": [{
  13541. "id": "t2",
  13542. "name": "Température 2",
  13543. "value": 47
  13544. },
  13545. {
  13546. "id": "t1",
  13547. "name": "Température 1",
  13548. "value": 45
  13549. },
  13550. {
  13551. "id": "t3",
  13552. "name": "Température 3",
  13553. "value": 42
  13554. },
  13555. {
  13556. "id": "cpu_cp_slave",
  13557. "name": "Température CPU CP Slave",
  13558. "value": 72
  13559. },
  13560. {
  13561. "id": "cpu_cp_master",
  13562. "name": "Température CPU CP Master",
  13563. "value": 72
  13564. },
  13565. {
  13566. "id": "cpu_ap",
  13567. "name": "Température CPU",
  13568. "value": 64
  13569. }
  13570. ],
  13571. "model_info": {
  13572. "pretty_name": "Freebox v7 (r1)",
  13573. "has_expansions": true,
  13574. "name": "fbxgw7-r1/full",
  13575. "has_lan_sfp": true,
  13576. "has_dect": true,
  13577. "internal_hdd_size": 0,
  13578. "has_home_automation": true,
  13579. "wifi_type": "2d4_5g_5g"
  13580. },
  13581. "fans": [{
  13582. "id": "secondary-fan",
  13583. "name": "Ventillateur 2",
  13584. "value": 1725
  13585. },
  13586. {
  13587. "id": "main",
  13588. "name": "Ventillateur 1",
  13589. "value": 1739
  13590. }
  13591. ],
  13592. "expansions": [{
  13593. "type": "security",
  13594. "present": true,
  13595. "slot": 1,
  13596. "probe_done": true,
  13597. "supported": true,
  13598. "bundle": "985700J183900112"
  13599. },
  13600. {
  13601. "type": "ftth_p2p",
  13602. "present": true,
  13603. "slot": 2,
  13604. "probe_done": true,
  13605. "supported": true,
  13606. "bundle": "959300V181500003"
  13607. }
  13608. ],
  13609. "box_authenticated": true,
  13610. "disk_status": "active",
  13611. "uptime": "2 heures 11 minutes 32 secondes",
  13612. "uptime_val": 7892,
  13613. "user_main_storage": "Disque 1",
  13614. "board_name": "fbxgw7r",
  13615. "serial": "957601J183400107",
  13616. "firmware_version": "6.6.6"
  13617. }
  13618. }
  13619.  
  13620. Old version (api < v5)
  13621.  
  13622. GET /api/v8/system/
  13623.  
  13624. Get the SystemConfigV5
  13625.  
  13626. Example request:
  13627.  
  13628. GET /api/v8/system/ HTTP/1.1
  13629. Host: mafreebox.freebox.fr
  13630.  
  13631. Example response:
  13632.  
  13633. HTTP/1.1 200 OK
  13634. Content-Type: application/json; charset=utf-8
  13635.  
  13636. {
  13637. "success": true,
  13638. "result": {
  13639. "mac": "F4:CA:E5:5C:EA:14",
  13640. "box_flavor": "light",
  13641. "temp_cpub": 63,
  13642. "disk_status": "active",
  13643. "box_authenticated": true,
  13644. "board_name": "fbxgw1r",
  13645. "fan_rpm": 1832,
  13646. "temp_sw": 52,
  13647. "uptime": "6 jours 22 heures 9 minutes 46 secondes",
  13648. "uptime_val": 598186,
  13649. "user_main_storage": "Disque 1",
  13650. "temp_cpum": 62,
  13651. "serial": "805400T144100853",
  13652. "firmware_version": "6.6.6"
  13653. }
  13654. }
  13655.  
  13656. Reboot the system
  13657.  
  13658. POST /api/v8/system/reboot/
  13659.  
  13660. Reboot the Freebox
  13661.  
  13662. Example request:
  13663.  
  13664. POST /api/v8/system/reboot/ HTTP/1.1
  13665. Host: mafreebox.freebox.fr
  13666.  
  13667. Example response:
  13668.  
  13669. HTTP/1.1 200 OK
  13670. Content-Type: application/json; charset=utf-8
  13671.  
  13672. {
  13673. "success": true
  13674. }
  13675.  
  13676. VPN Server [UNSTABLE]
  13677.  
  13678. The VPN Server API allows you to control the Freebox VPN Server
  13679. VPN Server Errors
  13680.  
  13681. When attempting to access this API, you may encounter the following errors:
  13682.  
  13683. error_code
  13684.  
  13685. Description
  13686.  
  13687. inval
  13688.  
  13689. invalid parameters
  13690.  
  13691. exist
  13692.  
  13693. entry already exists
  13694.  
  13695. noent
  13696.  
  13697. invalid id
  13698.  
  13699. nomem
  13700.  
  13701. internal error
  13702.  
  13703. unsupp
  13704.  
  13705. not supported
  13706.  
  13707. inuse
  13708.  
  13709. resource in use
  13710.  
  13711. busy
  13712.  
  13713. resource is busy
  13714.  
  13715. ioerror
  13716.  
  13717. internal error
  13718.  
  13719. size
  13720.  
  13721. too many elements
  13722. VPN Server List
  13723. VPN Server Object
  13724.  
  13725. VPNServer
  13726.  
  13727. VPNServer has the following attributes:
  13728.  
  13729. name string Read-only
  13730.  
  13731. VPN server name (id)
  13732.  
  13733. type enum Read-only
  13734.  
  13735. VPN server type
  13736.  
  13737. type
  13738.  
  13739. Description
  13740.  
  13741. ipsec
  13742.  
  13743. IPsec IKEv2 server
  13744.  
  13745. pptp
  13746.  
  13747. PPTP VPN server
  13748.  
  13749. openvpn
  13750.  
  13751. OpenVPN server
  13752.  
  13753. wireguard
  13754.  
  13755. WireGuard server
  13756.  
  13757. state enum Read-only
  13758.  
  13759. server state
  13760.  
  13761. state
  13762.  
  13763. stopped
  13764.  
  13765. starting
  13766.  
  13767. started
  13768.  
  13769. stopping
  13770.  
  13771. error
  13772.  
  13773. connection_count int Read-only
  13774.  
  13775. number of active connections
  13776.  
  13777. auth_connection_count int Read-only
  13778.  
  13779. number of active connections that have passed authentication
  13780.  
  13781. VPN Server List API
  13782.  
  13783. GET /api/v8/vpn/
  13784.  
  13785. Get the list of VPNServer
  13786.  
  13787. Example request:
  13788.  
  13789. GET /api/v8/vpn/ HTTP/1.1
  13790. Host: mafreebox.freebox.fr
  13791.  
  13792. Example response:
  13793.  
  13794. HTTP/1.1 200 OK
  13795. Content-Type: application/json; charset=utf-8
  13796.  
  13797. {
  13798. "success": true,
  13799. "result": [
  13800. {
  13801. "state": "stopped",
  13802. "type": "pptp",
  13803. "name": "pptp",
  13804. "connection_count": 0,
  13805. "auth_connection_count": 0
  13806. },
  13807. {
  13808. "state": "stopped",
  13809. "type": "openvpn",
  13810. "name": "openvpn_routed",
  13811. "connection_count": 0,
  13812. "auth_connection_count": 0
  13813. },
  13814. {
  13815. "state": "stopped",
  13816. "type": "openvpn",
  13817. "name": "openvpn_bridge",
  13818. "connection_count": 0,
  13819. "auth_connection_count": 0
  13820. },
  13821. {
  13822. "state": "stopped",
  13823. "type": "wireguard",
  13824. "name": "wireguard",
  13825. "connection_count": 0,
  13826. "auth_connection_count": 0
  13827. }
  13828. ]
  13829. }
  13830.  
  13831. VPN Server Config
  13832.  
  13833. VPNPPTPConfig
  13834.  
  13835. VPNServerConfig has the following attributes:
  13836.  
  13837. mppe enum
  13838.  
  13839. mppe
  13840.  
  13841. Description
  13842.  
  13843. disable
  13844.  
  13845. disable mppe
  13846.  
  13847. require
  13848.  
  13849. require mppe
  13850.  
  13851. require_128
  13852.  
  13853. require 128 bits mppe
  13854.  
  13855. allowed_auth dict
  13856.  
  13857. allowed authentication methods dictionnary with following entries:
  13858.  
  13859. pap
  13860.  
  13861. chap
  13862.  
  13863. mschapv2
  13864.  
  13865. values are booleans.
  13866.  
  13867. VPNOpenVpnConfig
  13868.  
  13869. cipher enum
  13870.  
  13871. cipher
  13872.  
  13873. blowfish
  13874.  
  13875. aes128
  13876.  
  13877. aes256
  13878.  
  13879. chacha20poly1305
  13880.  
  13881. disable_fragment bool
  13882.  
  13883. disable fragment configuration option
  13884.  
  13885. use_tcp bool
  13886.  
  13887. use TCP instead of UDP
  13888.  
  13889. VPNWireGuardConfig
  13890.  
  13891. mtu int
  13892.  
  13893. wireguard device MTU. Value must be between 512 and 1420.
  13894.  
  13895. VPNIPSecAuthMode
  13896.  
  13897. id_source enum
  13898.  
  13899. source of the connection id
  13900.  
  13901. id_source
  13902.  
  13903. custom
  13904.  
  13905. id_custom string
  13906.  
  13907. value of the source id when id_source is custom
  13908.  
  13909. VPNIPSecConfig
  13910.  
  13911. ike_version int Read-only
  13912.  
  13913. IKE protocol version
  13914.  
  13915. auth_modes[] array of VPNIPSecAuthMode Read-only
  13916.  
  13917. map of supported auth modes, currently only psk is supported
  13918.  
  13919. VPNServerConfig
  13920.  
  13921. id string Read-only
  13922.  
  13923. VPN server id
  13924.  
  13925. type enum Read-only
  13926.  
  13927. VPN server type
  13928.  
  13929. type
  13930.  
  13931. Description
  13932.  
  13933. pptp
  13934.  
  13935. PPTP VPN server
  13936.  
  13937. openvpn
  13938.  
  13939. OpenVPN server
  13940.  
  13941. ipsec
  13942.  
  13943. IPsec IKEv2 server
  13944.  
  13945. wireguard
  13946.  
  13947. WireGuard server
  13948.  
  13949. enabled bool
  13950.  
  13951. is the VPN server enabled
  13952.  
  13953. enable_ipv4 bool
  13954.  
  13955. enable IPv4 on this server
  13956.  
  13957. NOTE: Not relevant for openvpn_bridge, pptp and wireguard
  13958.  
  13959. enable_ipv6 bool
  13960.  
  13961. enable IPv6 on this server
  13962.  
  13963. NOTE: Not relevant for openvpn_bridge, pptp and wireguard
  13964.  
  13965. port int
  13966.  
  13967. the server port
  13968.  
  13969. NOTE: you can only edit the server port when type is openvpn or wireguard
  13970.  
  13971. min_port int Read-only
  13972.  
  13973. This field indicate the minimum possible value for port (see ConnectionStatus ipv4_port_range)
  13974.  
  13975. max_port int Read-only
  13976.  
  13977. This field indicate the maximum possible value for port (see ConnectionStatus ipv4_port_range)
  13978.  
  13979. port_ike int
  13980.  
  13981. IPSec ike server port
  13982.  
  13983. NOTE: only present for ipsec server
  13984.  
  13985. port_nat int
  13986.  
  13987. IPSec nat server port
  13988.  
  13989. NOTE: only present for ipsec server
  13990.  
  13991. conf_pptp VPNPPTPConfig
  13992.  
  13993. only available when type is PPTP
  13994.  
  13995. conf_openvpn VPNOpenVpnConfig
  13996.  
  13997. only available when type is OpenVPN
  13998.  
  13999. conf_ipsec VPNIPSecConfig
  14000.  
  14001. only available when type is IPsec
  14002.  
  14003. conf_wireguard VPNWireGuardConfig
  14004.  
  14005. only available when type is WireGuard
  14006.  
  14007. ip_start string Read-only
  14008.  
  14009. start of the IP range that will be used to give clients an IP
  14010.  
  14011. ip_end string Read-only
  14012.  
  14013. end of the IP range that will be used to give clients an IP
  14014.  
  14015. ip6_start string Read-only
  14016.  
  14017. start of the IPv6 range that will be used to give clients an IPv6
  14018.  
  14019. ip6_end string Read-only
  14020.  
  14021. end of the IPv6 range that will be used to give clients an IPv6
  14022.  
  14023. VPN Server Config API
  14024. Get a VPN config
  14025.  
  14026. GET /api/v8/vpn/{vpn_id}/config/
  14027.  
  14028. Get the VPNServerConfig
  14029.  
  14030. Example request:
  14031.  
  14032. GET /api/v8/vpn/openvpn_routed/config/ HTTP/1.1
  14033. Host: mafreebox.freebox.fr
  14034.  
  14035. Example response:
  14036.  
  14037. HTTP/1.1 200 OK
  14038. Content-Type: application/json; charset=utf-8
  14039.  
  14040. {
  14041. "success": true,
  14042. "result": {
  14043. "enabled": false,
  14044. "port": 1194,
  14045. "conf_openvpn": {
  14046. "cipher": "aes128"
  14047. },
  14048. "id": "openvpn_routed",
  14049. "ip_start": "192.168.27.65",
  14050. "ip_end": "192.168.27.95",
  14051. "type": "openvpn"
  14052. }
  14053. }
  14054.  
  14055. Update the VPN configuration
  14056.  
  14057. PUT /api/v8/vpn/openvpn_routed/config/
  14058.  
  14059. Update the VPNServerConfig
  14060.  
  14061. Example request:
  14062.  
  14063. PUT /api/v8/vpn/openvpn_routed/config/ HTTP/1.1
  14064. Host: mafreebox.freebox.fr
  14065.  
  14066. {
  14067. "conf_openvpn": {
  14068. "cipher": "blowfish"
  14069. }
  14070. }
  14071.  
  14072. Example response:
  14073.  
  14074. HTTP/1.1 200 OK
  14075. Content-Type: application/json; charset=utf-8
  14076.  
  14077. {
  14078. "success": true,
  14079. "result": {
  14080. "enabled": false,
  14081. "port": 1194,
  14082. "conf_openvpn": {
  14083. "cipher": "blowfish"
  14084. },
  14085. "id": "openvpn_routed",
  14086. "ip_start": "192.168.27.65",
  14087. "ip_end": "192.168.27.95",
  14088. "type": "openvpn"
  14089. }
  14090. }
  14091.  
  14092. VPN Server User API
  14093.  
  14094. VPN users are common to all VPN servers.
  14095. VPN Server User Object
  14096.  
  14097. VPNUser
  14098.  
  14099. VPNUser has the following attributes:
  14100.  
  14101. login string
  14102.  
  14103. VPN user login
  14104.  
  14105. type enum
  14106.  
  14107. VPN user type
  14108.  
  14109. type
  14110.  
  14111. standard
  14112.  
  14113. wireguard
  14114.  
  14115. password string Write-only
  14116.  
  14117. VPN user password (length must be between 8 and 32)
  14118.  
  14119. password_set bool Read-only
  14120.  
  14121. True if a password was provided for this user
  14122.  
  14123. ip_reservation ipv4
  14124.  
  14125. You can specify the IP you want to assign to this user. If you don’t want to use a specific IP pass an empty string or omit this property. This field is required if the type property is set to ‘wireguard’.
  14126.  
  14127. The IP must be in the VPN range (see ip_start, ip_end).
  14128.  
  14129. conf_wireguard
  14130.  
  14131. This field is present only if the type property is set to ‘wireguard’.
  14132.  
  14133. keepalive int
  14134.  
  14135. Interval in seconds at which keepalive packets are sent.
  14136.  
  14137. psk bool
  14138.  
  14139. Enable optional preshared-key.
  14140.  
  14141. VPN Server User List
  14142.  
  14143. GET /api/v8/vpn/user/
  14144.  
  14145. Get the list of VPNUser
  14146.  
  14147. Example request:
  14148.  
  14149. GET /api/v8/vpn/user/ HTTP/1.1
  14150. Host: mafreebox.freebox.fr
  14151.  
  14152. Example response:
  14153.  
  14154. HTTP/1.1 200 OK
  14155. Content-Type: application/json; charset=utf-8
  14156.  
  14157. {
  14158. "success": true,
  14159. "result": [
  14160. {
  14161. "ip_reservation": "",
  14162. "type": "standard",
  14163. "login": "test-1392677633-np",
  14164. "password_set": false
  14165. },
  14166. {
  14167. "ip_reservation": "",
  14168. "type": "standard",
  14169. "login": "test-1392677633",
  14170. "password_set": true
  14171. },
  14172. {
  14173. "ip_reservation": "192.168.27.68",
  14174. "type": "wireguard",
  14175. "login": "test-1392677633-wg",
  14176. "password_set": false,
  14177. "conf_wireguard": {
  14178. "keepalive": 10,
  14179. "psk": false
  14180. }
  14181. }
  14182. ]
  14183. }
  14184.  
  14185. Get a VPN user
  14186.  
  14187. GET /api/v8/vpn/user/{login}
  14188.  
  14189. Gets the VPNUser with the given login
  14190.  
  14191. Example request:
  14192.  
  14193. GET /api/v8/vpn/user/test-1392677633-np HTTP/1.1
  14194. Host: mafreebox.freebox.fr
  14195.  
  14196. Example response:
  14197.  
  14198. HTTP/1.1 200 OK
  14199. Content-Type: application/json; charset=utf-8
  14200.  
  14201. {
  14202. "success": true,
  14203. "result": {
  14204. "ip_reservation": "",
  14205. "login": "test-1392677633-np",
  14206. "type": "standard",
  14207. "password_set": false
  14208. }
  14209. }
  14210.  
  14211. Add a VPN User
  14212.  
  14213. POST /api/v8/vpn/user/
  14214.  
  14215. Creates a new VPNUser.
  14216.  
  14217. Example request:
  14218.  
  14219. POST /api/v8/vpn/user/ HTTP/1.1
  14220. Host: mafreebox.freebox.fr
  14221.  
  14222. {
  14223. "login": "vpnuser01",
  14224. "type": "standard",
  14225. "password": "thisisasecret",
  14226. "ip_reservation": "192.168.27.69"
  14227. }
  14228.  
  14229. Example response:
  14230.  
  14231. HTTP/1.1 200 OK
  14232. Content-Type: application/json; charset=utf-8
  14233.  
  14234. {
  14235. "success": true,
  14236. "result": {
  14237. "ip_reservation": "192.168.27.69",
  14238. "login": "vpnuser01",
  14239. "password_set": true
  14240. }
  14241. }
  14242.  
  14243. Delete a VPN User
  14244.  
  14245. DELETE /api/v8/vpn/user/{login}
  14246.  
  14247. Deletes the VPNUser
  14248.  
  14249. Example request:
  14250.  
  14251. DELETE /api/v8/vpn/user/vpnuser01 HTTP/1.1
  14252. Host: mafreebox.freebox.fr
  14253.  
  14254. Example response:
  14255.  
  14256. HTTP/1.1 200 OK
  14257. Content-Type: application/json; charset=utf-8
  14258.  
  14259. {
  14260. "success": true
  14261. }
  14262.  
  14263. Update a VPN User
  14264.  
  14265. PUT /api/v8/vpn/user/{login}
  14266.  
  14267. Updates the VPNUser task with the given login
  14268.  
  14269. Example request:
  14270.  
  14271. PUT /api/v8/vpn/user/test-1392677633-np HTTP/1.1
  14272. Host: mafreebox.freebox.fr
  14273.  
  14274. {
  14275. "password": "donttellanyone"
  14276. }
  14277.  
  14278. Example response:
  14279.  
  14280. HTTP/1.1 200 OK
  14281. Content-Type: application/json; charset=utf-8
  14282.  
  14283. {
  14284. "success": true,
  14285. "result": {
  14286. "ip_reservation": "",
  14287. "login": "test-1392677633-np",
  14288. "password_set": true
  14289. }
  14290. }
  14291.  
  14292. VPN IP Pool
  14293. Get the VPN server IP pool reservations
  14294.  
  14295. GET /api/v8/vpn/ip_pool/
  14296.  
  14297. Gets the VPNUser with the given login
  14298.  
  14299. Example request:
  14300.  
  14301. GET /api/v8/vpn/ip_pool/ HTTP/1.1
  14302. Host: mafreebox.freebox.fr
  14303.  
  14304. Example response:
  14305.  
  14306. HTTP/1.1 200 OK
  14307. Content-Type: application/json; charset=utf-8
  14308.  
  14309. {
  14310. "success": true,
  14311. "result": {
  14312. "ip_start": "192.168.27.65",
  14313. "ip_end": "192.168.27.95",
  14314. "reservations": [
  14315. {
  14316. "login": "test",
  14317. "ip": "192.168.27.69"
  14318. }
  14319. ]
  14320. }
  14321. }
  14322.  
  14323. VPN Server Connection API
  14324.  
  14325. This API allows listing the active connections to the VPN server
  14326. VPN Connection Object
  14327.  
  14328. VPNConnection
  14329.  
  14330. VPNConnection has the following attributes:
  14331.  
  14332. id string Read-only
  14333.  
  14334. connection id
  14335.  
  14336. vpn strong Read-only
  14337.  
  14338. related VPN server id
  14339.  
  14340. user string Read-only
  14341.  
  14342. user login
  14343.  
  14344. authenticated bool Read-only
  14345.  
  14346. is the connection authenticated
  14347.  
  14348. auth_time int Read-only
  14349.  
  14350. timestamp of the authentication
  14351.  
  14352. src_ip ipv4 Read-only
  14353.  
  14354. connection source IP address
  14355.  
  14356. src_port int Read-only
  14357.  
  14358. connection source port
  14359.  
  14360. local_ip int Read-only
  14361.  
  14362. attributed IP address from VPN adress pool
  14363.  
  14364. rx_bytes int Read-only
  14365.  
  14366. rx bytes
  14367.  
  14368. tx_bytes int Read-only
  14369.  
  14370. tx bytes
  14371.  
  14372. Get the list of connections
  14373.  
  14374. GET /api/v8/vpn/connection/
  14375.  
  14376. Get the list of VPNUser
  14377.  
  14378. Example request:
  14379.  
  14380. GET /api/v8/vpn/user/ HTTP/1.1
  14381. Host: mafreebox.freebox.fr
  14382.  
  14383. Example response:
  14384.  
  14385. HTTP/1.1 200 OK
  14386. Content-Type: application/json; charset=utf-8
  14387.  
  14388. {
  14389. "success": true,
  14390. "result": [
  14391. {
  14392. "rx_bytes": 94,
  14393. "authenticated": true,
  14394. "tx_bytes": 94,
  14395. "user": "test",
  14396. "id": "pptp-2",
  14397. "vpn": "pptp",
  14398. "src_ip": "93.184.216.119",
  14399. "auth_time": 1392895603,
  14400. "local_ip": "192.168.27.65"
  14401. }
  14402. ]
  14403. }
  14404.  
  14405. Close a given connection
  14406.  
  14407. DELETE /api/v8/vpn/connection/{id}
  14408.  
  14409. Deletes the VPNUser
  14410.  
  14411. Example request:
  14412.  
  14413. DELETE /api/v8/vpn/connection/pptp-2 HTTP/1.1
  14414. Host: mafreebox.freebox.fr
  14415.  
  14416. Example response:
  14417.  
  14418. HTTP/1.1 200 OK
  14419. Content-Type: application/json; charset=utf-8
  14420.  
  14421. {
  14422. "success": true
  14423. }
  14424.  
  14425. VPN User configuration file API
  14426.  
  14427. For OpenVPN and WireGuard servers, you can download a configuration file that will be used to configure the VPN client
  14428. Donwload a user configuration file
  14429.  
  14430. GET /api/v8/vpn/download_config/{server_name}/{login}/{fmt}
  14431.  
  14432. Download an configuration file for the given server and login The “fmt” field must be set to either “plain” or “json”.
  14433.  
  14434. WARNING: each time you download a new OpenVPN configuration file for a given user, you invalidate previous configuration file emitted for this user
  14435.  
  14436. Example request:
  14437.  
  14438. GET /api/v8/vpn/download_config/openvpn_routed/test/plain HTTP/1.1
  14439. Host: mafreebox.freebox.fr
  14440.  
  14441. Example response:
  14442.  
  14443. HTTP/1.1 200 OK
  14444. Date: Thu, 20 Feb 2014 13:14:01 GMT
  14445. Server: nginx
  14446. Content-Type: application/x-openvpn-profile
  14447. Content-Disposition: attachment; filename="config_openvpn_routed_test.ovpn"
  14448. Keep-Alive: timeout=5, max=99
  14449. Connection: Keep-Alive
  14450. Transfer-Encoding: chunked
  14451.  
  14452. [ ... ]
  14453.  
  14454. VPN Client [UNSTABLE]
  14455.  
  14456. The VPN Client API allows you to control the Freebox VPN Client
  14457. VPN Client Errors
  14458.  
  14459. When attempting to access this API, you may encounter the following errors:
  14460.  
  14461. error_code
  14462.  
  14463. Description
  14464.  
  14465. inval
  14466.  
  14467. invalid parameters
  14468.  
  14469. nomem
  14470.  
  14471. internal error
  14472.  
  14473. ioerror
  14474.  
  14475. internal error
  14476.  
  14477. nodev
  14478.  
  14479. invalid device
  14480.  
  14481. noent
  14482.  
  14483. invalid id
  14484.  
  14485. netdown
  14486.  
  14487. network is not available
  14488.  
  14489. exist
  14490.  
  14491. entry already exists
  14492.  
  14493. busy
  14494.  
  14495. resource is busy
  14496. VPN Client Configuration
  14497. VPN Client Configuration Object
  14498.  
  14499. VPNClientConfig
  14500.  
  14501. VPNClientConfig has the following attributes:
  14502.  
  14503. id string Read-only
  14504.  
  14505. VPN config id
  14506.  
  14507. description string
  14508.  
  14509. VPN description
  14510.  
  14511. type enum
  14512.  
  14513. VPN server type
  14514.  
  14515. type
  14516.  
  14517. Description
  14518.  
  14519. pptp
  14520.  
  14521. PPTP VPN server
  14522.  
  14523. openvpn
  14524.  
  14525. OpenVPN server
  14526.  
  14527. wireguard
  14528.  
  14529. WireGuard server
  14530.  
  14531. active bool
  14532.  
  14533. is this configuration active. Only one configuration is active at a time.
  14534.  
  14535. conf_pptp VPNClientConfigPPTP
  14536.  
  14537. only available when type is PPTP
  14538.  
  14539. conf_wireguard VPNClientConfigWireGuard
  14540.  
  14541. only available when type is WireGuard
  14542.  
  14543. VPNClientConfigPPTP
  14544.  
  14545. VPNClientConfigPPTP has the following attributes:
  14546.  
  14547. remote_host string
  14548.  
  14549. remote host IP or name
  14550.  
  14551. username string
  14552.  
  14553. VPN username
  14554.  
  14555. password string Write-only
  14556.  
  14557. VPN password
  14558.  
  14559. mppe enum
  14560.  
  14561. mppe
  14562.  
  14563. Description
  14564.  
  14565. disable
  14566.  
  14567. disable mppe
  14568.  
  14569. require
  14570.  
  14571. require mppe
  14572.  
  14573. require_128
  14574.  
  14575. require 128 bits mppe
  14576.  
  14577. allowed_auth dict
  14578.  
  14579. allowed authentication methods dictionnary with following keys:
  14580.  
  14581. eap
  14582.  
  14583. pap
  14584.  
  14585. chap
  14586.  
  14587. mschap
  14588.  
  14589. mschapv2
  14590.  
  14591. values are booleans.
  14592.  
  14593. VPNClientConfigWireGuard
  14594.  
  14595. VPNClientConfigWireGuard has the following attributes:
  14596.  
  14597. remote_addr string
  14598.  
  14599. remote host IP
  14600.  
  14601. remote_port int
  14602.  
  14603. remote host port
  14604.  
  14605. remote_public_key string
  14606.  
  14607. remote host public key
  14608.  
  14609. remote_preshared_key string
  14610.  
  14611. optional preshared key
  14612.  
  14613. local_priv_key string
  14614.  
  14615. local private key
  14616.  
  14617. local_addr[] array of VPNClientConfigWireGuardIP
  14618.  
  14619. IPs to assign to the local interface.
  14620.  
  14621. dns[] array of string
  14622.  
  14623. list of strings containing IPs of DNS servers to use. Both IPv4 and IPv6 are supported.
  14624.  
  14625. VPNClientConfigWireGuardIP
  14626.  
  14627. ip string
  14628.  
  14629. string representation of an IPv4 or IPv6 address
  14630.  
  14631. len int
  14632.  
  14633. prefix length associated with the IP address
  14634.  
  14635. Get VPN Client configuration list
  14636.  
  14637. GET /api/v8/vpn_client/config/
  14638.  
  14639. Get the list of VPNClientConfig
  14640.  
  14641. Example request:
  14642.  
  14643. GET /api/v8/vpn_client/config/ HTTP/1.1
  14644. Host: mafreebox.freebox.fr
  14645.  
  14646. Example response:
  14647.  
  14648. HTTP/1.1 200 OK
  14649. Content-Type: application/json; charset=utf-8
  14650.  
  14651. {
  14652. "success": true,
  14653. "result": [
  14654. {
  14655. "type": "pptp",
  14656. "description": "test vpn2",
  14657. "active": true,
  14658. "id": "vpn0",
  14659. "conf_pptp": {
  14660. "mppe": "require",
  14661. "username": "freeuser",
  14662. "remote_host": "vpnhost.example.org",
  14663. "allowed_auth": {
  14664. "eap": false,
  14665. "mschap": false,
  14666. "mschapv2": true,
  14667. "chap": false,
  14668. "pap": false
  14669. }
  14670. }
  14671. },
  14672. {
  14673. "type": "pptp",
  14674. "description": "test vpn1",
  14675. "active": false,
  14676. "id": "vpn1",
  14677. "conf_pptp": {
  14678. "mppe": "require",
  14679. "username": "testuser",
  14680. "remote_host": "example.org",
  14681. "allowed_auth": {
  14682. "eap": false,
  14683. "mschap": false,
  14684. "mschapv2": true,
  14685. "chap": false,
  14686. "pap": false
  14687. }
  14688. }
  14689. }
  14690. {
  14691. "type": "wireguard",
  14692. "description": "test vpn2",
  14693. "active": false,
  14694. "id": "vpn2",
  14695. "conf_wireguard": {
  14696. "local_addr": [{"ip":"198.51.100.10", "len":24}],
  14697. "local_priv_key": "TdbS1Y0RHZ6rRNSxlEUssD/pnRDfrHMFfJPLl5icvQg=",
  14698. "dns": ["198.51.100.53", "2001:db8:100::53"],
  14699. "mtu": 1420,
  14700. "remote_public_key": "QZnLR0TYPbPbhfVWeLVRf1zsPC0JXG/woVmsmEkgsw8=",
  14701. "remote_addr": "192.0.2.1",
  14702. "remote_port": 51820,
  14703. "remote_preshared_key": ""
  14704. }
  14705. }
  14706. ]
  14707. }
  14708.  
  14709. Get a VPN client config
  14710.  
  14711. GET /api/v8/vpn_client/config/{id}
  14712.  
  14713. Get the VPNClientConfig
  14714.  
  14715. Example request:
  14716.  
  14717. GET /api/v8/vpn_client/config/vpn0 HTTP/1.1
  14718. Host: mafreebox.freebox.fr
  14719.  
  14720. Example response:
  14721.  
  14722. HTTP/1.1 200 OK
  14723. Content-Type: application/json; charset=utf-8
  14724.  
  14725. {
  14726. "success": true,
  14727. "result": {
  14728. "type": "pptp",
  14729. "description": "test vpn2",
  14730. "active": true,
  14731. "id": "vpn0",
  14732. "conf_pptp": {
  14733. "mppe": "require",
  14734. "username": "freeuser",
  14735. "remote_host": "vpnhost.example.org",
  14736. "allowed_auth": {
  14737. "eap": false,
  14738. "mschap": false,
  14739. "mschapv2": true,
  14740. "chap": false,
  14741. "pap": false
  14742. }
  14743. }
  14744. }
  14745. }
  14746.  
  14747. Add a VPN client configuration
  14748.  
  14749. POST /api/v8/vpn_client/config/
  14750.  
  14751. Creates a new VPNClientConfig.
  14752.  
  14753. Example request:
  14754.  
  14755. POST /api/v8/vpn_client/config/ HTTP/1.1
  14756. Host: mafreebox.freebox.fr
  14757.  
  14758. {
  14759. "type": "pptp",
  14760. "description": "test pptp",
  14761. "active": false,
  14762. "conf_pptp": {
  14763. "mppe": "require",
  14764. "username": "fbxtest",
  14765. "password": "",
  14766. "remote_host": "test.example.org",
  14767. "allowed_auth": {
  14768. "mschapv2": true
  14769. }
  14770. }
  14771. }
  14772.  
  14773. Example response:
  14774.  
  14775. HTTP/1.1 200 OK
  14776. Content-Type: application/json; charset=utf-8
  14777.  
  14778. {
  14779. "success": true,
  14780. "result": {
  14781. "type": "pptp",
  14782. "description": "test pptp",
  14783. "active": false,
  14784. "id": "vpn2",
  14785. "conf_pptp": {
  14786. "password": "",
  14787. "mppe": "require",
  14788. "username": "fbxtest",
  14789. "remote_host": "test.example.org",
  14790. "allowed_auth": {
  14791. "eap": false,
  14792. "mschap": false,
  14793. "mschapv2": true,
  14794. "chap": false,
  14795. "pap": false
  14796. }
  14797. }
  14798. }
  14799. }
  14800.  
  14801. Delete a VPN client Configuration
  14802.  
  14803. DELETE /api/v8/vpn_client/config/{id}
  14804.  
  14805. Deletes the VPNClientConfig
  14806.  
  14807. Example request:
  14808.  
  14809. DELETE /api/v8/vpn_client/config/vpn2 HTTP/1.1
  14810. Host: mafreebox.freebox.fr
  14811.  
  14812. Example response:
  14813.  
  14814. HTTP/1.1 200 OK
  14815. Content-Type: application/json; charset=utf-8
  14816.  
  14817. {
  14818. "success": true
  14819. }
  14820.  
  14821. Update the VPN client configuration
  14822.  
  14823. PUT /api/v8/vpn_client/config/{id}
  14824.  
  14825. Update the VPNServerConfig
  14826.  
  14827. Example request:
  14828.  
  14829. PUT /api/v8/vpn_client/config/vpn0 HTTP/1.1
  14830. Host: mafreebox.freebox.fr
  14831.  
  14832. {
  14833. "active": false
  14834. }
  14835.  
  14836. Example response:
  14837.  
  14838. HTTP/1.1 200 OK
  14839. Content-Type: application/json; charset=utf-8
  14840.  
  14841. {
  14842. "success": true,
  14843. "result": {
  14844. "type": "pptp",
  14845. "description": "test vpn2",
  14846. "active": false,
  14847. "id": "vpn0",
  14848. "conf_pptp": {
  14849. "mppe": "require",
  14850. "username": "freeuser",
  14851. "remote_host": "vpnhost.example.org",
  14852. "allowed_auth": {
  14853. "eap": false,
  14854. "mschap": false,
  14855. "mschapv2": true,
  14856. "chap": false,
  14857. "pap": false
  14858. }
  14859. }
  14860. }
  14861. }
  14862.  
  14863. VPN Client Status
  14864. VPN Client Status Object
  14865.  
  14866. VPNClientStatus
  14867.  
  14868. VPNClientStatus has the following attributes:
  14869.  
  14870. enabled bool Read-only
  14871.  
  14872. is VPN client enabled
  14873.  
  14874. active_vpn string Read-only
  14875.  
  14876. active VPN id
  14877.  
  14878. active_vpn_description string Read-only
  14879.  
  14880. active VPN description
  14881.  
  14882. type enum Read-only
  14883.  
  14884. active VPN type
  14885.  
  14886. type
  14887.  
  14888. Description
  14889.  
  14890. pptp
  14891.  
  14892. PPTP VPN server
  14893.  
  14894. openvpn
  14895.  
  14896. OpenVPN server
  14897.  
  14898. wireguard
  14899.  
  14900. WireGuard server
  14901.  
  14902. state enum Read-only
  14903.  
  14904. state
  14905.  
  14906. Description
  14907.  
  14908. waiting_wan
  14909.  
  14910. waiting for wan connection
  14911.  
  14912. going_up
  14913.  
  14914. connecting
  14915.  
  14916. up
  14917.  
  14918. connected
  14919.  
  14920. going_down
  14921.  
  14922. disconnecting
  14923.  
  14924. down
  14925.  
  14926. disconnected
  14927.  
  14928. last_up int Read-only
  14929.  
  14930. timestamp of last successful connection
  14931.  
  14932. last_try int Read-only
  14933.  
  14934. timestamp of last connection attempt
  14935.  
  14936. next_try int Read-only
  14937.  
  14938. seconds left until next connection attempt
  14939.  
  14940. last_error enum Read-only
  14941.  
  14942. last_error
  14943.  
  14944. Description
  14945.  
  14946. none
  14947.  
  14948. no error
  14949.  
  14950. internal
  14951.  
  14952. internal error
  14953.  
  14954. authentication_failed
  14955.  
  14956. wrong credentials
  14957.  
  14958. auth_failed
  14959.  
  14960. wrong credentials
  14961.  
  14962. resolv_failed
  14963.  
  14964. invalid host name
  14965.  
  14966. connect_timeout
  14967.  
  14968. connection timeout
  14969.  
  14970. connect_failed
  14971.  
  14972. connection failed
  14973.  
  14974. setup_control_failed
  14975.  
  14976. PPTP session negociation failure
  14977.  
  14978. setup_call_failed
  14979.  
  14980. PPTP session failure
  14981.  
  14982. protocol
  14983.  
  14984. protocol error
  14985.  
  14986. remote_terminated
  14987.  
  14988. connection closed by remote peer
  14989.  
  14990. remote_disconnect
  14991.  
  14992. connection closed by remote peer
  14993.  
  14994. stats VpnClientStats Read-only
  14995.  
  14996. connection statistics
  14997.  
  14998. IPv4 VpnClientIpInfo Read-only
  14999.  
  15000. connection IPv4 information
  15001.  
  15002. VpnClientStats
  15003.  
  15004. rate_up int Read-only
  15005.  
  15006. current upload rate (in byte/s)
  15007.  
  15008. rate_down int Read-only
  15009.  
  15010. current download rate (in byte/s)
  15011.  
  15012. bytes_up int Read-only
  15013.  
  15014. total bytes uploaded
  15015.  
  15016. bytes_down int Read-only
  15017.  
  15018. total bytes downloaded
  15019.  
  15020. VpnClientIpInfo
  15021.  
  15022. config_valid bool Read-only
  15023.  
  15024. is the configuration valid
  15025.  
  15026. ip_mask dict Read-only
  15027.  
  15028. assigned IP and netmask
  15029.  
  15030. domain string Read-only
  15031.  
  15032. provided domain
  15033.  
  15034. gateway IPv4 Read-only
  15035.  
  15036. provided gateway
  15037.  
  15038. dns[] array of ipv4 Read-only
  15039.  
  15040. list of dns servers
  15041.  
  15042. provider enum Read-only
  15043.  
  15044. ip_mask source
  15045.  
  15046. provider
  15047.  
  15048. Description
  15049.  
  15050. none
  15051.  
  15052. none
  15053.  
  15054. static
  15055.  
  15056. static IP configuration
  15057.  
  15058. ppp
  15059.  
  15060. ppp
  15061.  
  15062. dhcp
  15063.  
  15064. DHCP server
  15065.  
  15066. routes list Read-only
  15067.  
  15068. list of provided routes
  15069.  
  15070. dhcp dict Read-only
  15071.  
  15072. DHCP status information
  15073.  
  15074. Get the VPN client status
  15075.  
  15076. GET /api/v8/vpn_client/status
  15077.  
  15078. Get the VPNClientStatus
  15079.  
  15080. Example request:
  15081.  
  15082. GET /api/v8/vpn_client/status HTTP/1.1
  15083. Host: mafreebox.freebox.fr
  15084.  
  15085. Example response:
  15086.  
  15087. HTTP/1.1 200 OK
  15088. Content-Type: application/json; charset=utf-8
  15089.  
  15090. {
  15091. "success": true,
  15092. "result": {
  15093. "enabled": true,
  15094. "type": "pptp",
  15095. "last_error": "none",
  15096. "active_vpn_description": "test vpn",
  15097. "last_try": 1392904509,
  15098. "state": "up",
  15099. "stats": {
  15100. "rate_up": 0,
  15101. "bytes_down": 94,
  15102. "bytes_up": 94,
  15103. "rate_down": 0
  15104. },
  15105. "active_vpn": "vpn1",
  15106. "next_try": 0,
  15107. "last_up": 1392904510,
  15108. "ipv4": {
  15109. "routes": { },
  15110. "config_valid": true,
  15111. "ip_mask": {
  15112. "ip": "192.168.27.65",
  15113. "mask": "255.255.255.255"
  15114. },
  15115. "provider": "ppp",
  15116. "dhcp": {
  15117. "state": "down",
  15118. "renew_remaining": 0,
  15119. "dhcp_options": { },
  15120. "lease_remaining": 0,
  15121. "lease_time": 0,
  15122. "rebind_remaining": 0,
  15123. "server_id": 0
  15124. },
  15125. "dns": [
  15126. "212.27.38.253"
  15127. ],
  15128. "domain": "",
  15129. "gateway": "212.27.38.253"
  15130. }
  15131. }
  15132. }
  15133.  
  15134. Get the VPN client logs
  15135.  
  15136. GET /api/v8/vpn_client/log
  15137.  
  15138. Example request:
  15139.  
  15140. GET /api/v8/vpn_client/log HTTP/1.1
  15141. Host: mafreebox.freebox.fr
  15142.  
  15143. Example response:
  15144.  
  15145. HTTP/1.1 200 OK
  15146. Content-Type: application/json; charset=utf-8
  15147.  
  15148. {
  15149. "success": true,
  15150. "result": "2014-02-20 14:55:10 dbg: ppp: pppd: sent [ ... ] "
  15151. }
  15152.  
  15153. Storage
  15154. Storage API [UNSTABLE]
  15155.  
  15156. This API allows you to manage the Freebox internal disk and disks connected to the Freebox
  15157.  
  15158. This API is unstable, it can be modified without notice in next releases.
  15159. Storage API Errors
  15160.  
  15161. When attempting to access this API, you may encounter the following errors:
  15162.  
  15163. error_code
  15164.  
  15165. Description
  15166.  
  15167. not_found
  15168.  
  15169. No disk/partition with this id
  15170.  
  15171. invalid_disk
  15172.  
  15173. No such disk
  15174.  
  15175. is_a_partition
  15176.  
  15177. This is not a disk but a partition
  15178.  
  15179. is_internal
  15180.  
  15181. This action is not permitted on internal disk
  15182.  
  15183. op_not_supported
  15184.  
  15185. Operation not supported
  15186.  
  15187. op_failed
  15188.  
  15189. Operation failed
  15190.  
  15191. disk_busy
  15192.  
  15193. Disk is busy
  15194.  
  15195. partition_not_found
  15196.  
  15197. Parition not found
  15198.  
  15199. partition_needed
  15200.  
  15201. Partition needed
  15202. Disk Partition object
  15203.  
  15204. Operation progress has the following attributes:
  15205.  
  15206. OperationProgress
  15207.  
  15208. done_steps int Read-only
  15209.  
  15210. number of steps done
  15211.  
  15212. max_steps int Read-only
  15213.  
  15214. total number of steps
  15215.  
  15216. percent int Read-only
  15217.  
  15218. current step progress
  15219.  
  15220. Disk partitions have the following attributes:
  15221.  
  15222. DiskPartition
  15223.  
  15224. id int Read-only
  15225.  
  15226. unique partition id
  15227.  
  15228. disk_id int Read-only
  15229.  
  15230. related disk id
  15231.  
  15232. state enum
  15233.  
  15234. state
  15235.  
  15236. Description
  15237.  
  15238. error
  15239.  
  15240. Partition has error
  15241.  
  15242. checking
  15243.  
  15244. Partition check in progress
  15245.  
  15246. formatting
  15247.  
  15248. Partition format in progress
  15249.  
  15250. mounting
  15251.  
  15252. Partition mount in progress
  15253.  
  15254. maintenance
  15255.  
  15256. Partition is in maintenance mode
  15257.  
  15258. mounted
  15259.  
  15260. Partition is ready
  15261.  
  15262. umounting
  15263.  
  15264. Partition umount in progress
  15265.  
  15266. umounted
  15267.  
  15268. Partition is umounted
  15269.  
  15270. ejecting
  15271.  
  15272. Partition ejection in progress
  15273.  
  15274. fstype enum Read-only
  15275.  
  15276. fstype
  15277.  
  15278. empty
  15279.  
  15280. unknown
  15281.  
  15282. xfs
  15283.  
  15284. ext4
  15285.  
  15286. vfat
  15287.  
  15288. ntfs
  15289.  
  15290. hf
  15291.  
  15292. hfsplus
  15293.  
  15294. swap
  15295.  
  15296. exfat
  15297.  
  15298. label string
  15299.  
  15300. partition name
  15301.  
  15302. path string Read-only
  15303.  
  15304. partition mount point (encoded in base64 as explained in fs API)
  15305.  
  15306. total_bytes int Read-only
  15307.  
  15308. partition size (in bytes)
  15309.  
  15310. used_bytes int Read-only
  15311.  
  15312. partition used space (in bytes)
  15313.  
  15314. free_bytes int Read-only
  15315.  
  15316. partition free space (in bytes)
  15317.  
  15318. fsck_result enum Read-only
  15319.  
  15320. fsck result
  15321.  
  15322. state
  15323.  
  15324. Description
  15325.  
  15326. no_run_yet
  15327.  
  15328. Partition has not been checked yet
  15329.  
  15330. running
  15331.  
  15332. Check is in progress
  15333.  
  15334. fs_clean
  15335.  
  15336. File system is ok
  15337.  
  15338. fs_corrected
  15339.  
  15340. File system was corrected
  15341.  
  15342. fs_needs_correction
  15343.  
  15344. File system need correction
  15345.  
  15346. failed
  15347.  
  15348. File system has unrecoverable error
  15349.  
  15350. operation_pct OperationProgress Read-only
  15351.  
  15352. partition operation progress
  15353.  
  15354. Storage Disk object
  15355.  
  15356. Storage disks have the following attributes:
  15357.  
  15358. StorageDisk
  15359.  
  15360. id int Read-only
  15361.  
  15362. the disk id
  15363.  
  15364. type enum Read-only
  15365.  
  15366. type
  15367.  
  15368. Description
  15369.  
  15370. internal
  15371.  
  15372. Freebox internal disk
  15373.  
  15374. usb
  15375.  
  15376. usb disk
  15377.  
  15378. sata
  15379.  
  15380. sata disk
  15381.  
  15382. state enum
  15383.  
  15384. state
  15385.  
  15386. Description
  15387.  
  15388. error
  15389.  
  15390. Disk has error
  15391.  
  15392. disabled
  15393.  
  15394. Disk is disabled
  15395.  
  15396. enabled
  15397.  
  15398. Disk is enabled
  15399.  
  15400. formatting
  15401.  
  15402. Disk is formatting
  15403.  
  15404. connector int Read-only
  15405.  
  15406. Disk physical connector id
  15407.  
  15408. total_bytes int Read-only
  15409.  
  15410. Disk size (in bytes)
  15411.  
  15412. table_type int Read-only
  15413.  
  15414. table_type
  15415.  
  15416. msdos
  15417.  
  15418. gpt
  15419.  
  15420. superfloppy
  15421.  
  15422. empty
  15423.  
  15424. model string Read-only
  15425.  
  15426. Disk model
  15427.  
  15428. serial string Read-only
  15429.  
  15430. Disk serial number
  15431.  
  15432. firmware string Read-only
  15433.  
  15434. Disk firmware version
  15435.  
  15436. temp int Read-only
  15437.  
  15438. Disk temperature (when supported) in °C
  15439.  
  15440. operation_pct OperationProgress Read-only
  15441.  
  15442. partition operation progress
  15443.  
  15444. partitions[] array of DiskPartition Read-only
  15445.  
  15446. list of disk partitions
  15447.  
  15448. idle bool Read-only
  15449.  
  15450. is disk idle (when available)
  15451.  
  15452. idle_duration int Read-only
  15453.  
  15454. disk idle duration (in seconds) (when available)
  15455.  
  15456. spinning bool Read-only
  15457.  
  15458. is disk spinning (when available)
  15459.  
  15460. active_duration int Read-only
  15461.  
  15462. disk activity duration (in seconds) (when available)
  15463.  
  15464. time_before_spindown int Read-only
  15465.  
  15466. seconds left before disk spin down (in seconds) (when available)
  15467.  
  15468. read_requests int Read-only
  15469.  
  15470. Number of read requests sent since to disk since boot (when available)
  15471.  
  15472. read_error_requests int Read-only
  15473.  
  15474. Number of read requests in error since boot. Might indicate disk failure (when available)
  15475.  
  15476. write_requests int Read-only
  15477.  
  15478. Number of write requests sent since to disk since boot (when available)
  15479.  
  15480. write_error_requests int Read-only
  15481.  
  15482. Number of write requests in error since boot. Might indicate disk failure (when available)
  15483.  
  15484. Storage Disk API
  15485. Get the list of disks
  15486.  
  15487. GET /api/v8/storage/disk/
  15488.  
  15489. Returns the collection of all StorageDisk
  15490.  
  15491. Example request:
  15492.  
  15493. GET /api/v8/storage/disk/ HTTP/1.1
  15494. Host: mafreebox.freebox.fr
  15495.  
  15496. Example response:
  15497.  
  15498. HTTP/1.1 200 OK
  15499. Content-Type: application/json; charset=utf-8
  15500.  
  15501. {
  15502. "success": true,
  15503. "result": [
  15504. {
  15505. "idle_duration": 368,
  15506. "spinning": true,
  15507. "table_type": "msdos",
  15508. "firmware": "PB2ICC0E",
  15509. "type": "internal",
  15510. "idle": true,
  15511. "connector": 0,
  15512. "id": 1,
  15513. "state": "enabled",
  15514. "time_before_spindown": 232,
  15515. "total_bytes": 250059350016,
  15516. "model": "Hitachi HCC545025B9A300",
  15517. "active_duration": 0,
  15518. "temp": 51,
  15519. "serial": "GSCH35VC",
  15520. "partitions": [
  15521. {
  15522. "fstype": "ext4",
  15523. "total_bytes": 245091500032,
  15524. "label": "Disque dur",
  15525. "id": 3,
  15526. "fsck_result": "no_run_yet",
  15527. "state": "mounted",
  15528. "disk_id": 1,
  15529. "free_bytes": 68120969216,
  15530. "used_bytes": 164520534016,
  15531. "path": "L0Rpc3F1ZSBkdXI="
  15532. }
  15533. ]
  15534. },
  15535. {
  15536. "type": "usb",
  15537. "total_bytes": 125435904,
  15538. "connector": 1,
  15539. "id": 1001,
  15540. "active_duration": 0,
  15541. "partitions": [
  15542. {
  15543. "fstype": "ext4",
  15544. "total_bytes": 121418752,
  15545. "label": "Disque 1",
  15546. "id": 1002,
  15547. "fsck_result": "no_run_yet",
  15548. "state": "mounted",
  15549. "disk_id": 1001,
  15550. "free_bytes": 108904448,
  15551. "used_bytes": 6245376,
  15552. "path": "L0Rpc3F1ZSAx"
  15553. }
  15554. ],
  15555. "idle_duration": 0,
  15556. "state": "enabled",
  15557. "idle": false,
  15558. "spinning": false,
  15559. "model": "",
  15560. "table_type": "gpt",
  15561. "temp": 0,
  15562. "serial": "",
  15563. "firmware": ""
  15564. }
  15565. ]
  15566. }
  15567.  
  15568. Get a given disk info
  15569.  
  15570. GET /api/v8/storage/disk/{id}
  15571.  
  15572. Returns the StorageDisk with the given id
  15573.  
  15574. Example request:
  15575.  
  15576. GET /api/v8/storage/disk/1 HTTP/1.1
  15577. Host: mafreebox.freebox.fr
  15578.  
  15579. Example response:
  15580.  
  15581. HTTP/1.1 200 OK
  15582. Content-Type: application/json; charset=utf-8
  15583.  
  15584. {
  15585. "success": true,
  15586. "result": {
  15587. "idle_duration": 464,
  15588. "spinning": true,
  15589. "table_type": "msdos",
  15590. "firmware": "PB2ICC0E",
  15591. "type": "internal",
  15592. "idle": true,
  15593. "connector": 0,
  15594. "id": 1,
  15595. "state": "enabled",
  15596. "time_before_spindown": 136,
  15597. "total_bytes": 250059350016,
  15598. "model": "Hitachi HCC545025B9A300",
  15599. "active_duration": 0,
  15600. "temp": 51,
  15601. "serial": "GSCH35VC",
  15602. "partitions": [
  15603. {
  15604. "fstype": "ext4",
  15605. "total_bytes": 245091500032,
  15606. "label": "Disque dur",
  15607. "id": 3,
  15608. "fsck_result": "no_run_yet",
  15609. "state": "mounted",
  15610. "disk_id": 1,
  15611. "free_bytes": 68120969216,
  15612. "used_bytes": 164520534016,
  15613. "path": "L0Rpc3F1ZSBkdXI="
  15614. }
  15615. ]
  15616. }
  15617. }
  15618.  
  15619. Update a disk state
  15620.  
  15621. PUT /api/v8/storage/disk/{id}
  15622.  
  15623. Enable/Disable a disk
  15624.  
  15625. Example request:
  15626.  
  15627. PUT /api/v8/storage/disk/1 HTTP/1.1
  15628. Host: mafreebox.freebox.fr
  15629.  
  15630. {
  15631. "state": "disabled"
  15632. }
  15633.  
  15634. Example response:
  15635.  
  15636. HTTP/1.1 200 OK
  15637. Content-Type: application/json; charset=utf-8
  15638.  
  15639. {
  15640. "success": true,
  15641. "result": {
  15642. "type": "usb",
  15643. "total_bytes": 125435904,
  15644. "connector": 1,
  15645. "id": 1001,
  15646. "active_duration": 0,
  15647. "partitions": [
  15648. {
  15649. "fstype": "ext4",
  15650. "total_bytes": 121418752,
  15651. "label": "Disque 1",
  15652. "id": 1002,
  15653. "fsck_result": "no_run_yet",
  15654. "state": "umounted",
  15655. "disk_id": 1001,
  15656. "free_bytes": 108904448,
  15657. "used_bytes": 6245376,
  15658. "path": "L0Rpc3F1ZSAx"
  15659. }
  15660. ],
  15661. "idle_duration": 0,
  15662. "state": "disabled",
  15663. "idle": false,
  15664. "spinning": false,
  15665. "model": "",
  15666. "table_type": "gpt",
  15667. "temp": 0,
  15668. "serial": "",
  15669. "firmware": ""
  15670. }
  15671. }
  15672.  
  15673. Get FS advices
  15674.  
  15675. GET /api/v8/storage/disk/{disk_id}/fsadvice?partition_id={partition_id}&dedicated_disk={bool}
  15676.  
  15677. Check disk FS and get formating advices.
  15678.  
  15679. To be able to get FS advice for a disk you need to provide the disk_id. Specify dedicated_disk for a disk that will only be used with the Freebox server (no need to specify it for a SATA internal disk). If the disk is empty do not specify partition_id in order to get advice for creating a new one. If the disk contains a partition specify the partition_id that needs to be checked.
  15680.  
  15681. Example request:
  15682.  
  15683. GET /api/v8/storage/disk/1000/fsadvice?partition_id=1003&dedicated_disk=false HTTP/1.1
  15684. Host: mafreebox.freebox.fr
  15685.  
  15686. Example response
  15687.  
  15688. HTTP/1.1 200 OK
  15689. Content-Type: application/json; charset=utf-8
  15690.  
  15691. {
  15692. "success": true
  15693. "result":
  15694. {
  15695. "fstype": "exfat",
  15696. "table_type": "gpt",
  15697. "reason": "max_file_size",
  15698. "partitions_to_delete": [
  15699. {
  15700. "fstype": "exfat",
  15701. "total_bytes": 1000000000000,
  15702. "label": "EFI",
  15703. "id": 1001,
  15704. "internal": false,
  15705. "fsck_result": "no_run_yet",
  15706. "state": "mounted",
  15707. "disk_id": 1000,
  15708. "free_bytes": 1000000000000,
  15709. "used_bytes": 1310000,
  15710. "path": "L0Rpc3F1ZSAxIDE="
  15711. },
  15712. {
  15713. "fstype": "exfat",
  15714. "total_bytes": 1000000000000,
  15715. "label": "DATA",
  15716. "id": 1002,
  15717. "internal": false,
  15718. "fsck_result": "no_run_yet",
  15719. "state": "mounted",
  15720. "disk_id": 1000,
  15721. "free_bytes": 1000000000000,
  15722. "used_bytes": 1310000,
  15723. "path": "L1ZvbHVtZSAxMDAwR28="
  15724. },
  15725. },
  15726. }
  15727.  
  15728. Resons can be one of the following:
  15729.  
  15730. Reason
  15731.  
  15732. Description
  15733.  
  15734. max_file_size
  15735.  
  15736. Performance and bigger that 4GB files support
  15737.  
  15738. perf_and_compat
  15739.  
  15740. Performance and device compatibility
  15741.  
  15742. sata_performance
  15743.  
  15744. Performance for SATA disk
  15745.  
  15746. no_partition
  15747.  
  15748. Missing parition id on already formatted disk
  15749.  
  15750. partition_error
  15751.  
  15752. Partition is in error state
  15753.  
  15754. Format a disk
  15755.  
  15756. PUT /api/v8/storage/disk/{id}/format/
  15757.  
  15758. Format the disk with the given id
  15759.  
  15760. To be able to format a disk you need to provide the following parameters (JSON encoded). There will be one partition using all the available space on disk. All previous data will be lost.
  15761.  
  15762. This parameters will be ignored if you format the Freebox internal disk
  15763.  
  15764. Parameters
  15765.  
  15766. table_type (string) – The partition table format
  15767.  
  15768. fs_type (string) – The partition type
  15769.  
  15770. label (string) – The partition label
  15771.  
  15772. NOTE: once started you can monitor the format process getting the disk information (see StorageDisk operation_pct field)
  15773.  
  15774. Example request:
  15775.  
  15776. PUT /api/v8/storage/disk/1001/format HTTP/1.1
  15777. Host: mafreebox.freebox.fr
  15778.  
  15779. {
  15780. "label": "freebox",
  15781. "fs_type": "vfat",
  15782. "table_type": "msdos"
  15783. }
  15784.  
  15785. Example response:
  15786.  
  15787. HTTP/1.1 200 OK
  15788. Content-Type: application/json; charset=utf-8
  15789.  
  15790. {
  15791. "success": true
  15792. }
  15793.  
  15794. Storage Partition API
  15795. Get the list of partitions
  15796.  
  15797. GET /api/v8/storage/partition/
  15798.  
  15799. Returns the collection of all DiskPartition
  15800.  
  15801. Example request:
  15802.  
  15803. GET /api/v8/storage/partition/ HTTP/1.1
  15804. Host: mafreebox.freebox.fr
  15805.  
  15806. Example response:
  15807.  
  15808. HTTP/1.1 200 OK
  15809. Content-Type: application/json; charset=utf-8
  15810.  
  15811. {
  15812. "success": true,
  15813. "result": [
  15814. {
  15815. "fstype": "ext4",
  15816. "total_bytes": 245091500032,
  15817. "label": "Disque dur",
  15818. "id": 3,
  15819. "fsck_result": "no_run_yet",
  15820. "state": "umounted",
  15821. "disk_id": 1,
  15822. "free_bytes": 68120969216,
  15823. "used_bytes": 164520534016,
  15824. "path": "L0Rpc3F1ZSBkdXI="
  15825. },
  15826. {
  15827. "fstype": "vfat",
  15828. "total_bytes": 123485184,
  15829. "label": "freebox",
  15830. "id": 1002,
  15831. "fsck_result": "no_run_yet",
  15832. "state": "mounted",
  15833. "disk_id": 1001,
  15834. "free_bytes": 123484672,
  15835. "used_bytes": 512,
  15836. "path": "L2ZyZWVib3g="
  15837. }
  15838. ]
  15839. }
  15840.  
  15841. Get a given partition info
  15842.  
  15843. GET /api/v8/storage/partition/{id}
  15844.  
  15845. Returns the DiskPartition with the given id
  15846.  
  15847. Example request:
  15848.  
  15849. GET /api/v8/storage/partition/1002 HTTP/1.1
  15850. Host: mafreebox.freebox.fr
  15851.  
  15852. Example response:
  15853.  
  15854. HTTP/1.1 200 OK
  15855. Content-Type: application/json; charset=utf-8
  15856.  
  15857. {
  15858. "success": true,
  15859. "result": {
  15860. "fstype": "vfat",
  15861. "total_bytes": 123485184,
  15862. "label": "freebox",
  15863. "id": 1002,
  15864. "fsck_result": "no_run_yet",
  15865. "state": "mounted",
  15866. "disk_id": 1001,
  15867. "free_bytes": 123484672,
  15868. "used_bytes": 512,
  15869. "path": "L2ZyZWVib3g="
  15870. }
  15871. }
  15872.  
  15873. Update a partition state
  15874.  
  15875. PUT /api/v8/storage/partition/{id}
  15876.  
  15877. Enable/Disable a partition
  15878.  
  15879. Example request:
  15880.  
  15881. PUT /api/v8/storage/partition/1 HTTP/1.1
  15882. Host: mafreebox.freebox.fr
  15883.  
  15884. {
  15885. "state" : "umounted"
  15886. }
  15887.  
  15888. Example response:
  15889.  
  15890. HTTP/1.1 200 OK
  15891. Content-Type: application/json; charset=utf-8
  15892.  
  15893. {
  15894. "success": true,
  15895. "result": {
  15896. "fstype": "vfat",
  15897. "total_bytes": 123485184,
  15898. "label": "freebox",
  15899. "id": 1002,
  15900. "fsck_result": "no_run_yet",
  15901. "state": "umounted",
  15902. "disk_id": 1001,
  15903. "free_bytes": 123484672,
  15904. "used_bytes": 512,
  15905. "path": "L2ZyZWVib3g="
  15906. }
  15907. }
  15908.  
  15909. Check a partition
  15910.  
  15911. PUT /api/v8/storage/partition/{id}/check/
  15912.  
  15913. Checks the partition with the given id
  15914.  
  15915. To be able to check a partition you need to provide the following parameters (JSON encoded):
  15916.  
  15917. Parameters
  15918.  
  15919. checkmode (enum) – ‘ro’ for read only check, ‘rw’ to attempt to repair errors
  15920.  
  15921. NOTE: once started you can monitor the fsck process getting the partition information (see DiskPartition operation_pct field)
  15922.  
  15923. Example request:
  15924.  
  15925. PUT /api/v8/storage/partition/1002/check HTTP/1.1
  15926. Host: mafreebox.freebox.fr
  15927.  
  15928. {
  15929. "checkmode": "ro"
  15930. }
  15931.  
  15932. Example response:
  15933.  
  15934. HTTP/1.1 200 OK
  15935. Content-Type: application/json; charset=utf-8
  15936.  
  15937. {
  15938. "success": true
  15939. }
  15940.  
  15941. Storage Config
  15942.  
  15943. StorageConfig has the following attributes:
  15944.  
  15945. StorageConfig
  15946.  
  15947. external_pm_enabled bool
  15948.  
  15949. enable/disable external disk power management
  15950.  
  15951. external_pm_idle_before_spindown int
  15952.  
  15953. idle time in minutes to wait before spinning down an external disk
  15954.  
  15955. Storage config API
  15956. Get the current storage configuration
  15957.  
  15958. GET /api/v8/storage/config/
  15959.  
  15960. Get the StorageConfig
  15961.  
  15962. Example request:
  15963.  
  15964. GET /api/v8/storage/config/ HTTP/1.1
  15965. Host: mafreebox.freebox.fr
  15966.  
  15967. Example response:
  15968.  
  15969. HTTP/1.1 200 OK
  15970. Content-Type: application/json; charset=utf-8
  15971.  
  15972. {
  15973. "success": true,
  15974. "result": {
  15975. "external_pm_idle_before_spindown": 10,
  15976. "external_pm_enabled": true
  15977. }
  15978. }
  15979.  
  15980. Update the External Storage configuration
  15981.  
  15982. PUT /api/v8/storage/config/
  15983.  
  15984. Update the StorageConfig
  15985.  
  15986. Example request:
  15987.  
  15988. PUT /api/v8/storage/config/ HTTP/1.1
  15989. Host: mafreebox.freebox.fr
  15990.  
  15991. {
  15992. "external_pm_enabled": false
  15993. }
  15994.  
  15995. Example response:
  15996.  
  15997. HTTP/1.1 200 OK
  15998. Content-Type: application/json; charset=utf-8
  15999.  
  16000. {
  16001. "success": true,
  16002. "result": {
  16003. "external_pm_idle_before_spindown": 10,
  16004. "external_pm_enabled": false
  16005. }
  16006. }
  16007.  
  16008. RAID API [UNSTABLE]
  16009.  
  16010. This API allows you to manage the Freebox internal raid arrays for disks connected to the Freebox
  16011.  
  16012. This API is unstable, it can be modified without notice in next releases.
  16013. RAID API Errors
  16014.  
  16015. When attempting to access this API, you may encounter the following errors:
  16016.  
  16017. error_code
  16018.  
  16019. Description
  16020.  
  16021. inval
  16022.  
  16023. Invalid parameters(s)
  16024.  
  16025. no_sys
  16026.  
  16027. Function not available
  16028.  
  16029. member_not_found
  16030.  
  16031. No member found
  16032.  
  16033. members_too_many
  16034.  
  16035. Too many members
  16036.  
  16037. array_not_found
  16038.  
  16039. RAID array not found
  16040.  
  16041. array_stop_failed
  16042.  
  16043. Error when stopping the RAID array
  16044.  
  16045. array_start_failed
  16046.  
  16047. Error when starting the RAID array
  16048.  
  16049. array_destroy_failed
  16050.  
  16051. Error when destroying the RAID array
  16052.  
  16053. array_not_running
  16054.  
  16055. The RAID array is not active
  16056.  
  16057. array_not_stopped
  16058.  
  16059. The RAID array is not stopped
  16060.  
  16061. array_degraded
  16062.  
  16063. The RAID array is degraded
  16064.  
  16065. array_not_degraded
  16066.  
  16067. The RAID array is not degraded
  16068.  
  16069. array_complete
  16070.  
  16071. The RAID array is full
  16072.  
  16073. already_member
  16074.  
  16075. The specified disks are already members of a RAID array
  16076.  
  16077. disk_more_than_once
  16078.  
  16079. The same disk has been specified more than once
  16080.  
  16081. disks_missing
  16082.  
  16083. Insufficient number of disks
  16084.  
  16085. bad_disk_location
  16086.  
  16087. Only internal drives can be used in a RAID array
  16088.  
  16089. disk_internal
  16090.  
  16091. This disk cannot be used in a RAID array
  16092.  
  16093. disk_busy
  16094.  
  16095. Disk is busy
  16096.  
  16097. create_failed
  16098.  
  16099. RAID array creation failed
  16100.  
  16101. create_too_many_members
  16102.  
  16103. The number of disks is too high (basic)
  16104.  
  16105. create_not_enough_members
  16106.  
  16107. The number of disks is too small
  16108.  
  16109. create_bad_member_count
  16110.  
  16111. The number of disks is incorrect (raid10)
  16112.  
  16113. sync_action_bad_level
  16114.  
  16115. This type of RAID array does not support synchronization
  16116.  
  16117. sync_action_array_busy
  16118.  
  16119. This RAID array is being resynchronized/restored
  16120.  
  16121. sync_action_bad_action
  16122.  
  16123. It is not possible to force resynchronization manually
  16124.  
  16125. sync_action_failed
  16126.  
  16127. This action has been denied
  16128.  
  16129. check_interval_too_large
  16130.  
  16131. Check interval is too long
  16132.  
  16133. check_interval_not_supported
  16134.  
  16135. This check interval is not supported
  16136.  
  16137. remove_bad_level
  16138.  
  16139. This type of RAID array does not allow member removal
  16140.  
  16141. remove_not_enough_active
  16142.  
  16143. Not enough active members to allow removal of a member
  16144.  
  16145. remove_failed
  16146.  
  16147. Failure to remove a member
  16148.  
  16149. add_too_many
  16150.  
  16151. Too many new members
  16152.  
  16153. add_member_too_small
  16154.  
  16155. One of the members is too small to be added to this array
  16156.  
  16157. add_failed
  16158.  
  16159. Failed to add member
  16160.  
  16161. member_examine_data_failed
  16162.  
  16163. Unable to examine member data
  16164.  
  16165. sync_speed_min_greaterthan_max
  16166.  
  16167. Minimum sync speed is more important than maximum speed
  16168.  
  16169. sync_speed_min_toohigh
  16170.  
  16171. The minimum sync speed is too high
  16172.  
  16173. sync_speed_max_toohigh
  16174.  
  16175. The maximum sync speed it too high
  16176.  
  16177. sync_speed_min_toolow
  16178.  
  16179. The minimum sync speed is too low
  16180.  
  16181. sync_speed_max_toolow
  16182.  
  16183. The maximum sync speed is too low
  16184.  
  16185. sync_speed_set_failed
  16186.  
  16187. Error changing synchronization speed
  16188.  
  16189. grow_bad_level
  16190.  
  16191. RAID level migration not possible
  16192.  
  16193. grow_not_enough_disks
  16194.  
  16195. Not enough disks for expansion
  16196.  
  16197. grow_failed
  16198.  
  16199. Expansion failed
  16200.  
  16201. grow_array_busy
  16202.  
  16203. Cannot extend a busy RAID array
  16204.  
  16205. grow_member_too_small
  16206.  
  16207. One of the members is too small to expand the raid array
  16208.  
  16209. rescan_member_failed
  16210.  
  16211. One or more members could not be rescanned
  16212.  
  16213. add_spares_busy
  16214.  
  16215. Cannot add out-of-sync disks when the array is busy
  16216.  
  16217. add_spares_nospares
  16218.  
  16219. No out-of-sync member detected
  16220.  
  16221. add_spares_complete
  16222.  
  16223. The RAID Array is full and cannot add an out of sync member
  16224.  
  16225. add_spares_failed
  16226.  
  16227. Failed to add out-of-sync disks
  16228. RAID API objects
  16229. RAID Array object
  16230.  
  16231. RaidArray
  16232.  
  16233. id int Read-only
  16234.  
  16235. unique id of this array. Used as a reference for API calls.
  16236.  
  16237. state enum
  16238.  
  16239. state
  16240.  
  16241. Description
  16242.  
  16243. stopped
  16244.  
  16245. Array is stopped
  16246.  
  16247. running
  16248.  
  16249. Array is running
  16250.  
  16251. error
  16252.  
  16253. Array is in error
  16254.  
  16255. name string
  16256.  
  16257. The array name
  16258.  
  16259. level enum
  16260.  
  16261. level
  16262.  
  16263. Description
  16264.  
  16265. basic
  16266.  
  16267. Basic RAID level, like a single drive raid1 array
  16268.  
  16269. raid0
  16270.  
  16271. RAID 0
  16272.  
  16273. raid1
  16274.  
  16275. RAID 1
  16276.  
  16277. raid5
  16278.  
  16279. RAID 5
  16280.  
  16281. raid10
  16282.  
  16283. RAID 10
  16284.  
  16285. disk_id int Read-only
  16286.  
  16287. The disk id of the array, for use with the disk format API.
  16288.  
  16289. uuid string Read-only
  16290.  
  16291. The array unique id. Only this id is guaranteed to stay stable accross reboots.
  16292.  
  16293. sync_action enum Read-only
  16294.  
  16295. sync_action
  16296.  
  16297. Description
  16298.  
  16299. idle
  16300.  
  16301. Array is idle
  16302.  
  16303. resync
  16304.  
  16305. Sync operation in progress
  16306.  
  16307. recover
  16308.  
  16309. Recover operation in progress
  16310.  
  16311. check
  16312.  
  16313. Array is being checked
  16314.  
  16315. repair
  16316.  
  16317. Repair operation in progress
  16318.  
  16319. reshape
  16320.  
  16321. Array growth in progress
  16322.  
  16323. frozen
  16324.  
  16325. Array is frozen
  16326.  
  16327. sysfs_state enum Read-only
  16328.  
  16329. Low-level Linux-specific md state value read in sysfs array_state property.
  16330.  
  16331. sysfs_state
  16332.  
  16333. clear
  16334.  
  16335. inactive
  16336.  
  16337. suspended
  16338.  
  16339. readonly
  16340.  
  16341. read_auto
  16342.  
  16343. clean
  16344.  
  16345. active
  16346.  
  16347. write_pending
  16348.  
  16349. active_idle
  16350.  
  16351. array_size int Read-only
  16352.  
  16353. Size of array in bytes.
  16354.  
  16355. raid_disks int Read-only
  16356.  
  16357. Number of members that should be in this array.
  16358.  
  16359. sync_speed int Read-only
  16360.  
  16361. Sync speed in bytes per second
  16362.  
  16363. sync_completed_pos int Read-only
  16364.  
  16365. Current position of sync process.
  16366.  
  16367. sync_completed_end int Read-only
  16368.  
  16369. End position of sync process: total of bytes to sync.
  16370.  
  16371. sync_completed_percent int Read-only
  16372.  
  16373. Percentage of sync completion.
  16374.  
  16375. check_interval int Read-only
  16376.  
  16377. Check interval in seconds.
  16378.  
  16379. last_check int Read-only
  16380.  
  16381. Unix timestamp of last check in seconds.
  16382.  
  16383. next_check int Read-only
  16384.  
  16385. Unix timestamp of next check in seconds. Might be 0 if check_interval is 0.
  16386.  
  16387. degraded bool Read-only
  16388.  
  16389. Whether the array is degraded or not.
  16390.  
  16391. members[] array of RaidMember
  16392.  
  16393. List of members of this array
  16394.  
  16395. RAID Member object
  16396.  
  16397. RaidMember
  16398.  
  16399. id int Read-only
  16400.  
  16401. unique id of this member. This corresponds to the disk id, usable with the Storage Disk API.
  16402.  
  16403. array_id int Read-only
  16404.  
  16405. id of the array this member is in
  16406.  
  16407. role enum Read-only
  16408.  
  16409. role
  16410.  
  16411. Description
  16412.  
  16413. active
  16414.  
  16415. Active member of the array
  16416.  
  16417. faulty
  16418.  
  16419. Faulty member
  16420.  
  16421. spare
  16422.  
  16423. Member kept as spare
  16424.  
  16425. missing
  16426.  
  16427. Missing (removed or dead) member of the array
  16428.  
  16429. set_name string Read-only
  16430.  
  16431. name of the array this member is into
  16432.  
  16433. set_uuid string Read-only
  16434.  
  16435. uuid of the array this member is into
  16436.  
  16437. dev_uuid string Read-only
  16438.  
  16439. uuid of this member
  16440.  
  16441. device_location enum Read-only
  16442.  
  16443. internal location of this member. Possible slot values: sata-internal-p0, sata-internal-p1, sata-internal-p2, sata-internal-p4
  16444.  
  16445. total_bytes int Read-only
  16446.  
  16447. size of this member in bytes
  16448.  
  16449. active_device int Read-only
  16450.  
  16451. device number inside the array
  16452.  
  16453. corrected_read_errors int Read-only
  16454.  
  16455. Device read errors count
  16456.  
  16457. sct_erc_supported bool Read-only
  16458.  
  16459. Whether SCT_ERC is supported by the device according to its S.M.A.R.T. data.
  16460.  
  16461. sct_erc_enabled bool Read-only
  16462.  
  16463. Whether SCT_ERC is enabled on the device according to its S.M.A.R.T. data.
  16464.  
  16465. disk RaidDisk Read-only
  16466.  
  16467. A few properties of the disk.
  16468.  
  16469. RAID Disk object
  16470.  
  16471. RaidDisk
  16472.  
  16473. model string Read-only
  16474.  
  16475. Disk model.
  16476.  
  16477. serial string Read-only
  16478.  
  16479. Disk serial number.
  16480.  
  16481. firmware string Read-only
  16482.  
  16483. Disk firmware revision
  16484.  
  16485. temp int Read-only
  16486.  
  16487. Disk temperature in °C.
  16488.  
  16489. RAID API actions
  16490. Get the list of RAID arrays
  16491.  
  16492. GET /api/v8/storage/raid/
  16493.  
  16494. Returns the collection of all RaidArray
  16495.  
  16496. Example request:
  16497.  
  16498. GET /api/v8/storage/raid/ HTTP/1.1
  16499. Host: mafreebox.freebox.fr
  16500.  
  16501. Example response:
  16502.  
  16503. HTTP/1.1 200 OK
  16504. Content-Type: application/json; charset=utf-8
  16505.  
  16506. {
  16507. "success": true,
  16508. "result": [
  16509. {
  16510. "degraded": false,
  16511. "raid_disks": 4,
  16512. "next_check": 0,
  16513. "sync_action": "idle",
  16514. "level": "raid5",
  16515. "uuid": "a4f1fbf3-f8e7-453f-19ec-842d6f4e2895",
  16516. "sysfs_state": "clear",
  16517. "id": 0,
  16518. "sync_completed_pos": 0,
  16519. "members": [
  16520. {
  16521. "total_bytes": 1000000000000,
  16522. "active_device": 0,
  16523. "id": 1000,
  16524. "corrected_read_errors": 0,
  16525. "array_id": 0,
  16526. "disk": {
  16527. "firmware": "02.01A02",
  16528. "temp": 43,
  16529. "serial": "WD-WX91A42F69NE",
  16530. "model": "WDC WD10JUCX-56WPNY0"
  16531. },
  16532. "role": "active",
  16533. "sct_erc_supported": false,
  16534. "sct_erc_enabled": false,
  16535. "dev_uuid": "666793c9-2d04-9d9e-5c8a-2f13eb7f2e9e",
  16536. "device_location": "sata-internal-p1",
  16537. "set_name": "Freebox",
  16538. "set_uuid": "a4f1fbf3-f8e7-453f-19ec-842d6f4e2895"
  16539. },
  16540. {
  16541. "total_bytes": 1000000000000,
  16542. "active_device": 1,
  16543. "id": 2000,
  16544. "corrected_read_errors": 0,
  16545. "array_id": 0,
  16546. "disk": {
  16547. "firmware": "02.01A02",
  16548. "temp": 47,
  16549. "serial": "WD-WX91A42F1337",
  16550. "model": "WDC WD10JUCX-56WPNY0"
  16551. },
  16552. "role": "active",
  16553. "sct_erc_supported": false,
  16554. "sct_erc_enabled": false,
  16555. "dev_uuid": "231b35d0-c37f-9d3c-be7a-b7b8485341ce",
  16556. "device_location": "sata-internal-p0",
  16557. "set_name": "Freebox",
  16558. "set_uuid": "a4f1fbf3-f8e7-453f-19ec-842d6f4e2895"
  16559. },
  16560. {
  16561. "total_bytes": 1000000000000,
  16562. "active_device": 2,
  16563. "id": 3000,
  16564. "corrected_read_errors": 0,
  16565. "array_id": 0,
  16566. "disk": {
  16567. "firmware": "02.01A02",
  16568. "temp": 46,
  16569. "serial": "WD-WX91A42FZ3I9",
  16570. "model": "WDC WD10JUCX-56WPNY0"
  16571. },
  16572. "role": "active",
  16573. "sct_erc_supported": false,
  16574. "sct_erc_enabled": false,
  16575. "dev_uuid": "d28e5fd8-5e2a-baf3-fd24-6fe5ff2593d6",
  16576. "device_location": "sata-internal-p2",
  16577. "set_name": "Freebox",
  16578. "set_uuid": "a4f1fbf3-f8e7-453f-19ec-842d6f4e2895"
  16579. },
  16580. {
  16581. "total_bytes": 1000000000000,
  16582. "active_device": 3,
  16583. "id": 4000,
  16584. "corrected_read_errors": 0,
  16585. "array_id": 0,
  16586. "disk": {
  16587. "firmware": "02.01A02",
  16588. "temp": 46,
  16589. "serial": "WD-WX91A42F1333",
  16590. "model": "WDC WD10JUCX-56WPNY0"
  16591. },
  16592. "role": "active",
  16593. "sct_erc_supported": false,
  16594. "sct_erc_enabled": false,
  16595. "dev_uuid": "fdf5a84a-c427-e1ef-aa12-1732d2cf689f",
  16596. "device_location": "sata-internal-p3",
  16597. "set_name": "Freebox",
  16598. "set_uuid": "a4f1fbf3-f8e7-453f-19ec-842d6f4e2895"
  16599. }
  16600. ],
  16601. "array_size": 3000000000000,
  16602. "state": "running",
  16603. "sync_speed": 0,
  16604. "name": "Freebox",
  16605. "check_interval": 0,
  16606. "disk_id": 6000,
  16607. "last_check": 1576082428,
  16608. "sync_completed_end": 0,
  16609. "sync_completed_percent": 0
  16610. }
  16611. ]
  16612. }
  16613.  
  16614. Get a given RAID array info
  16615.  
  16616. GET /api/v8/storage/raid/{id}
  16617.  
  16618. Returns a single RaidArray
  16619.  
  16620. Example request:
  16621.  
  16622. GET /api/v8/storage/raid/0 HTTP/1.1
  16623. Host: mafreebox.freebox.fr
  16624.  
  16625. Example response:
  16626.  
  16627. HTTP/1.1 200 OK
  16628. Content-Type: application/json; charset=utf-8
  16629.  
  16630. {
  16631. "success": true,
  16632. "result": {
  16633. "degraded": false,
  16634. "raid_disks": 4,
  16635. "next_check": 0,
  16636. "sync_action": "idle",
  16637. "level": "raid5",
  16638. "uuid": "a4f1fbf3-f8e7-453f-19ec-842d6f4e2895",
  16639. "sysfs_state": "clear",
  16640. "id": 0,
  16641. "sync_completed_pos": 0,
  16642. "members": [
  16643. {
  16644. "total_bytes": 1000000000000,
  16645. "active_device": 0,
  16646. "id": 1000,
  16647. "corrected_read_errors": 0,
  16648. "array_id": 0,
  16649. "disk": {
  16650. "firmware": "02.01A02",
  16651. "temp": 43,
  16652. "serial": "WD-WX91A42F69NE",
  16653. "model": "WDC WD10JUCX-56WPNY0"
  16654. },
  16655. "role": "active",
  16656. "sct_erc_supported": false,
  16657. "sct_erc_enabled": false,
  16658. "dev_uuid": "666793c9-2d04-9d9e-5c8a-2f13eb7f2e9e",
  16659. "device_location": "sata-internal-p1",
  16660. "set_name": "Freebox",
  16661. "set_uuid": "a4f1fbf3-f8e7-453f-19ec-842d6f4e2895"
  16662. },
  16663. {
  16664. "total_bytes": 1000000000000,
  16665. "active_device": 1,
  16666. "id": 2000,
  16667. "corrected_read_errors": 0,
  16668. "array_id": 0,
  16669. "disk": {
  16670. "firmware": "02.01A02",
  16671. "temp": 47,
  16672. "serial": "WD-WX91A42F1337",
  16673. "model": "WDC WD10JUCX-56WPNY0"
  16674. },
  16675. "role": "active",
  16676. "sct_erc_supported": false,
  16677. "sct_erc_enabled": false,
  16678. "dev_uuid": "231b35d0-c37f-9d3c-be7a-b7b8485341ce",
  16679. "device_location": "sata-internal-p0",
  16680. "set_name": "Freebox",
  16681. "set_uuid": "a4f1fbf3-f8e7-453f-19ec-842d6f4e2895"
  16682. },
  16683. {
  16684. "total_bytes": 1000000000000,
  16685. "active_device": 2,
  16686. "id": 3000,
  16687. "corrected_read_errors": 0,
  16688. "array_id": 0,
  16689. "disk": {
  16690. "firmware": "02.01A02",
  16691. "temp": 46,
  16692. "serial": "WD-WX91A42FZ3I9",
  16693. "model": "WDC WD10JUCX-56WPNY0"
  16694. },
  16695. "role": "active",
  16696. "sct_erc_supported": false,
  16697. "sct_erc_enabled": false,
  16698. "dev_uuid": "d28e5fd8-5e2a-baf3-fd24-6fe5ff2593d6",
  16699. "device_location": "sata-internal-p2",
  16700. "set_name": "Freebox",
  16701. "set_uuid": "a4f1fbf3-f8e7-453f-19ec-842d6f4e2895"
  16702. },
  16703. {
  16704. "total_bytes": 1000000000000,
  16705. "active_device": 3,
  16706. "id": 4000,
  16707. "corrected_read_errors": 0,
  16708. "array_id": 0,
  16709. "disk": {
  16710. "firmware": "02.01A02",
  16711. "temp": 46,
  16712. "serial": "WD-WX91A42F1333",
  16713. "model": "WDC WD10JUCX-56WPNY0"
  16714. },
  16715. "role": "active",
  16716. "sct_erc_supported": false,
  16717. "sct_erc_enabled": false,
  16718. "dev_uuid": "fdf5a84a-c427-e1ef-aa12-1732d2cf689f",
  16719. "device_location": "sata-internal-p3",
  16720. "set_name": "Freebox",
  16721. "set_uuid": "a4f1fbf3-f8e7-453f-19ec-842d6f4e2895"
  16722. }
  16723. ],
  16724. "array_size": 3000000000000,
  16725. "state": "running",
  16726. "sync_speed": 0,
  16727. "name": "Freebox",
  16728. "check_interval": 0,
  16729. "disk_id": 6000,
  16730. "last_check": 1576082428,
  16731. "sync_completed_end": 0,
  16732. "sync_completed_percent": 0
  16733. }
  16734. }
  16735.  
  16736. Create a RAID array
  16737.  
  16738. POST /api/v8/storage/raid/
  16739.  
  16740. Send a RaidArray with the following members:
  16741.  
  16742. level
  16743.  
  16744. name
  16745.  
  16746. members
  16747.  
  16748. Each member should have the following property:
  16749.  
  16750. id
  16751.  
  16752. Delete a RAID array
  16753.  
  16754. DELETE /api/v8/storage/raid/{id}
  16755.  
  16756. Start or stop a RAID array
  16757.  
  16758. Send a RaidArray with properties “id” and “state”.
  16759.  
  16760. This is used to start and stop an array by changing the state to “stopped” or “running”. These are the only two supported operations. Any change to other fields is ignored.
  16761.  
  16762. PUT /api/v8/storage/raid/{id}
  16763.  
  16764. Force start a RAID array
  16765.  
  16766. In case an array is incomplete, but has enough data to start in degraded mode, it won’t start automatically at boot, and the force start can be used. Can only be done if array state is “error”.
  16767.  
  16768. POST /api/v8/storage/raid/{id}/forcestart
  16769.  
  16770. Remove faulty members from RAID array
  16771.  
  16772. In case an array has faulty members, it might be desirable to delete them to add others members instead. Can only be done if array is not running.
  16773.  
  16774. DELETE /api/v8/storage/raid/{id}/members/faulty
  16775.  
  16776. Add members to an existing array that has missing members
  16777.  
  16778. In case an array is incomplete (has missing members), either because they were removed physically, or after becoming faulty, it’s possible to add new members to let the reconstruction happen. Can only be done if array is not running.
  16779.  
  16780. PUT /api/v8/storage/raid/{id}/members
  16781.  
  16782. Send a json object containing a “members” property, which is array of RaidMember objects. Only the “id” property of each member is required.
  16783. Re-add out-of-sync members that appear as spares
  16784.  
  16785. In case an array has been force-started without a member, and then said member is physically plugged, it won’t be added automatically and will appear with the “spare” role, this operation must be used. Can only be done if the array has a member with the “spare” role, and is not running.
  16786.  
  16787. POST /api/v8/storage/raid/{id}/members/addspares
  16788.  
  16789. Parental filter
  16790. Profile management
  16791. Profile Object
  16792.  
  16793. Profile
  16794.  
  16795. id int Read-only
  16796.  
  16797. unique id of this profile
  16798.  
  16799. name string
  16800.  
  16801. name of this profile
  16802.  
  16803. icon string
  16804.  
  16805. URL of the icon relative to root of the API domain.
  16806.  
  16807. Profiles API
  16808. Get the list of profiles
  16809.  
  16810. GET /api/v8/profile
  16811.  
  16812. Example request:
  16813.  
  16814. GET /api/v8/profile HTTP/1.1
  16815. Host: mafreebox.freebox.fr
  16816.  
  16817. Example response:
  16818.  
  16819. HTTP/1.1 200 OK
  16820. Content-Type: application/json; charset=utf-8
  16821.  
  16822. {
  16823. "success": true,
  16824. "result": [
  16825. {
  16826. "id": 2,
  16827. "name": "r0ro",
  16828. "url": "/resources/images/profile/profile_04.png"
  16829. },
  16830.  
  16831. [ ... ]
  16832.  
  16833. {
  16834. "id": 7,
  16835. "name": "Xav",
  16836. "url": "/resources/images/profile/profile_02.png"
  16837. }
  16838. ]
  16839.  
  16840. }
  16841.  
  16842. Get a profile
  16843.  
  16844. GET /api/v8/profile/{id}
  16845.  
  16846. Get the Profile with the given id
  16847.  
  16848. Example request:
  16849.  
  16850. GET /api/v8/profile/2 HTTP/1.1
  16851. Host: mafreebox.freebox.fr
  16852.  
  16853. Example response:
  16854.  
  16855. HTTP/1.1 200 OK
  16856. Content-Type: application/json; charset=utf-8
  16857.  
  16858. {
  16859. "success": true,
  16860. "result": {
  16861. "id": 2,
  16862. "name": "r0ro",
  16863. "url": "/resources/images/profile/profile_04.png"
  16864. }
  16865. }
  16866.  
  16867. Add a profile
  16868.  
  16869. POST /api/v8/profile/
  16870.  
  16871. Example request:
  16872.  
  16873. POST /api/v8/profile HTTP/1.1
  16874. Host: mafreebox.freebox.fr
  16875.  
  16876. {
  16877. "name": "Pierrot",
  16878. "url": "/resources/images/profile/profile_04.png"
  16879. }
  16880.  
  16881. Example response:
  16882.  
  16883. HTTP/1.1 200 OK
  16884. Content-Type: application/json; charset=utf-8
  16885.  
  16886. {
  16887. "success": true,
  16888. "result":
  16889. {
  16890. "id": 3,
  16891. }
  16892. }
  16893.  
  16894. Delete a profile
  16895.  
  16896. DELETE /api/v8/profile/{id}
  16897.  
  16898. Example request:
  16899.  
  16900. DELETE /api/v8/profile/2 HTTP/1.1
  16901. Host: mafreebox.freebox.fr
  16902.  
  16903. Example response:
  16904.  
  16905. HTTP/1.1 200 OK
  16906. Content-Type: application/json; charset=utf-8
  16907.  
  16908. {
  16909. "success": true,
  16910. }
  16911.  
  16912. Update a profile
  16913.  
  16914. PUT /api/v8/profile/3
  16915.  
  16916. Example request:
  16917.  
  16918. PUT /api/v8/profile HTTP/1.1
  16919. Host: mafreebox.freebox.fr
  16920.  
  16921. {
  16922. "name": "Pierrot",
  16923. "url": "/resources/images/profile/profile_02.png"
  16924. }
  16925.  
  16926. Example response:
  16927.  
  16928. HTTP/1.1 200 OK
  16929. Content-Type: application/json; charset=utf-8
  16930.  
  16931. {
  16932. "success": true,
  16933. "result":
  16934. {
  16935. "id": 3,
  16936. "name": "Pierrot",
  16937. "url": "/resources/images/profile/profile_02.png"
  16938. }
  16939. }
  16940.  
  16941. Network Control Object
  16942.  
  16943. The different modes supported are :
  16944.  
  16945. mode
  16946.  
  16947. Description
  16948.  
  16949. allowed
  16950.  
  16951. access is allowed
  16952.  
  16953. denied
  16954.  
  16955. access is denied
  16956.  
  16957. webonly
  16958.  
  16959. access is granted only for HTTP and HTTPS traffic; legacy mode, use not recommended.
  16960.  
  16961. NetworkControl
  16962.  
  16963. profile_id int Read-only
  16964.  
  16965. Id of the profile this network control is associated with. This is read-only, unless you use the POST api to add a network control.
  16966.  
  16967. next_change int Read-only
  16968.  
  16969. UNIX timestamp of next rule change in seconds. 0 if no next change.
  16970.  
  16971. override_mode enum
  16972.  
  16973. mode of current override.
  16974.  
  16975. current_mode enum Read-only
  16976.  
  16977. mode in use. If override is true, it will be override_mode, otherwise it’s the mode from the rules atttached to this NetworkControl.
  16978.  
  16979. rule_mode enum Read-only
  16980.  
  16981. mode that would be in use if there was no override. Depends only on rules, and is useful to determine what will happen when override is lifted.
  16982.  
  16983. override_until int
  16984.  
  16985. Unix timestamp in seconds when override ends. Relevant when override is true. Set at 0 for unlimited.
  16986.  
  16987. override bool
  16988.  
  16989. Whether there’s an override at the moment.
  16990.  
  16991. macs[] array of string
  16992.  
  16993. List of mac adresses associated with this profile’s network control.
  16994.  
  16995. hosts[] array of LanHost Read-only
  16996.  
  16997. List of Lan Host objects associated with this profile’s netwokr control. Derived from the macs array.
  16998.  
  16999. resolution int Read-only
  17000.  
  17001. Control resolution per day of this network control. Currently at 288.
  17002.  
  17003. cdayranges[] array of string
  17004.  
  17005. list of custom day range, each custom day range represents a group of days for which you want to use a different planning than other week days.
  17006.  
  17007. For instance a custom day range can contain the list of your children holidays.
  17008.  
  17009. cdayranges
  17010.  
  17011. Description
  17012.  
  17013. :fr_bank_holidays
  17014.  
  17015. French bank holidays
  17016.  
  17017. :fr_school_holidays_a
  17018.  
  17019. French school holidays - Zone A
  17020.  
  17021. :fr_school_holidays_b
  17022.  
  17023. French school holidays - Zone B
  17024.  
  17025. :fr_school_holidays_c
  17026.  
  17027. French school holidays - Zone C
  17028.  
  17029. :fr_school_holidays_corse
  17030.  
  17031. French school holidays - Corse
  17032.  
  17033. each cdayranges can be a coma separated list of cdayranges, for instance “:fr_bank_holidays,:fr_school_holidays_b”
  17034.  
  17035. Network Control API
  17036. Get Network Control for all profiles
  17037.  
  17038. GET /api/v8/network_control
  17039.  
  17040. Get Network Control for a profile
  17041.  
  17042. GET /api/v8/network_control/{profile_id}
  17043.  
  17044. Example request:
  17045.  
  17046. GET /api/v8/network_control/5 HTTP/1.1
  17047. Host: mafreebox.freebox.fr
  17048.  
  17049. Example response:
  17050.  
  17051. HTTP/1.1 200 OK
  17052. Content-Type: application/json; charset=utf-8
  17053.  
  17054. {
  17055. "success": true,
  17056. "result":
  17057. {
  17058. "profile_id": 5,
  17059. "next_change": 0,
  17060. "override": false,
  17061. "override_mode": "denied",
  17062. "current_mode": "allowed",
  17063. "macs": [
  17064. "D8:A2:CA:FE:BA:DF",
  17065. "D0:23:BE:DE:AD:EF"
  17066. ],
  17067. "hosts": [
  17068. "PC-de-mamie",
  17069. "Cantal-chromebook"
  17070. ],
  17071. "resolution": 288,
  17072. "cdayranges": []
  17073. }
  17074. }
  17075.  
  17076. Update Network Control for a profile
  17077.  
  17078. PUT /api/v8/network_control/{profile_id}
  17079.  
  17080. Example request:
  17081.  
  17082. PUT /api/v8/network_control/3 HTTP/1.1
  17083. Host: mafreebox.freebox.fr
  17084.  
  17085. {
  17086. "profile_id": 3,
  17087. "next_change": 0,
  17088. "override": false,
  17089. "override_mode": "allowed",
  17090. "current_mode": "denied",
  17091. "macs": [
  17092. "98:E8:FA:FE:BA:42",
  17093. "2C:CC:44:D1:AD:4F"
  17094. ],
  17095. "hosts": [
  17096. "3DS-Thibault",
  17097. "Vita-Rodolphe"
  17098. ],
  17099. "resolution": 288,
  17100. "cdayranges": []
  17101. }
  17102.  
  17103. Example response:
  17104.  
  17105. {
  17106. "success": true,
  17107. "result":
  17108. {
  17109. "profile_id": 3,
  17110. "next_change": 0,
  17111. "override": false,
  17112. "override_mode": "allowed",
  17113. "current_mode": "denied",
  17114. "macs": [
  17115. "98:E8:FA:FE:BA:42",
  17116. "2C:CC:44:D1:AD:4F"
  17117. ],
  17118. "hosts": [
  17119. "3DS-Thibault",
  17120. "Vita-Rodolphe"
  17121. ],
  17122. "resolution": 288,
  17123. "cdayranges": []
  17124. }
  17125. }
  17126.  
  17127. Get migration to new default mode status
  17128.  
  17129. Verify if migration to new default mode has been done (“allowed” only) if default mode was modified.
  17130.  
  17131. GET /api/v8/network_control/migrate
  17132.  
  17133. Example request:
  17134.  
  17135. GET /api/v8/network_control/migrate HTTP/1.1
  17136. Host: mafreebox.freebox.fr
  17137.  
  17138. Example response:
  17139.  
  17140. HTTP/1.1 200 OK
  17141. Content-Type: application/json; charset=utf-8
  17142.  
  17143. {
  17144. "success": true,
  17145. "result":
  17146. {
  17147. "default_mode_migrated": false
  17148. }
  17149. }
  17150.  
  17151. Migrate to new default mode
  17152.  
  17153. Do migration to new default mode (“allowed”) if it was modified previously.
  17154.  
  17155. POST /api/v8/network_control/migrate
  17156.  
  17157. Example request:
  17158.  
  17159. POST /api/v8/network_control/migrate HTTP/1.1
  17160. Host: mafreebox.freebox.fr
  17161.  
  17162. Example response:
  17163.  
  17164. HTTP/1.1 200 OK
  17165. Content-Type: application/json; charset=utf-8
  17166.  
  17167. {
  17168. "success": true,
  17169. "result":
  17170. {
  17171. "default_mode_migrated": true
  17172. }
  17173. }
  17174.  
  17175. Rule Object
  17176.  
  17177. NetworkControlRule
  17178.  
  17179. id int Read-only
  17180.  
  17181. Unique rule identifier.
  17182.  
  17183. profile_id int Read-only
  17184.  
  17185. Id of profile this rule applies to.
  17186.  
  17187. name string
  17188.  
  17189. Rule name
  17190.  
  17191. mode enum
  17192.  
  17193. Mode described in Network Control Object
  17194.  
  17195. start_time
  17196.  
  17197. Seconds since start of day (00:00) when rule starts. Must be in increments of the resolution. When resolution is 288, it means 5 minutes slots, so the value must be a multiple of 300.
  17198.  
  17199. end_time
  17200.  
  17201. Time of day in seconds since start of day (00:00) when rule ends. end_time modulo 300 must always be zero when resolution is 288.
  17202.  
  17203. weekdays[] array of bool
  17204.  
  17205. Array of days of weeks when this rule apply. 8th one is for cdayranges.
  17206.  
  17207. enabled bool
  17208.  
  17209. Whether rule is enabled.
  17210.  
  17211. Rule API
  17212. Get Network Control Rules for a profile
  17213.  
  17214. GET /api/v8/network_control/{profile_id}/rules
  17215.  
  17216. Returns the list of rules for this profile
  17217.  
  17218. Get a Network Control Rule
  17219.  
  17220. GET /api/v8/network_control/{profile_id}/rules/{rule_id}
  17221.  
  17222. Returns one rule.
  17223.  
  17224. Create a Network Control Rule
  17225.  
  17226. POST /api/v8/network_controlr/{profile_id}/rules/
  17227.  
  17228. Create a rule given in parameter.
  17229.  
  17230. Update a Network Control Rule
  17231.  
  17232. PUT /api/v8/network_control/{id}/rules/{rule_id}
  17233.  
  17234. Update rule.
  17235.  
  17236. Delete a Network Control Rule
  17237.  
  17238. DELETE /api/v8/network_control/{id}/rules/{rule_id}
  17239.  
  17240. Delete rule.
  17241.  
  17242. PVR
  17243. PVR [UNSTABLE]
  17244.  
  17245. * INTERNAL USE ONLY *
  17246. PVR Errors
  17247.  
  17248. error_code
  17249.  
  17250. Description
  17251.  
  17252. noent
  17253.  
  17254. wrong id
  17255.  
  17256. inval
  17257.  
  17258. invalid params
  17259.  
  17260. inval_date_fmt
  17261.  
  17262. invalid date format
  17263.  
  17264. inval_end_before_start
  17265.  
  17266. start time must be before end time
  17267.  
  17268. system_time_incorrect
  17269.  
  17270. system time not available
  17271.  
  17272. record_duration_too_long
  17273.  
  17274. record duration is too long
  17275.  
  17276. record_date_in_past
  17277.  
  17278. record date is already passed
  17279.  
  17280. unknown_channel
  17281.  
  17282. unknown channel
  17283.  
  17284. no_channel_svc
  17285.  
  17286. no service for this channel
  17287.  
  17288. only_auto_disable
  17289.  
  17290. can’t disable manual precord
  17291.  
  17292. cannot_change_en_state
  17293.  
  17294. can’t change enabled state
  17295.  
  17296. cannot_disable_has_data
  17297.  
  17298. can’t disable started record
  17299.  
  17300. internal_error
  17301.  
  17302. internal error
  17303. PVR Config
  17304.  
  17305. PVR config has the following attributes:
  17306.  
  17307. PvrConfig
  17308.  
  17309. margin_before int
  17310.  
  17311. default margin before recording start time
  17312.  
  17313. margin_after int
  17314.  
  17315. default margin after recording end time
  17316.  
  17317. PVR Config API
  17318. Get the current PVR configuration
  17319.  
  17320. GET /api/v8/pvr/config/
  17321.  
  17322. Returns the current PvrConfig
  17323.  
  17324. Example request:
  17325.  
  17326. GET /api/v8/pvr/config/ HTTP/1.1
  17327. Host: mafreebox.freebox.fr
  17328.  
  17329. Example response:
  17330.  
  17331. HTTP/1.1 200 OK
  17332. Content-Type: application/json; charset=utf-8
  17333.  
  17334. {
  17335. "success": true,
  17336. "result": {
  17337. "margin_before": 10,
  17338. "margin_after": 5
  17339. }
  17340. }
  17341.  
  17342. Update the current PVR configuration
  17343.  
  17344. PUT /api/v8/pvr/config/
  17345.  
  17346. Update the current PvrConfig
  17347.  
  17348. PVR Quota
  17349.  
  17350. PVR Quota has the following attributes:
  17351.  
  17352. PvrQuota
  17353.  
  17354. quota_exceeded bool
  17355.  
  17356. is quota exceeded
  17357.  
  17358. needed_tresh int
  17359.  
  17360. needed quota threshold
  17361.  
  17362. cur_tresh int
  17363.  
  17364. current quota threshold
  17365.  
  17366. PVR Quota API
  17367. Getting the current quota info
  17368.  
  17369. GET /api/v8/pvr/quota/
  17370.  
  17371. Example request:
  17372.  
  17373. GET /api/v8/pvr/quota/ HTTP/1.1
  17374. Host: mafreebox.freebox.fr
  17375.  
  17376. Example response:
  17377.  
  17378. HTTP/1.1 200 OK
  17379. Content-Type: application/json; charset=utf-8
  17380.  
  17381. {
  17382. "success": true,
  17383. "result": {
  17384. "quota_exceeded": true,
  17385. "needed_tresh": 80,
  17386. "cur_tresh": 40
  17387. }
  17388. }
  17389.  
  17390. Request next quota threshold
  17391.  
  17392. PUT /api/v8/pvr/quota/
  17393.  
  17394. Request next quota threshold. You don’t have to provide any arguments, the quota will be adjusted automatically if needed.
  17395.  
  17396. Example request:
  17397.  
  17398. PUT /api/v8/pvr/quota/ HTTP/1.1
  17399. Host: mafreebox.freebox.fr
  17400.  
  17401. { }
  17402.  
  17403. Example response:
  17404.  
  17405. HTTP/1.1 200 OK
  17406. Content-Type: application/json; charset=utf-8
  17407.  
  17408. {
  17409. "success": true,
  17410. "result": {
  17411. "quota_exceeded": false,
  17412. "needed_tresh": 80,
  17413. "cur_tresh": 80
  17414. }
  17415. }
  17416.  
  17417. PVR Programmed records
  17418.  
  17419. Precords (Programmed records) are records that are planned. Precords can be manual, or generated using a PVR Generator (see below). Only manual Precords can be edited directly.
  17420. Precord
  17421.  
  17422. Precord has the following attributes:
  17423.  
  17424. Precord
  17425.  
  17426. id string Read-only
  17427.  
  17428. precord id
  17429.  
  17430. media string
  17431.  
  17432. media name on which the record will be written to. See the Media API for more info. This property and can be empty when the file backing the record is not available, for example when secure is set.
  17433.  
  17434. path string
  17435.  
  17436. destination directory on the media storage where the record will be written to
  17437.  
  17438. has_record_gen bool Read-only
  17439.  
  17440. if true, this precord has been generated using a Generator
  17441.  
  17442. record_gen_id int Read-only
  17443.  
  17444. if has_record_gen, this is the id of the generator
  17445.  
  17446. conflict bool Read-only
  17447.  
  17448. if true this record may conflict with another record
  17449.  
  17450. overlap_list[] array of int Read-only
  17451.  
  17452. in case of conflict, this will contain the list of records id that may conflict with this record
  17453.  
  17454. enabled bool
  17455.  
  17456. it only applies to generated records. If false the generated precord will be skipped.
  17457.  
  17458. altered bool Read-only
  17459.  
  17460. a precord is altered when some part of the recording may be missing. This can be the case if a conflict occurred during the recording (or connection was down)
  17461.  
  17462. state enum Read-only
  17463.  
  17464. State
  17465.  
  17466. Description
  17467.  
  17468. disabled
  17469.  
  17470. disabled
  17471.  
  17472. start_error
  17473.  
  17474. failed to start
  17475.  
  17476. waiting_start_time
  17477.  
  17478. scheduled
  17479.  
  17480. starting
  17481.  
  17482. starting
  17483.  
  17484. running
  17485.  
  17486. running
  17487.  
  17488. running_error
  17489.  
  17490. running with error
  17491.  
  17492. failed
  17493.  
  17494. failed
  17495.  
  17496. finished
  17497.  
  17498. finished
  17499.  
  17500. error enum Read-only
  17501.  
  17502. Error
  17503.  
  17504. none
  17505.  
  17506. file_access_error
  17507.  
  17508. disk_full
  17509.  
  17510. private_but_no_private_dir
  17511.  
  17512. network_problem
  17513.  
  17514. resource_problem
  17515.  
  17516. no_stream_available
  17517.  
  17518. no_data_received
  17519.  
  17520. missed
  17521.  
  17522. stopped
  17523.  
  17524. internal_error
  17525.  
  17526. unknown_error
  17527.  
  17528. channel_uuid string
  17529.  
  17530. channel uuid
  17531.  
  17532. channel_name string
  17533.  
  17534. optional channel name
  17535.  
  17536. channel_quality enum
  17537.  
  17538. channel_quality
  17539.  
  17540. auto
  17541.  
  17542. hd
  17543.  
  17544. sd
  17545.  
  17546. ld
  17547.  
  17548. 3d
  17549.  
  17550. channel_type enum
  17551.  
  17552. channel_type
  17553.  
  17554. Description
  17555.  
  17556. ‘’ (empty string)
  17557.  
  17558. auto
  17559.  
  17560. iptv
  17561.  
  17562. use only iptv streams
  17563.  
  17564. dvb
  17565.  
  17566. use only dvb streams
  17567.  
  17568. name string
  17569.  
  17570. record name
  17571.  
  17572. subname string
  17573.  
  17574. record subname
  17575.  
  17576. broadcast_type enum
  17577.  
  17578. broadcast_type
  17579.  
  17580. tv
  17581.  
  17582. radio
  17583.  
  17584. start int
  17585.  
  17586. record start timestamp
  17587.  
  17588. end int
  17589.  
  17590. record end timestamp
  17591.  
  17592. legacy_uri string
  17593.  
  17594. only used for legacy apps. Use channel_uuid instead when available NOTE: only visible when called from player
  17595.  
  17596. force_channel_name string
  17597.  
  17598. only used for legacy apps. Use channel_uuid instead when available NOTE: only visible when called from player
  17599.  
  17600. Precord API
  17601. Getting the list of precords
  17602.  
  17603. GET /api/v8/pvr/programmed/
  17604.  
  17605. Example request:
  17606.  
  17607. GET /api/v8/pvr/programmed/ HTTP/1.1
  17608. Host: mafreebox.freebox.fr
  17609.  
  17610. Example response:
  17611.  
  17612. HTTP/1.1 200 OK
  17613. Content-Type: application/json; charset=utf-8
  17614.  
  17615. {
  17616. "success": true,
  17617. "result": [
  17618. {
  17619. "has_record_gen": true,
  17620. "channel_name": "France 2",
  17621. "overlap_list": [
  17622. 195
  17623. ],
  17624. "end": 1403755697,
  17625. "media": "Disque dur",
  17626. "path": "Enregistrements",
  17627. "record_gen_id": 10,
  17628. "enabled": true,
  17629. "id": 190,
  17630. "start": 1403755628,
  17631. "broadcast_type": "tv",
  17632. "subname": "",
  17633. "state": "waiting_start_time",
  17634. "channel_type": "",
  17635. "name": "Test Repeat",
  17636. "channel_quality": "auto",
  17637. "conflict": true,
  17638. "channel_uuid": "uuid-webtv-201",
  17639. "error": "none",
  17640. "altered": false
  17641. }
  17642.  
  17643. [ ... ]
  17644.  
  17645. {
  17646. "has_record_gen": false,
  17647. "channel_name": "France 2",
  17648. "overlap_list": [ ],
  17649. "end": 1403541511,
  17650. "media": "NO NAME",
  17651. "path": "Enregistrements",
  17652. "record_gen_id": 0,
  17653. "enabled": true,
  17654. "id": 236,
  17655. "start": 1403541361,
  17656. "broadcast_type": "tv",
  17657. "subname": "Sub Test",
  17658. "state": "finished",
  17659. "channel_type": "iptv",
  17660. "name": "Test",
  17661. "channel_quality": "auto",
  17662. "conflict": false,
  17663. "channel_uuid": "uuid-webtv-201",
  17664. "error": "none",
  17665. "altered": true
  17666. }
  17667. ]
  17668. }
  17669.  
  17670. Getting a specific precord
  17671.  
  17672. GET /api/v8/pvr/programmed/{id}
  17673.  
  17674. Returns the requested Precord
  17675.  
  17676. Example request:
  17677.  
  17678. GET /api/v8/pvr/programmed/236 HTTP/1.1
  17679. Host: mafreebox.freebox.fr
  17680.  
  17681. Example response:
  17682.  
  17683. HTTP/1.1 200 OK
  17684. Content-Type: application/json; charset=utf-8
  17685.  
  17686. {
  17687. "success": true,
  17688. "result": {
  17689. "has_record_gen": false,
  17690. "channel_name": "France 2",
  17691. "overlap_list": [ ],
  17692. "end": 1403541511,
  17693. "media": "NO NAME",
  17694. "path": "Enregistrements",
  17695. "record_gen_id": 0,
  17696. "enabled": true,
  17697. "id": 236,
  17698. "start": 1403541361,
  17699. "broadcast_type": "tv",
  17700. "subname": "Sub Test",
  17701. "state": "finished",
  17702. "channel_type": "iptv",
  17703. "name": "Test",
  17704. "channel_quality": "auto",
  17705. "conflict": false,
  17706. "channel_uuid": "uuid-webtv-201",
  17707. "error": "none",
  17708. "altered": true
  17709. }
  17710. }
  17711.  
  17712. Updating a precord
  17713.  
  17714. PUT /api/v8/pvr/programmed/{id}
  17715.  
  17716. Update a Precord properties
  17717.  
  17718. Example request:
  17719.  
  17720. PUT /api/v8/pvr/programmed/236 HTTP/1.1
  17721. Host: mafreebox.freebox.fr
  17722.  
  17723. {
  17724. "name": "test 2"
  17725. }
  17726.  
  17727. Example response:
  17728.  
  17729. HTTP/1.1 200 OK
  17730. Content-Type: application/json; charset=utf-8
  17731.  
  17732. {
  17733. "success": true,
  17734. "result": {
  17735. "has_record_gen": false,
  17736. "channel_name": "France 2",
  17737. "overlap_list": [ ],
  17738. "end": 1403541511,
  17739. "media": "NO NAME",
  17740. "path": "Enregistrements",
  17741. "record_gen_id": 0,
  17742. "enabled": true,
  17743. "id": 236,
  17744. "start": 1403541361,
  17745. "broadcast_type": "tv",
  17746. "subname": "Sub Test",
  17747. "state": "finished",
  17748. "channel_type": "iptv",
  17749. "name": "test 2",
  17750. "channel_quality": "auto",
  17751. "conflict": false,
  17752. "channel_uuid": "uuid-webtv-201",
  17753. "error": "none",
  17754. "altered": true
  17755. }
  17756. }
  17757.  
  17758. Delete a precord
  17759.  
  17760. DELETE /api/v8/pvr/programmed/{id}
  17761.  
  17762. Delete a Precord
  17763.  
  17764. Example request:
  17765.  
  17766. DELETE /api/v8/pvr/programmed/236 HTTP/1.1
  17767.  
  17768. Example response:
  17769.  
  17770. HTTP/1.1 200 OK
  17771. Content-Type: application/json; charset=utf-8
  17772.  
  17773. {
  17774. "success": true,
  17775. }
  17776.  
  17777. Create a precord
  17778.  
  17779. POST /api/v8/pvr/programmed/
  17780.  
  17781. Create a new Precord
  17782.  
  17783. ** Example request**:
  17784.  
  17785. ** Example response**:
  17786.  
  17787. HTTP/1.1 200 OK
  17788. Content-Type: application/json; charset=utf-8
  17789.  
  17790. {
  17791. "success": true,
  17792. "result": {
  17793. "id": 63,
  17794. "media": "Disque dur",
  17795. "path": "Enregistrements",
  17796. "channel_uuid": "uuid-webtv-374",
  17797. "channel_name": "NT1",
  17798. "channel_type": "",
  17799. "channel_quality": "auto",
  17800. "broadcast_type": "tv",
  17801. "start": 1444240500,
  17802. "end": 1444244100,
  17803. "name": "Secret Story",
  17804. "subname": "La soirée des habitants",
  17805. "state": "starting",
  17806. "error": "none",
  17807. "enabled": true,
  17808. "altered": false,
  17809. "conflict": false,
  17810. "overlap_list": [],
  17811. "margin_before": 0,
  17812. "margin_after": 0,
  17813. "has_record_gen": false,
  17814. "record_gen_id": 0
  17815. }
  17816. }
  17817.  
  17818. PVR Finished records
  17819.  
  17820. Frecords (Finished records) are records that are finished or in progress. An Frecord object is created automatically when a Precord start time is reached.
  17821. Frecord
  17822.  
  17823. Frecord has the following attributes:
  17824.  
  17825. Frecord
  17826.  
  17827. id string Read-only
  17828.  
  17829. frecord id
  17830.  
  17831. media string Read-only
  17832.  
  17833. media name on which the record is written. See the Media API for more info. This property and can be empty when the file backing the record is not available, for example when secure is set.
  17834.  
  17835. path string Read-only
  17836.  
  17837. destination directory on the media storage
  17838.  
  17839. filename string Read-only
  17840.  
  17841. filename of the record
  17842.  
  17843. byte_size int Read-only
  17844.  
  17845. size of the record file in bytes
  17846.  
  17847. has_record_gen bool Read-only
  17848.  
  17849. if true, this frecord has been generated using a Generator
  17850.  
  17851. record_gen_id int Read-only
  17852.  
  17853. if has_record_gen, this is the id of the generator
  17854.  
  17855. altered bool Read-only
  17856.  
  17857. an frecord is altered when some part of the recording may be missing. This can be the case if a conflict occurred during the recording (or connection was down)
  17858.  
  17859. state enum Read-only
  17860.  
  17861. State
  17862.  
  17863. Description
  17864.  
  17865. disabled
  17866.  
  17867. disabled
  17868.  
  17869. start_error
  17870.  
  17871. failed to start
  17872.  
  17873. waiting_start_time
  17874.  
  17875. scheduled
  17876.  
  17877. starting
  17878.  
  17879. starting
  17880.  
  17881. running
  17882.  
  17883. running
  17884.  
  17885. running_error
  17886.  
  17887. running with error
  17888.  
  17889. failed
  17890.  
  17891. failed
  17892.  
  17893. finished
  17894.  
  17895. finished
  17896.  
  17897. error enum Read-only
  17898.  
  17899. Error
  17900.  
  17901. none
  17902.  
  17903. file_access_error
  17904.  
  17905. disk_full
  17906.  
  17907. private_but_no_private_dir
  17908.  
  17909. network_problem
  17910.  
  17911. resource_problem
  17912.  
  17913. no_stream_available
  17914.  
  17915. no_data_received
  17916.  
  17917. missed
  17918.  
  17919. stopped
  17920.  
  17921. internal_error
  17922.  
  17923. unknown_error
  17924.  
  17925. channel_uuid string Read-only
  17926.  
  17927. channel uuid
  17928.  
  17929. channel_name string Read-only
  17930.  
  17931. optional channel name
  17932.  
  17933. channel_quality enum Read-only
  17934.  
  17935. channel_quality
  17936.  
  17937. auto
  17938.  
  17939. hd
  17940.  
  17941. sd
  17942.  
  17943. ld
  17944.  
  17945. 3d
  17946.  
  17947. channel_type enum Read-only
  17948.  
  17949. channel_type
  17950.  
  17951. Description
  17952.  
  17953. ‘’ (empty string)
  17954.  
  17955. auto
  17956.  
  17957. iptv
  17958.  
  17959. use only iptv streams
  17960.  
  17961. dvb
  17962.  
  17963. use only dvb streams
  17964.  
  17965. name string
  17966.  
  17967. record name
  17968.  
  17969. subname string
  17970.  
  17971. record subname
  17972.  
  17973. broadcast_type enum Read-only
  17974.  
  17975. broadcast_type
  17976.  
  17977. tv
  17978.  
  17979. radio
  17980.  
  17981. start int Read-only
  17982.  
  17983. record start timestamp
  17984.  
  17985. end int Read-only
  17986.  
  17987. record end timestamp
  17988.  
  17989. secure bool Read-only
  17990.  
  17991. flag set when the record is protected by DRM
  17992.  
  17993. Frecord API
  17994. Getting the list of frecords
  17995.  
  17996. GET /api/v8/pvr/finished/
  17997.  
  17998. Example request:
  17999.  
  18000. GET /api/v8/pvr/finished/ HTTP/1.1
  18001. Host: mafreebox.freebox.fr
  18002.  
  18003. Example response:
  18004.  
  18005. HTTP/1.1 200 OK
  18006. Content-Type: application/json; charset=utf-8
  18007.  
  18008. {
  18009. "success": true,
  18010. "result": [
  18011. {
  18012. "id": 5,
  18013. "media": "Disque dur",
  18014. "path": "Enregistrements",
  18015. "filename": "M6 - Fier de ma maison - 27-06-2013 16h35 01h15 (5).m2ts",
  18016. "byte_size": 4433869440,
  18017. "has_record_gen": false,
  18018. "record_gen_id": 0,
  18019. "broadcast_type": "tv",
  18020. "channel_uuid": "uuid-webtv-613",
  18021. "channel_name": "M6",
  18022. "channel_type": "dvb",
  18023. "channel_quality": "hd",
  18024. "name": "Fier de ma maison",
  18025. "subname": "",
  18026. "start": 1372343700,
  18027. "end": 1372348200,
  18028. "state": "finished",
  18029. "error": "none",
  18030. "enabled": true,
  18031. "altered": true,
  18032. "secure": false
  18033. },
  18034.  
  18035. [ ... ]
  18036.  
  18037. {
  18038. "id": 22,
  18039. "media": "",
  18040. "path": "",
  18041. "filename": "TF1 - Nos chers voisins - 17-09-2014 15h23 01h (22).m2ts",
  18042. "byte_size": 2421095040,
  18043. "has_record_gen": false,
  18044. "record_gen_id": 0,
  18045. "broadcast_type": "tv",
  18046. "channel_uuid": "uuid-webtv-612",
  18047. "channel_name": "TF1",
  18048. "channel_type": "",
  18049. "channel_quality": "auto",
  18050. "name": "Nos chers voisins",
  18051. "subname": "",
  18052. "start": 1410960180,
  18053. "end": 1410963780,
  18054. "state": "finished",
  18055. "error": "none",
  18056. "enabled": true,
  18057. "altered": true,
  18058. "secure": true
  18059. }
  18060. ]
  18061. }
  18062.  
  18063. Getting a specific frecord
  18064.  
  18065. GET /api/v8/pvr/finished/{id}
  18066.  
  18067. Returns the requested Frecord
  18068.  
  18069. Example request:
  18070.  
  18071. GET /api/v8/pvr/finished/236 HTTP/1.1
  18072. Host: mafreebox.freebox.fr
  18073.  
  18074. Example response:
  18075.  
  18076. HTTP/1.1 200 OK
  18077. Content-Type: application/json; charset=utf-8
  18078.  
  18079. {
  18080. "success": true,
  18081. "result": {
  18082. "id": 236,
  18083. "media": "NO NAME",
  18084. "path": "",
  18085. "filename": "France 3 - Tout le sport - 10-04-2015 20h00 10m (24).m2ts",
  18086. "byte_size": 341752320,
  18087. "has_record_gen": false,
  18088. "record_gen_id": 0,
  18089. "broadcast_type": "tv",
  18090. "channel_uuid": "uuid-webtv-202",
  18091. "channel_name": "France 3",
  18092. "channel_type": "",
  18093. "channel_quality": "auto",
  18094. "name": "Tout le sport",
  18095. "subname": "",
  18096. "start": 1428688800,
  18097. "end": 1428689400,
  18098. "state": "finished",
  18099. "error": "none",
  18100. "enabled": true,
  18101. "altered": true,
  18102. "secure": false
  18103. }
  18104. }
  18105.  
  18106. Updating an frecord
  18107.  
  18108. PUT /api/v8/pvr/finished/{id}
  18109.  
  18110. Update a Frecord properties
  18111.  
  18112. Example request:
  18113.  
  18114. PUT /api/v8/pvr/finished/236 HTTP/1.1
  18115. Host: mafreebox.freebox.fr
  18116.  
  18117. {
  18118. "name": "Tout le sport",
  18119. "subname": "On est les champions"
  18120. }
  18121.  
  18122. Example response:
  18123.  
  18124. HTTP/1.1 200 OK
  18125. Content-Type: application/json; charset=utf-8
  18126.  
  18127. {
  18128. "success": true,
  18129. "result": {
  18130. "id": 236,
  18131. "media": "NO NAME",
  18132. "path": "",
  18133. "filename": "France 3 - Tout le sport - 10-04-2015 20h00 10m (24).m2ts",
  18134. "byte_size": 341752320,
  18135. "has_record_gen": false,
  18136. "record_gen_id": 0,
  18137. "broadcast_type": "tv",
  18138. "channel_uuid": "uuid-webtv-202",
  18139. "channel_name": "France 3",
  18140. "channel_type": "",
  18141. "channel_quality": "auto",
  18142. "name": "Tout le sport",
  18143. "subname": "On est les champions",
  18144. "start": 1428688800,
  18145. "end": 1428689400,
  18146. "state": "finished",
  18147. "error": "none",
  18148. "enabled": true,
  18149. "altered": true,
  18150. "secure": false
  18151. }
  18152. }
  18153.  
  18154. Delete an frecord
  18155.  
  18156. DELETE /api/v8/pvr/finished/{id}
  18157.  
  18158. Delete a Frecord and associated files
  18159.  
  18160. Example request:
  18161.  
  18162. DELETE /api/v8/pvr/finished/236 HTTP/1.1
  18163.  
  18164. Example response:
  18165.  
  18166. HTTP/1.1 200 OK
  18167. Content-Type: application/json; charset=utf-8
  18168.  
  18169. {
  18170. "success": true,
  18171. }
  18172.  
  18173. Storage media
  18174.  
  18175. Media objects represent a storage on which records can be written to, typically a disk.
  18176. Media
  18177.  
  18178. Media has the following attributes:
  18179.  
  18180. Media
  18181.  
  18182. media string Read-only
  18183.  
  18184. name of the storage medium
  18185.  
  18186. free_bytes int Read-only
  18187.  
  18188. number of free bytes on the medium
  18189.  
  18190. total bytes int [ro]
  18191.  
  18192. total number of bytes on the medium
  18193.  
  18194. record_time int Read-only
  18195.  
  18196. estimated record time in seconds for multiple channel types and qualities
  18197.  
  18198. Media API
  18199. Getting the list of media
  18200.  
  18201. GET /api/v8/pvr/media/
  18202.  
  18203. Example request:
  18204.  
  18205. GET /api/v8/pvr/media/ HTTP/1.1
  18206. Host: mafreebox.freebox.fr
  18207.  
  18208. Example response:
  18209.  
  18210. HTTP/1.1 200 OK
  18211. Content-Type: application/json; charset=utf-8
  18212.  
  18213. {
  18214. "success": true,
  18215. "result": [
  18216. {
  18217. "media": "Disque dur",
  18218. "free_bytes": 39700000000,
  18219. "total_bytes": 244950000000,
  18220. "record_time": {
  18221. "dvb": { "sd": 48461, "hd": 35245, "3d": 35245 },
  18222. "iptv": { "ld": 155078, "sd": 110770, "hd": 51012, "3d": 51012 }
  18223. }
  18224. },
  18225.  
  18226. [ ... ]
  18227.  
  18228. {
  18229. "media": "NO NAME",
  18230. "free_bytes": 873930000,
  18231. "total_bytes": 7790000000,
  18232. "record_time": {
  18233. "dvb": { "sd": 1066, "hd": 775, "3d": 775 },
  18234. "iptv": { "ld": 3413, "sd": 2438, "hd": 1122, "3d": 1122 }
  18235. }
  18236. }
  18237. ]
  18238. }
  18239.  
  18240. Home
  18241. Home API
  18242.  
  18243. The Home API allows you to acces features related to home automation
  18244. List Home Adapters
  18245. Home Adapter Object
  18246.  
  18247. HomeAdapter
  18248.  
  18249. HomeAdapter has the following attributes:
  18250.  
  18251. id int Read-only
  18252.  
  18253. this object id
  18254.  
  18255. icon_url String Read-only
  18256.  
  18257. Url of the adapter icon
  18258.  
  18259. label String Read-only
  18260.  
  18261. The displayable name of this adapter
  18262.  
  18263. status enum
  18264.  
  18265. Adapter status
  18266.  
  18267. status
  18268.  
  18269. Description
  18270.  
  18271. unplugged
  18272.  
  18273. The adapter is not available
  18274.  
  18275. disabled
  18276.  
  18277. The adapter has been disabled
  18278.  
  18279. active
  18280.  
  18281. the adapter is active
  18282.  
  18283. type AdapterType Read-only
  18284.  
  18285. The technical type of this adapter.
  18286.  
  18287. props Map
  18288.  
  18289. Technical data related to this adapter, useful fo developers
  18290.  
  18291. Get Home Adapters List
  18292.  
  18293. GET /api/v8/home/adapters
  18294.  
  18295. Retrieve the list of registered HomeAdapter. A new adapters appear when the user plugs a new home automation dongle.
  18296.  
  18297. Example request:
  18298.  
  18299. GET /api/v8/home/adapters HTTP/1.1
  18300. Host: mafreebox.freebox.fr
  18301.  
  18302. Example response:
  18303.  
  18304. HTTP/1.1 200 OK
  18305. Content-Type: application/json; charset=utf-8
  18306.  
  18307. {
  18308. "result": [
  18309. {
  18310. "icon_url": "http://images.com/adapter_dm.png",
  18311. "id": 1,
  18312. "label": "Gestionnaire de caméra",
  18313. "status": "active",
  18314. "type": {
  18315. "name": "adapter::cam"
  18316. }
  18317. },
  18318. {
  18319. "icon_url": "http://images.com/adapter_dm.png",
  18320. "id": 2,
  18321. "label": "Réseau Rts",
  18322. "status": "active",
  18323. "type": {
  18324. "name": "adapter::rts"
  18325. }
  18326. },
  18327. {
  18328. "icon_url": "http://images.com/adapter_dm.png",
  18329. "id": 3,
  18330. "label": "Réseau IOHome",
  18331. "props": {
  18332. "Addr": 160,
  18333. "SomfyId": "00:00:00:00"
  18334. },
  18335. "status": "active",
  18336. "type": {
  18337. "name": "adapter::ios"
  18338. }
  18339. },
  18340. {
  18341. "icon_url": "http://images.com/adapter_dm.png",
  18342. "id": 4,
  18343. "label": "Réseau Domus",
  18344. "props": {
  18345. "Network ID": 50791
  18346. },
  18347. "status": "active",
  18348. "type": {
  18349. "name": "adapter::domus"
  18350. }
  18351. }
  18352. ],
  18353. "success": true
  18354. }
  18355.  
  18356. Get a Home Adapter
  18357.  
  18358. GET /api/v8/home/adapters/{id}
  18359.  
  18360. Fetch information about a single HomeAdapter.
  18361.  
  18362. Example request:
  18363.  
  18364. GET /api/v8/home/adapters/1 HTTP/1.1
  18365. Host: mafreebox.freebox.fr
  18366.  
  18367. Example response:
  18368.  
  18369. HTTP/1.1 200 OK
  18370. Content-Type: application/json; charset=utf-8
  18371.  
  18372. {
  18373. "result": {
  18374. "icon_url": "http://images.com/adapter_dm.png",
  18375. "id": 1,
  18376. "label": "Gestionnaire de caméra",
  18377. "status": "active",
  18378. "type": {
  18379. "name": "adapter::cam"
  18380. }
  18381. }
  18382. "success": true
  18383. }
  18384.  
  18385. Change a Home Adapter status
  18386.  
  18387. PUT /api/v8/home/adapters/{id}
  18388.  
  18389. Change the status of a HomeAdapter.
  18390.  
  18391. Example request:
  18392.  
  18393. PUT /api/v8/home/adapters/1 HTTP/1.1
  18394. Host: mafreebox.freebox.fr
  18395.  
  18396. {
  18397. "status": "disabled"
  18398. }
  18399.  
  18400. Example response:
  18401.  
  18402. HTTP/1.1 200 OK
  18403. Content-Type: application/json; charset=utf-8
  18404.  
  18405. {
  18406. "success": true
  18407. }
  18408.  
  18409. Pair a new object
  18410. Pairing Step
  18411.  
  18412. HomePairingStep
  18413.  
  18414. This represents a pairing process step.
  18415.  
  18416. fields[] array of HomePairingStepField Read-only
  18417.  
  18418. A collection of ui elements to display.
  18419.  
  18420. icon_url String Read-only
  18421.  
  18422. The url of an image which represents this step.
  18423.  
  18424. pageid int Read-only
  18425.  
  18426. The identifier of this step.
  18427.  
  18428. refresh int
  18429.  
  18430. The delay in millisecond after which to request a new step update.
  18431.  
  18432. session int Read-only
  18433.  
  18434. The id of this session process.
  18435.  
  18436. HomePairingStepField
  18437.  
  18438. widget enum Read-only
  18439.  
  18440. The type of ui element to display.
  18441.  
  18442. widget
  18443.  
  18444. Description
  18445.  
  18446. label
  18447.  
  18448. A simple text field
  18449.  
  18450. select
  18451.  
  18452. A selectable list item
  18453.  
  18454. button
  18455.  
  18456. A clickable button
  18457.  
  18458. display_qrcode
  18459.  
  18460. A qrcode
  18461.  
  18462. input
  18463.  
  18464. An input text field
  18465.  
  18466. checkbox
  18467.  
  18468. A checkbable button
  18469.  
  18470. progress
  18471.  
  18472. A progress bar
  18473.  
  18474. bar_button_left
  18475.  
  18476. A button displayed at the left of the bottom nav bar
  18477.  
  18478. bar_button_right
  18479.  
  18480. A button displayed at the right of the bottom nav bar
  18481.  
  18482. text string Read-only
  18483.  
  18484. The data to use with the displayed widget.
  18485.  
  18486. widget
  18487.  
  18488. text usage
  18489.  
  18490. label
  18491.  
  18492. The label text
  18493.  
  18494. select
  18495.  
  18496. The item caption
  18497.  
  18498. button
  18499.  
  18500. The button caption
  18501.  
  18502. display_qrcode
  18503.  
  18504. The data to encode in the qrcode
  18505.  
  18506. input
  18507.  
  18508. The default text
  18509.  
  18510. checkbox
  18511.  
  18512. The button caption
  18513.  
  18514. progress
  18515.  
  18516. The progress value, in percent, as int
  18517.  
  18518. bar_button_left
  18519.  
  18520. The button caption
  18521.  
  18522. bar_button_right
  18523.  
  18524. The button caption
  18525.  
  18526. Start Pairing
  18527.  
  18528. POST /api/v8/home/pairing/{adapter_id}
  18529.  
  18530. Start the pairing process on a specific HomeAdapter.
  18531.  
  18532. op: start
  18533.  
  18534. type: the type of object to pair. This parameter is only relevant for the domus adapter.
  18535.  
  18536. type
  18537.  
  18538. Description
  18539.  
  18540. node::domus::freebox::secmod
  18541.  
  18542. Pair the security module
  18543.  
  18544. node::domus::sercomm::pir
  18545.  
  18546. Pair a movement detector
  18547.  
  18548. node::domus::sercomm::keyfob
  18549.  
  18550. Pair an alarm remote control
  18551.  
  18552. node::domus::sercomm::doorswitch
  18553.  
  18554. Pair an opening detector
  18555.  
  18556. Example request:
  18557.  
  18558. POST /api/v8/home/pairing/1 HTTP/1.1
  18559. Host: mafreebox.freebox.fr
  18560.  
  18561. {
  18562. "op": "start",
  18563. "type": "node::domus::freebox::secmod"
  18564. }
  18565.  
  18566. Example response:
  18567.  
  18568. HTTP/1.1 200 OK
  18569. Content-Type: application/json; charset=utf-8
  18570.  
  18571. {
  18572. "success": true
  18573. }
  18574.  
  18575. Current Pairing Step
  18576.  
  18577. GET /api/v8/home/pairing/{adapter_id}
  18578.  
  18579. Get the current HomePairingStep on a specific HomeAdapter
  18580.  
  18581. Example request:
  18582.  
  18583. GET /api/v8/home/pairing/1 HTTP/1.1
  18584. Host: mafreebox.freebox.fr
  18585.  
  18586. Example response:
  18587.  
  18588. HTTP/1.1 200 OK
  18589. Content-Type: application/json; charset=utf-8
  18590.  
  18591. {
  18592. "result" : {
  18593. "fields" : [
  18594. {
  18595. "text" : "Veuillez vérifier que votre wifi est bien activé.",
  18596. "widget" : "label"
  18597. }
  18598. ],
  18599. "icon_url" : "/resources/images/home/pairing/wifi.png",
  18600. "pageid" : 2,
  18601. "refresh" : 1000,
  18602. "session" : 62328
  18603. },
  18604. "success" : true
  18605. }
  18606.  
  18607. Next Step
  18608.  
  18609. POST /api/v8/home/pairing/{adapter_id}
  18610.  
  18611. Send current step result and get the next step in the process. Call this when the user clicks on a button, bar_button_left, bar_button_right or a select item.
  18612.  
  18613. field is a list of value corresponding to the current page widgets.
  18614.  
  18615. widget
  18616.  
  18617. value in fields
  18618.  
  18619. label
  18620.  
  18621. null
  18622.  
  18623. select
  18624.  
  18625. The index of the selected item, null if none selected
  18626.  
  18627. button
  18628.  
  18629. true if the button has been clicked, false otherwise
  18630.  
  18631. display_qrcode
  18632.  
  18633. null
  18634.  
  18635. input
  18636.  
  18637. The text entered
  18638.  
  18639. checkbox
  18640.  
  18641. true if checked, false otherwise
  18642.  
  18643. progress
  18644.  
  18645. The progress value, in percent, as int
  18646.  
  18647. bar_button_left
  18648.  
  18649. The button caption
  18650.  
  18651. bar_button_right
  18652.  
  18653. The button caption
  18654.  
  18655. Example request:
  18656.  
  18657. POST /api/v8/home/pairing/1 HTTP/1.1
  18658. Host: mafreebox.freebox.fr
  18659.  
  18660. {
  18661. "op": "next",
  18662. "session": "659887",
  18663. "pageid": "1".
  18664. "fields": [null,null,"mon texte", false, true]
  18665. }
  18666.  
  18667. Example response:
  18668.  
  18669. HTTP/1.1 200 OK
  18670. Content-Type: application/json; charset=utf-8
  18671.  
  18672. {
  18673. "result" : {
  18674. "fields" : [
  18675. {
  18676. "text" : "Veuillez vérifier que votre wifi est bien activé.",
  18677. "widget" : "label"
  18678. }
  18679. ],
  18680. "icon_url" : "/resources/images/home/pairing/wifi.png",
  18681. "pageid" : 2,
  18682. "refresh" : 1000,
  18683. "session" : 62328
  18684. },
  18685. "success" : true
  18686. }
  18687.  
  18688. Stop Pairing
  18689.  
  18690. POST /api/v8/home/pairing/{adapter_id}
  18691.  
  18692. Stop the pairing process on a specific HomeAdapter.
  18693.  
  18694. op: stop session: the id of the pairing session to stop
  18695.  
  18696. Example request:
  18697.  
  18698. POST /api/v8/home/pairing/1 HTTP/1.1
  18699. Host: mafreebox.freebox.fr
  18700.  
  18701. {
  18702. "op": "stop",
  18703. "session": 15645
  18704. }
  18705.  
  18706. Example response:
  18707.  
  18708. HTTP/1.1 200 OK
  18709. Content-Type: application/json; charset=utf-8
  18710.  
  18711. {
  18712. "success": true
  18713. }
  18714.  
  18715. Home Nodes
  18716.  
  18717. Acces objects connected to the automation network.
  18718. Home Node Object
  18719.  
  18720. HomeNode
  18721.  
  18722. adapter int Read-only
  18723.  
  18724. Id of the HomeAdapter this node is connected to.
  18725.  
  18726. category String Read-only
  18727.  
  18728. ???
  18729.  
  18730. id int Read-only
  18731.  
  18732. Id of this node.
  18733.  
  18734. label String Read-only
  18735.  
  18736. Displayable name of this node
  18737.  
  18738. name String Read-only
  18739.  
  18740. Technical name of this node
  18741.  
  18742. show_endpoints[] array of HomeNodeEndpoint Read-only
  18743.  
  18744. Endpoints exposed by this node
  18745.  
  18746. signal_links[] array of HomeNodeLink Read-only
  18747.  
  18748. Links from other objects to this node signals
  18749.  
  18750. slot_links[] array of HomeNodeLink Read-only
  18751.  
  18752. Links from other objects to this node slots
  18753.  
  18754. status enum Read-only
  18755.  
  18756. Status of this node
  18757.  
  18758. status
  18759.  
  18760. Description
  18761.  
  18762. unreachable
  18763.  
  18764. The adapter is not reachable
  18765.  
  18766. disabled
  18767.  
  18768. The node has been disabled
  18769.  
  18770. active
  18771.  
  18772. The node is connected
  18773.  
  18774. unpaired
  18775.  
  18776. The node has not been paired to any network
  18777.  
  18778. type HomeNodeType Read-only
  18779.  
  18780. Node type info
  18781.  
  18782. HomeNodeEndpoint
  18783.  
  18784. category String Read-only
  18785.  
  18786. ???
  18787.  
  18788. ep_type enum Read-only
  18789.  
  18790. The endpoint type
  18791.  
  18792. ep_type
  18793.  
  18794. Description
  18795.  
  18796. signal
  18797.  
  18798. The endpoint outputs an information
  18799.  
  18800. slot
  18801.  
  18802. A endpoint that controls the object
  18803.  
  18804. id int Read-only
  18805.  
  18806. The endpoint id
  18807.  
  18808. visibility enum Read-only
  18809.  
  18810. Visibility level of this endpoint
  18811.  
  18812. visibility
  18813.  
  18814. Description
  18815.  
  18816. internal
  18817.  
  18818. For internal use only, never exposed
  18819.  
  18820. normal
  18821.  
  18822. The endpoint is available for scenarii but does not display info to the user
  18823.  
  18824. dashboard
  18825.  
  18826. The endpoint expose data that can be displayed on UI
  18827.  
  18828. access enum Read-only
  18829.  
  18830. Access mode of this endpoint
  18831.  
  18832. access
  18833.  
  18834. Description
  18835.  
  18836. r
  18837.  
  18838. Read only
  18839.  
  18840. w
  18841.  
  18842. Write only
  18843.  
  18844. rw
  18845.  
  18846. Read and write
  18847.  
  18848. HomeNodeType
  18849.  
  18850. icon String Read-only
  18851.  
  18852. The node icon name or url
  18853.  
  18854. label String Read-only
  18855.  
  18856. The node displayable type
  18857.  
  18858. label name Read-only
  18859.  
  18860. The node type technical name
  18861.  
  18862. physical boolean Read-only
  18863.  
  18864. True when the node is an actual connected object, false when it’s a virtual node
  18865.  
  18866. HomeNodeEndpointUi
  18867.  
  18868. display enum Read-only
  18869.  
  18870. Display mode of this data
  18871.  
  18872. display
  18873.  
  18874. Description
  18875.  
  18876. text
  18877.  
  18878. This displays the endpoint value as text. Read access is always allowed when “text” is used. When write access is allowed, the text may be editable on user request. When the “unit” entry is present and not null, it specifies the physical unit associated to the endpoint value.
  18879.  
  18880. icon
  18881.  
  18882. This displays the icon fecthed from “icon_url” with % being replaced by the string representation of the endpoint value. For string value type, the % is replaced by the endpoint value. For int and float value types, this requires an “icon_ranges” array of threshold values. The % is replaced by the index in the “range” array which is just below the endpoint value. For boolean value type, the % is replaced by “on” or “off”. When the “value” is null, the % is replaced by the empty string. Read access is always allowed when “icon” is used. Write access is not used.
  18883.  
  18884. button
  18885.  
  18886. This displays a push button. Write access is always allowed when “button” is used. A null value must be send to the endpoint when pushed.
  18887.  
  18888. slider
  18889.  
  18890. This displays a slider with the cursor located according to the endpoint value in the range specified by “range”. Read access is always allowed when “slider” is used. When write access is allowed, the cursor may be moved by the user. When write access is not allowed it may be displayed as a progress bar.
  18891.  
  18892. toggle
  18893.  
  18894. This displays an on/off switch. Read access is always allowed when “switch” is used. When write access is allowed, switch may be toggled by the user. A boolean value must be send to the endpoint when toggled.
  18895.  
  18896. color
  18897.  
  18898. This displays a color value. The value type is an int representing the RGB color. Read access is always allowed when “color” is used.
  18899.  
  18900. warning
  18901.  
  18902. This display the icon fetched from “icon_url” when the value condition is true. For boolean value type, the value is the condition. For int and float value types, this requires a “range” of size 2. If the value is within the range, the condition is true.
  18903.  
  18904. icon_url String Read-only
  18905.  
  18906. Url or name of the icon to display. The icon may be displayed for any value of “display”.
  18907.  
  18908. unit String Read-only
  18909.  
  18910. The unit of the value to display.
  18911.  
  18912. icon_color String Read-only
  18913.  
  18914. The hexadecimal presentation of the tint to apply to the icon fetched from “icon_url”.
  18915.  
  18916. text_color String Read-only
  18917.  
  18918. The hexadecimal presentation of the color of this endpoint label.
  18919.  
  18920. value_color String Read-only
  18921.  
  18922. The hexadecimal presentation of the color of this endpoint value.
  18923.  
  18924. range[] array of double Read-only
  18925.  
  18926. Range of array of threshold values for this endpoint value.
  18927.  
  18928. icon_color_range[] array of String Read-only
  18929.  
  18930. A range of colors to choose from instead of “icon_color”. The index in the range is the index in the “range” array which is just below the endpoint value.
  18931.  
  18932. text_color_range[] array of String Read-only
  18933.  
  18934. A range of colors to choose from instead of “text_color”. The index in the range is the index in the “range” array which is just below the endpoint value.
  18935.  
  18936. value_color_range[] array of String Read-only
  18937.  
  18938. A range of colors to choose from instead of “value_color”. The index in the range is the index in the “range” array which is just below the endpoint value.
  18939.  
  18940. status_text_range[] array of String Read-only
  18941.  
  18942. Text values to display instead of the value itself. The index in the range is the index in the “range” array which is just below the endpoint value.
  18943.  
  18944. Get Home Nodes
  18945.  
  18946. GET /api/v8/home/nodes
  18947.  
  18948. Get the list of HomeNode A node is either a physical home automation device or a virtual black box used to interact with other nodes. Physical nodes are associated to an adapter. Nodes may have slot and signal endpoints. They can be used to interact with the node from the user interface. They can also be connected together using links.
  18949.  
  18950. Example request:
  18951.  
  18952. GET /api/v8/home/nodes HTTP/1.1
  18953. Host: mafreebox.freebox.fr
  18954.  
  18955. Example response:
  18956.  
  18957. HTTP/1.1 200 OK
  18958. Content-Type: application/json; charset=utf-8
  18959.  
  18960. {
  18961. "success": true,
  18962. "result": [
  18963. [...]
  18964. ]
  18965. }
  18966.  
  18967. Get a Home Node
  18968.  
  18969. GET /api/v8/home/nodes/{id}
  18970.  
  18971. Get a specific HomeNode
  18972.  
  18973. Example request:
  18974.  
  18975. GET /api/v8/home/nodes HTTP/1.1
  18976. Host: mafreebox.freebox.fr
  18977.  
  18978. Example response:
  18979.  
  18980. HTTP/1.1 200 OK
  18981. Content-Type: application/json; charset=utf-8
  18982.  
  18983. {
  18984. "success": true,
  18985. "result": {
  18986. [...]
  18987. }
  18988. }
  18989. }
  18990.  
  18991. Rename a Home Node
  18992.  
  18993. PUT /api/v8/home/nodes/{id}
  18994.  
  18995. Rename a HomeNode
  18996.  
  18997. Example request:
  18998.  
  18999. PUT /api/v8/home/nodes HTTP/1.1
  19000. Host: mafreebox.freebox.fr
  19001.  
  19002. {
  19003. "label": "Mon objet"
  19004. }
  19005.  
  19006. Example response:
  19007.  
  19008. HTTP/1.1 200 OK
  19009. Content-Type: application/json; charset=utf-8
  19010.  
  19011. {
  19012. "success": true
  19013. }
  19014.  
  19015. Delete a Home Node
  19016.  
  19017. DELETE /api/v8/home/nodes/{id}
  19018.  
  19019. Remove a HomeNode from the automation network. The object will need to be paired again if the node is physical.
  19020.  
  19021. Example request:
  19022.  
  19023. DELETE /api/v8/home/nodes HTTP/1.1
  19024. Host: mafreebox.freebox.fr
  19025.  
  19026. Example response:
  19027.  
  19028. HTTP/1.1 200 OK
  19029. Content-Type: application/json; charset=utf-8
  19030.  
  19031. {
  19032. "success": true
  19033. }
  19034.  
  19035. Home Nodes Values
  19036. Endpoint value object
  19037.  
  19038. HomeNodeEndpointValue
  19039.  
  19040. value String Read-only
  19041.  
  19042. The current value of the endpoint
  19043.  
  19044. unit String Read-only
  19045.  
  19046. The displayable unit of the value
  19047.  
  19048. refresh int Read-only
  19049.  
  19050. The period this value need to be refreshed
  19051.  
  19052. value_type enum Read-only
  19053.  
  19054. The type of value this enpoint expose
  19055.  
  19056. value_type
  19057.  
  19058. bool
  19059.  
  19060. int
  19061.  
  19062. float
  19063.  
  19064. void
  19065.  
  19066. Fetch Endpoint Value
  19067.  
  19068. GET /api/v8/home/enpoints/{node_id}/{endpoint_id}
  19069.  
  19070. Retrieve the current value of the specified node endpoint. The last pushed value is returned for slot endpoints. For signal endpoint, the value is retrieved directly from the node specific back-end.
  19071.  
  19072. Example request:
  19073.  
  19074. GET /api/v8/home/endpoints/14/1 HTTP/1.1
  19075. Host: mafreebox.freebox.fr
  19076.  
  19077. Example response:
  19078.  
  19079. HTTP/1.1 200 OK
  19080. Content-Type: application/json; charset=utf-8
  19081.  
  19082. {
  19083. "result": {
  19084. "value": false,
  19085. "value_type": "bool"
  19086. },
  19087. "success": true
  19088. }
  19089.  
  19090. Change Endpoint Value
  19091.  
  19092. PUT /api/v8/home/enpoints/{node_id}/{endpoint_id}
  19093.  
  19094. Push a value to the specified node slot endpoint. Only slot endpoint accept this operation.
  19095.  
  19096. Example request:
  19097.  
  19098. PUT /api/v8/home/endpoints/14/1 HTTP/1.1
  19099. Host: mafreebox.freebox.fr
  19100.  
  19101. {
  19102. "value": true
  19103. }
  19104.  
  19105. Example response:
  19106.  
  19107. HTTP/1.1 200 OK
  19108. Content-Type: application/json; charset=utf-8
  19109.  
  19110. {
  19111. "success": true
  19112. }
  19113.  
  19114. Home Tileset
  19115.  
  19116. The tileset is a user-friendly representation of connected objects which expose features instead of the actual objects
  19117. HomeTileObject
  19118.  
  19119. HomeTile
  19120.  
  19121. node_id int Read-only
  19122.  
  19123. Id of the HomeNode providing this tile data
  19124.  
  19125. label String Read-only
  19126.  
  19127. Displayable label of this tile
  19128.  
  19129. action enum Read-only
  19130.  
  19131. Action provided by this tile
  19132.  
  19133. action
  19134.  
  19135. Description
  19136.  
  19137. tileset
  19138.  
  19139. Open the related node sub-tileset
  19140.  
  19141. graph
  19142.  
  19143. Open a graph detail page
  19144.  
  19145. store
  19146.  
  19147. Display a store simple command
  19148.  
  19149. store_slider
  19150.  
  19151. Display a store slider command
  19152.  
  19153. color_picker
  19154.  
  19155. Display a color selection widget
  19156.  
  19157. heat_picker
  19158.  
  19159. Display a white tone selection widget
  19160.  
  19161. intensity_picker
  19162.  
  19163. Display an intensity selection widget
  19164.  
  19165. none
  19166.  
  19167. No action
  19168.  
  19169. type enum Read-only
  19170.  
  19171. The type of tile to display
  19172.  
  19173. type
  19174.  
  19175. Description
  19176.  
  19177. action
  19178.  
  19179. A button tile that present no data
  19180.  
  19181. info
  19182.  
  19183. A generic tile that displays datas according to their UI field
  19184.  
  19185. light
  19186.  
  19187. A light control tile with color, intensity and head pickers
  19188.  
  19189. alarm_sensor
  19190.  
  19191. A tile representing a sensor that belongs to an alarm system
  19192.  
  19193. alarm_control
  19194.  
  19195. A tile representing an alarm system control
  19196.  
  19197. camera
  19198.  
  19199. A tile representing a camera
  19200.  
  19201. group HomeNodeGroup Read-only
  19202.  
  19203. Displayable label of this tile
  19204.  
  19205. data[] array of HomeTileData Read-only
  19206.  
  19207. Displayable label of this tile
  19208.  
  19209. HomeNodeGroup
  19210.  
  19211. label String Read-only
  19212.  
  19213. The displayable name of this group
  19214.  
  19215. icon_url String Read-only
  19216.  
  19217. The icon url or name
  19218.  
  19219. HomeTileData
  19220.  
  19221. refresh int Read-only
  19222.  
  19223. The period this data needs to be refreshed
  19224.  
  19225. label String Read-only
  19226.  
  19227. The displayable name of this data
  19228.  
  19229. ep_id int Read-only
  19230.  
  19231. Id of the HomeNodeEndpoint related to this data
  19232.  
  19233. value_type enum Read-only
  19234.  
  19235. The data value type
  19236.  
  19237. value_type
  19238.  
  19239. bool
  19240.  
  19241. int
  19242.  
  19243. float
  19244.  
  19245. string
  19246.  
  19247. value String
  19248.  
  19249. The data value
  19250.  
  19251. value String Read-only
  19252.  
  19253. The data value history as string in the format: “timestamp:value” separated by semicolons
  19254.  
  19255. ui HomeNodeEndpointUi Read-only
  19256.  
  19257. Ui descriptor for this data to knbow how to dsplay it
  19258.  
  19259. List all Tiles
  19260.  
  19261. GET /api/v8/home/tileset/all
  19262.  
  19263. Get the list of all tiles.
  19264.  
  19265. Example request:
  19266.  
  19267. GET /api/v8/home/tileset/all HTTP/1.1
  19268. Host: mafreebox.freebox.fr
  19269.  
  19270. Example response:
  19271.  
  19272. HTTP/1.1 200 OK
  19273. Content-Type: application/json; charset=utf-8
  19274.  
  19275. {
  19276. "result" : [
  19277. {
  19278. "data" : [
  19279. {
  19280. "ep_id" : 0,
  19281. "label" : "Trigger",
  19282. "ui" : {
  19283. "access" : "rw",
  19284. "display" : "text"
  19285. },
  19286. "value" : null,
  19287. "value_type" : "void"
  19288. },
  19289. {
  19290. "category" : "alarm",
  19291. "ep_id" : 1,
  19292. "label" : "Alarme",
  19293. "ui" : {
  19294. "access" : "rw",
  19295. "display" : "toggle",
  19296. "icon_url" : "http://lagabardine.ovh/~jeremie/img/Alarm.png"
  19297. },
  19298. "value" : false,
  19299. "value_type" : "bool"
  19300. },
  19301. {
  19302. "ep_id" : 2,
  19303. "label" : "Pin Code",
  19304. "ui" : {
  19305. "access" : "rw",
  19306. "display" : "text"
  19307. },
  19308. "value" : 0,
  19309. "value_type" : "int"
  19310. },
  19311. {
  19312. "ep_id" : 3,
  19313. "label" : "Sirène",
  19314. "refresh" : 2000,
  19315. "ui" : {
  19316. "access" : "r",
  19317. "display" : "toggle",
  19318. "icon_url" : "http://lagabardine.ovh/~jeremie/img/Alarm.png"
  19319. },
  19320. "value" : false,
  19321. "value_type" : "bool"
  19322. }
  19323. ],
  19324. "ep_type" : "slot",
  19325. "group" : {
  19326. "icon_url" : "http://lagabardine.ovh/~jeremie/img/favori.png",
  19327. "label" : ""
  19328. },
  19329. "node_id" : 17,
  19330. "type" : "alarm_control"
  19331. },
  19332. {
  19333. "data" : [
  19334. {
  19335. "ep_id" : 0,
  19336. "history" : "1539868875260:1;1539876788228:0;1539876788530:1;1539876788796:0;1539876788850:1;1539876798829:0;1539876799143:1;1540282834199:1;1540305925367:0;1540305930508:1;",
  19337. "label" : "Fenêtre",
  19338. "ui" : {
  19339. "access" : "r",
  19340. "display" : "icon",
  19341. "icon_color_range" : [
  19342. "#ff0000",
  19343. "#00ff00"
  19344. ],
  19345. "icon_url" : "home_picto_dws",
  19346. "status_text_range" : [
  19347. "Ouvert",
  19348. "Fermé"
  19349. ],
  19350. "value_color" : "#00ff00"
  19351. },
  19352. "value" : null,
  19353. "value_type" : "bool"
  19354. },
  19355. {
  19356. "ep_id" : 1,
  19357. "history" : "",
  19358. "label" : "Couvercle",
  19359. "ui" : {
  19360. "access" : "r",
  19361. "display" : "warning",
  19362. "icon_color" : "#00ff00",
  19363. "icon_url" : "home_picto_cover_alert"
  19364. },
  19365. "value" : null,
  19366. "value_type" : "bool"
  19367. },
  19368. {
  19369. "ep_id" : 2,
  19370. "label" : "Niveau de Batterie",
  19371. "ui" : {
  19372. "access" : "r",
  19373. "display" : "warning",
  19374. "icon_color" : "#00ff00",
  19375. "icon_url" : "home_picto_battery_alert",
  19376. "range" : [
  19377. 0,
  19378. 10
  19379. ],
  19380. "unit" : "%"
  19381. },
  19382. "value" : null,
  19383. "value_type" : "int"
  19384. }
  19385. ],
  19386. "ep_type" : "signal",
  19387. "group" : {
  19388. "icon_url" : "http://lagabardine.ovh/~jeremie/img/favori.png",
  19389. "label" : "alarm"
  19390. },
  19391. "label" : "Détecteur d'ouvertures",
  19392. "node_id" : 24,
  19393. "type" : "alarm_sensor"
  19394. },
  19395. {
  19396. "data" : [
  19397. {
  19398. "ep_id" : 0,
  19399. "history" : "1539597596899:1;1539867684806:1;1539868117300:0;1539868164089:1;1540282931546:1;1540296461125:0;1540296468385:1;",
  19400. "label" : "Détection",
  19401. "ui" : {
  19402. "access" : "r",
  19403. "display" : "icon",
  19404. "icon_color_range" : [
  19405. "#ff0000",
  19406. "#00ff00"
  19407. ],
  19408. "icon_url" : "home_picto_pir",
  19409. "status_text_range" : [
  19410. "Mouvement détécté",
  19411. "Aucun movement"
  19412. ],
  19413. "unit" : ""
  19414. },
  19415. "value" : null,
  19416. "value_type" : "bool"
  19417. },
  19418. {
  19419. "ep_id" : 1,
  19420. "history" : "",
  19421. "label" : "Couvercle",
  19422. "ui" : {
  19423. "access" : "r",
  19424. "display" : "warning",
  19425. "icon_url" : "home_picto_cover_alert",
  19426. "unit" : ""
  19427. },
  19428. "value" : null,
  19429. "value_type" : "bool"
  19430. },
  19431. {
  19432. "ep_id" : 2,
  19433. "label" : "Niveau de Batterie",
  19434. "ui" : {
  19435. "access" : "r",
  19436. "display" : "warning",
  19437. "icon_url" : "home_picto_battery_alert",
  19438. "range" : [
  19439. 0,
  19440. 10
  19441. ],
  19442. "unit" : "%"
  19443. },
  19444. "value" : null,
  19445. "value_type" : "int"
  19446. }
  19447. ],
  19448. "ep_type" : "signal",
  19449. "group" : {
  19450. "icon_url" : "http://lagabardine.ovh/~jeremie/img/favori.png",
  19451. "label" : "alarm"
  19452. },
  19453. "label" : "move",
  19454. "node_id" : 26,
  19455. "type" : "alarm_sensor"
  19456. }
  19457. ],
  19458. "success" : true
  19459. }
  19460.  
  19461. List a Node sub-tileset
  19462.  
  19463. GET /api/v8/home/tileset/{node_id}
  19464.  
  19465. Get the list of all tiles corresponding to a node with “action”=”tileset”.
  19466.  
  19467. Example request:
  19468.  
  19469. GET /api/v8/home/tileset/42 HTTP/1.1
  19470. Host: mafreebox.freebox.fr
  19471.  
  19472. Example response:
  19473.  
  19474. HTTP/1.1 200 OK
  19475. Content-Type: application/json; charset=utf-8
  19476.  
  19477. {
  19478. "success" : true,
  19479. "result" : [...]
  19480. }
  19481.  
  19482. Special Tiles specification
  19483. Alarm Tiles
  19484. Alarm control
  19485.  
  19486. This tile gives the current state of the alarm and allow to turn it on an off
  19487.  
  19488. type
  19489.  
  19490. alarm_control
  19491. data
  19492.  
  19493. Index
  19494.  
  19495. Value type
  19496.  
  19497. Access
  19498.  
  19499. Description
  19500.  
  19501. 0
  19502.  
  19503. enum
  19504.  
  19505. r
  19506.  
  19507. The current alarm state
  19508.  
  19509. 1
  19510.  
  19511. void
  19512.  
  19513. w
  19514.  
  19515. Activate the main alarm
  19516.  
  19517. 2
  19518.  
  19519. void
  19520.  
  19521. w
  19522.  
  19523. Activate the night alarm
  19524.  
  19525. 3
  19526.  
  19527. void
  19528.  
  19529. w
  19530.  
  19531. Desactivate the alarm
  19532.  
  19533. 4
  19534.  
  19535. void
  19536.  
  19537. w
  19538.  
  19539. Skip the alarm activation timer
  19540.  
  19541. 5
  19542.  
  19543. int
  19544.  
  19545. r/w
  19546.  
  19547. Alarm PIN code that should be asked before changing the alarm state
  19548.  
  19549. 6
  19550.  
  19551. string
  19552.  
  19553. r
  19554.  
  19555. Alarm error code
  19556. state values
  19557.  
  19558. State
  19559.  
  19560. Description
  19561.  
  19562. idle
  19563.  
  19564. The alarm is off
  19565.  
  19566. alarm1_arming
  19567.  
  19568. The main alarm is beeing activated, it’s a countdown when only the sensors not in the timed zone can trigger the alert
  19569.  
  19570. alarm2_arming
  19571.  
  19572. The night alarm is beeing activated, it’s a countdown when only the sensors not in the timed zone can trigger the alert
  19573.  
  19574. alarm1_armed
  19575.  
  19576. The main alarm is on
  19577.  
  19578. alarm2_armed
  19579.  
  19580. The night alarm is on
  19581.  
  19582. alarm1_alert_timer
  19583.  
  19584. The main alarm has been trigged by a sensor in the timed zone and the siren will ring after a countdown
  19585.  
  19586. alarm2_alert_timer
  19587.  
  19588. The night alarm has been trigged by a sensor in the timed zone and the siren will ring after a countdown
  19589.  
  19590. alert
  19591.  
  19592. The siren is ringing
  19593.  
  19594. Alarm sensor
  19595.  
  19596. This tile represents a connected sensor used to trigger the alarm
  19597.  
  19598. type
  19599.  
  19600. alarm_sensor
  19601. data
  19602.  
  19603. Index
  19604.  
  19605. Value type
  19606.  
  19607. Access
  19608.  
  19609. Description
  19610.  
  19611. 0
  19612.  
  19613. boolean
  19614.  
  19615. r
  19616.  
  19617. The state of this sensor: false=opening detected
  19618.  
  19619. 1..n
  19620.  
  19621. any
  19622.  
  19623. r
  19624.  
  19625. Any data with warning display type
  19626.  
  19627. Alarm sensor
  19628.  
  19629. This tile represents a connected sensor used to trigger the alarm
  19630.  
  19631. type
  19632.  
  19633. alarm_sensor
  19634. data
  19635.  
  19636. Index
  19637.  
  19638. Value type
  19639.  
  19640. Access
  19641.  
  19642. Description
  19643.  
  19644. 0
  19645.  
  19646. boolean
  19647.  
  19648. r
  19649.  
  19650. The state of this sensor: false=opening detected
  19651.  
  19652. 1..n
  19653.  
  19654. any
  19655.  
  19656. r
  19657.  
  19658. Any data with warning display type
  19659.  
  19660. Camera
  19661.  
  19662. This tile represents a camera
  19663.  
  19664. type
  19665.  
  19666. camera
  19667. data
  19668.  
  19669. Index
  19670.  
  19671. Value type
  19672.  
  19673. Access
  19674.  
  19675. Description
  19676.  
  19677. 0
  19678.  
  19679. string
  19680.  
  19681. r
  19682.  
  19683. The url of this camera on the local network
  19684.  
  19685. Automation tiles
  19686. Simple store
  19687.  
  19688. This tile represents a store with simple commands
  19689.  
  19690. type
  19691.  
  19692. info
  19693. action
  19694.  
  19695. store
  19696. data
  19697.  
  19698. Index
  19699.  
  19700. Value type
  19701.  
  19702. Access
  19703.  
  19704. Description
  19705.  
  19706. 0
  19707.  
  19708. boolean
  19709.  
  19710. r
  19711.  
  19712. The state of the store: true=open, false=closed, null=undetermined
  19713.  
  19714. 1
  19715.  
  19716. void
  19717.  
  19718. w
  19719.  
  19720. Command to open the store
  19721.  
  19722. 2
  19723.  
  19724. void
  19725.  
  19726. w
  19727.  
  19728. Command to stop the store at its current position
  19729.  
  19730. 3
  19731.  
  19732. void
  19733.  
  19734. w
  19735.  
  19736. Command to close the store
  19737.  
  19738. Commanded store
  19739.  
  19740. This tile represents a store with precise position command
  19741.  
  19742. type
  19743.  
  19744. info
  19745. action
  19746.  
  19747. store_slider
  19748. data
  19749.  
  19750. Index
  19751.  
  19752. Value type
  19753.  
  19754. Access
  19755.  
  19756. Description
  19757.  
  19758. 0
  19759.  
  19760. int
  19761.  
  19762. rw
  19763.  
  19764. The position of store in percent: 0=fully opened, 100=fully closed
  19765.  
  19766. 1
  19767.  
  19768. void
  19769.  
  19770. w
  19771.  
  19772. Command to stop the store at its current position
  19773.  
  19774. Color light bulb
  19775.  
  19776. This tile represents a connected light bulb with full color and intensity control
  19777.  
  19778. type
  19779.  
  19780. light
  19781. action
  19782.  
  19783. color_picker
  19784. data
  19785.  
  19786. Index
  19787.  
  19788. Value type
  19789.  
  19790. Access
  19791.  
  19792. Description
  19793.  
  19794. 0
  19795.  
  19796. void
  19797.  
  19798. rw
  19799.  
  19800. The state of the light: true=on
  19801.  
  19802. 1
  19803.  
  19804. int
  19805.  
  19806. rw
  19807.  
  19808. The H and S components of the color HSV value (H: 16 bits, S: 8 bit)
  19809.  
  19810. 2
  19811.  
  19812. int
  19813.  
  19814. rw
  19815.  
  19816. The V value of the color HSV value (V: 8 bits)
  19817.  
  19818. White light bulb
  19819.  
  19820. This tile represents a connected light bulb with intensity and white tone control only
  19821.  
  19822. type
  19823.  
  19824. light
  19825. action
  19826.  
  19827. heat_picker
  19828. data
  19829.  
  19830. Index
  19831.  
  19832. Value type
  19833.  
  19834. Access
  19835.  
  19836. Description
  19837.  
  19838. 0
  19839.  
  19840. void
  19841.  
  19842. rw
  19843.  
  19844. The state of the light: true=on
  19845.  
  19846. 1
  19847.  
  19848. int
  19849.  
  19850. rw
  19851.  
  19852. The H and S components of the color HSV value (H: 16 bits, S: 8 bit)
  19853.  
  19854. 2
  19855.  
  19856. int
  19857.  
  19858. rw
  19859.  
  19860. The V value of the color HSV value (V: 8 bits)
  19861.  
  19862. Luminosity light bulb
  19863.  
  19864. This tile represents a connected light bulb with intensity control only
  19865.  
  19866. type
  19867.  
  19868. light
  19869. action
  19870.  
  19871. intensity_picker
  19872. data
  19873.  
  19874. Index
  19875.  
  19876. Value type
  19877.  
  19878. Access
  19879.  
  19880. Description
  19881.  
  19882. 0
  19883.  
  19884. void
  19885.  
  19886. rw
  19887.  
  19888. The state of the light: true=on
  19889.  
  19890. 1
  19891.  
  19892. int
  19893.  
  19894. rw
  19895.  
  19896. The luminosity value in percent
  19897.  
  19898. Cameras
  19899.  
  19900. The Camera API allows you to access features related to cameras.
  19901. Camera Errors
  19902.  
  19903. When attempting to access the Camera API, you may encounter the following errors:
  19904.  
  19905. error_code
  19906.  
  19907. Description
  19908.  
  19909. noent
  19910.  
  19911. no camera with this id
  19912.  
  19913. inval
  19914.  
  19915. invalid parameters
  19916. Camera object
  19917.  
  19918. Camera object have the following properties
  19919.  
  19920. Camera
  19921.  
  19922. id string
  19923.  
  19924. camera id
  19925.  
  19926. node_id int
  19927.  
  19928. camera node id
  19929.  
  19930. name string
  19931.  
  19932. camera name
  19933.  
  19934. stream_url string
  19935.  
  19936. camera stream url
  19937.  
  19938. lan_gid string
  19939.  
  19940. camera lan id
  19941.  
  19942. Camera API
  19943. Get list of cameras
  19944.  
  19945. GET /api/v8/camera/
  19946.  
  19947. Returns the collection of all Camera
  19948.  
  19949. Example request:
  19950.  
  19951. GET /api/v8/camera/ HTTP/1.1
  19952. Host: mafreebox.freebox.fr
  19953.  
  19954. Example response:
  19955.  
  19956. HTTP/1.1 200 OK
  19957. Content-Type: application/json; charset=utf-8
  19958.  
  19959. {
  19960. "success": true,
  19961. "result": [
  19962. {
  19963. "id": "012345678901",
  19964. "node_id": 0,
  19965. "name": "Caméra du salon",
  19966. "stream_url": "/camera/stream/012345678901/stream.m3u8",
  19967. "lan_gid": "ether-3c:98:72:fa:36:15"
  19968. },
  19969. {
  19970. "id": "012345678902",
  19971. "node_id": 1,
  19972. "name": "Caméra du bureau",
  19973. "stream_url": "/camera/stream/012345678902/stream.m3u8",
  19974. "lan_gid": "ether-3c:98:72:fa:42:58"
  19975. }
  19976. ]
  19977. }
  19978.  
  19979. Access a given camera
  19980.  
  19981. GET /api/v8/camera/{id}
  19982.  
  19983. Returns the Camera with the given id
  19984.  
  19985. Example request:
  19986.  
  19987. GET /api/v8/camera/012345678901 HTTP/1.1
  19988. Host: mafreebox.freebox.fr
  19989.  
  19990. Example response:
  19991.  
  19992. HTTP/1.1 200 OK
  19993. Content-Type: application/json; charset=utf-8
  19994.  
  19995. {
  19996. "success": true,
  19997. "result": {
  19998. "id": "012345678901",
  19999. "node_id": 0,
  20000. "name": "Caméra du salon",
  20001. "stream_url": "/camera/stream/012345678901/stream.m3u8",
  20002. "lan_gid": "ether-3c:98:72:fa:36:15"
  20003. }
  20004. }
  20005.  
  20006. Delete a camera
  20007.  
  20008. Use Home Node Api to delete camera (like a node) with its node id
  20009. Notification
  20010. Notif
  20011.  
  20012. The Notification API allows you to access features related with notification,
  20013. Notification Errors
  20014.  
  20015. When attempting to access the Notification API, you may encounter the following errors:
  20016.  
  20017. error_code
  20018.  
  20019. Description
  20020.  
  20021. noent
  20022.  
  20023. no device with this id
  20024.  
  20025. inval
  20026.  
  20027. invalid parameters
  20028. Notification Target object
  20029.  
  20030. Target Notification Target object have the following properties
  20031.  
  20032. NotificationTarget
  20033.  
  20034. id string
  20035.  
  20036. last_use int
  20037.  
  20038. type string
  20039.  
  20040. ios | android
  20041.  
  20042. name string
  20043.  
  20044. device name
  20045.  
  20046. subscriptions array
  20047.  
  20048. permission list array
  20049.  
  20050. Type
  20051.  
  20052. Description
  20053.  
  20054. phone
  20055.  
  20056. notification when missing call
  20057.  
  20058. download
  20059.  
  20060. notification when download is finished
  20061.  
  20062. security
  20063.  
  20064. notification when alarm is on
  20065.  
  20066. Notification API
  20067. Get list of notification target
  20068.  
  20069. GET /api/v8/notif/targets
  20070.  
  20071. Returns the collection of all Notification Target
  20072.  
  20073. Example request:
  20074.  
  20075. GET /api/v8/notif/targets HTTP/1.1
  20076. Host: mafreebox.freebox.fr
  20077.  
  20078. Example response:
  20079.  
  20080. HTTP/1.1 200 OK
  20081. Content-Type: application/json; charset=utf-8
  20082.  
  20083. {
  20084. "success":true,
  20085. "result":[
  20086. {
  20087. "last_use":0,
  20088. "type":"ios",
  20089. "name":"iPhone de Xavier",
  20090. "id":"11111111-2222-3333-4444-555555555555",
  20091. "subscriptions":[
  20092. "security",
  20093. "downloader",
  20094. "phone",
  20095. ]
  20096. },
  20097. {
  20098. "last_use":0,
  20099. "type":"android",
  20100. "name":"mamy",
  20101. "id":"22222222-1111-3333-4444-555555555555",
  20102. "subscriptions":[
  20103. "phone"
  20104. ]
  20105. ]
  20106. }
  20107.  
  20108. Get a given notification target by this id
  20109.  
  20110. GET /api/v8/notif/targets/{id}
  20111.  
  20112. Returns the Notification Target with the given id
  20113.  
  20114. Example request:
  20115.  
  20116. GET /api/v8/notif/targets/11111111-2222-3333-4444-555555555555 HTTP/1.1
  20117. Host: mafreebox.freebox.fr
  20118.  
  20119. Example response:
  20120.  
  20121. HTTP/1.1 200 OK
  20122. Content-Type: application/json; charset=utf-8
  20123.  
  20124. {
  20125. "success":true,
  20126. "result":[
  20127. {
  20128. "last_use":0,
  20129. "type":"ios",
  20130. "name":"iPhone de Xavier",
  20131. "id":"11111111-2222-3333-4444-555555555555",
  20132. "subscriptions":[
  20133. "security",
  20134. "downloader",
  20135. "phone",
  20136. ]
  20137. }
  20138. ]
  20139. }
  20140.  
  20141. Delete a notification target
  20142.  
  20143. DELETE /api/v8/notif/targets/{id}
  20144.  
  20145. Deletes the Notification Target with the given id.
  20146.  
  20147. Example request:
  20148.  
  20149. DELETE /api/v8/notif/targets/22222222-1111-3333-4444-555555555555 HTTP/1.1
  20150. Host: mafreebox.freebox.fr
  20151.  
  20152. Example response:
  20153.  
  20154. HTTP/1.1 200 OK
  20155. Content-Type: application/json; charset=utf-8
  20156.  
  20157. {
  20158. "success": true
  20159. }
  20160.  
  20161. Update a notification target
  20162.  
  20163. PUT /api/v8/notif/targets/{id}
  20164.  
  20165. Update the Notification Target with the given id.
  20166.  
  20167. Example request:
  20168.  
  20169. PUT /api/v8/notif/targets/22222222-1111-3333-4444-555555555555 HTTP/1.1
  20170. Host: mafreebox.freebox.fr
  20171.  
  20172. {
  20173. "name": "iPhone de Xavier",
  20174. "type": "ios",
  20175. "token": "token_token_token_token_token_token_token",
  20176. "subscriptions": ["download", "phone"],
  20177. "last_use": 0
  20178. }
  20179.  
  20180. Example response:
  20181.  
  20182. HTTP/1.1 200 OK
  20183. Content-Type: application/json; charset=utf-8
  20184.  
  20185. {
  20186. "success": true
  20187. }
  20188.  
  20189. Add a notification target
  20190.  
  20191. PUT /api/v8/notif/targets/{id}
  20192.  
  20193. Update the Notification Target with the given id.
  20194.  
  20195. Example request:
  20196.  
  20197. PUT /api/v8/notif/targets/4444444444-1111-3333-4444-555555555555 HTTP/1.1
  20198. Host: mafreebox.freebox.fr
  20199.  
  20200. {
  20201. "name": "my new iPhone 12",
  20202. "type": "ios",
  20203. "token": "token_token_token_token_token_token_token",
  20204. "subscriptions": ["download"],
  20205. "last_use": 0
  20206. }
  20207.  
  20208. Example response:
  20209.  
  20210. HTTP/1.1 200 OK
  20211. Content-Type: application/json; charset=utf-8
  20212.  
  20213. {
  20214. "success": true
  20215. }
  20216.  
  20217. Player devices
  20218. Player [UNSTABLE]
  20219.  
  20220. * INTERNAL USE ONLY *
  20221.  
  20222. With the player API you access and control a Freebox Player connected on the same local network as the Freebox Server. Available players can be enumerated, and the listed player identifier can be used to dispatch commands.
  20223. Player Errors
  20224.  
  20225. When attempting to access the player API, you may encounter the following errors:
  20226.  
  20227. error_code
  20228.  
  20229. Description
  20230.  
  20231. internal_error
  20232.  
  20233. Internal error
  20234.  
  20235. inval
  20236.  
  20237. Invalid parameters
  20238.  
  20239. noent
  20240.  
  20241. no player with this id
  20242. Player Objects
  20243. Player
  20244.  
  20245. Player
  20246.  
  20247. id int
  20248.  
  20249. device_name string
  20250.  
  20251. uid string
  20252.  
  20253. reachable bool
  20254.  
  20255. api_version string
  20256.  
  20257. api_available bool
  20258.  
  20259. Player Status Foreground App
  20260.  
  20261. PlayerStatusForegroundApp
  20262.  
  20263. package_id id
  20264.  
  20265. cur_url string
  20266.  
  20267. context object
  20268.  
  20269. package string
  20270.  
  20271. Player Status Capabilities
  20272.  
  20273. Capabilities of a media player.
  20274.  
  20275. PlayerStatusCapabilities
  20276.  
  20277. play bool
  20278.  
  20279. pause bool
  20280.  
  20281. stop bool
  20282.  
  20283. next bool
  20284.  
  20285. prev bool
  20286.  
  20287. record bool
  20288.  
  20289. record_stop bool
  20290.  
  20291. seek_forward bool
  20292.  
  20293. seek_backward bool
  20294.  
  20295. seek_to bool
  20296.  
  20297. shuffle bool
  20298.  
  20299. repeat_all bool
  20300.  
  20301. repeat_one bool
  20302.  
  20303. select_stream bool
  20304.  
  20305. select_audio_track bool
  20306.  
  20307. select_srt_track bool
  20308.  
  20309. Player Status Informations
  20310.  
  20311. PlayerStatusInformations
  20312.  
  20313. name string
  20314.  
  20315. last_activity long
  20316.  
  20317. capabilities PlayerStatusCapabilities
  20318.  
  20319. Player Status
  20320.  
  20321. PlayerStatus
  20322.  
  20323. power_state string
  20324.  
  20325. state
  20326.  
  20327. Description
  20328.  
  20329. standby
  20330.  
  20331. freebox player is currently in standby mode
  20332.  
  20333. running
  20334.  
  20335. freebox player is on
  20336.  
  20337. player PlayerStatusInformations
  20338.  
  20339. State of the active media player on the device.
  20340.  
  20341. foreground_app PlayerStatusForegroundApp
  20342.  
  20343. The context of the currently running application. The fields exposed in this object are left to the discretion of the application author, and thus subject to change at any time.
  20344.  
  20345. Player API
  20346. List every player devices
  20347.  
  20348. GET /api/v8/player
  20349.  
  20350. Returns the list of all player devices registered on the local network ([Player]).
  20351.  
  20352. Example request:
  20353.  
  20354. GET /api/v8/player HTTP/1.1
  20355. Host: mafreebox.freebox.fr
  20356.  
  20357. Example response:
  20358.  
  20359. HTTP/1.1 200 OK
  20360. Content-Type: application/json; charset=utf-8
  20361.  
  20362. {
  20363. "success": true,
  20364. "result": [
  20365. {
  20366. "device_name": "Freebox Player",
  20367. "stb_type": "stb_v7",
  20368. "uid": "123456789012345678911234567892123",
  20369. "reachable": true,
  20370. "api_version": "6.0",
  20371. "id": 11,
  20372. "api_available": true
  20373. }
  20374. ]
  20375. }
  20376.  
  20377. Get player device status
  20378.  
  20379. GET /api/v8/player/{id_player}/api/v6/status/
  20380.  
  20381. Returns the current state of a player device (Player).
  20382.  
  20383. Example request:
  20384.  
  20385. GET /api/v8/player/11/api/v6/status/ HTTP/1.1
  20386. Host: mafreebox.freebox.fr
  20387.  
  20388. Example response:
  20389.  
  20390. HTTP/1.1 200 OK
  20391. Content-Type: application/json; charset=utf-8
  20392.  
  20393. {
  20394. "success": true,
  20395. "result": {
  20396. "power_state": "standby"
  20397. }
  20398. }
  20399.  
  20400. Control the active media player of a device
  20401.  
  20402. POST /api/v8/player/{id_player}/api/v6/control/mediactrl/
  20403.  
  20404. Parameters
  20405.  
  20406. name (string) – Command to execute
  20407.  
  20408. Send a command to the active media player of a device. Not all commands are always available, the capabilities of the active media player can be retrieved in the device status to determine which commands ca be used.
  20409.  
  20410. command
  20411.  
  20412. Description
  20413.  
  20414. play_pause
  20415.  
  20416. toogle play pause
  20417.  
  20418. stop
  20419.  
  20420. stop
  20421.  
  20422. prev
  20423.  
  20424. previous
  20425.  
  20426. next
  20427.  
  20428. next
  20429.  
  20430. select_stream
  20431.  
  20432. select quality of the stream
  20433.  
  20434. select_audio_track
  20435.  
  20436. select audio track
  20437.  
  20438. select_srt_track
  20439.  
  20440. select subtitle track
  20441.  
  20442. Example request:
  20443.  
  20444. POST /api/v8/player/11/api/v6/control/mediactrl/ HTTP/1.1
  20445. Host: mafreebox.freebox.fr
  20446.  
  20447. {
  20448. "name": "play_pause"
  20449. }
  20450.  
  20451. Example response:
  20452.  
  20453. HTTP/1.1 200 OK
  20454. Content-Type: application/json; charset=utf-8
  20455.  
  20456. {
  20457. "success": true
  20458. }
  20459.  
  20460. Open a url on a player device
  20461.  
  20462. POST /api/v8/player/{id_player}/api/v6/control/open
  20463.  
  20464. Parameters
  20465.  
  20466. url (string) – Url to open on the Freebox Player
  20467.  
  20468. type (string) – Mime type of the content to open on the Freebox Player (optional: default is empty)
  20469.  
  20470. Here are some useful examples calls:
  20471.  
  20472. Open the video player:
  20473.  
  20474. { "url": "http://jell.yfish.us/media/jellyfish-3-mbps-hd-h264.mkv",
  20475. "type": "video/x-matroska" }
  20476.  
  20477. Open the web browser:
  20478.  
  20479. { "url": "https://www.google.com",
  20480. "type": "text/html" }
  20481.  
  20482. Open TV on channel 2:
  20483.  
  20484. { "url": "tv:?channel=2" }
  20485.  
  20486. Open a YouTube video:
  20487.  
  20488. { "url": "https://www.youtube.com/watch?v=pltY5vS-aOY" }
  20489.  
  20490. Example request:
  20491.  
  20492. POST /api/v8/player/11/api/v6/control/open HTTP/1.1
  20493. Host: mafreebox.freebox.fr
  20494.  
  20495. {
  20496. "url": "tv:?channel=123"
  20497. }
  20498.  
  20499. Example response:
  20500.  
  20501. HTTP/1.1 200 OK
  20502. Content-Type: application/json; charset=utf-8
  20503.  
  20504. {
  20505. "success": true
  20506. }
  20507.  
  20508. Virtual machines
  20509. VM API [UNSTABLE]
  20510.  
  20511. This API allows to control VMs on boxes that have has_vm to true in their SystemConfig information.
  20512. VM API Errors
  20513.  
  20514. When attempting to access this API, you may encounter the following errors:
  20515.  
  20516. error_code
  20517.  
  20518. Description
  20519.  
  20520. initfail
  20521.  
  20522. VM cannot be initialized
  20523.  
  20524. startfail
  20525.  
  20526. The VM cannot be launched
  20527.  
  20528. inval
  20529.  
  20530. Invalid parameter
  20531.  
  20532. nomem
  20533.  
  20534. Not enough memory available
  20535.  
  20536. already_running
  20537.  
  20538. The VM is already running
  20539.  
  20540. not_running
  20541.  
  20542. The VM is not running
  20543.  
  20544. too_big
  20545.  
  20546. Size too big
  20547.  
  20548. too_small
  20549.  
  20550. Size too small
  20551.  
  20552. exists
  20553.  
  20554. File exists
  20555.  
  20556. too_many_vms
  20557.  
  20558. The maximum number of configurable VMs has been reached
  20559.  
  20560. no_such_vm
  20561.  
  20562. VM does not exist
  20563.  
  20564. disk_in_use
  20565.  
  20566. The disk is already in use
  20567.  
  20568. nocpu
  20569.  
  20570. Not enough CPUs available
  20571.  
  20572. no_such_usb_port
  20573.  
  20574. USB port does not exist
  20575.  
  20576. usb_in_use
  20577.  
  20578. Another VM is already using USB
  20579.  
  20580. usb_init_fail
  20581.  
  20582. Unable to initialize USB
  20583.  
  20584. disk_not_qcow2
  20585.  
  20586. The disk is not in Qcow2 format
  20587.  
  20588. unsupported_disk_type
  20589.  
  20590. Unsupported disk format
  20591.  
  20592. file_not_found
  20593.  
  20594. Disk file not found
  20595.  
  20596. efi_file_in_use
  20597.  
  20598. EFI settings file is already in use
  20599.  
  20600. efi_file_fail
  20601.  
  20602. Cannot open EFI settings file
  20603.  
  20604. distro_http
  20605.  
  20606. Internal http error
  20607.  
  20608. distro_sig
  20609.  
  20610. Internal sig error
  20611.  
  20612. distro_json
  20613.  
  20614. Internal json error
  20615.  
  20616. create
  20617.  
  20618. Unable to create file
  20619.  
  20620. perm_own
  20621.  
  20622. Incorrect permission
  20623.  
  20624. open_info
  20625.  
  20626. Unable to open file for information
  20627.  
  20628. open_resize
  20629.  
  20630. Cannot open file for resizing
  20631.  
  20632. resize_trunc
  20633.  
  20634. Unable to resize raw disk
  20635.  
  20636. power_button
  20637.  
  20638. Unable to send shutdown to VM
  20639.  
  20640. restart
  20641.  
  20642. Cannot send restart to VM
  20643.  
  20644. open_launch_disk
  20645.  
  20646. Error opening disk file
  20647.  
  20648. open_launch_cd
  20649.  
  20650. Error opening cdrom file
  20651.  
  20652. start_nodisk
  20653.  
  20654. Cannot start without disk
  20655.  
  20656. init_vm_control
  20657.  
  20658. Unable to initialize VM control
  20659.  
  20660. set_nodisk
  20661.  
  20662. Cannot set up a VM without disk
  20663.  
  20664. set_badformat
  20665.  
  20666. Unsupported disk format
  20667.  
  20668. save_data
  20669.  
  20670. Cannot save VM settings
  20671.  
  20672. stop_control
  20673.  
  20674. Cannot stop VM control
  20675.  
  20676. info
  20677.  
  20678. Unable to retrieve disk info
  20679.  
  20680. info_parse
  20681.  
  20682. Unable to analyze disk information
  20683.  
  20684. info_novirtual
  20685.  
  20686. Unable to retrieve disk size
  20687.  
  20688. info_noactual
  20689.  
  20690. Unable to retrieve actual disk size
  20691.  
  20692. info_noformat
  20693.  
  20694. Unable to retrive disk format
  20695.  
  20696. create_qcow
  20697.  
  20698. Unable to create qcow2 disk
  20699.  
  20700. resize_qcow
  20701.  
  20702. Unable to resize qcow2 disk
  20703.  
  20704. set_too_many_disks
  20705.  
  20706. The VM has too many disks
  20707.  
  20708. set_empty_disk_path
  20709.  
  20710. Empty disk path
  20711.  
  20712. task_notfound
  20713.  
  20714. The task does not exist
  20715.  
  20716. not_stopped
  20717.  
  20718. The VM is not stopped
  20719. VM API objects
  20720. VM object
  20721.  
  20722. VM
  20723.  
  20724. id int Read-only
  20725.  
  20726. unique id of this VM
  20727.  
  20728. name string
  20729.  
  20730. Name of this VM. Max 31 characters.
  20731.  
  20732. disk_path string
  20733.  
  20734. Base64-encoded path to the hard disk image of this VM.
  20735.  
  20736. disk_type enum
  20737.  
  20738. Type of disk image.
  20739.  
  20740. disk_type
  20741.  
  20742. Description
  20743.  
  20744. raw
  20745.  
  20746. Raw disk data
  20747.  
  20748. qcow2
  20749.  
  20750. Qcow2 image type. Usually qcow version 3. Note: not all features are supported. In particular, reference to other images is disabled.
  20751.  
  20752. cd_path string Optionnal
  20753.  
  20754. Base64-encoded path to CDROM device ISO image. Optional.
  20755.  
  20756. memory int
  20757.  
  20758. Memory allocated to this VM in megabytes.
  20759.  
  20760. vcpus int
  20761.  
  20762. Number of virtual CPUs to allocate to this VM.
  20763.  
  20764. status enum Read-only
  20765.  
  20766. VM status
  20767.  
  20768. status
  20769.  
  20770. Description
  20771.  
  20772. stopped
  20773.  
  20774. VM is stopped
  20775.  
  20776. running
  20777.  
  20778. VM is running
  20779.  
  20780. starting
  20781.  
  20782. VM is starting up. Transitionnal state
  20783.  
  20784. stopping
  20785.  
  20786. VM is being stoppped. Transitionnal state
  20787.  
  20788. enable_screen bool
  20789.  
  20790. Whether or not this VM should have a virtual screen, to use with the VNC websocket protocol.
  20791.  
  20792. bind_usb_ports[] array of enum
  20793.  
  20794. List of ports that should be bound to this VM. Only one VM can use USB at given time, whether is uses only one or all USB ports. The list of system USB ports is available in VmSystemInfo. For example: “usb-external-type-a”, “usb-external-type-c”.
  20795.  
  20796. enable_cloudinit bool
  20797.  
  20798. Whether or not to enable passing data through cloudinit. This uses the NoCloud iso image method; it will add a virtual cdrom drive (distinct from the one passed by cd_path) with the data in cloudinit_userdata and cloudinit_hostname when enabled.
  20799.  
  20800. cloudinit_hostname bool
  20801.  
  20802. When cloudinit is enabled, hostname desired for this VM. Max 59 characters.
  20803.  
  20804. cloudinit_userdata bool
  20805.  
  20806. When cloudinit is enabled, raw yaml to be passed in the user-data file. Maximum 32767 characters.
  20807.  
  20808. mac string Read-only
  20809.  
  20810. VM ethernet interface MAC address.
  20811.  
  20812. os string
  20813.  
  20814. Type of OS used for this VM. Only used to set an icon for now. Example values:
  20815.  
  20816. unknown
  20817.  
  20818. fedora
  20819.  
  20820. debian
  20821.  
  20822. ubuntu
  20823.  
  20824. freebsd
  20825.  
  20826. opensuse
  20827.  
  20828. centos
  20829.  
  20830. jeedom
  20831.  
  20832. homebridge
  20833.  
  20834. VM System Info object
  20835.  
  20836. VmSystemInfo
  20837.  
  20838. total_memory int Read-only
  20839.  
  20840. Total memory available to VMs.
  20841.  
  20842. used_memory int Read-only
  20843.  
  20844. Currently used memory by all VMs.
  20845.  
  20846. total_cpus int Read-only
  20847.  
  20848. Total number of vCPUs available to VMs.
  20849.  
  20850. used_cpus int Read-only
  20851.  
  20852. Currently used vCPUs by all VMs.
  20853.  
  20854. usb_ports[] array of string Read-only
  20855.  
  20856. List of USB ports available on this system
  20857.  
  20858. usb_used bool Read-only
  20859.  
  20860. Whether a VM is currently using USB. (only one can use USB at a given time)
  20861.  
  20862. VM Distribution object
  20863.  
  20864. VmDistribution
  20865.  
  20866. name string Read-only
  20867.  
  20868. Name of downloadable distribution image.
  20869.  
  20870. url string Read-only
  20871.  
  20872. URL of distribution. Usually an arm64 qcow2 cloud image, supporting EFI boot and cloud-init.
  20873.  
  20874. hash string Read-only
  20875.  
  20876. Hash in the format sha256:<hash> or sha512:<hash>; or a URL to a SHA256SUMS or SHA512SUMS file (used by Ubuntu, Debian), or to a -CHECKSUM file (used by Fedora). It is designed to be passed as-is to the download add API.
  20877.  
  20878. os string Read-only
  20879.  
  20880. OS of this distribution image; to be passed as a os type in the VM.
  20881.  
  20882. VM Disk info object
  20883.  
  20884. VmDiskInfo
  20885.  
  20886. type enum Read-only
  20887.  
  20888. Type of disk, just like in VM.disk_type
  20889.  
  20890. actual_size int Read-only
  20891.  
  20892. Space used by virtual image on disk. This is how much filesystem space is consumed on the box.
  20893.  
  20894. virtual_size int Read-only
  20895.  
  20896. Size of virtual disk. This is the size the disk will appear inside the VM.
  20897.  
  20898. VM Disk task object
  20899.  
  20900. VmDiskTask
  20901.  
  20902. id int Read-only
  20903.  
  20904. Task id.
  20905.  
  20906. type enum Read-only
  20907.  
  20908. Type of disk operation:
  20909.  
  20910. create
  20911.  
  20912. resize
  20913.  
  20914. done bool Read-only
  20915.  
  20916. Is task done
  20917.  
  20918. error bool Read-only
  20919.  
  20920. Is task in error
  20921.  
  20922. VM API actions
  20923. Get VM System Info
  20924.  
  20925. GET /api/v8/vm/info/
  20926.  
  20927. Returns a VmSystemInfo
  20928.  
  20929. Get Installable VM distributions
  20930.  
  20931. GET /api/v8/vm/distros/
  20932.  
  20933. Returns a collection of VmDistribution
  20934.  
  20935. Get the list of all VMs
  20936.  
  20937. GET /api/v8/vm/
  20938.  
  20939. Returns a collection of VM
  20940.  
  20941. Get a VM
  20942.  
  20943. GET /api/v8/vm/{id}
  20944.  
  20945. Returns a VM object
  20946.  
  20947. Add a VM
  20948.  
  20949. POST /api/v8/vm/
  20950.  
  20951. Needs to be passed a VM object
  20952.  
  20953. Delete a VM
  20954.  
  20955. DELETE /api/v8/vm/{id}
  20956.  
  20957. Only works if vm is stopped.
  20958. Update a VM
  20959.  
  20960. PUT /api/v8/vm/{id}
  20961.  
  20962. Only works if vm is stopped.
  20963. Start a VM
  20964.  
  20965. POST /api/v8/vm/{id}/start
  20966.  
  20967. Only works if vm is stopped.
  20968. Send a powerbutton signal to a VM
  20969.  
  20970. POST /api/v8/vm/{id}/powerbutton
  20971.  
  20972. This will send an ACPI shutdown button event to the VM, so that it can decide to shutdown itself.
  20973.  
  20974. Only works if vm is running.
  20975. Stop a VM
  20976.  
  20977. Immediately stops the VM without any safety.
  20978.  
  20979. POST /api/v8/vm/{id}/stop
  20980.  
  20981. Only works if vm is running.
  20982. Reset a VM
  20983.  
  20984. Immediately restarts the VM without any safety.
  20985.  
  20986. POST /api/v8/vm/{id}/restart
  20987.  
  20988. Only works if vm is running.
  20989. Watch for VM status changes
  20990.  
  20991. You should use the websocket RegisterAction API with the vm_state_changed event to watch for changes in VM status, instead of polling.
  20992.  
  20993. The event will contain this object:
  20994.  
  20995. VmStateChange
  20996.  
  20997. id int Read-only
  20998.  
  20999. VM id.
  21000.  
  21001. status enum Read-only
  21002.  
  21003. New VM.status.
  21004.  
  21005. You can also watch for lan_host_l3addr_reachable and compare it with VM.mac to get the VM IP when it starts.
  21006. VM virtual console
  21007.  
  21008. The serial port of the VM is available via a WebSocket.
  21009.  
  21010. GET /api/v8/vm/{id}/console
  21011.  
  21012. It uses the QEMU websocket chardev device. Call must be authentified like the rest of the API.
  21013. VM virtual screen
  21014.  
  21015. When VM.enable_screen is true, the VM will have a VNC over websocket device available.
  21016.  
  21017. GET /api/v8/vm/{id}/vnc
  21018.  
  21019. It uses the QEMU VNC websocket device. Call must be authentified like the rest of the API. This device should work with noVNC unmodified.
  21020. Get information on a virtual disk
  21021.  
  21022. POST /api/v8/vm/disk/info
  21023.  
  21024. Parameters
  21025.  
  21026. disk_path (string) – base64-encoded disk path
  21027.  
  21028. Returns a VmDiskInfo object.
  21029. Create a virtual disk
  21030.  
  21031. POST /api/v8/vm/disk/create
  21032.  
  21033. Parameters
  21034.  
  21035. disk_path (string) – base64-encoded disk path
  21036.  
  21037. size (int) – Size in bytes of virtual disk.
  21038.  
  21039. disk_type (enum) – Type of VM.disk_type
  21040.  
  21041. Returns a task id. Task should not be polled, use the vm_disk_task_done websocket event with RegisterAction.
  21042. Resize a virtual disk
  21043.  
  21044. POST /api/v8/vm/disk/resize
  21045.  
  21046. Parameters
  21047.  
  21048. disk_path (string) – base64-encoded disk path
  21049.  
  21050. size (int) – New size of virtual disk
  21051.  
  21052. shrink_allow (bool) – Whether shrinking the disk is allowed. Setting to true means this operation can be destructive.
  21053.  
  21054. Returns a task id. Task should not be polled, use the vm_disk_task_done websocket event with RegisterAction.
  21055. Get a virtual disk task
  21056.  
  21057. GET /api/v8/vm/disk/task/{id}
  21058.  
  21059. Returns a VmDiskTask
  21060. Delete a virtual disk task
  21061.  
  21062. DELETE /api/v8/vm/disk/task/{id}
  21063.  
  21064. Delete your tasks once they are done.
  21065.  
Add Comment
Please, Sign In to add comment