-
Notifications
You must be signed in to change notification settings - Fork 16
Exporting Boards
This article details the process of importing/exporting boards to/from a BBS node.
Note that the import/export feature between bbsnode
v4.x and v5.x versions are incompatible.
For v4.x, interactions with the node is fully done via http, at the port provided by the flag -http-port
of the bbsnode
executable. If this flag is not set, then it is 7410
by default.
The export endpoint is at 127.0.0.1:{http-port}/api/admin/board/export
with the following form-data values:
Key | Value (examples) | Description |
---|---|---|
board_public_key |
033fe5d17813a7f55a825772e9b3050096f3fc5d4d71737d6b869410e7a970a0a4 |
Public key of the board to export. |
file_name |
exported_board_1 |
Name of the file to export board to. |
This endpoint can easily be called using the following executable: https://github.com/skycoin/bbs/tree/master/cmd/v4export .
Note that exported boards are stored in {config-dir}/exports
with the file extension .export
, where {config-dir}
is determined by the flag -config-dir
. By default, {config-dir}
is set as $HOME/.skybbs
.
Exported files as in json format similar to the following example:
{
"root": {
"root_type": "board",
"root_revision": 0,
"deleted": false,
"summary": {
"name": "",
"body": "",
"created": 0,
"tags": null
}
},
"board": {
"board": {
"name": "Test Board",
"body": "this is a test board.",
"created": 1512960762418740526,
"tags": null
},
"threads": [
{
"thread": {
"name": "Thread 1",
"body": "This is thread 1.",
"created": 1512961769187381691,
"creator": "02c17adefa128e7c9ea01e47cea34f599b519c191a57bf27bc0097758bcb289bef"
},
"posts": [
{
"of_post": "0000000000000000000000000000000000000000000000000000000000000000",
"name": "Hello!",
"body": "\u003cp\u003eHello on thread 1.\u003c/p\u003e",
"created": 1512961808330971676,
"creator": "02c17adefa128e7c9ea01e47cea34f599b519c191a57bf27bc0097758bcb289bef"
}
]
}
]
}
}