{"info":{"_postman_id":"72d10ae3-ea22-47c9-a3d7-394081d600ec","name":"BlogApi","description":"<html><head></head><body><p>This is the simple User Blog curd operation with JWT Authentication</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"22951744","collectionId":"72d10ae3-ea22-47c9-a3d7-394081d600ec","publishedId":"2s9YkrbLCE","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-12-22T17:16:15.000Z"},"item":[{"name":"User Register","id":"fd53bbca-9eae-47f3-8797-87bdcb266d4d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\":\"Test User3\",\r\n    \"email\":\"Test3@gmail.com\",\r\n    \"password\":\"password\",\r\n    \"phone\":\"9227462129\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/user/register","description":"<p>Register User</p>\n<p>Email should be unique</p>\n","urlObject":{"port":"8080","path":["api","user","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"fd53bbca-9eae-47f3-8797-87bdcb266d4d"},{"name":"User Login","id":"062ebe92-71bc-4151-92e9-af0bef2b5bd3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"Test@gmail.com\",\r\n    \"password\":\"password\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/user/login","description":"<p>JWT Token is created for the current session and stored in browser's cookie for further authentication</p>\n","urlObject":{"port":"8080","path":["api","user","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"062ebe92-71bc-4151-92e9-af0bef2b5bd3"},{"name":"Create Blog","id":"2b4b0aa3-bd94-4a38-b43a-e111b8a91675","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"title\":\"Test blog 1\",\r\n    \"description\":\"Test blog description 1\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/blog/","description":"<p>Creating blog requires Token which is taken from browsers cookie</p>\n","urlObject":{"port":"8080","path":["api","blog",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"2b4b0aa3-bd94-4a38-b43a-e111b8a91675"},{"name":"Get User","id":"1b3516cd-1853-4049-8c55-f1a5587e13b4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/api/user/getuser","description":"<p>It returns the profile information of current logged in user</p>\n","urlObject":{"protocol":"http","port":"8080","path":["api","user","getuser"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"1b3516cd-1853-4049-8c55-f1a5587e13b4"},{"name":"Update Blog","id":"e600051f-3328-4619-b536-e25007f2bda7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"title\":\"Test blog update test  1\",\r\n    \"description\":\"Test blog description update test 1\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/blog/65856873eb6645bb8ee9fc91","description":"<p>Update the blog using the _id provided by the mongoDB.</p>\n","urlObject":{"port":"8080","path":["api","blog","65856873eb6645bb8ee9fc91"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e600051f-3328-4619-b536-e25007f2bda7"},{"name":"Delete Blog","id":"34c390e1-c0fe-49da-a160-0034bad45458","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"localhost:8080/api/blog/65856999eb6645bb8ee9fc95","urlObject":{"port":"8080","path":["api","blog","65856999eb6645bb8ee9fc95"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"34c390e1-c0fe-49da-a160-0034bad45458"},{"name":"Get Blog","id":"139b05a6-8dbc-43cc-938a-94eaadac1893","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"localhost:8080/api/blog/6585c34d376331c2789aa94e","urlObject":{"port":"8080","path":["api","blog","6585c34d376331c2789aa94e"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"139b05a6-8dbc-43cc-938a-94eaadac1893"},{"name":"Get Blogs","id":"4fa0382b-ae95-47d2-8529-ee73eeac3fef","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/api/blog/","description":"<p>Returns all the blog. Here the _id present in the each object of response is used for update, delete , and get operations</p>\n","urlObject":{"protocol":"http","port":"8080","path":["api","blog",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"4fa0382b-ae95-47d2-8529-ee73eeac3fef"},{"name":"User Logout","id":"b70f8de7-124b-4667-b25d-d9af92f2f37f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"localhost:8080/api/user/logout","urlObject":{"port":"8080","path":["api","user","logout"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b70f8de7-124b-4667-b25d-d9af92f2f37f"},{"name":"Get all blogs of user","id":"080ebf70-88e9-40c8-96ec-60ca56bbfde5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"localhost:8080/api/blog/users","urlObject":{"port":"8080","path":["api","blog","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"080ebf70-88e9-40c8-96ec-60ca56bbfde5"},{"name":"Admin Register","id":"d213cd2f-160f-40d4-b736-bf8168bd219d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\":\"Test admin1\",\r\n    \"email\":\"Testadmin1@gmail.com\",\r\n    \"password\":\"password\",\r\n    \"phone\":\"9227462129\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/admin/register","urlObject":{"protocol":"http","port":"8080","path":["api","admin","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"d213cd2f-160f-40d4-b736-bf8168bd219d"},{"name":"Admin Login","id":"2e80b07c-b82d-477a-8177-8dfd1a86ab80","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"2e80b07c-b82d-477a-8177-8dfd1a86ab80"},{"name":"Admin Update Blog","id":"8f766382-6fda-4f00-bd56-e26a6a0306af","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n       \r\n        \"title\": \"Demo blog update by admin 111\",\r\n        \"description\": \"Demo blog description 1\"\r\n       \r\n    }","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/admin/65856873eb6645bb8ee9fc91","urlObject":{"protocol":"http","port":"8080","path":["api","admin","65856873eb6645bb8ee9fc91"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8f766382-6fda-4f00-bd56-e26a6a0306af"},{"name":"Admin getAll users","id":"c9479809-0bac-4a0c-b4e6-30ed7a76b1c3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"c9479809-0bac-4a0c-b4e6-30ed7a76b1c3"},{"name":"Admin Delete user","id":"8d5fcff8-ee3d-412f-a8b1-30d4f6751392","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:8080/api/admin/deleteuser/658564ff39bf655e7523d7e4","urlObject":{"protocol":"http","port":"8080","path":["api","admin","deleteuser","658564ff39bf655e7523d7e4"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8d5fcff8-ee3d-412f-a8b1-30d4f6751392"},{"name":"Admin Register User","id":"d0600742-e99d-4f28-bd7f-15210e9eea02","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\":\"Test User4 created by admin\",\r\n    \"email\":\"Test4@gmail.com\",\r\n    \"password\":\"password\",\r\n    \"phone\":\"9227462129\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/admin/registeruser","urlObject":{"protocol":"http","port":"8080","path":["api","admin","registeruser"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"d0600742-e99d-4f28-bd7f-15210e9eea02"},{"name":"Admin updare User","id":"4b98361b-599c-4bb9-927e-d300d7779b81","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\":\"Test User4 updated by admin\",\r\n    \"email\":\"Test4@gmail.com\",\r\n    \"password\":\"password\",\r\n    \"phone\":\"9227462129\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/admin/updateuser/658f922c1e409556f456d613","urlObject":{"protocol":"http","port":"8080","path":["api","admin","updateuser","658f922c1e409556f456d613"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"4b98361b-599c-4bb9-927e-d300d7779b81"},{"name":"Admin logout","id":"37cdfd5c-d388-4159-b5db-0c3fea68f0dc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/api/admin/logout","urlObject":{"protocol":"http","port":"8080","path":["api","admin","logout"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"37cdfd5c-d388-4159-b5db-0c3fea68f0dc"},{"name":"Admin profile update","id":"854573fa-af48-43ab-853c-10fa160b9193","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\":\"Test admin1 update\",\r\n    \"email\":\"Testadmin1@gmail.com\",\r\n    \"password\":\"password\",\r\n    \"phone\":\"9227462129\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/api/admin/updateprofile","urlObject":{"protocol":"http","port":"8080","path":["api","admin","updateprofile"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"854573fa-af48-43ab-853c-10fa160b9193"},{"name":"Admin profile","id":"29c83a82-c975-437c-9287-4cc80285412e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/api/admin/getadmin","urlObject":{"protocol":"http","port":"8080","path":["api","admin","getadmin"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"29c83a82-c975-437c-9287-4cc80285412e"},{"name":"Add profile picture","id":"a00578b6-57b1-4ff7-894e-d90025738829","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"profilepic","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","filesNotInWorkingDirectory":["/C:/Users/adity/OneDrive/Pictures/Aditya_img.jpg"],"src":"/C:/Users/adity/OneDrive/Pictures/Aditya_img.jpg"}]},"url":"localhost:8080/api/user/uploadprofilepic","urlObject":{"port":"8080","path":["api","user","uploadprofilepic"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a00578b6-57b1-4ff7-894e-d90025738829"}]}