mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Added examples, updated docs for image gallery api endpoints
This commit is contained in:
3
dev/api/requests/image-gallery-update.json
Normal file
3
dev/api/requests/image-gallery-update.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"name": "My updated image name"
|
||||
}
|
28
dev/api/responses/image-gallery-create.json
Normal file
28
dev/api/responses/image-gallery-create.json
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "cute-cat-image.png",
|
||||
"path": "\/uploads\/images\/gallery\/2023-03\/cute-cat-image.png",
|
||||
"url": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/cute-cat-image.png",
|
||||
"type": "gallery",
|
||||
"uploaded_to": 1,
|
||||
"created_by": {
|
||||
"id": 1,
|
||||
"name": "Admin",
|
||||
"slug": "admin"
|
||||
},
|
||||
"updated_by": {
|
||||
"id": 1,
|
||||
"name": "Admin",
|
||||
"slug": "admin"
|
||||
},
|
||||
"updated_at": "2023-03-15 08:17:37",
|
||||
"created_at": "2023-03-15 08:17:37",
|
||||
"id": 618,
|
||||
"thumbs": {
|
||||
"gallery": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/thumbs-150-150\/cute-cat-image.png",
|
||||
"display": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/scaled-1680-\/cute-cat-image.png"
|
||||
},
|
||||
"content": {
|
||||
"html": "<a href=\"https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/cute-cat-image.png\" target=\"_blank\"><img src=\"https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/scaled-1680-\/cute-cat-image.png\" alt=\"cute-cat-image.png\"><\/a>",
|
||||
"markdown": ""
|
||||
}
|
||||
}
|
41
dev/api/responses/image-gallery-list.json
Normal file
41
dev/api/responses/image-gallery-list.json
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "My cat scribbles",
|
||||
"url": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-02\/scribbles.jpg",
|
||||
"path": "\/uploads\/images\/gallery\/2023-02\/scribbles.jpg",
|
||||
"type": "gallery",
|
||||
"uploaded_to": 1,
|
||||
"created_by": 1,
|
||||
"updated_by": 1,
|
||||
"created_at": "2023-02-12T16:34:57.000000Z",
|
||||
"updated_at": "2023-02-12T16:34:57.000000Z"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "Drawing-1.png",
|
||||
"url": "https:\/\/bookstack.example.com\/uploads\/images\/drawio\/2023-02\/drawing-1.png",
|
||||
"path": "\/uploads\/images\/drawio\/2023-02\/drawing-1.png",
|
||||
"type": "drawio",
|
||||
"uploaded_to": 2,
|
||||
"created_by": 2,
|
||||
"updated_by": 2,
|
||||
"created_at": "2023-02-12T16:39:19.000000Z",
|
||||
"updated_at": "2023-02-12T16:39:19.000000Z"
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"name": "beans.jpg",
|
||||
"url": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-02\/beans.jpg",
|
||||
"path": "\/uploads\/images\/gallery\/2023-02\/beans.jpg",
|
||||
"type": "gallery",
|
||||
"uploaded_to": 6,
|
||||
"created_by": 1,
|
||||
"updated_by": 1,
|
||||
"created_at": "2023-02-15T19:37:44.000000Z",
|
||||
"updated_at": "2023-02-15T19:37:44.000000Z"
|
||||
}
|
||||
],
|
||||
"total": 3
|
||||
}
|
28
dev/api/responses/image-gallery-read.json
Normal file
28
dev/api/responses/image-gallery-read.json
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
"id": 618,
|
||||
"name": "cute-cat-image.png",
|
||||
"url": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/cute-cat-image.png",
|
||||
"created_at": "2023-03-15 08:17:37",
|
||||
"updated_at": "2023-03-15 08:17:37",
|
||||
"created_by": {
|
||||
"id": 1,
|
||||
"name": "Admin",
|
||||
"slug": "admin"
|
||||
},
|
||||
"updated_by": {
|
||||
"id": 1,
|
||||
"name": "Admin",
|
||||
"slug": "admin"
|
||||
},
|
||||
"path": "\/uploads\/images\/gallery\/2023-03\/cute-cat-image.png",
|
||||
"type": "gallery",
|
||||
"uploaded_to": 1,
|
||||
"thumbs": {
|
||||
"gallery": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/thumbs-150-150\/cute-cat-image.png",
|
||||
"display": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/scaled-1680-\/cute-cat-image.png"
|
||||
},
|
||||
"content": {
|
||||
"html": "<a href=\"https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/cute-cat-image.png\" target=\"_blank\"><img src=\"https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/scaled-1680-\/cute-cat-image.png\" alt=\"cute-cat-image.png\"><\/a>",
|
||||
"markdown": ""
|
||||
}
|
||||
}
|
28
dev/api/responses/image-gallery-update.json
Normal file
28
dev/api/responses/image-gallery-update.json
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
"id": 618,
|
||||
"name": "My updated image name",
|
||||
"url": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/cute-cat-image.png",
|
||||
"created_at": "2023-03-15 08:17:37",
|
||||
"updated_at": "2023-03-15 08:24:50",
|
||||
"created_by": {
|
||||
"id": 1,
|
||||
"name": "Admin",
|
||||
"slug": "admin"
|
||||
},
|
||||
"updated_by": {
|
||||
"id": 1,
|
||||
"name": "Admin",
|
||||
"slug": "admin"
|
||||
},
|
||||
"path": "\/uploads\/images\/gallery\/2023-03\/cute-cat-image.png",
|
||||
"type": "gallery",
|
||||
"uploaded_to": 1,
|
||||
"thumbs": {
|
||||
"gallery": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/thumbs-150-150\/cute-cat-image.png",
|
||||
"display": "https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/scaled-1680-\/cute-cat-image.png"
|
||||
},
|
||||
"content": {
|
||||
"html": "<a href=\"https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/cute-cat-image.png\" target=\"_blank\"><img src=\"https:\/\/bookstack.example.com\/uploads\/images\/gallery\/2023-03\/scaled-1680-\/cute-cat-image.png\" alt=\"My updated image name\"><\/a>",
|
||||
"markdown": ""
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user