]> BookStack Code Mirror - bookstack/blobdiff - dev/api/responses/pages-read.json
API: Added examples for comments
[bookstack] / dev / api / responses / pages-read.json
index 22ff2de84af5e7ab7b292c3759b685c2be69bc27..e38a9cf9242b4366a9a1b588a04fca8ce287eb5f 100644 (file)
        "revision_count": 5,
        "template": false,
        "editor": "wysiwyg",
+       "comments": {
+               "active": [
+                       {
+                               "comment": {
+                                       "id": 22,
+                                       "commentable_id": 306,
+                                       "commentable_type": "page",
+                                       "html": "<p>Does this need revising?<\/p>\n",
+                                       "parent_id": null,
+                                       "local_id": 1,
+                                       "created_by": {
+                                               "id": 1,
+                                               "name": "Admin",
+                                               "slug": "admin"
+                                       },
+                                       "updated_by": 1,
+                                       "created_at": "2023-06-07T07:50:56.000000Z",
+                                       "updated_at": "2023-06-07T07:50:56.000000Z",
+                                       "content_ref": "",
+                                       "archived": false
+                               },
+                               "depth": 0,
+                               "children": [
+                                       {
+                                               "comment": {
+                                                       "id": 34,
+                                                       "commentable_id": 2646,
+                                                       "commentable_type": "page",
+                                                       "html": "<p>I think it's okay!<\/p>\n",
+                                                       "parent_id": 1,
+                                                       "local_id": 2,
+                                                       "created_by": {
+                                                               "id": 2,
+                                                               "name": "Editor",
+                                                               "slug": "editor"
+                                                       },
+                                                       "updated_by": 1,
+                                                       "created_at": "2023-06-07T13:46:25.000000Z",
+                                                       "updated_at": "2023-06-07T13:46:25.000000Z",
+                                                       "content_ref": "",
+                                                       "archived": false
+                                               },
+                                               "depth": 1,
+                                               "children": []
+                                       }
+                               ]
+                       }
+               ],
+               "archived": [
+                       {
+                               "comment": {
+                                       "id": 21,
+                                       "commentable_id": 2646,
+                                       "commentable_type": "page",
+                                       "html": "<p>The title needs to be fixed<\/p>\n",
+                                       "parent_id": null,
+                                       "local_id": 3,
+                                       "created_by": {
+                                               "id": 2,
+                                               "name": "Editor",
+                                               "slug": "editor"
+                                       },
+                                       "updated_by": 1,
+                                       "created_at": "2023-06-07T07:50:49.000000Z",
+                                       "updated_at": "2025-10-24T08:37:22.000000Z",
+                                       "content_ref": "",
+                                       "archived": true
+                               },
+                               "depth": 0,
+                               "children": []
+                       }
+               ]
+       },
        "tags": [
                {
                        "name": "Category",