{"info":{"_postman_id":"3684cf54-a80f-45da-b372-8492dbbc6568","name":"simple-blog-posts","description":"<html><head></head><body><h1 id=\"blog-posts-api\">Blog Posts API</h1>\n<p>This API manages simple CRUD operations for a blog. The collection contains sample requests that show how each endpoint in the API works.</p>\n<h2 id=\"available-requests\">Available Requests</h2>\n<ul>\n<li>Add/Create new blog post</li>\n<li>Retrieve all available blog posts</li>\n<li>Retrieve single blog post using its ID</li>\n<li>Update existing blog post</li>\n<li>Delete existing blog post</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Blog Posts API","slug":"blog-posts-api"}],"owner":"15381378","collectionId":"3684cf54-a80f-45da-b372-8492dbbc6568","publishedId":"2s7YYr852c","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-09-12T19:41:37.000Z"},"item":[{"name":"CREATE BLOG POST","id":"08928f91-9818-482f-8ffc-572f3ef15a9a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"Testing DELETE controller\",\n    \"body\": \"I'm expecting this to be deleted soon, but if you see this among the blog posts list, then everything is working fine :)\",\n    \"author\": \"Marvellous Chimaraoke\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:8080/api/v1/posts","description":"<p>API endpoint to allow a user add/create a new blog post.</p>\n<blockquote>\n<p>A successful request should result in a <em>HTTP 201</em> status code.</p>\n</blockquote>\n<blockquote>\n<p>An unsuccessful request should result in a <em>HTTP 400</em> status code.</p>\n</blockquote>\n","urlObject":{"port":"8080","path":["api","v1","posts"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"0b7de5e0-a2a1-4ad6-888f-55d0147a4f31","name":"Successful Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"Testing DELETE controller\",\n    \"body\": \"I'm expecting this to be deleted soon, but if you see this among the blog posts list, then everything is working fine :)\",\n    \"author\": \"Marvellous Chimaraoke\"\n}","options":{"raw":{"language":"json"}}},"url":"https://blogposts.up.railway.app/api/v1/posts"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"date","value":"Mon, 12 Sep 2022 18:52:41 GMT"},{"key":"content-length","value":"338"},{"key":"x-envoy-upstream-service-time","value":"13"},{"key":"server","value":"railway"},{"key":"connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"post\": {\n        \"ID\": 1,\n        \"CreatedAt\": \"2022-09-12T18:52:41.063182091Z\",\n        \"UpdatedAt\": \"2022-09-12T18:52:41.063182091Z\",\n        \"DeletedAt\": null,\n        \"title\": \"Testing DELETE controller\",\n        \"body\": \"I'm expecting this to be deleted soon, but if you see this among the blog posts list, then everything is working fine :)\",\n        \"author\": \"Marvellous Chimaraoke\"\n    },\n    \"success\": true\n}"},{"id":"ac0966ec-182d-4a94-9db9-efc0d9d7ed04","name":"Failed Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"\",\n    \"body\": \"I'm expecting this to be deleted soon, but if you see this among the blog posts list, then everything is working fine :)\",\n    \"author\": \"Marvellous Chimaraoke\"\n}","options":{"raw":{"language":"json"}}},"url":"https://blogposts.up.railway.app/api/v1/posts"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"date","value":"Mon, 12 Sep 2022 20:02:45 GMT"},{"key":"content-length","value":"84"},{"key":"x-envoy-upstream-service-time","value":"11"},{"key":"server","value":"railway"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Bad request: could not create new blog post\",\n    \"success\": false\n}"}],"_postman_id":"08928f91-9818-482f-8ffc-572f3ef15a9a"},{"name":"GET BLOG POSTS","id":"1ca76d9d-9e45-4dff-81bb-26f7278fd869","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"localhost:8080/api/v1/posts","description":"<p>API endpoint to retrieve all blog posts from the blog posts database.</p>\n<blockquote>\n<p>A successful request should result in a <em>HTTP 200</em> status code.</p>\n</blockquote>\n","urlObject":{"port":"8080","path":["api","v1","posts"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"0d90cbba-c02a-4114-a8d3-821a98044599","name":"Successful Request","originalRequest":{"method":"GET","header":[],"url":"https://blogposts.up.railway.app/api/v1/posts"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"date","value":"Mon, 12 Sep 2022 19:01:44 GMT"},{"key":"content-length","value":"335"},{"key":"x-envoy-upstream-service-time","value":"25"},{"key":"server","value":"railway"}],"cookie":[],"responseTime":null,"body":"{\n    \"posts\": [\n        {\n            \"ID\": 1,\n            \"CreatedAt\": \"2022-09-12T18:52:41.063182Z\",\n            \"UpdatedAt\": \"2022-09-12T18:52:41.063182Z\",\n            \"DeletedAt\": null,\n            \"title\": \"Testing DELETE controller\",\n            \"body\": \"I'm expecting this to be deleted soon, but if you see this among the blog posts list, then everything is working fine :)\",\n            \"author\": \"Marvellous Chimaraoke\"\n        }\n    ],\n    \"success\": true\n}"}],"_postman_id":"1ca76d9d-9e45-4dff-81bb-26f7278fd869"},{"name":"GET BLOG POST","id":"f35fb77d-f494-4fd0-8f62-c7814f2538de","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://blogposts.up.railway.app/api/v1/posts/{id}","description":"<p>API endpoint to retrieve an existing blog post on the from the blog posts database.</p>\n<blockquote>\n<p>A successful request should result in a <em>HTTP 200</em> status code.</p>\n</blockquote>\n<blockquote>\n<p>An unsuccessful request should result in a <em>HTTP 404</em> status code.</p>\n</blockquote>\n","urlObject":{"protocol":"https","path":["api","v1","posts","{id}"],"host":["blogposts","up","railway","app"],"query":[],"variable":[]}},"response":[{"id":"0228d01e-a929-40e9-8909-3ee174b11559","name":"Successful Request","originalRequest":{"method":"GET","header":[],"url":"https://blogposts.up.railway.app/api/v1/posts/1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"date","value":"Mon, 12 Sep 2022 19:07:48 GMT"},{"key":"content-length","value":"332"},{"key":"x-envoy-upstream-service-time","value":"5"},{"key":"server","value":"railway"},{"key":"connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"post\": {\n        \"ID\": 1,\n        \"CreatedAt\": \"2022-09-12T18:52:41.063182Z\",\n        \"UpdatedAt\": \"2022-09-12T18:52:41.063182Z\",\n        \"DeletedAt\": null,\n        \"title\": \"Testing DELETE controller\",\n        \"body\": \"I'm expecting this to be deleted soon, but if you see this among the blog posts list, then everything is working fine :)\",\n        \"author\": \"Marvellous Chimaraoke\"\n    },\n    \"success\": true\n}"},{"id":"384dddbe-7fd4-48c0-88c7-d281544ab0f4","name":"Failed Request","originalRequest":{"method":"GET","header":[],"url":"https://blogposts.up.railway.app/api/v1/posts/88"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"date","value":"Mon, 12 Sep 2022 19:09:54 GMT"},{"key":"content-length","value":"65"},{"key":"x-envoy-upstream-service-time","value":"26"},{"key":"server","value":"railway"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"blog post with id {88} does not exist\",\n    \"success\": false\n}"}],"_postman_id":"f35fb77d-f494-4fd0-8f62-c7814f2538de"},{"name":"UPDATE BLOG POST","id":"e49638ca-ec2c-4aaa-b19f-e12b4137f51b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"Testing POST Controller - I made an edit to this title :)\"\n}","options":{"raw":{"language":"json"}}},"url":"https://blogposts.up.railway.app/api/v1/posts/{id}","description":"<p>API endpoint to update the details of an existing blog post in the database.</p>\n<blockquote>\n<p>A successful request should result in a <em>HTTP 200</em> status code.</p>\n</blockquote>\n<blockquote>\n<p>An unsuccessful request should result in a <em>HTTP 404</em> status code.</p>\n</blockquote>\n","urlObject":{"protocol":"https","path":["api","v1","posts","{id}"],"host":["blogposts","up","railway","app"],"query":[],"variable":[]}},"response":[{"id":"0ab913b6-2285-4e94-b5f6-a8f6250314c3","name":"Successful Request","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"Testing POST Controller - I made an edit to this title :)\"\n}","options":{"raw":{"language":"json"}}},"url":"https://blogposts.up.railway.app/api/v1/posts/1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"date","value":"Mon, 12 Sep 2022 19:12:31 GMT"},{"key":"content-length","value":"367"},{"key":"x-envoy-upstream-service-time","value":"5"},{"key":"server","value":"railway"},{"key":"connection","value":"close"}],"cookie":[],"responseTime":null,"body":"{\n    \"post\": {\n        \"ID\": 1,\n        \"CreatedAt\": \"2022-09-12T18:52:41.063182Z\",\n        \"UpdatedAt\": \"2022-09-12T19:12:31.240938672Z\",\n        \"DeletedAt\": null,\n        \"title\": \"Testing POST Controller - I made an edit to this title :)\",\n        \"body\": \"I'm expecting this to be deleted soon, but if you see this among the blog posts list, then everything is working fine :)\",\n        \"author\": \"Marvellous Chimaraoke\"\n    },\n    \"success\": true\n}"},{"id":"3a59d51a-4d99-4c2d-ab75-25a3b5c96e5b","name":"Failed Request","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"Testing POST Controller - I made an edit to this title :)\"\n}","options":{"raw":{"language":"json"}}},"url":"https://blogposts.up.railway.app/api/v1/posts/26"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"date","value":"Mon, 12 Sep 2022 19:16:13 GMT"},{"key":"content-length","value":"65"},{"key":"x-envoy-upstream-service-time","value":"10"},{"key":"server","value":"railway"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"blog post with id {26} does not exist\",\n    \"success\": false\n}"}],"_postman_id":"e49638ca-ec2c-4aaa-b19f-e12b4137f51b"},{"name":"DELETE BLOG POST","id":"ce268ca3-bfb6-489d-8477-d756a1303280","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"https://blogposts.up.railway.app/api/v1/posts/{id}","description":"<p>API endpoint to delete a blog post from the database.</p>\n<blockquote>\n<p>A successful request should result in a <em>HTTP 200</em> status code.</p>\n</blockquote>\n<blockquote>\n<p>An unsuccessful request should result in a <em>HTTP 404</em> status code.</p>\n</blockquote>\n","urlObject":{"protocol":"https","path":["api","v1","posts","{id}"],"host":["blogposts","up","railway","app"],"query":[],"variable":[]}},"response":[{"id":"9fbaef8a-a3ad-4e3e-afc5-3d95e20a2440","name":"Successful Request","originalRequest":{"method":"DELETE","header":[],"url":"https://blogposts.up.railway.app/api/v1/posts/1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 12 Sep 2022 18:35:16 GMT"},{"key":"Content-Length","value":"54"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"post deleted successfully\",\n    \"success\": true\n}"},{"id":"9ce582db-5893-471b-b652-51d36cc9d8c3","name":"Failed Request","originalRequest":{"method":"DELETE","header":[],"url":"https://blogposts.up.railway.app/api/v1/posts/24"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"content-type","value":"application/json; charset=utf-8"},{"key":"date","value":"Mon, 12 Sep 2022 19:35:48 GMT"},{"key":"content-length","value":"65"},{"key":"x-envoy-upstream-service-time","value":"27"},{"key":"server","value":"railway"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"blog post with id {24} does not exist\",\n    \"success\": false\n}"}],"_postman_id":"ce268ca3-bfb6-489d-8477-d756a1303280"}]}