Skip to content

Instantly share code, notes, and snippets.

@ssddanbrown
Created February 10, 2022 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssddanbrown/de805abfdf1a1defb54500055de5e7ea to your computer and use it in GitHub Desktop.
Save ssddanbrown/de805abfdf1a1defb54500055de5e7ea to your computer and use it in GitHub Desktop.
BookStack Postman Collection
{
"info": {
"name": "BookStack REST API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "DOCS",
"item": [
{
"name": "docs-display",
"request": {
"method": "GET",
"header": [],
"description": "Load the docs page for the API."
},
"response": []
},
{
"name": "docs-json",
"request": {
"method": "GET",
"header": [],
"description": "Show a JSON view of the API docs data."
},
"response": []
}
]
},
{
"name": "ATTACHMENTS",
"item": [
{
"name": "attachments-list",
"request": {
"method": "GET",
"header": [],
"description": "Get a listing of attachments visible to the user. The external property indicates whether the attachment is simple a link. A false value for the external property would indicate a file upload."
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"data\": [\n {\n \"id\": 3,\n \"name\": \"datasheet.pdf\",\n \"extension\": \"pdf\",\n \"uploaded_to\": 8,\n \"external\": false,\n \"order\": 1,\n \"created_at\": \"2021-10-11T06:18:49.000000Z\",\n \"updated_at\": \"2021-10-20T06:31:10.000000Z\",\n \"created_by\": 1,\n \"updated_by\": 1\n },\n {\n \"id\": 4,\n \"name\": \"Cat reference\",\n \"extension\": \"\",\n \"uploaded_to\": 9,\n \"external\": true,\n \"order\": 1,\n \"created_at\": \"2021-10-20T06:30:11.000000Z\",\n \"updated_at\": \"2021-10-20T06:30:11.000000Z\",\n \"created_by\": 1,\n \"updated_by\": 1\n }\n ],\n \"total\": 2\n}"
}
]
},
{
"name": "attachments-create",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"description": "Create a new attachment in the system. An uploaded_to value must be provided containing an ID of the page that this upload will be related to. If you're uploading a file the POST data should be provided via a multipart/form-data type request instead of JSON.\n\n\nAvailable body parameters:\n\nname: required :: min:1 :: max:255 :: string\nuploaded_to: required :: integer :: exists:pages,id\nfile: required_without:link :: file :: max:50000\nlink: required_without:file :: min:1 :: max:255 :: safe_url",
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"My uploaded attachment\",\n \"uploaded_to\": 8,\n \"link\": \"https://link.example.com\"\n}",
"options": {
"raw": {
"language": "json"
}
}
}
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"id\": 5,\n \"name\": \"My uploaded attachment\",\n \"extension\": \"\",\n \"uploaded_to\": 8,\n \"external\": true,\n \"order\": 2,\n \"created_by\": 1,\n \"updated_by\": 1,\n \"created_at\": \"2021-10-20T06:35:46.000000Z\",\n \"updated_at\": \"2021-10-20T06:35:46.000000Z\"\n}"
}
]
},
{
"name": "attachments-read",
"request": {
"method": "GET",
"header": [],
"description": "Get the details & content of a single attachment of the given ID. The attachment link or file content is provided via a 'content' property. For files the content will be base64 encoded."
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"id\": 5,\n \"name\": \"My link attachment\",\n \"extension\": \"\",\n \"uploaded_to\": 4,\n \"external\": true,\n \"order\": 2,\n \"created_by\": {\n \"id\": 1,\n \"name\": \"Admin\",\n \"slug\": \"admin\"\n },\n \"updated_by\": {\n \"id\": 1,\n \"name\": \"Admin\",\n \"slug\": \"admin\"\n },\n \"created_at\": \"2021-10-20T06:35:46.000000Z\",\n \"updated_at\": \"2021-10-20T06:37:11.000000Z\",\n \"links\": {\n \"html\": \"<a target=\\\"_blank\\\" href=\\\"https://bookstack.local/attachments/5\\\">My updated attachment</a>\",\n \"markdown\": \"[My updated attachment](https://bookstack.local/attachments/5)\"\n },\n \"content\": \"https://link.example.com/updated\"\n}"
}
]
},
{
"name": "attachments-update",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"description": "Update the details of a single attachment. As per the create endpoint, if a file is being provided as the attachment content the request should be formatted as a multipart/form-data request instead of JSON.\n\n\nAvailable body parameters:\n\nname: min:1 :: max:255 :: string\nuploaded_to: integer :: exists:pages,id\nfile: file :: max:50000\nlink: min:1 :: max:255 :: safe_url",
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"My updated attachment\",\n \"uploaded_to\": 4,\n \"link\": \"https://link.example.com/updated\"\n}",
"options": {
"raw": {
"language": "json"
}
}
}
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"id\": 5,\n \"name\": \"My updated attachment\",\n \"extension\": \"\",\n \"uploaded_to\": 4,\n \"external\": true,\n \"order\": 2,\n \"created_by\": 1,\n \"updated_by\": 1,\n \"created_at\": \"2021-10-20T06:35:46.000000Z\",\n \"updated_at\": \"2021-10-20T06:37:11.000000Z\"\n}"
}
]
},
{
"name": "attachments-delete",
"request": {
"method": "DELETE",
"header": [],
"description": "Delete an attachment of the given ID."
},
"response": []
}
]
},
{
"name": "BOOKS",
"item": [
{
"name": "books-list",
"request": {
"method": "GET",
"header": [],
"description": "Get a listing of books visible to the user."
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"BookStack User Guide\",\n \"slug\": \"bookstack-user-guide\",\n \"description\": \"This is a general guide on using BookStack on a day-to-day basis.\",\n \"created_at\": \"2019-05-05T21:48:46.000000Z\",\n \"updated_at\": \"2019-12-11T20:57:31.000000Z\",\n \"created_by\": 1,\n \"updated_by\": 1,\n \"owned_by\": 1,\n \"image_id\": 3\n },\n {\n \"id\": 2,\n \"name\": \"Inventore inventore quia voluptatem.\",\n \"slug\": \"inventore-inventore-quia-voluptatem\",\n \"description\": \"Veniam nihil voluptas enim laborum corporis quos sint. Ab rerum voluptas ut iste voluptas magni quibusdam ut. Amet omnis enim voluptate neque facilis.\",\n \"created_at\": \"2019-05-05T22:10:14.000000Z\",\n \"updated_at\": \"2019-12-11T20:57:23.000000Z\",\n \"created_by\": 4,\n \"updated_by\": 3,\n \"owned_by\": 3,\n \"image_id\": 34\n }\n ],\n \"total\": 14\n}"
}
]
},
{
"name": "books-create",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"description": "Create a new book in the system.\n\n\nAvailable body parameters:\n\nname: required :: string :: max:255\ndescription: string :: max:1000\ntags: array",
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"My own book\",\n \"description\": \"This is my own little book\"\n}",
"options": {
"raw": {
"language": "json"
}
}
}
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"name\": \"My new book\",\n \"description\": \"This is a book created via the API\",\n \"created_by\": 1,\n \"updated_by\": 1,\n \"owned_by\": 1,\n \"slug\": \"my-new-book\",\n \"updated_at\": \"2020-01-12T14:05:11.000000Z\",\n \"created_at\": \"2020-01-12T14:05:11.000000Z\",\n \"id\": 15\n}"
}
]
},
{
"name": "books-read",
"request": {
"method": "GET",
"header": [],
"description": "View the details of a single book."
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"id\": 16,\n \"name\": \"My own book\",\n \"slug\": \"my-own-book\",\n \"description\": \"This is my own little book\",\n \"created_at\": \"2020-01-12T14:09:59.000000Z\",\n \"updated_at\": \"2020-01-12T14:11:51.000000Z\",\n \"created_by\": {\n \"id\": 1,\n \"name\": \"Admin\"\n },\n \"updated_by\": {\n \"id\": 1,\n \"name\": \"Admin\"\n },\n \"owned_by\": {\n \"id\": 1,\n \"name\": \"Admin\"\n },\n \"tags\": [\n {\n \"id\": 13,\n \"name\": \"Category\",\n \"value\": \"Guide\",\n \"order\": 0\n }\n ],\n \"cover\": {\n \"id\": 452,\n \"name\": \"sjovall_m117hUWMu40.jpg\",\n \"url\": \"http:\\/\\/bookstack.local\\/uploads\\/images\\/cover_book\\/2020-01\\/sjovall_m117hUWMu40.jpg\",\n \"created_at\": \"2020-01-12T14:11:51.000000Z\",\n \"updated_at\": \"2020-01-12T14:11:51.000000Z\",\n \"created_by\": 1,\n \"updated_by\": 1,\n \"path\": \"\\/uploads\\/images\\/cover_book\\/2020-01\\/sjovall_m117hUWMu40.jpg\",\n \"type\": \"cover_book\",\n \"uploaded_to\": 16\n }\n}"
}
]
},
{
"name": "books-update",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"description": "Update the details of a single book.\n\n\nAvailable body parameters:\n\nname: string :: min:1 :: max:255\ndescription: string :: max:1000\ntags: array",
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"My updated book\",\n \"description\": \"This is my book with updated details\"\n}",
"options": {
"raw": {
"language": "json"
}
}
}
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"id\": 16,\n \"name\": \"My own book\",\n \"slug\": \"my-own-book\",\n \"description\": \"This is my own little book - updated\",\n \"created_at\": \"2020-01-12T14:09:59.000000Z\",\n \"updated_at\": \"2020-01-12T14:16:10.000000Z\",\n \"created_by\": 1,\n \"updated_by\": 1,\n \"owned_by\": 1,\n \"image_id\": 452\n}"
}
]
},
{
"name": "books-delete",
"request": {
"method": "DELETE",
"header": [],
"description": "Delete a single book. This will typically send the book to the recycle bin."
},
"response": []
},
{
"name": "books-exportHtml",
"request": {
"method": "GET",
"header": [],
"description": "Export a book as a contained HTML file."
},
"response": []
},
{
"name": "books-exportPdf",
"request": {
"method": "GET",
"header": [],
"description": "Export a book as a PDF file."
},
"response": []
},
{
"name": "books-exportPlainText",
"request": {
"method": "GET",
"header": [],
"description": "Export a book as a plain text file."
},
"response": []
},
{
"name": "books-exportMarkdown",
"request": {
"method": "GET",
"header": [],
"description": "Export a book as a markdown file."
},
"response": []
}
]
},
{
"name": "CHAPTERS",
"item": [
{
"name": "chapters-list",
"request": {
"method": "GET",
"header": [],
"description": "Get a listing of chapters visible to the user."
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"data\": [\n {\n \"id\": 1,\n \"book_id\": 1,\n \"name\": \"Content Creation\",\n \"slug\": \"content-creation\",\n \"description\": \"How to create documentation on whatever subject you need to write about.\",\n \"priority\": 3,\n \"created_at\": \"2019-05-05:\",\n \"updated_at\": \"2019-09-28T11:24:23.000000Z\",\n \"created_by\": 1,\n \"updated_by\": 1,\n \"owned_by\": 1\n },\n {\n \"id\": 2,\n \"book_id\": 1,\n \"name\": \"Managing Content\",\n \"slug\": \"managing-content\",\n \"description\": \"How to keep things organised and orderly in the system for easier navigation and better user experience.\",\n \"priority\": 5,\n \"created_at\": \"2019-05-05T21:58:07.000000Z\",\n \"updated_at\": \"2019-10-17T15:05:34.000000Z\",\n \"created_by\": 3,\n \"updated_by\": 3,\n \"owned_by\": 3\n }\n ],\n \"total\": 40\n}"
}
]
},
{
"name": "chapters-create",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"description": "Create a new chapter in the system.\n\n\nAvailable body parameters:\n\nbook_id: required :: integer\nname: required :: string :: max:255\ndescription: string :: max:1000\ntags: array",
"body": {
"mode": "raw",
"raw": "{\n \"book_id\": 1,\n \"name\": \"My fantastic new chapter\",\n \"description\": \"This is a great new chapter that I've created via the API\",\n \"tags\": [\n {\"name\": \"Category\", \"value\": \"Top Content\"},\n {\"name\": \"Rating\", \"value\": \"Highest\"}\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
}
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"book_id\": 1,\n \"priority\": 6,\n \"name\": \"My fantastic new chapter\",\n \"description\": \"This is a great new chapter that I've created via the API\",\n \"created_by\": 1,\n \"updated_by\": 1,\n \"owned_by\": 1,\n \"slug\": \"my-fantastic-new-chapter\",\n \"updated_at\": \"2020-05-22T22:59:55.000000Z\",\n \"created_at\": \"2020-05-22T22:59:55.000000Z\",\n \"id\": 74,\n \"book\": {\n \"id\": 1,\n \"name\": \"BookStack User Guide\",\n \"slug\": \"bookstack-user-guide\",\n \"description\": \"This is a general guide on using BookStack on a day-to-day basis.\",\n \"created_at\": \"2019-05-05T21:48:46.000000Z\",\n \"updated_at\": \"2019-12-11T20:57:31.000000Z\",\n \"created_by\": 1,\n \"updated_by\": 1\n },\n \"tags\": [\n {\n \"name\": \"Category\",\n \"value\": \"Top Content\",\n \"order\": 0,\n \"created_at\": \"2020-05-22T22:59:55.000000Z\",\n \"updated_at\": \"2020-05-22T22:59:55.000000Z\"\n },\n {\n \"name\": \"Rating\",\n \"value\": \"Highest\",\n \"order\": 0,\n \"created_at\": \"2020-05-22T22:59:55.000000Z\",\n \"updated_at\": \"2020-05-22T22:59:55.000000Z\"\n }\n ]\n}"
}
]
},
{
"name": "chapters-read",
"request": {
"method": "GET",
"header": [],
"description": "View the details of a single chapter."
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"id\": 1,\n \"book_id\": 1,\n \"slug\": \"content-creation\",\n \"name\": \"Content Creation\",\n \"description\": \"How to create documentation on whatever subject you need to write about.\",\n \"priority\": 3,\n \"created_at\": \"2019-05-05T21:49:56.000000Z\",\n \"updated_at\": \"2019-09-28T11:24:23.000000Z\",\n \"created_by\": {\n \"id\": 1,\n \"name\": \"Admin\"\n },\n \"updated_by\": {\n \"id\": 1,\n \"name\": \"Admin\"\n },\n \"owned_by\": {\n \"id\": 1,\n \"name\": \"Admin\"\n },\n \"tags\": [\n {\n \"name\": \"Category\",\n \"value\": \"Guide\",\n \"order\": 0\n }\n ],\n \"pages\": [\n {\n \"id\": 1,\n \"book_id\": 1,\n \"chapter_id\": 1,\n \"name\": \"How to create page content\",\n \"slug\": \"how-to-create-page-content\",\n \"priority\": 0,\n \"created_at\": \"2019-05-05T21:49:58.000000Z\",\n \"updated_at\": \"2019-08-26T14:32:59.000000Z\",\n \"created_by\": 1,\n \"updated_by\": 1,\n \"draft\": false,\n \"revision_count\": 2,\n \"template\": false\n },\n {\n \"id\": 7,\n \"book_id\": 1,\n \"chapter_id\": 1,\n \"name\": \"Good book structure\",\n \"slug\": \"good-book-structure\",\n \"priority\": 1,\n \"created_at\": \"2019-05-05T22:01:55.000000Z\",\n \"updated_at\": \"2019-06-06T12:03:04.000000Z\",\n \"created_by\": 3,\n \"updated_by\": 3,\n \"draft\": false,\n \"revision_count\": 1,\n \"template\": false\n }\n ]\n}"
}
]
},
{
"name": "chapters-update",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"description": "Update the details of a single chapter.\n\n\nAvailable body parameters:\n\nbook_id: integer\nname: string :: min:1 :: max:255\ndescription: string :: max:1000\ntags: array",
"body": {
"mode": "raw",
"raw": "{\n \"book_id\": 1,\n \"name\": \"My fantastic updated chapter\",\n \"description\": \"This is an updated chapter that I've altered via the API\",\n \"tags\": [\n {\"name\": \"Category\", \"value\": \"Kinda Good Content\"},\n {\"name\": \"Rating\", \"value\": \"Medium\"}\n ]\n}",
"options": {
"raw": {
"language": "json"
}
}
}
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"id\": 75,\n \"book_id\": 1,\n \"slug\": \"my-fantastic-updated-chapter\",\n \"name\": \"My fantastic updated chapter\",\n \"description\": \"This is an updated chapter that I've altered via the API\",\n \"priority\": 7,\n \"created_at\": \"2020-05-22T23:03:35.000000Z\",\n \"updated_at\": \"2020-05-22T23:07:20.000000Z\",\n \"created_by\": 1,\n \"updated_by\": 1,\n \"owned_by\": 1,\n \"book\": {\n \"id\": 1,\n \"name\": \"BookStack User Guide\",\n \"slug\": \"bookstack-user-guide\",\n \"description\": \"This is a general guide on using BookStack on a day-to-day basis.\",\n \"created_at\": \"2019-05-05T21:48:46.000000Z\",\n \"updated_at\": \"2019-12-11T20:57:31.000000Z\",\n \"created_by\": 1,\n \"updated_by\": 1\n },\n \"tags\": [\n {\n \"name\": \"Category\",\n \"value\": \"Kinda Good Content\",\n \"order\": 0,\n \"created_at\": \"2020-05-22T23:07:20.000000Z\",\n \"updated_at\": \"2020-05-22T23:07:20.000000Z\"\n },\n {\n \"name\": \"Rating\",\n \"value\": \"Medium\",\n \"order\": 0,\n \"created_at\": \"2020-05-22T23:07:20.000000Z\",\n \"updated_at\": \"2020-05-22T23:07:20.000000Z\"\n }\n ]\n}"
}
]
},
{
"name": "chapters-delete",
"request": {
"method": "DELETE",
"header": [],
"description": "Delete a chapter. This will typically send the chapter to the recycle bin."
},
"response": []
},
{
"name": "chapters-exportHtml",
"request": {
"method": "GET",
"header": [],
"description": "Export a chapter as a contained HTML file."
},
"response": []
},
{
"name": "chapters-exportPdf",
"request": {
"method": "GET",
"header": [],
"description": "Export a chapter as a PDF file."
},
"response": []
},
{
"name": "chapters-exportPlainText",
"request": {
"method": "GET",
"header": [],
"description": "Export a chapter as a plain text file."
},
"response": []
},
{
"name": "chapters-exportMarkdown",
"request": {
"method": "GET",
"header": [],
"description": "Export a chapter as a markdown file."
},
"response": []
}
]
},
{
"name": "PAGES",
"item": [
{
"name": "pages-list",
"request": {
"method": "GET",
"header": [],
"description": "Get a listing of pages visible to the user."
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n\t\"data\": [\n\t\t{\n\t\t\t\"id\": 1,\n\t\t\t\"book_id\": 1,\n\t\t\t\"chapter_id\": 1,\n\t\t\t\"name\": \"How to create page content\",\n\t\t\t\"slug\": \"how-to-create-page-content\",\n\t\t\t\"priority\": 0,\n\t\t\t\"draft\": false,\n\t\t\t\"template\": false,\n\t\t\t\"created_at\": \"2019-05-05T21:49:58.000000Z\",\n\t\t\t\"updated_at\": \"2020-07-04T15:50:58.000000Z\",\n\t\t\t\"created_by\": 1,\n\t\t\t\"updated_by\": 1,\n\t\t\t\"owned_by\": 1\n\t\t},\n\t\t{\n\t\t\t\"id\": 2,\n\t\t\t\"book_id\": 1,\n\t\t\t\"chapter_id\": 1,\n\t\t\t\"name\": \"How to use images\",\n\t\t\t\"slug\": \"how-to-use-images\",\n\t\t\t\"priority\": 2,\n\t\t\t\"draft\": false,\n\t\t\t\"template\": false,\n\t\t\t\"created_at\": \"2019-05-05T21:53:30.000000Z\",\n\t\t\t\"updated_at\": \"2019-06-06T12:03:04.000000Z\",\n\t\t\t\"created_by\": 1,\n\t\t\t\"updated_by\": 1,\n\t\t\t\"owned_by\": 1\n\t\t},\n\t\t{\n\t\t\t\"id\": 3,\n\t\t\t\"book_id\": 1,\n\t\t\t\"chapter_id\": 1,\n\t\t\t\"name\": \"Drawings via draw.io\",\n\t\t\t\"slug\": \"drawings-via-drawio\",\n\t\t\t\"priority\": 3,\n\t\t\t\"draft\": false,\n\t\t\t\"template\": false,\n\t\t\t\"created_at\": \"2019-05-05T21:53:49.000000Z\",\n\t\t\t\"updated_at\": \"2019-12-18T21:56:52.000000Z\",\n\t\t\t\"created_by\": 1,\n\t\t\t\"updated_by\": 1,\n\t\t\t\"owned_by\": 1\n\t\t}\n\t],\n\t\"total\": 322\n}"
}
]
},
{
"name": "pages-create",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"description": "Create a new page in the system. The ID of a parent book or chapter is required to indicate where this page should be located. Any HTML content provided should be kept to a single-block depth of plain HTML elements to remain compatible with the BookStack front-end and editors. Any images included via base64 data URIs will be extracted and saved as gallery images against the page during upload.\n\n\nAvailable body parameters:\n\nbook_id: required_without:chapter_id :: integer\nchapter_id: required_without:book_id :: integer\nname: required :: string :: max:255\nhtml: required_without:markdown :: string\nmarkdown: required_without:html :: string\ntags: array",
"body": {
"mode": "raw",
"raw": "{\n\t\"book_id\": 1,\n\t\"name\": \"My API Page\",\n\t\"html\": \"<p>my new API page</p>\",\n\t\"tags\": [\n\t\t{\"name\": \"Category\", \"value\": \"Not Bad Content\"},\n\t\t{\"name\": \"Rating\", \"value\": \"Average\"}\n\t]\n}",
"options": {
"raw": {
"language": "json"
}
}
}
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n\t\"id\": 358,\n\t\"book_id\": 1,\n\t\"chapter_id\": 0,\n\t\"name\": \"My API Page\",\n\t\"slug\": \"my-api-page\",\n\t\"html\": \"<p id=\\\"bkmrk-my-new-api-page\\\">my new API page</p>\",\n\t\"priority\": 14,\n\t\"created_at\": \"2020-11-28T15:01:39.000000Z\",\n\t\"updated_at\": \"2020-11-28T15:01:39.000000Z\",\n\t\"created_by\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Admin\"\n\t},\n\t\"updated_by\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Admin\"\n\t},\n\t\"owned_by\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Admin\"\n\t},\n\t\"draft\": false,\n\t\"markdown\": \"\",\n\t\"revision_count\": 1,\n\t\"template\": false,\n\t\"tags\": [\n\t\t{\n\t\t\t\"name\": \"Category\",\n\t\t\t\"value\": \"Not Bad Content\",\n\t\t\t\"order\": 0\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Rating\",\n\t\t\t\"value\": \"Average\",\n\t\t\t\"order\": 1\n\t\t}\n\t]\n}"
}
]
},
{
"name": "pages-read",
"request": {
"method": "GET",
"header": [],
"description": "View the details of a single page. Pages will always have HTML content. They may have markdown content if the markdown editor was used to last update the page."
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n\t\"id\": 306,\n\t\"book_id\": 1,\n\t\"chapter_id\": 0,\n\t\"name\": \"A page written in markdown\",\n\t\"slug\": \"a-page-written-in-markdown\",\n\t\"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>\",\n\t\"priority\": 13,\n\t\"created_at\": \"2020-02-02T21:40:38.000000Z\",\n\t\"updated_at\": \"2020-11-28T14:43:20.000000Z\",\n\t\"created_by\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Admin\"\n\t},\n\t\"updated_by\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Admin\"\n\t},\n\t\"owned_by\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Admin\"\n\t},\n\t\"draft\": false,\n\t\"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)\",\n\t\"revision_count\": 5,\n\t\"template\": false,\n\t\"tags\": [\n\t\t{\n\t\t\t\"name\": \"Category\",\n\t\t\t\"value\": \"Top Content\",\n\t\t\t\"order\": 0\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Animal\",\n\t\t\t\"value\": \"Cat\",\n\t\t\t\"order\": 1\n\t\t}\n\t]\n}"
}
]
},
{
"name": "pages-update",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"description": "Update the details of a single page. See the 'create' action for details on the provided HTML/Markdown. Providing a 'book_id' or 'chapter_id' property will essentially move the page into that parent element if you have permissions to do so.\n\n\nAvailable body parameters:\n\nbook_id: required :: integer\nchapter_id: required :: integer\nname: string :: min:1 :: max:255\nhtml: string\nmarkdown: string\ntags: array",
"body": {
"mode": "raw",
"raw": "{\n\t\"chapter_id\": 1,\n\t\"name\": \"My updated API Page\",\n\t\"html\": \"<p>my new API page - Updated</p>\",\n\t\"tags\": [\n\t\t{\"name\": \"Category\", \"value\": \"API Examples\"},\n\t\t{\"name\": \"Rating\", \"value\": \"Alright\"}\n\t]\n}",
"options": {
"raw": {
"language": "json"
}
}
}
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n\t\"id\": 361,\n\t\"book_id\": 1,\n\t\"chapter_id\": 1,\n\t\"name\": \"My updated API Page\",\n\t\"slug\": \"my-updated-api-page\",\n\t\"html\": \"<p id=\\\"bkmrk-my-new-api-page---up\\\">my new API page - Updated</p>\",\n\t\"priority\": 16,\n\t\"created_at\": \"2020-11-28T15:10:54.000000Z\",\n\t\"updated_at\": \"2020-11-28T15:13:03.000000Z\",\n\t\"created_by\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Admin\"\n\t},\n\t\"updated_by\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Admin\"\n\t},\n\t\"owned_by\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Admin\"\n\t},\n\t\"draft\": false,\n\t\"markdown\": \"\",\n\t\"revision_count\": 5,\n\t\"template\": false,\n\t\"tags\": [\n\t\t{\n\t\t\t\"name\": \"Category\",\n\t\t\t\"value\": \"API Examples\",\n\t\t\t\"order\": 0\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Rating\",\n\t\t\t\"value\": \"Alright\",\n\t\t\t\"order\": 0\n\t\t}\n\t]\n}"
}
]
},
{
"name": "pages-delete",
"request": {
"method": "DELETE",
"header": [],
"description": "Delete a page. This will typically send the page to the recycle bin."
},
"response": []
},
{
"name": "pages-exportHtml",
"request": {
"method": "GET",
"header": [],
"description": "Export a page as a contained HTML file."
},
"response": []
},
{
"name": "pages-exportPdf",
"request": {
"method": "GET",
"header": [],
"description": "Export a page as a PDF file."
},
"response": []
},
{
"name": "pages-exportPlainText",
"request": {
"method": "GET",
"header": [],
"description": "Export a page as a plain text file."
},
"response": []
},
{
"name": "pages-exportMarkDown",
"request": {
"method": "GET",
"header": [],
"description": "Export a page as a markdown file."
},
"response": []
}
]
},
{
"name": "SEARCH",
"item": [
{
"name": "search-all",
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"description": "Run a search query against all main content types (shelves, books, chapters & pages) in the system. Takes the same input as the main search bar within the BookStack interface as a 'query' parameter. See https://www.bookstackapp.com/docs/user/searching/ for a full list of search term options. Results contain a 'type' property to distinguish between: bookshelf, book, chapter & page. The paging parameters and response format emulates a standard listing endpoint but standard sorting and filtering cannot be done on this endpoint. If a count value is provided this will only be taken as a suggestion. The results in the response may currently be up to 4x this value.\n\n\nAvailable body parameters:\n\nquery: required\npage: integer :: min:1\ncount: integer :: min:1 :: max:100",
"body": {
"mode": "raw",
"raw": "GET /api/search?query=cats+{created_by:me}&page=1&count=2",
"options": {
"raw": {
"language": "json"
}
}
}
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"data\": [\n {\n \"id\": 84,\n \"book_id\": 1,\n \"slug\": \"a-chapter-for-cats\",\n \"name\": \"A chapter for cats\",\n \"created_at\": \"2021-11-14T15:57:35.000000Z\",\n \"updated_at\": \"2021-11-14T15:57:35.000000Z\",\n \"type\": \"chapter\",\n \"url\": \"https://example.com/books/my-book/chapter/a-chapter-for-cats\",\n \"preview_html\": {\n \"name\": \"A chapter for <strong>cats</strong>\",\n \"content\": \"...once a bunch of <strong>cats</strong> named tony...behaviour of <strong>cats</strong> is unsuitable\"\n },\n \"tags\": []\n },\n {\n \"name\": \"The hows and whys of cats\",\n \"id\": 396,\n \"slug\": \"the-hows-and-whys-of-cats\",\n \"book_id\": 1,\n \"chapter_id\": 75,\n \"draft\": false,\n \"template\": false,\n \"created_at\": \"2021-05-15T16:28:10.000000Z\",\n \"updated_at\": \"2021-11-14T15:56:49.000000Z\",\n \"type\": \"page\",\n \"url\": \"https://example.com/books/my-book/page/the-hows-and-whys-of-cats\",\n \"preview_html\": {\n \"name\": \"The hows and whys of <strong>cats</strong>\",\n \"content\": \"...people ask why <strong>cats</strong>? but there are...the reason that <strong>cats</strong> are fast are due to...\"\n },\n \"tags\": [\n {\n \"name\": \"Animal\",\n \"value\": \"Cat\",\n \"order\": 0\n },\n {\n \"name\": \"Category\",\n \"value\": \"Top Content\",\n \"order\": 0\n }\n ]\n },\n {\n \"name\": \"How advanced are cats?\",\n \"id\": 362,\n \"slug\": \"how-advanced-are-cats\",\n \"book_id\": 13,\n \"chapter_id\": 73,\n \"draft\": false,\n \"template\": false,\n \"created_at\": \"2020-11-29T21:55:07.000000Z\",\n \"updated_at\": \"2021-11-14T16:02:39.000000Z\",\n \"type\": \"page\",\n \"url\": \"https://example.com/books/my-book/page/how-advanced-are-cats\",\n \"preview_html\": {\n \"name\": \"How advanced are <strong>cats</strong>?\",\n \"content\": \"<strong>cats</strong> are some of the most advanced animals in the world.\"\n },\n \"tags\": []\n }\n ],\n \"total\": 3\n}"
}
]
}
]
},
{
"name": "SHELVES",
"item": [
{
"name": "shelves-list",
"request": {
"method": "GET",
"header": [],
"description": "Get a listing of shelves visible to the user."
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"data\": [\n {\n \"id\": 8,\n \"name\": \"Qui qui aspernatur autem molestiae libero necessitatibus molestias.\",\n \"slug\": \"qui-qui-aspernatur-autem-molestiae-libero-necessitatibus-molestias\",\n \"description\": \"Enim dolor ut quia error dolores est. Aut distinctio consequuntur non nisi nostrum. Labore cupiditate error labore aliquid provident impedit voluptatibus. Quaerat impedit excepturi eius qui eius voluptatem reiciendis.\",\n \"created_at\": \"2019-05-05T22:10:16.000000Z\",\n \"updated_at\": \"2020-04-10T13:00:45.000000Z\",\n \"created_by\": 4,\n \"updated_by\": 1,\n \"owned_by\": 1,\n \"image_id\": 31\n },\n {\n \"id\": 9,\n \"name\": \"Ipsum aut inventore fuga libero non facilis.\",\n \"slug\": \"ipsum-aut-inventore-fuga-libero-non-facilis\",\n \"description\": \"Labore culpa modi perspiciatis harum sit. Maxime non et nam est. Quae ut laboriosam repellendus sunt quisquam. Velit at est perspiciatis nesciunt adipisci nobis illo. Sed possimus odit optio officiis nisi voluptates officiis dolor.\",\n \"created_at\": \"2019-05-05T22:10:16.000000Z\",\n \"updated_at\": \"2020-04-10T13:00:58.000000Z\",\n \"created_by\": 4,\n \"updated_by\": 1,\n \"owned_by\": 1,\n \"image_id\": 28\n },\n {\n \"id\": 10,\n \"name\": \"Omnis reiciendis aut molestias sint accusantium.\",\n \"slug\": \"omnis-reiciendis-aut-molestias-sint-accusantium\",\n \"description\": \"Qui ea occaecati alias est dolores voluptatem doloribus. Ad reiciendis corporis vero nostrum omnis et. Non doloribus ut eaque ut quos dolores.\",\n \"created_at\": \"2019-05-05T22:10:16.000000Z\",\n \"updated_at\": \"2020-04-10T13:00:53.000000Z\",\n \"created_by\": 4,\n \"updated_by\": 1,\n \"owned_by\": 4,\n \"image_id\": 30\n }\n ],\n \"total\": 3\n}"
}
]
},
{
"name": "shelves-create",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"description": "Create a new shelf in the system. An array of books IDs can be provided in the request. These will be added to the shelf in the same order as provided.\n\n\nAvailable body parameters:\n\nname: required :: string :: max:255\ndescription: string :: max:1000\nbooks: array",
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"My shelf\",\n \"description\": \"This is my shelf with some books\",\n \"books\": [5,1,3]\n}",
"options": {
"raw": {
"language": "json"
}
}
}
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"name\": \"My shelf\",\n \"description\": \"This is my shelf with some books\",\n \"created_by\": 1,\n \"updated_by\": 1,\n \"owned_by\": 1,\n \"slug\": \"my-shelf\",\n \"updated_at\": \"2020-04-10T13:24:09.000000Z\",\n \"created_at\": \"2020-04-10T13:24:09.000000Z\",\n \"id\": 14\n}"
}
]
},
{
"name": "shelves-read",
"request": {
"method": "GET",
"header": [],
"description": "View the details of a single shelf."
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"id\": 14,\n \"name\": \"My shelf\",\n \"slug\": \"my-shelf\",\n \"description\": \"This is my shelf with some books\",\n \"created_by\": {\n \"id\": 1,\n \"name\": \"Admin\"\n },\n \"updated_by\": {\n \"id\": 1,\n \"name\": \"Admin\"\n },\n \"owned_by\": {\n \"id\": 1,\n \"name\": \"Admin\"\n },\n \"created_at\": \"2020-04-10T13:24:09.000000Z\",\n \"updated_at\": \"2020-04-10T13:31:04.000000Z\",\n \"tags\": [\n {\n \"id\": 16,\n \"name\": \"Category\",\n \"value\": \"Guide\",\n \"order\": 0\n }\n ],\n \"cover\": {\n \"id\": 501,\n \"name\": \"anafrancisconi_Sp04AfFCPNM.jpg\",\n \"url\": \"http://bookstack.local/uploads/images/cover_book/2020-04/anafrancisconi_Sp04AfFCPNM.jpg\",\n \"created_at\": \"2020-04-10T13:31:04.000000Z\",\n \"updated_at\": \"2020-04-10T13:31:04.000000Z\",\n \"created_by\": 1,\n \"updated_by\": 1,\n \"path\": \"/uploads/images/cover_book/2020-04/anafrancisconi_Sp04AfFCPNM.jpg\",\n \"type\": \"cover_book\",\n \"uploaded_to\": 14\n },\n \"books\": [\n {\n \"id\": 5,\n \"name\": \"Sint explicabo alias sunt.\",\n \"slug\": \"jbsQrzuaXe\"\n },\n {\n \"id\": 1,\n \"name\": \"BookStack User Guide\",\n \"slug\": \"bookstack-user-guide\"\n },\n {\n \"id\": 3,\n \"name\": \"Molestiae doloribus sint velit suscipit dolorem.\",\n \"slug\": \"H99QxALaoG\"\n }\n ]\n}"
}
]
},
{
"name": "shelves-update",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"description": "Update the details of a single shelf. An array of books IDs can be provided in the request. These will be added to the shelf in the same order as provided and overwrite any existing book assignments.\n\n\nAvailable body parameters:\n\nname: string :: min:1 :: max:255\ndescription: string :: max:1000\nbooks: array",
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"My updated shelf\",\n \"description\": \"This is my update shelf with some books\",\n \"books\": [5,1,3]\n}",
"options": {
"raw": {
"language": "json"
}
}
}
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"id\": 14,\n \"name\": \"My updated shelf\",\n \"slug\": \"my-updated-shelf\",\n \"description\": \"This is my update shelf with some books\",\n \"created_by\": 1,\n \"updated_by\": 1,\n \"owned_by\": 1,\n \"image_id\": 501,\n \"created_at\": \"2020-04-10T13:24:09.000000Z\",\n \"updated_at\": \"2020-04-10T13:48:22.000000Z\"\n}"
}
]
},
{
"name": "shelves-delete",
"request": {
"method": "DELETE",
"header": [],
"description": "Delete a single shelf. This will typically send the shelf to the recycle bin."
},
"response": []
}
]
},
{
"name": "USERS",
"item": [
{
"name": "users-list",
"request": {
"method": "GET",
"header": [],
"description": "Get a listing of users in the system. Requires permission to manage users."
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"data\": [\n {\n \"id\": 1,\n \"name\": \"Dan Brown\",\n \"email\": \"dannyb@example.com\",\n \"created_at\": \"2022-02-03T16:27:55.000000Z\",\n \"updated_at\": \"2022-02-03T16:27:55.000000Z\",\n \"external_auth_id\": \"abc123456\",\n \"slug\": \"dan-brown\",\n \"user_id\": 1,\n \"last_activity_at\": \"2022-02-03T16:27:55.000000Z\",\n \"profile_url\": \"https://docs.example.com/user/dan-brown\",\n \"edit_url\": \"https://docs.example.com/settings/users/1\",\n \"avatar_url\": \"https://docs.example.com/uploads/images/user/2021-10/thumbs-50-50/profile-2021.jpg\"\n },\n {\n \"id\": 2,\n \"name\": \"Benny\",\n \"email\": \"benny@example.com\",\n \"created_at\": \"2022-01-31T20:39:24.000000Z\",\n \"updated_at\": \"2021-11-18T17:10:58.000000Z\",\n \"external_auth_id\": \"\",\n \"slug\": \"benny\",\n \"user_id\": 2,\n \"last_activity_at\": \"2022-01-31T20:39:24.000000Z\",\n \"profile_url\": \"https://docs.example.com/user/benny\",\n \"edit_url\": \"https://docs.example.com/settings/users/2\",\n \"avatar_url\": \"https://docs.example.com/uploads/images/user/2021-11/thumbs-50-50/guest.jpg\"\n }\n ],\n \"total\": 28\n}"
}
]
},
{
"name": "users-create",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"description": "Create a new user in the system. Requires permission to manage users.\n\n\nAvailable body parameters:\n\nname: required :: min:2\nemail: required :: min:2 :: email :: unique:users,email,NULL,id\nexternal_auth_id: string\nlanguage: string\npassword: min:8\nroles: array\nroles.*: integer\nsend_invite: boolean",
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Dan Brown\",\n \"email\": \"dannyb@example.com\",\n \"roles\": [1],\n \"language\": \"fr\",\n \"send_invite\": true\n}",
"options": {
"raw": {
"language": "json"
}
}
}
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"id\": 1,\n \"name\": \"Dan Brown\",\n \"email\": \"dannyb@example.com\",\n \"created_at\": \"2022-02-03T16:27:55.000000Z\",\n \"updated_at\": \"2022-02-03T16:27:55.000000Z\",\n \"external_auth_id\": \"abc123456\",\n \"slug\": \"dan-brown\",\n \"last_activity_at\": \"2022-02-03T16:27:55.000000Z\",\n \"profile_url\": \"https://docs.example.com/user/dan-brown\",\n \"edit_url\": \"https://docs.example.com/settings/users/1\",\n \"avatar_url\": \"https://docs.example.com/uploads/images/user/2021-10/thumbs-50-50/profile-2021.jpg\",\n \"roles\": [\n {\n \"id\": 1,\n \"display_name\": \"Admin\"\n }\n ]\n}"
}
]
},
{
"name": "users-read",
"request": {
"method": "GET",
"header": [],
"description": "View the details of a single user. Requires permission to manage users."
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"id\": 1,\n \"name\": \"Dan Brown\",\n \"email\": \"dannyb@example.com\",\n \"created_at\": \"2022-02-03T16:27:55.000000Z\",\n \"updated_at\": \"2022-02-03T16:27:55.000000Z\",\n \"external_auth_id\": \"abc123456\",\n \"slug\": \"dan-brown\",\n \"last_activity_at\": \"2022-02-03T16:27:55.000000Z\",\n \"profile_url\": \"https://docs.example.com/user/dan-brown\",\n \"edit_url\": \"https://docs.example.com/settings/users/1\",\n \"avatar_url\": \"https://docs.example.com/uploads/images/user/2021-10/thumbs-50-50/profile-2021.jpg\",\n \"roles\": [\n {\n \"id\": 1,\n \"display_name\": \"Admin\"\n }\n ]\n}"
}
]
},
{
"name": "users-update",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"description": "Update an existing user in the system. Requires permission to manage users.\n\n\nAvailable body parameters:\n\nname: min:2\nemail: min:2 :: email :: unique:users,email,NULL,id\nexternal_auth_id: string\nlanguage: string\npassword: min:8\nroles: array\nroles.*: integer",
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Dan Spaggleforth\",\n \"email\": \"dspaggles@example.com\",\n \"roles\": [2],\n \"language\": \"de\",\n \"password\": \"hunter2000\"\n}",
"options": {
"raw": {
"language": "json"
}
}
}
},
"response": [
{
"name": "Example Response",
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": "{\n \"id\": 1,\n \"name\": \"Dan Spaggleforth\",\n \"email\": \"dspaggles@example.com\",\n \"created_at\": \"2022-02-03T16:27:55.000000Z\",\n \"updated_at\": \"2022-02-03T16:27:55.000000Z\",\n \"external_auth_id\": \"abc123456\",\n \"slug\": \"dan-spaggleforth\",\n \"last_activity_at\": \"2022-02-03T16:27:55.000000Z\",\n \"profile_url\": \"https://docs.example.com/user/dan-spaggleforth\",\n \"edit_url\": \"https://docs.example.com/settings/users/1\",\n \"avatar_url\": \"https://docs.example.com/uploads/images/user/2021-10/thumbs-50-50/profile-2021.jpg\",\n \"roles\": [\n {\n \"id\": 2,\n \"display_name\": \"Editors\"\n }\n ]\n}"
}
]
},
{
"name": "users-delete",
"request": {
"method": "DELETE",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"description": "Delete a user from the system. Can optionally accept a user id via `migrate_ownership_id` to indicate who should be the new owner of their related content. Requires permission to manage users.\n\n\nAvailable body parameters:\n\nmigrate_ownership_id: integer :: exists:users,id",
"body": {
"mode": "raw",
"raw": "{\n \"migrate_ownership_id\": 5\n}",
"options": {
"raw": {
"language": "json"
}
}
}
},
"response": []
}
]
}
],
"auth": {
"type": "apikey",
"apikey": [
{
"key": "value",
"value": "Token {{TOKEN_ID}}:{{TOKEN_SECRET}}",
"type": "string"
},
{
"key": "key",
"value": "Authorization",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
],
"variable": [
{
"key": "TOKEN_ID",
"value": "",
"type": "default"
},
{
"key": "TOKEN_SECRET",
"value": "",
"type": "default"
},
{
"key": "BASE_URL",
"value": "",
"type": "default"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment