{"info":{"_postman_id":"2b052567-809b-4b40-a90c-e26f74cc6a99","name":"Comment Apis","description":"<html><head></head><body><p><strong>Comment APIs Collection:</strong></p>\n<p>This collection consists of endpoints to manage comments on blog posts.</p>\n<ol>\n<li><p><strong>Create Comment:</strong></p>\n<ul>\n<li><p><strong>Endpoint:</strong> POST /api/v1/comments</p>\n</li>\n<li><p><strong>Description:</strong> Allows authenticated users to create comments on a specified blog post.</p>\n</li>\n<li><p><strong>Request Body:</strong> comment, blogId</p>\n</li>\n<li><p><strong>Response:</strong> 201 Created, 400 Bad Request, 404 Not Found, 500 Internal Server Error</p>\n</li>\n<li><p><strong>Notes:</strong> User must be logged in and verified. Rate limiting applied.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Edit Comment:</strong></p>\n<ul>\n<li><p><strong>Endpoint:</strong> PUT /api/v1/comments/:commentId</p>\n</li>\n<li><p><strong>Description:</strong> Allows authenticated users to edit their own comments on a specified blog post.</p>\n</li>\n<li><p><strong>Request Body:</strong> comment</p>\n</li>\n<li><p><strong>Response:</strong> 200 OK, 400 Bad Request, 403 Forbidden, 404 Not Found, 500 Internal Server Error</p>\n</li>\n<li><p><strong>Notes:</strong> User must be logged in and authorized. Rate limiting applied.</p>\n</li>\n</ul>\n</li>\n<li><p><strong>Delete Comment:</strong></p>\n<ul>\n<li><p><strong>Endpoint:</strong> DELETE /api/v1/comments/:commentId</p>\n</li>\n<li><p><strong>Description:</strong> Allows authenticated users to delete their own comments on a specified blog post.</p>\n</li>\n<li><p><strong>Response:</strong> 200 OK, 403 Forbidden, 404 Not Found, 500 Internal Server Error</p>\n</li>\n<li><p><strong>Notes:</strong> User must be logged in and authorized. Rate limiting applied.</p>\n</li>\n</ul>\n</li>\n</ol>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"31843425","collectionId":"2b052567-809b-4b40-a90c-e26f74cc6a99","publishedId":"2sA2xk1BcC","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-03-13T12:56:00.000Z"},"item":[{"name":"Create Comment","id":"5515a97f-eefc-4e7b-9e09-d2a6c55cd870","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"inherit","inherit":{"basicConfig":[]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"comment","value":"Good content","type":"text","id":0},{"key":"blogId","value":"65e0b1ed2caebb67117796d4","type":"text","id":1}]},"url":"{{server}}/comments","description":"<p><strong>Endpoint:</strong> POST /api/v1/comments</p>\n<p><strong>Description:</strong> This endpoint allows authenticated users to create comments on a specified blog post. The user needs to provide the content of the comment and the ID of the blog post to which the comment will be added.</p>\n<p><strong>Request Body:</strong></p>\n<ul>\n<li><strong>comment:</strong> The content of the comment that the user wants to post.</li>\n<li><strong>blogId:</strong> The unique identifier of the blog post to which the comment will be added.</li>\n</ul>\n<p><strong>Response:</strong></p>\n<ul>\n<li><strong>201 Created:</strong> The comment was successfully created and added to the specified blog post.</li>\n<li><strong>400 Bad Request:</strong> If either the comment content or the blog ID is missing from the request.</li>\n<li><strong>404 Not Found:</strong> If the specified blog post does not exist.</li>\n<li><strong>500 Internal Server Error:</strong> If there is a server-side issue preventing the creation of the comment.</li>\n</ul>\n<p><strong>Notes:</strong></p>\n<ul>\n<li>The user must be logged in and verified to create a comment.</li>\n<li>Rate limiting is applied to prevent over requests.</li>\n</ul>\n","urlObject":{"path":["comments"],"host":["{{server}}"],"query":[],"variable":[]}},"response":[{"id":"6cf30ec0-e80e-41b8-b62e-087da2640d76","name":"Create Comment","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"comment","value":"Good Information about Frontend","type":"text","id":0},{"key":"blogId","value":"65ef07795b5510e9e92ddd60","type":"text","id":1}]},"url":"{{server}}/comments"},"status":"Created","code":201,"_postman_previewlanguage":"JSON","header":[{"key":"Server","value":"nginx","type":"text"},{"key":"Date","value":"Tue, 12 Mar 2024 12:26:41 GMT","type":"text"},{"key":"Content-Type","value":"application/json; charset=utf-8","type":"text"},{"key":"Content-Length","value":"51","type":"text"},{"key":"Connection","value":"keep-alive","type":"text"},{"key":"X-Powered-By","value":"Express","type":"text"},{"key":"Vary","value":"Origin","type":"text"},{"key":"Access-Control-Allow-Credentials","value":"true","type":"text"},{"key":"X-RateLimit-Limit","value":"8","type":"text"},{"key":"X-RateLimit-Remaining","value":"3","type":"text"},{"key":"X-RateLimit-Reset","value":"1710246658","type":"text"},{"key":"ETag","value":"W/\"33-BfDQHCWItd+3/4taYyl/E97+psg\"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Commented Successfully\"\n}"}],"_postman_id":"5515a97f-eefc-4e7b-9e09-d2a6c55cd870"},{"name":"Edit Comment","id":"ec174d38-ccbf-417e-8ed2-2ef9390bc2f5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"inherit","inherit":{"basicConfig":[]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"comment","value":"Good content edited","type":"text","id":0}]},"url":"{{server}}/comments/65eb165c2ba96220fabece26","description":"<p><strong>Endpoint:</strong> PUT /api/v1/comments/:commentId</p>\n<p><strong>Description:</strong> This endpoint allows authenticated users to edit their own comments on a specified blog post. Users need to provide the ID of the comment they want to edit along with the updated content.</p>\n<p><strong>Request Body:</strong></p>\n<ul>\n<li><strong>comment:</strong> The updated content of the comment.</li>\n</ul>\n<p><strong>Response:</strong></p>\n<ul>\n<li><p><strong>200 OK:</strong> The comment was successfully updated.</p>\n</li>\n<li><p><strong>400 Bad Request:</strong> If the comment content is missing from the request.</p>\n</li>\n<li><p><strong>403 Forbidden:</strong> If the user is not authorized to edit the comment (e.g., if the user did not create the comment).</p>\n</li>\n<li><p><strong>404 Not Found:</strong> If the specified comment does not exist.</p>\n</li>\n<li><p><strong>500 Internal Server Error:</strong> If there is a server-side issue preventing the update of the comment.</p>\n</li>\n</ul>\n<p><strong>Notes:</strong></p>\n<ul>\n<li><p>The user must be logged in and authorized to edit the comment.</p>\n</li>\n<li><p>Rate limiting is applied to prevent abuse.</p>\n</li>\n</ul>\n","urlObject":{"path":["comments","65eb165c2ba96220fabece26"],"host":["{{server}}"],"query":[],"variable":[]}},"response":[{"id":"bf0fea9c-69e4-49d1-bece-9aa723decde8","name":"Edit Comment","originalRequest":{"method":"PUT","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"comment","value":"Edited : Fronted is very much high in demand","type":"text","id":0}]},"url":"{{server}}/comments/65f04a1e84b051f87c4d3494"},"status":"OK","code":200,"_postman_previewlanguage":"JSON","header":[{"key":"Server","value":"nginx","type":"text"},{"key":"Date","value":"Tue, 12 Mar 2024 12:28:33 GMT","type":"text"},{"key":"Content-Type","value":"application/json; charset=utf-8","type":"text"},{"key":"Content-Length","value":"44","type":"text"},{"key":"Connection","value":"keep-alive","type":"text"},{"key":"X-Powered-By","value":"Express","type":"text"},{"key":"Vary","value":"Origin","type":"text"},{"key":"Access-Control-Allow-Credentials","value":"true","type":"text"},{"key":"X-RateLimit-Limit","value":"8","type":"text"},{"key":"X-RateLimit-Remaining","value":"7","type":"text"},{"key":"X-RateLimit-Reset","value":"1710246814","type":"text"},{"key":"ETag","value":"W/\"2c-RctaDo2FZz8zzH3deYcI3nVqNpA\"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Comment Updated\"\n}"}],"_postman_id":"ec174d38-ccbf-417e-8ed2-2ef9390bc2f5"},{"name":"Delete Comment","id":"31b8fb90-c3f6-4907-85a2-3d03a7882ed8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"inherit","inherit":{"basicConfig":[]},"isInherited":false},"method":"DELETE","header":[],"body":{"mode":"urlencoded","urlencoded":[]},"url":"{{server}}/comments/65eb165c2ba96220fabece26","description":"<p><strong>Endpoint:</strong> DELETE /api/v1/comments/:commentId</p>\n<p><strong>Description:</strong> This endpoint allows authenticated users to delete their own comments on a specified blog post. Users need to provide the ID of the comment they want to delete.</p>\n<p><strong>Response:</strong></p>\n<ul>\n<li><p><strong>200 OK:</strong> The comment was successfully deleted.</p>\n</li>\n<li><p><strong>403 Forbidden:</strong> If the user is not authorized to delete the comment (e.g., if the user did not create the comment).</p>\n</li>\n<li><p><strong>404 Not Found:</strong> If the specified comment does not exist.</p>\n</li>\n<li><p><strong>500 Internal Server Error:</strong> If there is a server-side issue preventing the deletion of the comment.</p>\n</li>\n</ul>\n<p><strong>Notes:</strong></p>\n<ul>\n<li><p>The user must be logged in and authorized to delete the comment.</p>\n</li>\n<li><p>Rate limiting is applied to prevent abuse.</p>\n</li>\n</ul>\n","urlObject":{"path":["comments","65eb165c2ba96220fabece26"],"host":["{{server}}"],"query":[],"variable":[]}},"response":[{"id":"b6f654a6-766e-4deb-8d1f-88735c42ff11","name":"Delete Comment","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"urlencoded","urlencoded":[]},"url":"{{server}}/comments/65f04a1e84b051f87c4d3494"},"status":"OK","code":200,"_postman_previewlanguage":"JSON","header":[{"key":"Server","value":"nginx","type":"text"},{"key":"Date","value":"Tue, 12 Mar 2024 12:29:04 GMT","type":"text"},{"key":"Content-Type","value":"application/json; charset=utf-8","type":"text"},{"key":"Content-Length","value":"57","type":"text"},{"key":"Connection","value":"keep-alive","type":"text"},{"key":"X-Powered-By","value":"Express","type":"text"},{"key":"Vary","value":"Origin","type":"text"},{"key":"Access-Control-Allow-Credentials","value":"true","type":"text"},{"key":"X-RateLimit-Limit","value":"5","type":"text"},{"key":"X-RateLimit-Remaining","value":"4","type":"text"},{"key":"X-RateLimit-Reset","value":"1710246845","type":"text"},{"key":"ETag","value":"W/\"39-3wNSX2zqQ1/8B8c4vXR4x1IbeIQ\"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"success\": true,\n    \"message\": \"Comment deleted successfully\"\n}"}],"_postman_id":"31b8fb90-c3f6-4907-85a2-3d03a7882ed8"}]}