Skip to content

Commit e04a1af

Browse files
authored
Merge pull request #4344 from devdot/update-api-docs
Update API Docs
2 parents eb2c5d0 + d293171 commit e04a1af

12 files changed

+101
-72
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2+
"id": 15,
23
"name": "My new book",
4+
"slug": "my-new-book",
35
"description": "This is a book created via the API",
46
"created_by": 1,
57
"updated_by": 1,
68
"owned_by": 1,
7-
"slug": "my-new-book",
89
"updated_at": "2020-01-12T14:05:11.000000Z",
9-
"created_at": "2020-01-12T14:05:11.000000Z",
10-
"id": 15
10+
"created_at": "2020-01-12T14:05:11.000000Z"
1111
}

dev/api/responses/books-read.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@
77
"updated_at": "2020-01-12T14:11:51.000000Z",
88
"created_by": {
99
"id": 1,
10-
"name": "Admin"
10+
"name": "Admin",
11+
"slug": "admin"
1112
},
1213
"updated_by": {
1314
"id": 1,
14-
"name": "Admin"
15+
"name": "Admin",
16+
"slug": "admin"
1517
},
1618
"owned_by": {
1719
"id": 1,
18-
"name": "Admin"
20+
"name": "Admin",
21+
"slug": "admin"
1922
},
2023
"contents": [
2124
{
@@ -52,12 +55,12 @@
5255
"template": false,
5356
"created_at": "2021-12-19T18:22:11.000000Z",
5457
"updated_at": "2022-07-29T13:44:15.000000Z",
55-
"url": "https://example.com/books/my-own-book/page/cool-animals"
58+
"url": "https://example.com/books/my-own-book/page/cool-animals",
59+
"type": "page"
5660
}
5761
],
5862
"tags": [
5963
{
60-
"id": 13,
6164
"name": "Category",
6265
"value": "Guide",
6366
"order": 0
Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,25 @@
11
{
2+
"id": 74,
23
"book_id": 1,
3-
"priority": 6,
4+
"slug": "my-fantastic-new-chapter",
45
"name": "My fantastic new chapter",
56
"description": "This is a great new chapter that I've created via the API",
7+
"priority": 6,
68
"created_by": 1,
79
"updated_by": 1,
810
"owned_by": 1,
9-
"slug": "my-fantastic-new-chapter",
1011
"updated_at": "2020-05-22T22:59:55.000000Z",
1112
"created_at": "2020-05-22T22:59:55.000000Z",
12-
"id": 74,
13-
"book": {
14-
"id": 1,
15-
"name": "BookStack User Guide",
16-
"slug": "bookstack-user-guide",
17-
"description": "This is a general guide on using BookStack on a day-to-day basis.",
18-
"created_at": "2019-05-05T21:48:46.000000Z",
19-
"updated_at": "2019-12-11T20:57:31.000000Z",
20-
"created_by": 1,
21-
"updated_by": 1
22-
},
2313
"tags": [
2414
{
2515
"name": "Category",
2616
"value": "Top Content",
27-
"order": 0,
28-
"created_at": "2020-05-22T22:59:55.000000Z",
29-
"updated_at": "2020-05-22T22:59:55.000000Z"
17+
"order": 0
3018
},
3119
{
3220
"name": "Rating",
3321
"value": "Highest",
34-
"order": 0,
35-
"created_at": "2020-05-22T22:59:55.000000Z",
36-
"updated_at": "2020-05-22T22:59:55.000000Z"
22+
"order": 1
3723
}
3824
]
3925
}

dev/api/responses/chapters-list.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"updated_at": "2019-09-28T11:24:23.000000Z",
1212
"created_by": 1,
1313
"updated_by": 1,
14-
"owned_by": 1
14+
"owned_by": 1,
15+
"book_slug": "example-book"
1516
},
1617
{
1718
"id": 2,
@@ -24,7 +25,8 @@
2425
"updated_at": "2019-10-17T15:05:34.000000Z",
2526
"created_by": 3,
2627
"updated_by": 3,
27-
"owned_by": 3
28+
"owned_by": 3,
29+
"book_slug": "example-book"
2830
}
2931
],
3032
"total": 40

dev/api/responses/chapters-read.json

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,20 @@
99
"updated_at": "2019-09-28T11:24:23.000000Z",
1010
"created_by": {
1111
"id": 1,
12-
"name": "Admin"
12+
"name": "Admin",
13+
"slug": "admin"
1314
},
1415
"updated_by": {
1516
"id": 1,
16-
"name": "Admin"
17+
"name": "Admin",
18+
"slug": "admin"
1719
},
1820
"owned_by": {
1921
"id": 1,
20-
"name": "Admin"
22+
"name": "Admin",
23+
"slug": "admin"
2124
},
25+
"book_slug": "example-book",
2226
"tags": [
2327
{
2428
"name": "Category",
@@ -38,9 +42,12 @@
3842
"updated_at": "2019-08-26T14:32:59.000000Z",
3943
"created_by": 1,
4044
"updated_by": 1,
45+
"owned_by": 1,
4146
"draft": false,
4247
"revision_count": 2,
43-
"template": false
48+
"template": false,
49+
"editor": "wysiwyg",
50+
"book_slug": "example-book"
4451
},
4552
{
4653
"id": 7,
@@ -53,9 +60,12 @@
5360
"updated_at": "2019-06-06T12:03:04.000000Z",
5461
"created_by": 3,
5562
"updated_by": 3,
63+
"owned_by": 1,
5664
"draft": false,
5765
"revision_count": 1,
58-
"template": false
66+
"template": false,
67+
"editor": "wysiwyg",
68+
"book_slug": "example-book"
5969
}
6070
]
6171
}

dev/api/responses/chapters-update.json

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,17 @@
1010
"created_by": 1,
1111
"updated_by": 1,
1212
"owned_by": 1,
13-
"book": {
14-
"id": 1,
15-
"name": "BookStack User Guide",
16-
"slug": "bookstack-user-guide",
17-
"description": "This is a general guide on using BookStack on a day-to-day basis.",
18-
"created_at": "2019-05-05T21:48:46.000000Z",
19-
"updated_at": "2019-12-11T20:57:31.000000Z",
20-
"created_by": 1,
21-
"updated_by": 1
22-
},
13+
"book_slug": "bookstack-demo-site",
2314
"tags": [
2415
{
2516
"name": "Category",
2617
"value": "Kinda Good Content",
27-
"order": 0,
28-
"created_at": "2020-05-22T23:07:20.000000Z",
29-
"updated_at": "2020-05-22T23:07:20.000000Z"
18+
"order": 0
3019
},
3120
{
3221
"name": "Rating",
3322
"value": "Medium",
34-
"order": 0,
35-
"created_at": "2020-05-22T23:07:20.000000Z",
36-
"updated_at": "2020-05-22T23:07:20.000000Z"
23+
"order": 1
3724
}
3825
]
3926
}

dev/api/responses/pages-create.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,24 @@
1111
"updated_at": "2020-11-28T15:01:39.000000Z",
1212
"created_by": {
1313
"id": 1,
14-
"name": "Admin"
14+
"name": "Admin",
15+
"slug": "admin"
1516
},
1617
"updated_by": {
1718
"id": 1,
18-
"name": "Admin"
19+
"name": "Admin",
20+
"slug": "admin"
1921
},
2022
"owned_by": {
2123
"id": 1,
22-
"name": "Admin"
24+
"name": "Admin",
25+
"slug": "admin"
2326
},
2427
"draft": false,
2528
"markdown": "",
2629
"revision_count": 1,
2730
"template": false,
31+
"editor": "wysiwyg",
2832
"tags": [
2933
{
3034
"name": "Category",

dev/api/responses/pages-list.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@
88
"slug": "how-to-create-page-content",
99
"priority": 0,
1010
"draft": false,
11+
"revision_count": 3,
1112
"template": false,
1213
"created_at": "2019-05-05T21:49:58.000000Z",
1314
"updated_at": "2020-07-04T15:50:58.000000Z",
1415
"created_by": 1,
1516
"updated_by": 1,
16-
"owned_by": 1
17+
"owned_by": 1,
18+
"editor": "wysiwyg",
19+
"book_slug": "example-book"
1720
},
1821
{
1922
"id": 2,
@@ -23,12 +26,15 @@
2326
"slug": "how-to-use-images",
2427
"priority": 2,
2528
"draft": false,
29+
"revision_count": 3,
2630
"template": false,
2731
"created_at": "2019-05-05T21:53:30.000000Z",
2832
"updated_at": "2019-06-06T12:03:04.000000Z",
2933
"created_by": 1,
3034
"updated_by": 1,
31-
"owned_by": 1
35+
"owned_by": 1,
36+
"editor": "wysiwyg",
37+
"book_slug": "example-book"
3238
},
3339
{
3440
"id": 3,
@@ -38,12 +44,15 @@
3844
"slug": "drawings-via-drawio",
3945
"priority": 3,
4046
"draft": false,
47+
"revision_count": 3,
4148
"template": false,
4249
"created_at": "2019-05-05T21:53:49.000000Z",
4350
"updated_at": "2019-12-18T21:56:52.000000Z",
4451
"created_by": 1,
4552
"updated_by": 1,
46-
"owned_by": 1
53+
"owned_by": 1,
54+
"editor": "wysiwyg",
55+
"book_slug": "example-book"
4756
}
4857
],
4958
"total": 322

dev/api/responses/pages-read.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,24 @@
1111
"updated_at": "2020-11-28T14:43:20.000000Z",
1212
"created_by": {
1313
"id": 1,
14-
"name": "Admin"
14+
"name": "Admin",
15+
"slug": "admin"
1516
},
1617
"updated_by": {
1718
"id": 1,
18-
"name": "Admin"
19+
"name": "Admin",
20+
"slug": "admin"
1921
},
2022
"owned_by": {
2123
"id": 1,
22-
"name": "Admin"
24+
"name": "Admin",
25+
"slug": "admin"
2326
},
2427
"draft": false,
2528
"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[![yXSrubes.jpg](http://example.com/uploads/images/gallery/2020-04/scaled-1680-/yXSrubes.jpg)](http://example.com/uploads/images/gallery/2020-04/yXSrubes.jpg)",
2629
"revision_count": 5,
2730
"template": false,
31+
"editor": "wysiwyg",
2832
"tags": [
2933
{
3034
"name": "Category",

dev/api/responses/pages-update.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,24 @@
1111
"updated_at": "2020-11-28T15:13:03.000000Z",
1212
"created_by": {
1313
"id": 1,
14-
"name": "Admin"
14+
"name": "Admin",
15+
"slug": "admin"
1516
},
1617
"updated_by": {
1718
"id": 1,
18-
"name": "Admin"
19+
"name": "Admin",
20+
"slug": "admin"
1921
},
2022
"owned_by": {
2123
"id": 1,
22-
"name": "Admin"
24+
"name": "Admin",
25+
"slug": "admin"
2326
},
2427
"draft": false,
2528
"markdown": "",
2629
"revision_count": 5,
2730
"template": false,
31+
"editor": "wysiwyg",
2832
"tags": [
2933
{
3034
"name": "Category",

0 commit comments

Comments
 (0)