{"info":{"_postman_id":"6acbd97b-08c1-4301-b73e-8878a074486c","name":"Blog Rest Api","description":"<html><head></head><body><p>Implemented CRUD operation for blog post and user management.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"28169578","collectionId":"6acbd97b-08c1-4301-b73e-8878a074486c","publishedId":"2sA3JGfiui","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-05-05T17:56:56.000Z"},"item":[{"name":"signup","id":"f2c7901b-79d7-4a16-83df-44cbf82dee8a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"{{your_email}}\",\r\n    \"password\":\"{{your_password}}\",\r\n    \"name\":\"John\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://blog-rest-api-9yc5.onrender.com/signUp","description":"<p><strong>PUT /signup</strong></p>\n<ul>\n<li><p>Description: Allows users to sign up for the blog platform by providing their email,password and name.</p>\n</li>\n<li><p>Request Body: JSON object containing user's email, password. and name.</p>\n</li>\n<li><p>Response: Success message and userId if the user is successfully signed up.</p>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["signUp"],"host":["blog-rest-api-9yc5","onrender","com"],"query":[],"variable":[]}},"response":[{"id":"4cdb2436-07e8-456c-af24-309c17b22a17","name":"signup","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"{{your_email}}\",\r\n    \"password\":\"{{your_password}}\",\r\n    \"name\":\"John\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://blog-rest-api-9yc5.onrender.com/signUp"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 06 May 2024 14:42:02 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"CF-Ray","value":"87f9bbfaf9dd54f0-DEL"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"3e-/dfsbfKxBc0EbRZazNaiKdEj32U\""},{"key":"Vary","value":"Accept-Encoding"},{"key":"access-control-allow-headers","value":"Content-Type,Authorization"},{"key":"access-control-allow-methods","value":"GET,POST,PUT,PATCH,DELETE"},{"key":"rndr-id","value":"4b269ad6-92d5-481d"},{"key":"x-powered-by","value":"Express"},{"key":"x-render-origin-server","value":"Render"},{"key":"Server","value":"cloudflare"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"User Created\",\n    \"userId\": \"6638ec3ad0143300416fa957\"\n}"}],"_postman_id":"f2c7901b-79d7-4a16-83df-44cbf82dee8a"},{"name":"login","id":"6489809d-eb21-456e-b1c5-e4b463d87a9d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"{{your_email}}\",\r\n    \"password\":\"{{your_password}}\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://blog-rest-api-9yc5.onrender.com/login","description":"<p><strong>POST /login</strong></p>\n<ul>\n<li><p>Description: Allows registered users to log in to the blog platform using their credentials.</p>\n</li>\n<li><p>Request Body: JSON object containing user's email and password.</p>\n</li>\n<li><p>Response: JSON object containing a JWT token for authentication.</p>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["login"],"host":["blog-rest-api-9yc5","onrender","com"],"query":[],"variable":[]}},"response":[{"id":"3f11952c-0f13-4a84-833d-8671584c600b","name":"login","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"{{your_email}}\",\r\n    \"password\":\"{{your_password}}\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://blog-rest-api-9yc5.onrender.com/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 06 May 2024 14:45:36 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"CF-Ray","value":"87f9c13a6ff554f0-DEL"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"105-y/JMKUU+XVHUlZUNVm730qfxQ/A\""},{"key":"Vary","value":"Accept-Encoding"},{"key":"access-control-allow-headers","value":"Content-Type,Authorization"},{"key":"access-control-allow-methods","value":"GET,POST,PUT,PATCH,DELETE"},{"key":"rndr-id","value":"b56cc212-32ff-4e0c"},{"key":"x-powered-by","value":"Express"},{"key":"x-render-origin-server","value":"Render"},{"key":"Server","value":"cloudflare"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InRlc3RpbmdAZ21haWwuY29tIiwidXNlcklkIjoiNjYzOGVjM2FkMDE0MzMwMDQxNmZhOTU3IiwiaWF0IjoxNzE1MDA2NzM2LCJleHAiOjE3MTUwMTAzMzZ9.aKiJ77OmI-kMG-_--Gz60ytGq1iR3wzl-fFFmRYgq90\",\n    \"userId\": \"6638ec3ad0143300416fa957\"\n}"}],"_postman_id":"6489809d-eb21-456e-b1c5-e4b463d87a9d"},{"name":"Get Posts","id":"093eda22-0c2b-43fd-90b1-3dc59f19179b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{token}}"}],"url":"https://blog-rest-api-9yc5.onrender.com/posts","description":"<p>GET /posts</p>\n<ul>\n<li><p>Description: Retrieves a list of all posts available on the blog platform</p>\n</li>\n<li><p>Authentication: Requires a valid JWT token in the Authorization header.</p>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["posts"],"host":["blog-rest-api-9yc5","onrender","com"],"query":[],"variable":[]}},"response":[{"id":"4dfb79d6-9f80-4d3f-b2fb-609331d2fd47","name":"Get Posts","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{token}}"}],"url":"https://blog-rest-api-9yc5.onrender.com/posts"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 05 May 2024 16:37:32 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"CF-Ray","value":"87f227dc8e318e81-DEL"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"274-GvE+0ahl/Qg8nzi3CVVffc3MOFA\""},{"key":"Vary","value":"Accept-Encoding"},{"key":"access-control-allow-headers","value":"Content-Type,Authorization"},{"key":"access-control-allow-methods","value":"GET,POST,PUT,PATCH,DELETE"},{"key":"rndr-id","value":"39fa47bb-151d-41d1"},{"key":"x-powered-by","value":"Express"},{"key":"x-render-origin-server","value":"Render"},{"key":"Server","value":"cloudflare"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"posts fetched successfully\",\n    \"posts\": [\n        {\n            \"_id\": \"662e982a72eac84f04494d78\",\n            \"title\": \"Postman\",\n            \"imageUrl\": \"images\\\\2024-04-28T18-49-56.193Z-2024-04-11T12-19-00.756Z-laptop.jpg\",\n            \"content\": \"Test and publish your apis.\",\n            \"creator\": \"662e8ea00e40b3b26d525c99\",\n            \"createdAt\": \"2024-04-28T18:40:42.474Z\",\n            \"updatedAt\": \"2024-04-28T18:49:56.366Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"6637b50db407f81b8f39439b\",\n            \"title\": \"JavaScript\",\n            \"imageUrl\": \"images/2024-05-05T16-34-21.814Z-Books.jpg\",\n            \"content\": \"Scripting Language\",\n            \"creator\": \"6637b33db407f81b8f394398\",\n            \"createdAt\": \"2024-05-05T16:34:21.824Z\",\n            \"updatedAt\": \"2024-05-05T16:34:21.824Z\",\n            \"__v\": 0\n        }\n    ],\n    \"totalItems\": 2\n}"}],"_postman_id":"093eda22-0c2b-43fd-90b1-3dc59f19179b"},{"name":"Create Post","id":"848cf902-3be5-4274-82eb-8ebd07a21cdb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{token}}"}],"body":{"mode":"formdata","formdata":[{"key":"title","value":"JavaScript","type":"text"},{"key":"content","value":"Scripting Language","type":"text"},{"key":"image","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/Muskan/Desktop/Rest-Api/images/Books.jpg"],"src":"/C:/Users/Muskan/Desktop/Rest-Api/images/Books.jpg"}]},"url":"https://blog-rest-api-9yc5.onrender.com/post","description":"<p>POST /post</p>\n<ul>\n<li><p>Description: Creates a new post on the blog platform.</p>\n</li>\n<li><p>Authentication: Requires a valid JWT token in the Authorization header.</p>\n</li>\n<li><p>Request Body: JSON object containing the title, content and image of the post.</p>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["post"],"host":["blog-rest-api-9yc5","onrender","com"],"query":[],"variable":[]}},"response":[{"id":"147fc637-90ca-42b5-a884-700cba86ecfc","name":"Create Post","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{token}}"}],"body":{"mode":"formdata","formdata":[{"key":"title","value":"JavaScript","type":"text"},{"key":"content","value":"Scripting Language","type":"text"},{"key":"image","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/Muskan/Desktop/Rest-Api/images/Books.jpg"],"src":"/C:/Users/Muskan/Desktop/Rest-Api/images/Books.jpg"}]},"url":"https://blog-rest-api-9yc5.onrender.com/post"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 05 May 2024 16:34:22 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"CF-Ray","value":"87f22335ccf28e81-DEL"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"172-o+CtYbtf5Ese/i1X/SltN/AI06w\""},{"key":"Vary","value":"Accept-Encoding"},{"key":"access-control-allow-headers","value":"Content-Type,Authorization"},{"key":"access-control-allow-methods","value":"GET,POST,PUT,PATCH,DELETE"},{"key":"rndr-id","value":"1f2f1fed-d697-4504"},{"key":"x-powered-by","value":"Express"},{"key":"x-render-origin-server","value":"Render"},{"key":"Server","value":"cloudflare"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Post created successfully\",\n    \"post\": {\n        \"title\": \"JavaScript\",\n        \"imageUrl\": \"images/2024-05-05T16-34-21.814Z-Books.jpg\",\n        \"content\": \"Scripting Language\",\n        \"creator\": \"6637b33db407f81b8f394398\",\n        \"_id\": \"6637b50db407f81b8f39439b\",\n        \"createdAt\": \"2024-05-05T16:34:21.824Z\",\n        \"updatedAt\": \"2024-05-05T16:34:21.824Z\",\n        \"__v\": 0\n    },\n    \"creator\": {\n        \"_id\": \"6637b33db407f81b8f394398\",\n        \"name\": \"John\"\n    }\n}"}],"_postman_id":"848cf902-3be5-4274-82eb-8ebd07a21cdb"},{"name":"Read Post","id":"c1ee5ab7-4f0b-45b7-87f6-02d7a2fd2ed5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{token}}"}],"url":"https://blog-rest-api-9yc5.onrender.com/post/6637b50db407f81b8f39439b","description":"<p>GET /post/postId</p>\n<ul>\n<li>Description: Retrieves a specific post by its ID.</li>\n<li>Authentication: Requires a valid JWT token in the Authorization header.</li>\n<li>Path Parameter: postId (ID of the post to retrieve).</li>\n</ul>\n","urlObject":{"protocol":"https","path":["post","6637b50db407f81b8f39439b"],"host":["blog-rest-api-9yc5","onrender","com"],"query":[],"variable":[]}},"response":[{"id":"a944e101-cd0c-45c0-85da-d2785ad70344","name":"Read Post","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{token}}"}],"url":"https://blog-rest-api-9yc5.onrender.com/post/6637b50db407f81b8f39439b"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 05 May 2024 16:41:05 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"CF-Ray","value":"87f22d0d3af98e81-DEL"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"12a-UZLiY78VhVl3oNwSuYTEawILzsQ\""},{"key":"Vary","value":"Accept-Encoding"},{"key":"access-control-allow-headers","value":"Content-Type,Authorization"},{"key":"access-control-allow-methods","value":"GET,POST,PUT,PATCH,DELETE"},{"key":"rndr-id","value":"6598b000-ce2c-4f11"},{"key":"x-powered-by","value":"Express"},{"key":"x-render-origin-server","value":"Render"},{"key":"Server","value":"cloudflare"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Post fetched\",\n    \"post\": {\n        \"_id\": \"6637b50db407f81b8f39439b\",\n        \"title\": \"JavaScript\",\n        \"imageUrl\": \"images/2024-05-05T16-34-21.814Z-Books.jpg\",\n        \"content\": \"Scripting Language\",\n        \"creator\": \"6637b33db407f81b8f394398\",\n        \"createdAt\": \"2024-05-05T16:34:21.824Z\",\n        \"updatedAt\": \"2024-05-05T16:34:21.824Z\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"c1ee5ab7-4f0b-45b7-87f6-02d7a2fd2ed5"},{"name":"Update Post","id":"950191a5-b1df-4ae7-8aba-61575b87202e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{token}}"}],"body":{"mode":"formdata","formdata":[{"key":"title","value":"Node.js","type":"text"},{"key":"content","value":"Runtime Enviroment","type":"text"},{"key":"image","type":"file","src":"/C:/Users/Muskan/Desktop/Rest-Api/images/duck.jpg"}]},"url":"https://blog-rest-api-9yc5.onrender.com/post/6637b50db407f81b8f39439b","description":"<p>PUT /post/postId</p>\n<ul>\n<li><p>Description: Updates an existing post with new content.</p>\n</li>\n<li><p>Authentication: Requires a valid JWT token in the Authorization header.</p>\n</li>\n<li><p>Path Parameter: postId (ID of the post to update).</p>\n</li>\n<li><p>Request Body: JSON object containing the updated title,content and image of the post.</p>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["post","6637b50db407f81b8f39439b"],"host":["blog-rest-api-9yc5","onrender","com"],"query":[],"variable":[]}},"response":[{"id":"60ec4445-07a0-4287-abd4-03ca878af8f7","name":"Update Post","originalRequest":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{token}}"}],"body":{"mode":"formdata","formdata":[{"key":"title","value":"Node.js","type":"text"},{"key":"content","value":"Runtime Enviroment","type":"text"},{"key":"image","type":"file","src":"/C:/Users/Muskan/Desktop/Rest-Api/images/duck.jpg"}]},"url":"https://blog-rest-api-9yc5.onrender.com/post/6637b50db407f81b8f39439b"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 05 May 2024 16:45:13 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"CF-Ray","value":"87f2331e38b18e81-DEL"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"125-mPuNC+GO43X/3DwqIxAOlG8+PQY\""},{"key":"Vary","value":"Accept-Encoding"},{"key":"access-control-allow-headers","value":"Content-Type,Authorization"},{"key":"access-control-allow-methods","value":"GET,POST,PUT,PATCH,DELETE"},{"key":"rndr-id","value":"e489b795-5b01-40f8"},{"key":"x-powered-by","value":"Express"},{"key":"x-render-origin-server","value":"Render"},{"key":"Server","value":"cloudflare"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"postUpdated\",\n    \"post\": {\n        \"_id\": \"6637b50db407f81b8f39439b\",\n        \"title\": \"Node.js\",\n        \"imageUrl\": \"images/2024-05-05T16-45-13.436Z-duck.jpg\",\n        \"content\": \"Runtime Enviroment\",\n        \"creator\": \"6637b33db407f81b8f394398\",\n        \"createdAt\": \"2024-05-05T16:34:21.824Z\",\n        \"updatedAt\": \"2024-05-05T16:45:13.630Z\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"950191a5-b1df-4ae7-8aba-61575b87202e"},{"name":"Delete Post","id":"1d48f428-afa3-4892-8ced-b90fc42d87a7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{token}}"}],"url":"https://blog-rest-api-9yc5.onrender.com/post/6637b50db407f81b8f39439b","description":"<p>DELETE /post/postId</p>\n<ul>\n<li><p>Description: Deletes a specific post by its ID.</p>\n</li>\n<li><p>Authentication: Requires a valid JWT token in the Authorization header.</p>\n</li>\n<li><p>Path Parameter: postId (ID of the post to delete).</p>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["post","6637b50db407f81b8f39439b"],"host":["blog-rest-api-9yc5","onrender","com"],"query":[],"variable":[]}},"response":[{"id":"0bbf6d5c-c6d5-45b5-955d-a735a80f0d37","name":"Delete Post","originalRequest":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{token}}"}],"url":"https://blog-rest-api-9yc5.onrender.com/post/6637b50db407f81b8f39439b"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 05 May 2024 16:47:33 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"CF-Ray","value":"87f2368899cf8e81-DEL"},{"key":"CF-Cache-Status","value":"DYNAMIC"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"1a-so1XeLtyN9NGNuQhYTqGBta8aA8\""},{"key":"Vary","value":"Accept-Encoding"},{"key":"access-control-allow-headers","value":"Content-Type,Authorization"},{"key":"access-control-allow-methods","value":"GET,POST,PUT,PATCH,DELETE"},{"key":"rndr-id","value":"7b6d8ae9-ae11-49c7"},{"key":"x-powered-by","value":"Express"},{"key":"x-render-origin-server","value":"Render"},{"key":"Server","value":"cloudflare"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Deleted post\"\n}"}],"_postman_id":"1d48f428-afa3-4892-8ced-b90fc42d87a7"}]}