mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Added pages API doc examples
Made some tweaks to related content and other examples while there.
This commit is contained in:
9
dev/api/requests/pages-create.json
Normal file
9
dev/api/requests/pages-create.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"book_id": 1,
|
||||
"name": "My API Page",
|
||||
"html": "<p>my new API page</p>",
|
||||
"tags": [
|
||||
{"name": "Category", "value": "Not Bad Content"},
|
||||
{"name": "Rating", "value": "Average"}
|
||||
]
|
||||
}
|
9
dev/api/requests/pages-update.json
Normal file
9
dev/api/requests/pages-update.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"chapter_id": 1,
|
||||
"name": "My updated API Page",
|
||||
"html": "<p>my new API page - Updated</p>",
|
||||
"tags": [
|
||||
{"name": "Category", "value": "API Examples"},
|
||||
{"name": "Rating", "value": "Alright"}
|
||||
]
|
||||
}
|
@ -16,13 +16,9 @@
|
||||
"tags": [
|
||||
{
|
||||
"id": 13,
|
||||
"entity_id": 16,
|
||||
"entity_type": "BookStack\\Book",
|
||||
"name": "Category",
|
||||
"value": "Guide",
|
||||
"order": 0,
|
||||
"created_at": "2020-01-12 14:11:51",
|
||||
"updated_at": "2020-01-12 14:11:51"
|
||||
"order": 0
|
||||
}
|
||||
],
|
||||
"cover": {
|
||||
|
@ -19,9 +19,7 @@
|
||||
{
|
||||
"name": "Category",
|
||||
"value": "Guide",
|
||||
"order": 0,
|
||||
"created_at": "2020-05-22 22:51:51",
|
||||
"updated_at": "2020-05-22 22:51:51"
|
||||
"order": 0
|
||||
}
|
||||
],
|
||||
"pages": [
|
||||
@ -36,9 +34,9 @@
|
||||
"updated_at": "2019-08-26 14:32:59",
|
||||
"created_by": 1,
|
||||
"updated_by": 1,
|
||||
"draft": 0,
|
||||
"draft": false,
|
||||
"revision_count": 2,
|
||||
"template": 0
|
||||
"template": false
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
@ -51,9 +49,9 @@
|
||||
"updated_at": "2019-06-06 12:03:04",
|
||||
"created_by": 3,
|
||||
"updated_by": 3,
|
||||
"draft": 0,
|
||||
"draft": false,
|
||||
"revision_count": 1,
|
||||
"template": 0
|
||||
"template": false
|
||||
}
|
||||
]
|
||||
}
|
35
dev/api/responses/pages-create.json
Normal file
35
dev/api/responses/pages-create.json
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"id": 358,
|
||||
"book_id": 1,
|
||||
"chapter_id": 0,
|
||||
"name": "My API Page",
|
||||
"slug": "my-api-page",
|
||||
"html": "<p id=\"bkmrk-my-new-api-page\">my new API page</p>",
|
||||
"priority": 14,
|
||||
"created_at": "2020-11-28 15:01:39",
|
||||
"updated_at": "2020-11-28 15:01:39",
|
||||
"created_by": {
|
||||
"id": 1,
|
||||
"name": "Admin"
|
||||
},
|
||||
"updated_by": {
|
||||
"id": 1,
|
||||
"name": "Admin"
|
||||
},
|
||||
"draft": false,
|
||||
"markdown": "",
|
||||
"revision_count": 1,
|
||||
"template": false,
|
||||
"tags": [
|
||||
{
|
||||
"name": "Category",
|
||||
"value": "Not Bad Content",
|
||||
"order": 0
|
||||
},
|
||||
{
|
||||
"name": "Rating",
|
||||
"value": "Average",
|
||||
"order": 1
|
||||
}
|
||||
]
|
||||
}
|
47
dev/api/responses/pages-list.json
Normal file
47
dev/api/responses/pages-list.json
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"id": 1,
|
||||
"book_id": 1,
|
||||
"chapter_id": 1,
|
||||
"name": "How to create page content",
|
||||
"slug": "how-to-create-page-content",
|
||||
"priority": 0,
|
||||
"draft": false,
|
||||
"template": false,
|
||||
"created_at": "2019-05-05 21:49:58",
|
||||
"updated_at": "2020-07-04 15:50:58",
|
||||
"created_by": 1,
|
||||
"updated_by": 1
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"book_id": 1,
|
||||
"chapter_id": 1,
|
||||
"name": "How to use images",
|
||||
"slug": "how-to-use-images",
|
||||
"priority": 2,
|
||||
"draft": false,
|
||||
"template": false,
|
||||
"created_at": "2019-05-05 21:53:30",
|
||||
"updated_at": "2019-06-06 12:03:04",
|
||||
"created_by": 1,
|
||||
"updated_by": 1
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"book_id": 1,
|
||||
"chapter_id": 1,
|
||||
"name": "Drawings via draw.io",
|
||||
"slug": "drawings-via-drawio",
|
||||
"priority": 3,
|
||||
"draft": false,
|
||||
"template": false,
|
||||
"created_at": "2019-05-05 21:53:49",
|
||||
"updated_at": "2019-12-18 21:56:52",
|
||||
"created_by": 1,
|
||||
"updated_by": 1
|
||||
}
|
||||
],
|
||||
"total": 322
|
||||
}
|
35
dev/api/responses/pages-read.json
Normal file
35
dev/api/responses/pages-read.json
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"id": 306,
|
||||
"book_id": 1,
|
||||
"chapter_id": 0,
|
||||
"name": "A page written in markdown",
|
||||
"slug": "a-page-written-in-markdown",
|
||||
"html": "<h1 id=\"bkmrk-how-this-is-built\">How this is built</h1>\r\n<p id=\"bkmrk-this-page-is-written\">This page is written in markdown. BookStack stores the page data in HTML.</p>\r\n<p id=\"bkmrk-here%27s-a-cute-pictur\">Here's a cute picture of my cat:</p>\r\n<p id=\"bkmrk-\"><a href=\"http://example.com/uploads/images/gallery/2020-04/yXSrubes.jpg\"><img src=\"http://example.com/uploads/images/gallery/2020-04/scaled-1680-/yXSrubes.jpg\" alt=\"yXSrubes.jpg\"></a></p>",
|
||||
"priority": 13,
|
||||
"created_at": "2020-02-02 21:40:38",
|
||||
"updated_at": "2020-11-28 14:43:20",
|
||||
"created_by": {
|
||||
"id": 1,
|
||||
"name": "Admin"
|
||||
},
|
||||
"updated_by": {
|
||||
"id": 1,
|
||||
"name": "Admin"
|
||||
},
|
||||
"draft": false,
|
||||
"markdown": "# How this is built\r\n\r\nThis page is written in markdown. BookStack stores the page data in HTML.\r\n\r\nHere's a cute picture of my cat:\r\n\r\n[](http://example.com/uploads/images/gallery/2020-04/yXSrubes.jpg)",
|
||||
"revision_count": 5,
|
||||
"template": false,
|
||||
"tags": [
|
||||
{
|
||||
"name": "Category",
|
||||
"value": "Top Content",
|
||||
"order": 0
|
||||
},
|
||||
{
|
||||
"name": "Animal",
|
||||
"value": "Cat",
|
||||
"order": 1
|
||||
}
|
||||
]
|
||||
}
|
35
dev/api/responses/pages-update.json
Normal file
35
dev/api/responses/pages-update.json
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"id": 361,
|
||||
"book_id": 1,
|
||||
"chapter_id": 1,
|
||||
"name": "My updated API Page",
|
||||
"slug": "my-updated-api-page",
|
||||
"html": "<p id=\"bkmrk-my-new-api-page---up\">my new API page - Updated</p>",
|
||||
"priority": 16,
|
||||
"created_at": "2020-11-28 15:10:54",
|
||||
"updated_at": "2020-11-28 15:13:03",
|
||||
"created_by": {
|
||||
"id": 1,
|
||||
"name": "Admin"
|
||||
},
|
||||
"updated_by": {
|
||||
"id": 1,
|
||||
"name": "Admin"
|
||||
},
|
||||
"draft": false,
|
||||
"markdown": "",
|
||||
"revision_count": 5,
|
||||
"template": false,
|
||||
"tags": [
|
||||
{
|
||||
"name": "Category",
|
||||
"value": "API Examples",
|
||||
"order": 0
|
||||
},
|
||||
{
|
||||
"name": "Rating",
|
||||
"value": "Alright",
|
||||
"order": 0
|
||||
}
|
||||
]
|
||||
}
|
@ -16,13 +16,9 @@
|
||||
"tags": [
|
||||
{
|
||||
"id": 16,
|
||||
"entity_id": 14,
|
||||
"entity_type": "BookStack\\Bookshelf",
|
||||
"name": "Category",
|
||||
"value": "Guide",
|
||||
"order": 0,
|
||||
"created_at": "2020-04-10 13:31:04",
|
||||
"updated_at": "2020-04-10 13:31:04"
|
||||
"order": 0
|
||||
}
|
||||
],
|
||||
"cover": {
|
||||
|
Reference in New Issue
Block a user