{"info":{"_postman_id":"55c43cad-94b2-4833-91d5-c355b65b486b","name":"Blog's API","description":"<html><head></head><body><p>Simulates the database system of a blog. Manages login, users, blog posts, categories through CRUD endpoints.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"22527487","collectionId":"55c43cad-94b2-4833-91d5-c355b65b486b","publishedId":"VVBUx6Ns","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-09-07T18:18:14.000Z"},"item":[{"name":"user","item":[{"name":"All users","id":"43f59882-2554-4756-b38a-f76089c09595","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://localhost:3000/user/","description":"<p>Lists all registered users in the blog's database.</p>\n","urlObject":{"path":["user",""],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"c3eb9041-3c38-48b0-8ff6-4f2ec23402db","name":"All registered users","originalRequest":{"method":"GET","header":[{"key":"authorization","value":"deserunt occaecat dolore velit"}],"url":"http://localhost:3000/user/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[\n  {\n    \"id\": 1,\n    \"displayName\": \"Lewis Hamilton\",\n    \"email\": \"lewishamilton@gmail.com\",\n    \"image\": \"https://www.theplayoffs.com.br/wp-content/uploads/2022/08/Twitter-Lewis-Hamilton-scaled.jpg\"\n  },\n  {\n    \"id\": 2,\n    \"displayName\": \"Michael Schumacher\",\n    \"email\": \"michaelschumacher@gmail.com\",\n    \"image\": \"https://uploads.metropoles.com/wp-content/uploads/2021/08/25151628/Schumacher-1-600x400.jpg\"\n  }\n]"}],"_postman_id":"43f59882-2554-4756-b38a-f76089c09595"},{"name":"Creates one user","id":"66d256eb-ff17-4e11-a9bf-9ed5ca61186c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"displayName\": \"Niki Lauda\",\n  \"email\": \"nikilauda12@gmail.com\",\n  \"password\": \"laudaair\",\n  \"image\": \"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTIvVr4-7Wj-6TY-EFMLw8gkPEZXMBRVik2nA&usqp=CAU\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/user/","description":"<p>Creates a new user, authomatically logs in and generates authentication for futher operations. Receives in request body an object containing displayName, email, password and image (URL), all required strings.</p>\n","urlObject":{"path":["user",""],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"a28fb57c-3895-4160-aed0-5e3c1b0f38cb","name":"User Successfully created, logged in and authentication token generated","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"displayName\": \"Niki Lauda\",\n  \"email\": \"nikilauda12@gmail.com\",\n  \"password\": \"laudaair\",\n  \"image\": \"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTIvVr4-7Wj-6TY-EFMLw8gkPEZXMBRVik2nA&usqp=CAU\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/user/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7ImlkIjo1LCJkaXNwbGF5TmFtZSI6InVzdWFyaW8gZGUgdGVzdGUiLCJlbWFpbCI6InRlc3RlQGVtYWlsLmNvbSIsImltYWdlIjoibnVsbCJ9LCJpYXQiOjE2MjAyNDQxODcsImV4cCI6MTYyMDY3NjE4N30.Roc4byj6mYakYqd9LTCozU1hd9k_Vw5IWKGL4hcCVG8\"\n}"},{"id":"c5ac2a9e-30d7-4150-a90f-f1ba8165f296","name":"Unable to create user for invalid or missing fields","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"displayName\": \"Niki Lauda\",\n  \"email\": \"nikilauda12@gmail.com\",\n  \"password\": \"laudaair\",\n  \"image\": \"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTIvVr4-7Wj-6TY-EFMLw8gkPEZXMBRVik2nA&usqp=CAU\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/user/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":""},{"id":"1dd9a39c-e4ba-4b96-9893-a5b69ec20730","name":"User already registered","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"displayName\": \"Niki Lauda\",\n  \"email\": \"nikilauda12@gmail.com\",\n  \"password\": \"laudaair\",\n  \"image\": \"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTIvVr4-7Wj-6TY-EFMLw8gkPEZXMBRVik2nA&usqp=CAU\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/user/"},"status":"Conflict","code":409,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"66d256eb-ff17-4e11-a9bf-9ed5ca61186c"},{"name":"Delete user","id":"341682a2-8a3e-4428-b633-a5adb0b880eb","request":{"method":"DELETE","header":[],"url":"http://localhost:3000/user/me","description":"<p>Deletes the logged in user and all related posts from database.</p>\n","urlObject":{"path":["user","me"],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"af624c2c-fecf-48c6-86ad-594acda89c1b","name":"User successfully deleted","originalRequest":{"method":"DELETE","header":[{"key":"authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7ImlkIjo1LCJkaXNwbGF5TmFtZSI6InVzdWFyaW8gZGUgdGVzdGUiLCJlbWFpbCI6InRlc3RlQGVtYWlsLmNvbSIsImltYWdlIjoibnVsbCJ9LCJpYXQiOjE2MjAyNDQxODcsImV4cCI6MTYyMDY3NjE4N30.Roc4byj6mYakYqd9LTCozU1hd9k_Vw5IWKGL4hcCVG8"}],"url":"http://localhost:3000/user/me"},"status":"No Content","code":204,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"341682a2-8a3e-4428-b633-a5adb0b880eb"},{"name":"User by ID","id":"a15cf440-515c-4ee8-9b35-8ad709785831","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://localhost:3000/user/:id","description":"<p>Returns specific user information based on ID, sending on Response body an object containing id, displayName, email and image (URL), all strings.</p>\n","urlObject":{"path":["user",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"id":"a0858ef4-b99d-400e-a371-767a68b799d3","description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7ImlkIjo1LCJkaXNwbGF5TmFtZSI6InVzdWFyaW8gZGUgdGVzdGUiLCJlbWFpbCI6InRlc3RlQGVtYWlsLmNvbSIsImltYWdlIjoibnVsbCJ9LCJpYXQiOjE2MjAyNDQxODcsImV4cCI6MTYyMDY3NjE4N30.Roc4byj6mYakYqd9LTCozU1hd9k_Vw5IWKGL4hcCVG8","key":"id"}]}},"response":[{"id":"45c3b96d-ce00-4c38-baca-2aea30a35a2c","name":"Selected user information","originalRequest":{"method":"GET","header":[{"key":"authorization","value":"5"}],"url":{"raw":"http://localhost:3000/user/:id","host":["http://localhost:3000"],"path":["user",":id"],"variable":[{"key":"id","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7ImlkIjo1LCJkaXNwbGF5TmFtZSI6InVzdWFyaW8gZGUgdGVzdGUiLCJlbWFpbCI6InRlc3RlQGVtYWlsLmNvbSIsImltYWdlIjoibnVsbCJ9LCJpYXQiOjE2MjAyNDQxODcsImV4cCI6MTYyMDY3NjE4N30.Roc4byj6mYakYqd9LTCozU1hd9k_Vw5IWKGL4hcCVG8","description":"(Required) "}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"id\": 5,\n  \"displayName\": \"Max Verstappen\",\n  \"email\": \"supermax@gmail.com\",\n  \"image\": \"https://classic.exame.com/wp-content/uploads/2021/06/2021-06-21T152407Z_1_LYNXNPEH5K0W0_RTROPTP_4_FRANCA-F1-RED-BULL-1.jpg?quality=70&strip=info&w=1024\"\n}"},{"id":"1e12c169-1fe5-40b0-8296-b7505a8ef753","name":"User does not exist","originalRequest":{"method":"GET","header":[{"key":"authorization","value":"5"}],"url":{"raw":"http://localhost:3000/user/:id","host":["http://localhost:3000"],"path":["user",":id"],"variable":[{"key":"id","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7ImlkIjo1LCJkaXNwbGF5TmFtZSI6InVzdWFyaW8gZGUgdGVzdGUiLCJlbWFpbCI6InRlc3RlQGVtYWlsLmNvbSIsImltYWdlIjoibnVsbCJ9LCJpYXQiOjE2MjAyNDQxODcsImV4cCI6MTYyMDY3NjE4N30.Roc4byj6mYakYqd9LTCozU1hd9k_Vw5IWKGL4hcCVG8","description":"(Required) "}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"a15cf440-515c-4ee8-9b35-8ad709785831"}],"id":"934e5dbe-9a3c-4664-bb37-bd3826bb35b8","_postman_id":"934e5dbe-9a3c-4664-bb37-bd3826bb35b8","description":""},{"name":"categories","item":[{"name":"All categories","id":"b55eb8d0-f797-4e67-8040-900b2e401713","request":{"method":"GET","header":[{"key":"Accept","value":"type"}],"url":"http://localhost:3000/categories/","description":"<p>Returns all registered categories</p>\n","urlObject":{"path":["categories",""],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"144d7563-f45d-452a-a1e8-5620b277613a","name":"All categories and IDs","originalRequest":{"method":"GET","header":[{"key":"authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7ImlkIjo1LCJkaXNwbGF5TmFtZSI6InVzdWFyaW8gZGUgdGVzdGUiLCJlbWFpbCI6InRlc3RlQGVtYWlsLmNvbSIsImltYWdlIjoibnVsbCJ9LCJpYXQiOjE2MjAyNDQxODcsImV4cCI6MTYyMDY3NjE4N30.Roc4byj6mYakYqd9LTCozU1hd9k_Vw5IWKGL4hcCVG8"}],"url":"http://localhost:3000/categories/"},"status":"OK","code":200,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"type"}],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"b55eb8d0-f797-4e67-8040-900b2e401713"},{"name":"Creates category","id":"ca270504-578c-4401-8c4a-266590acef3a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Tennis\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/categories/","description":"<p>Creates a new category from name property received on Request body</p>\n","urlObject":{"path":["categories",""],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"d2bfe143-cc09-4beb-b46f-3f4e4b081495","name":"Category created","originalRequest":{"method":"POST","header":[{"key":"authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7ImlkIjo1LCJkaXNwbGF5TmFtZSI6InVzdWFyaW8gZGUgdGVzdGUiLCJlbWFpbCI6InRlc3RlQGVtYWlsLmNvbSIsImltYWdlIjoibnVsbCJ9LCJpYXQiOjE2MjAyNDQxODcsImV4cCI6MTYyMDY3NjE4N30.Roc4byj6mYakYqd9LTCozU1hd9k_Vw5IWKGL4hcCVG8"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Tennis\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/categories/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"id\": 4,\n  \"name\": \"Tennis\"\n}"},{"id":"84327fe5-f8b6-4b7a-b44e-dc5a3dc55340","name":"Invalid field","originalRequest":{"method":"POST","header":[{"key":"authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7ImlkIjo1LCJkaXNwbGF5TmFtZSI6InVzdWFyaW8gZGUgdGVzdGUiLCJlbWFpbCI6InRlc3RlQGVtYWlsLmNvbSIsImltYWdlIjoibnVsbCJ9LCJpYXQiOjE2MjAyNDQxODcsImV4cCI6MTYyMDY3NjE4N30.Roc4byj6mYakYqd9LTCozU1hd9k_Vw5IWKGL4hcCVG8"}],"body":{"mode":"raw","raw":"{\n  \"name\": \"Tennis\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/categories/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"ca270504-578c-4401-8c4a-266590acef3a"}],"id":"0bd969e4-f609-4702-b4ab-6b8e7954a0e9","_postman_id":"0bd969e4-f609-4702-b4ab-6b8e7954a0e9","description":""},{"name":"post","item":[{"name":"{id}","item":[{"name":"Delete post","id":"a8b97251-9401-4846-b484-67d33d0e3cf2","request":{"method":"DELETE","header":[],"url":"http://localhost:3000/post/:id","description":"<p>Deletes specific post by ID, only if logged in user is its owner.</p>\n","urlObject":{"path":["post",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"id":"6e2721c2-1e50-4523-bd11-dbc9573e44d0","description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"deserunt occaecat dolore velit","key":"id"}]}},"response":[{"id":"1c3d02b2-a34e-4469-96a6-2fadff52430c","name":"Post successfully deleted","originalRequest":{"method":"DELETE","header":[{"key":"authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7ImlkIjo1LCJkaXNwbGF5TmFtZSI6InVzdWFyaW8gZGUgdGVzdGUiLCJlbWFpbCI6InRlc3RlQGVtYWlsLmNvbSIsImltYWdlIjoibnVsbCJ9LCJpYXQiOjE2MjAyNDQxODcsImV4cCI6MTYyMDY3NjE4N30.Roc4byj6mYakYqd9LTCozU1hd9k_Vw5IWKGL4hcCVG8"}],"url":{"raw":"http://localhost:3000/post/:id","host":["http://localhost:3000"],"path":["post",":id"],"variable":[{"key":"id","value":"deserunt occaecat dolore velit","description":"(Required) "}]}},"status":"No Content","code":204,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":""},{"id":"437b3912-92c5-4908-8506-c45072fe55ee","name":"Unauthorized user","originalRequest":{"method":"DELETE","header":[{"key":"authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7ImlkIjo1LCJkaXNwbGF5TmFtZSI6InVzdWFyaW8gZGUgdGVzdGUiLCJlbWFpbCI6InRlc3RlQGVtYWlsLmNvbSIsImltYWdlIjoibnVsbCJ9LCJpYXQiOjE2MjAyNDQxODcsImV4cCI6MTYyMDY3NjE4N30.Roc4byj6mYakYqd9LTCozU1hd9k_Vw5IWKGL4hcCVG8"}],"url":{"raw":"http://localhost:3000/post/:id","host":["http://localhost:3000"],"path":["post",":id"],"variable":[{"key":"id","value":"deserunt occaecat dolore velit","description":"(Required) "}]}},"status":"Unauthorized","code":401,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":""},{"id":"f47f3c5e-87ec-4759-b15d-d3108fcb1a40","name":"Post does not exist","originalRequest":{"method":"DELETE","header":[{"key":"authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7ImlkIjo1LCJkaXNwbGF5TmFtZSI6InVzdWFyaW8gZGUgdGVzdGUiLCJlbWFpbCI6InRlc3RlQGVtYWlsLmNvbSIsImltYWdlIjoibnVsbCJ9LCJpYXQiOjE2MjAyNDQxODcsImV4cCI6MTYyMDY3NjE4N30.Roc4byj6mYakYqd9LTCozU1hd9k_Vw5IWKGL4hcCVG8"}],"url":{"raw":"http://localhost:3000/post/:id","host":["http://localhost:3000"],"path":["post",":id"],"variable":[{"key":"id","value":"deserunt occaecat dolore velit","description":"(Required) "}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"a8b97251-9401-4846-b484-67d33d0e3cf2"},{"name":"Edits a post","id":"b0a4a68a-fb45-4a76-b8b0-ba91d232bf89","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"Three more years\",\n  \"content\": \"Alonso wants to race for three more years. Where? We don't know yet...\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/post/:id","description":"<p>Allows update only on title and content properties of a specified post by ID. Receives an object containing new title and content through Request body</p>\n","urlObject":{"path":["post",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"id":"b661c2c7-e9ac-4d09-81c7-473dc740c1bc","description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"deserunt occaecat dolore velit","key":"id"}]}},"response":[{"id":"fd6c365a-6641-41be-abad-47be54d3a5ad","name":"Post successfully edited","originalRequest":{"method":"PUT","header":[{"key":"authorization","value":"deserunt occaecat dolore velit"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"Three more years\",\n  \"content\": \"Alonso wants to race for three more years. Where? We don't know yet...\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/post/:id","host":["http://localhost:3000"],"path":["post",":id"],"variable":[{"key":"id","value":"deserunt occaecat dolore velit","description":"(Required) "}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"id\": 3,\n  \"title\": \"Three more years\",\n  \"content\": \"Alonso wants to race for three more years. Where? We don't know yet...\",\n  \"userId\": 1,\n  \"published\": \"2022-05-18T18:00:01.000Z\",\n  \"updated\": \"2022-05-18T18:07:32.000Z\",\n  \"user\": {\n    \"id\": 1,\n    \"displayName\": \"Lewis Hamilton\",\n    \"email\": \"lewishamilton@gmail.com\",\n    \"image\": \"https://upload.wikimedia.org/wikipedia/commons/1/18/Lewis_Hamilton_2016_Malaysia_2.jpg\"\n  },\n  \"categories\": [\n    {\n      \"id\": 1,\n      \"name\": \"Formula 1\"\n    },\n    {\n      \"id\": 9,\n      \"name\": \"Hopes and Dreams\"\n    }\n  ]\n}"},{"id":"dfc975d8-24dd-48c2-b47e-870fbf014b28","name":"Missing fields","originalRequest":{"method":"PUT","header":[{"key":"authorization","value":"deserunt occaecat dolore velit"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"Three more years\",\n  \"content\": \"Alonso wants to race for three more years. Where? We don't know yet...\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/post/:id","host":["http://localhost:3000"],"path":["post",":id"],"variable":[{"key":"id","value":"deserunt occaecat dolore velit","description":"(Required) "}]}},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":""},{"id":"0e21d7e2-6fd6-4a45-9d40-3ab6b4a4c61e","name":"Unauthorized user","originalRequest":{"method":"PUT","header":[{"key":"authorization","value":"deserunt occaecat dolore velit"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"Three more years\",\n  \"content\": \"Alonso wants to race for three more years. Where? We don't know yet...\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:3000/post/:id","host":["http://localhost:3000"],"path":["post",":id"],"variable":[{"key":"id","value":"deserunt occaecat dolore velit","description":"(Required) "}]}},"status":"Unauthorized","code":401,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"b0a4a68a-fb45-4a76-b8b0-ba91d232bf89"},{"name":"Post by ID","id":"bdcde914-35be-4840-8403-a1c2f6b43010","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://localhost:3000/post/:id","description":"<p>Recovers post information through relations with user and category tables based on ID</p>\n","urlObject":{"path":["post",":id"],"host":["http://localhost:3000"],"query":[],"variable":[{"id":"bf53b5f7-865c-4a2b-8fb6-0437a73945dc","description":{"content":"<p>(Required) </p>\n","type":"text/plain"},"type":"any","value":"deserunt occaecat dolore velit","key":"id"}]}},"response":[{"id":"31936e94-275e-4478-b57c-83e284d4f858","name":"Post information with relations with user and category","originalRequest":{"method":"GET","header":[{"key":"authorization","value":"deserunt occaecat dolore velit"}],"url":{"raw":"http://localhost:3000/post/:id","host":["http://localhost:3000"],"path":["post",":id"],"variable":[{"key":"id","value":"deserunt occaecat dolore velit","description":"(Required) "}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"id\": 10,\n  \"title\": \"Win in Abu Dabhi\",\n  \"content\": \"After winning the 2021 Abu Dhabi Grand Prix, Verstappen became the first Dutch driver to win the Formula One World Championship, and the 34th Formula One World Drivers' Champion.\",\n  \"userId\": 11,\n  \"published\": \"2011-08-01T19:58:00.000Z\",\n  \"updated\": \"2011-08-01T19:58:51.000Z\",\n  \"user\": {\n    \"id\": 1,\n    \"displayName\": \"Natalie Pinkham\",\n    \"email\": \"pinkhamf1@gmail.com\",\n    \"image\": \"https://media.gettyimages.com/photos/natalie-pinkham-of-sky-f1-is-seen-during-the-italian-formula-one-at-picture-id151759926?s=2048x2048\"\n  },\n  \"categories\": [\n    {\n      \"id\": 1,\n      \"name\": \"Formula 1\"\n    }\n  ]\n}"},{"id":"ebcaa8a6-fc8b-4437-bfee-8380c6acc989","name":"Post does not exist","originalRequest":{"method":"GET","header":[{"key":"authorization","value":"deserunt occaecat dolore velit"}],"url":{"raw":"http://localhost:3000/post/:id","host":["http://localhost:3000"],"path":["post",":id"],"variable":[{"key":"id","value":"deserunt occaecat dolore velit","description":"(Required) "}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"bdcde914-35be-4840-8403-a1c2f6b43010"}],"id":"46b46e83-c096-4f0f-8cf4-786c4e2f9e76","_postman_id":"46b46e83-c096-4f0f-8cf4-786c4e2f9e76","description":""},{"name":"All posts","id":"73b26505-d032-4122-9314-241d0d9f534a","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://localhost:3000/post/","description":"<p>Lists all posts registered in the blog's database</p>\n","urlObject":{"path":["post",""],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"66ca9ce8-1e72-40ec-ab09-627abb598e64","name":"All registered posts","originalRequest":{"method":"GET","header":[{"key":"authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7ImlkIjo1LCJkaXNwbGF5TmFtZSI6InVzdWFyaW8gZGUgdGVzdGUiLCJlbWFpbCI6InRlc3RlQGVtYWlsLmNvbSIsImltYWdlIjoibnVsbCJ9LCJpYXQiOjE2MjAyNDQxODcsImV4cCI6MTYyMDY3NjE4N30.Roc4byj6mYakYqd9LTCozU1hd9k_Vw5IWKGL4hcCVG8"}],"url":"http://localhost:3000/post/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[\n  {\n    \"id\": 1,\n    \"title\": \"8th Title at Silverstone\",\n    \"content\": \"Hamilton has been on pole seven times at Silverstone and has a record 103 wins from 297 races in total.\",\n    \"userId\": 1,\n    \"published\": \"2011-08-01T19:58:00.000Z\",\n    \"updated\": \"2011-08-01T19:58:51.000Z\",\n    \"user\": {\n      \"id\": 1,\n      \"displayName\": \"Lewis Hamilton\",\n      \"email\": \"lewishamilton@gmail.com\",\n      \"image\": \"https://upload.wikimedia.org/wikipedia/commons/1/18/Lewis_Hamilton_2016_Malaysia_2.jpg\"\n    },\n    \"categories\": [\n      {\n        \"id\": 1,\n        \"name\": \"Formula 1\"\n      }\n    ]\n  },\n  {\n    \"id\": 2,\n    \"title\": \"Crash at Silverstone\",\n    \"content\": \"Verstappen and Hamilton tangled on lap one of the 2021 British Grand Prix at Copse.\",\n    \"userId\": 5,\n    \"published\": \"2011-08-01T19:58:00.000Z\",\n    \"updated\": \"2011-08-01T19:58:51.000Z\",\n    \"user\": {\n      \"id\": 1,\n      \"displayName\": \"Will Buxton\",\n      \"email\": \"buxtonwill@gmail.com\",\n      \"image\": \"https://image-cdn.essentiallysports.com/wp-content/uploads/FNox9SqXwAMkFzG.jpg\"\n    },\n    \"categories\": [\n      {\n        \"id\": 1,\n        \"name\": \"Formula 1\"\n      },\n      {\n        \"id\": 7,\n        \"name\": \"Sky Sports\"\n      }\n    ]\n  }\n]"}],"_postman_id":"73b26505-d032-4122-9314-241d0d9f534a"},{"name":"Creates one post","id":"0ee1e4c3-69cc-476f-a6a5-53c44fef55c5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"reprehenderit\",\n  \"content\": \"dolore ipsum et irure\",\n  \"categoryIds\": [\n    -29899839,\n    -61550142\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/post/","description":"<p>Creates a new post. Receives title, content and category IDs through Request body. Category IDs need to exist to be added.</p>\n","urlObject":{"path":["post",""],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"fe5ec672-eac7-444b-87de-47ab2178aa24","name":"Post successfully created","originalRequest":{"method":"POST","header":[{"key":"authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7ImlkIjo1LCJkaXNwbGF5TmFtZSI6InVzdWFyaW8gZGUgdGVzdGUiLCJlbWFpbCI6InRlc3RlQGVtYWlsLmNvbSIsImltYWdlIjoibnVsbCJ9LCJpYXQiOjE2MjAyNDQxODcsImV4cCI6MTYyMDY3NjE4N30.Roc4byj6mYakYqd9LTCozU1hd9k_Vw5IWKGL4hcCVG8"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"aute dolor id\",\n  \"content\": \"p\",\n  \"categoryIds\": [\n    -25303587,\n    99937754\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/post/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"id\": 3,\n  \"title\": \"Ferrari: Another let down\",\n  \"content\": \"Ferrari keeps on disapponting drivers, tifosi, themselves and everyone through bad management and questionable choices\",\n  \"userId\": 1,\n  \"updated\": \"2022-05-18T18:00:01.196Z\",\n  \"published\": \"2022-05-18T18:00:01.196Z\"\n}"},{"id":"4a3d12c6-0742-43d4-a068-570e0494591a","name":"Invalid or missing fields","originalRequest":{"method":"POST","header":[{"key":"authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7ImlkIjo1LCJkaXNwbGF5TmFtZSI6InVzdWFyaW8gZGUgdGVzdGUiLCJlbWFpbCI6InRlc3RlQGVtYWlsLmNvbSIsImltYWdlIjoibnVsbCJ9LCJpYXQiOjE2MjAyNDQxODcsImV4cCI6MTYyMDY3NjE4N30.Roc4byj6mYakYqd9LTCozU1hd9k_Vw5IWKGL4hcCVG8"}],"body":{"mode":"raw","raw":"{\n  \"title\": \"aute dolor id\",\n  \"content\": \"p\",\n  \"categoryIds\": [\n    -25303587,\n    99937754\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/post/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"0ee1e4c3-69cc-476f-a6a5-53c44fef55c5"},{"name":"Search posts","id":"619c5b0c-1f97-413a-b749-82631b2aef1b","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"url":"http://localhost:3000/post/search?q=Silverstone","description":"<p>Returns posts which title or content match the query string passed in the URL. Returns posts in an array, or an empty array if no posts match the search</p>\n","urlObject":{"path":["post","search"],"host":["http://localhost:3000"],"query":[{"description":{"content":"<p>String to search for in post title or content</p>\n","type":"text/plain"},"key":"q","value":"Silverstone"}],"variable":[]}},"response":[{"id":"1a54b740-2d58-47d3-8a4b-17508dd3fcca","name":"All posts matching the search query","originalRequest":{"method":"GET","header":[{"key":"authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7ImlkIjo1LCJkaXNwbGF5TmFtZSI6InVzdWFyaW8gZGUgdGVzdGUiLCJlbWFpbCI6InRlc3RlQGVtYWlsLmNvbSIsImltYWdlIjoibnVsbCJ9LCJpYXQiOjE2MjAyNDQxODcsImV4cCI6MTYyMDY3NjE4N30.Roc4byj6mYakYqd9LTCozU1hd9k_Vw5IWKGL4hcCVG8"}],"url":{"raw":"http://localhost:3000/post/search?q=Silverstone","host":["http://localhost:3000"],"path":["post","search"],"query":[{"key":"q","value":"Silverstone"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"[\n  {\n    \"id\": 1,\n    \"title\": \"8th Title at Silverstone\",\n    \"content\": \"Hamilton has been on pole seven times at Silverstone and has a record 103 wins from 297 races in total.\",\n    \"userId\": 1,\n    \"published\": \"2011-08-01T19:58:00.000Z\",\n    \"updated\": \"2011-08-01T19:58:51.000Z\",\n    \"user\": {\n      \"id\": 1,\n      \"displayName\": \"Lewis Hamilton\",\n      \"email\": \"lewishamilton@gmail.com\",\n      \"image\": \"https://upload.wikimedia.org/wikipedia/commons/1/18/Lewis_Hamilton_2016_Malaysia_2.jpg\"\n    },\n    \"categories\": [\n      {\n        \"id\": 1,\n        \"name\": \"Formula 1\"\n      }\n    ]\n  },\n  {\n    \"id\": 2,\n    \"title\": \"Crash at Silverstone\",\n    \"content\": \"Verstappen and Hamilton tangled on lap one of the 2021 British Grand Prix at Copse.\",\n    \"userId\": 5,\n    \"published\": \"2011-08-01T19:58:00.000Z\",\n    \"updated\": \"2011-08-01T19:58:51.000Z\",\n    \"user\": {\n      \"id\": 1,\n      \"displayName\": \"Will Buxton\",\n      \"email\": \"buxtonwill@gmail.com\",\n      \"image\": \"https://image-cdn.essentiallysports.com/wp-content/uploads/FNox9SqXwAMkFzG.jpg\"\n    },\n    \"categories\": [\n      {\n        \"id\": 1,\n        \"name\": \"Formula 1\"\n      },\n      {\n        \"id\": 7,\n        \"name\": \"Sky Sports\"\n      }\n    ]\n  }\n]"}],"_postman_id":"619c5b0c-1f97-413a-b749-82631b2aef1b"}],"id":"be2b7eca-6513-4ac1-87c6-06f68d6186e9","_postman_id":"be2b7eca-6513-4ac1-87c6-06f68d6186e9","description":""},{"name":"Login","id":"9e569f38-5d4c-4699-b1d8-da4ec304c110","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"lewishamilton@gmail.com\",\n  \"password\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/login/","description":"<p>Signs the user in and generates authentication for further operations</p>\n","urlObject":{"path":["login",""],"host":["http://localhost:3000"],"query":[],"variable":[]}},"response":[{"id":"64f2c939-b761-4445-9e11-616f0f0a1b17","name":"Successfully logged in and authentication token generated","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"email\": \"lewishamilton@gmail.com\",\n  \"password\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/login/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n  \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXlsb2FkIjp7ImlkIjo1LCJkaXNwbGF5TmFtZSI6InVzdWFyaW8gZGUgdGVzdGUiLCJlbWFpbCI6InRlc3RlQGVtYWlsLmNvbSIsImltYWdlIjoibnVsbCJ9LCJpYXQiOjE2MjAyNDQxODcsImV4cCI6MTYyMDY3NjE4N30.Roc4byj6mYakYqd9LTCozU1hd9k_Vw5IWKGL4hcCVG8\"\n}"},{"id":"77ee9a3d-5913-4e8f-a21f-890abd49e6ef","name":"Unable to login due to missing or invalid fields","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"email\": \"lewishamilton@gmail.com\",\n  \"password\": \"123456\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/login/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"text","header":[{"key":"Content-Type","value":"text/plain"}],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"9e569f38-5d4c-4699-b1d8-da4ec304c110"}],"variable":[{"id":"edb7c85a-b2b7-4183-9fd3-fc98b33ca516","key":"baseUrl","value":"http://localhost:3000","type":"string"}]}