{"info":{"_postman_id":"0bb5a9a0-0733-4b90-b252-367c031694ce","name":"Property maintenance plugin","description":"<html><head></head><body><p>API documentation for Maintenance ticket plugin app</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"19111686","collectionId":"0bb5a9a0-0733-4b90-b252-367c031694ce","publishedId":"2s8YzUxMFN","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-12-13T10:20:38.000Z"},"item":[{"name":"Authentication","item":[{"name":"Login","id":"0852f4c9-3b20-47a5-b476-15245117532c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"Pirjo Mäkinen\",\r\n    \"password\": \"somePW\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/auth/login","description":"<p>Login and get token for the user</p>\n<h3 id=\"body\">Body</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>username</td>\n<td>String</td>\n<td>User's username</td>\n</tr>\n<tr>\n<td>password</td>\n<td>String</td>\n<td>User's password</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["login"],"host":["http://localhost:8000/auth"],"query":[],"variable":[]}},"response":[{"id":"6a0d3a33-09bc-4626-8e85-3eae189473dd","name":"Login","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"Pirjo Mäkinen\",\r\n    \"password\": \"somePW\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/auth/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"292"},{"key":"ETag","value":"W/\"124-ct3eiJGs5fkYlfw3+nGT12qxFkE\""},{"key":"Date","value":"Wed, 14 Dec 2022 15:01:07 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"user\": {\n        \"id\": 1,\n        \"employeeid\": \"Pirjo Mäkinen\",\n        \"email\": \"user1@test.com\",\n        \"role\": 1\n    },\n    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiZW1wbG95ZWVpZCI6IlBpcmpvIE3DpGtpbmVuIiwiZW1haWwiOiJ1c2VyMUB0ZXN0LmNvbSIsInJvbGUiOjEsImlhdCI6MTY3MTAzMDA2N30.s8B3ChHYyD807wPXlJkFLVHgClNeKR4QPcS4bgaWnZA\"\n}"}],"_postman_id":"0852f4c9-3b20-47a5-b476-15245117532c"}],"id":"2c523b6b-88d5-4b45-8ed8-6cc55a2873d7","_postman_id":"2c523b6b-88d5-4b45-8ed8-6cc55a2873d7","description":""},{"name":"Posts","item":[{"name":"Get all posts","id":"923afbe3-143e-42c6-8f51-235dbdb89f82","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"http://localhost:8000/post","urlObject":{"host":["http://localhost:8000/post"],"query":[],"variable":[]}},"response":[{"id":"72ae77c8-accf-45d4-b92a-e208233c1467","name":"New Request","originalRequest":{"method":"GET","header":[],"url":"http://localhost:8000/post"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"1083"},{"key":"ETag","value":"W/\"43b-Lbe//NRDvndJcKDGHmFILbvYhXo\""},{"key":"Date","value":"Tue, 13 Dec 2022 10:41:07 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 1,\n        \"user\": \"Tatu Ihaksi\",\n        \"description\": \"Vessanpöntössä ei ole vettä.\",\n        \"title\": \"Vessa rikki\",\n        \"location\": \"Vessa kerros 2\",\n        \"stateid\": 1,\n        \"state\": \"Processing\",\n        \"type\": \"Service advice\",\n        \"typeid\": 2,\n        \"created_date\": \"2022-12-13T10:40:20.000Z\",\n        \"closed_date\": null,\n        \"areamarker\": \"{\\\"top\\\":57.52162678350747,\\\"left\\\":43.87596899224806}\",\n        \"mediafilename\": null\n    },\n    {\n        \"id\": 2,\n        \"user\": \"Matti Stenvall\",\n        \"description\": \"Keittiö on pysynyt siistinä viime viikon konferensista huolimatta.\",\n        \"title\": \"Homma toimii!\",\n        \"location\": \"\",\n        \"stateid\": 0,\n        \"state\": \"Open\",\n        \"type\": \"Feeback\",\n        \"typeid\": 1,\n        \"created_date\": \"2022-12-13T10:40:20.000Z\",\n        \"closed_date\": null,\n        \"areamarker\": \"{\\\"top\\\":57.52162678350747,\\\"left\\\":43.87596899224806}\",\n        \"mediafilename\": null\n    },\n    {\n        \"id\": 3,\n        \"user\": \"Merili Elnadi\",\n        \"description\": \"Aulassa olevan sähköpistokkeen johdot roikkuvat.\",\n        \"title\": \"Aulan sähköpistoke\",\n        \"location\": \"Kerros 3 aula\",\n        \"stateid\": 0,\n        \"state\": \"Open\",\n        \"type\": \"Safety advice\",\n        \"typeid\": 3,\n        \"created_date\": \"2022-12-13T10:40:20.000Z\",\n        \"closed_date\": null,\n        \"areamarker\": \"{\\\"top\\\":57.52162678350747,\\\"left\\\":43.87596899224806}\",\n        \"mediafilename\": null\n    }\n]"}],"_postman_id":"923afbe3-143e-42c6-8f51-235dbdb89f82"},{"name":"Get posts by user","id":"ba450071-af08-4c54-a365-c27949ab6d94","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8000/post/user/:id","description":"<p>Get a list of posts by the given user</p>\n<h3 id=\"parameter\">Parameter</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Number</td>\n<td>Id of the user</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["user",":id"],"host":["http://localhost:8000/post"],"query":[],"variable":[{"type":"any","value":"2","key":"id"}]}},"response":[{"id":"de5f7298-1131-4f6a-b5b2-5ba27eac68a2","name":"Get posts by user","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:8000/post/user/:id","host":["http://localhost:8000/post"],"path":["user",":id"],"variable":[{"key":"id","value":"2"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"350"},{"key":"ETag","value":"W/\"15e-E3z9VZ0Mv1FPaMbKDjCM/ArVrqo\""},{"key":"Date","value":"Wed, 14 Dec 2022 11:45:47 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 1,\n        \"user\": \"Tatu Ihaksi\",\n        \"description\": \"Vessanpöntössä ei ole vettä.\",\n        \"title\": \"Vessa rikki\",\n        \"location\": \"Vessa kerros 2\",\n        \"stateid\": 1,\n        \"state\": \"Processing\",\n        \"type\": \"Service advice\",\n        \"typeid\": 2,\n        \"created_date\": \"2022-12-13T10:40:20.000Z\",\n        \"closed_date\": null,\n        \"areamarker\": \"{\\\"top\\\":57.52162678350747,\\\"left\\\":43.87596899224806}\",\n        \"mediafilename\": null\n    }\n]"}],"_postman_id":"ba450071-af08-4c54-a365-c27949ab6d94"},{"name":"Get posts by state","id":"ab2365f4-8a74-422d-9575-607f4e09745a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8000/post/state/:id","description":"<p>Get a list of posts with the given post state</p>\n<h3 id=\"parameter\">Parameter</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Number</td>\n<td>Id of the state</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["state",":id"],"host":["http://localhost:8000/post"],"query":[],"variable":[{"type":"any","value":"0","key":"id"}]}},"response":[{"id":"a100b834-2298-41ab-b947-d758edadcaf0","name":"Get posts by state","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:8000/post/state/:id","host":["http://localhost:8000/post"],"path":["state",":id"],"variable":[{"key":"id","value":"0"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"734"},{"key":"ETag","value":"W/\"2de-fIY9l1m/UUJg82uHJj10i/kGoX8\""},{"key":"Date","value":"Wed, 14 Dec 2022 11:49:15 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 2,\n        \"user\": \"Matti Stenvall\",\n        \"description\": \"Keittiö on pysynyt siistinä viime viikon konferensista huolimatta.\",\n        \"title\": \"Homma toimii!\",\n        \"location\": \"\",\n        \"stateid\": 0,\n        \"state\": \"Open\",\n        \"type\": \"Feeback\",\n        \"typeid\": 1,\n        \"created_date\": \"2022-12-13T10:40:20.000Z\",\n        \"closed_date\": null,\n        \"areamarker\": \"{\\\"top\\\":57.52162678350747,\\\"left\\\":43.87596899224806}\",\n        \"mediafilename\": null\n    },\n    {\n        \"id\": 3,\n        \"user\": \"Merili Elnadi\",\n        \"description\": \"Aulassa olevan sähköpistokkeen johdot roikkuvat.\",\n        \"title\": \"Aulan sähköpistoke\",\n        \"location\": \"Kerros 3 aula\",\n        \"stateid\": 0,\n        \"state\": \"Open\",\n        \"type\": \"Safety advice\",\n        \"typeid\": 3,\n        \"created_date\": \"2022-12-13T10:40:20.000Z\",\n        \"closed_date\": null,\n        \"areamarker\": \"{\\\"top\\\":57.52162678350747,\\\"left\\\":43.87596899224806}\",\n        \"mediafilename\": null\n    }\n]"}],"_postman_id":"ab2365f4-8a74-422d-9575-607f4e09745a"},{"name":"Send post","id":"813f23cf-fafa-4738-8199-78d0fe7d19a1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"userid","value":"4","type":"text"},{"key":"title","value":"Aulan sähköpistoke","type":"text"},{"key":"description","value":"Aulassa olevan sähköpistokkeen johdot roikkuvat.","type":"text"},{"key":"type","value":"3","type":"text"},{"key":"location","value":"Kerros 3 aula","type":"text"},{"key":"areamarker","value":"{\"top\":57.52162678350747,\"left\":43.87596899224806}","type":"text"},{"key":"media","type":"file","src":"/C:/Users/tatud/Pictures/pic.PNG"}]},"url":"http://localhost:8000/post","description":"<p>Upload a post with form-data</p>\n<h3 id=\"body\">Body</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>userid</td>\n<td>Number</td>\n<td>Post creator's ID</td>\n</tr>\n<tr>\n<td>title</td>\n<td>String</td>\n<td>Title for the post</td>\n</tr>\n<tr>\n<td>description</td>\n<td>String</td>\n<td>Description for the post</td>\n</tr>\n<tr>\n<td>type</td>\n<td>Number</td>\n<td>Id for the post type</td>\n</tr>\n<tr>\n<td>location</td>\n<td>String</td>\n<td>Described location</td>\n</tr>\n<tr>\n<td>areamarker</td>\n<td>Object</td>\n<td>Marker postion on the map</td>\n</tr>\n<tr>\n<td>media</td>\n<td>File</td>\n<td>Image file</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"host":["http://localhost:8000/post"],"query":[],"variable":[]}},"response":[{"id":"cbbfc83f-b62c-4986-ad89-cfbe37aeafba","name":"Send post","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"userid","value":"4","type":"text"},{"key":"title","value":"Aulan sähköpistoke","type":"text"},{"key":"description","value":"Aulassa olevan sähköpistokkeen johdot roikkuvat.","type":"text"},{"key":"type","value":"3","type":"text"},{"key":"location","value":"Kerros 3 aula","type":"text"},{"key":"areamarker","value":"{\"top\":57.52162678350747,\"left\":43.87596899224806}","type":"text"},{"key":"media","type":"file","src":"/C:/Users/tatud/Pictures/pic.PNG"}]},"url":"http://localhost:8000/post"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"37"},{"key":"ETag","value":"W/\"25-DrSse/Pn6tKlWSQaahVOBnBF3KQ\""},{"key":"Date","value":"Wed, 14 Dec 2022 12:05:58 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Post created with id: 5\"\n}"}],"_postman_id":"813f23cf-fafa-4738-8199-78d0fe7d19a1"},{"name":"Modify post","id":"4b963131-fa1a-42bf-b1f9-53f41e0154d0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"title\": \"Modified title\",\r\n    \"description\": \"Modified desc\",\r\n    \"location\": \"Modified location\",\r\n    \"type\": 2,\r\n    \"areamarker\": \"{}\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/post/:id","description":"<p>Modify given post</p>\n<h3 id=\"parameter\">Parameter</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Number</td>\n<td>Id of the post</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"body\">Body</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>title</td>\n<td>String</td>\n<td>Title for the post</td>\n</tr>\n<tr>\n<td>description</td>\n<td>String</td>\n<td>Description for the post</td>\n</tr>\n<tr>\n<td>location</td>\n<td>String</td>\n<td>Described location</td>\n</tr>\n<tr>\n<td>type</td>\n<td>Number</td>\n<td>Id for the post type</td>\n</tr>\n<tr>\n<td>areamarker</td>\n<td>Object</td>\n<td>Marker position on the map</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"http","port":"8000","path":["post",":id"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"4","key":"id"}]}},"response":[{"id":"a41a3b2e-5b56-404b-9232-f5b95b563f06","name":"Modify post","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"title\": \"Modified title\",\r\n    \"description\": \"Modified desc\",\r\n    \"location\": \"Modified location\",\r\n    \"type\": 2,\r\n    \"areamarker\": \"{}\"\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:8000/post/:id","protocol":"http","host":["localhost"],"port":"8000","path":["post",":id"],"variable":[{"key":"id","value":"4"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"33"},{"key":"ETag","value":"W/\"21-KEp8rU3SXsc1GKrIJ3+iPa1cn6o\""},{"key":"Date","value":"Wed, 14 Dec 2022 12:45:27 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Post modified: true\"\n}"}],"_postman_id":"4b963131-fa1a-42bf-b1f9-53f41e0154d0"},{"name":"Modify post state","id":"ba54915d-a893-4562-a159-eb9bcc7f11ed","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"state\": 2\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/post/state/:id","description":"<p>Modify the state of the given post</p>\n<h3 id=\"parameter\">Parameter</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Number</td>\n<td>Id of the post</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"body\">Body</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>state</td>\n<td>Number</td>\n<td>Id of the state</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"http","port":"8000","path":["post","state",":id"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"2","key":"id"}]}},"response":[{"id":"3ec5fe35-9654-4d2d-8b9a-881bc79d7e6d","name":"Modify post state","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"state\": 2\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:8000/post/state/:id","protocol":"http","host":["localhost"],"port":"8000","path":["post","state",":id"],"variable":[{"key":"id","value":"2"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"39"},{"key":"ETag","value":"W/\"27-O3vREwKdDpVojfogpW2UCXyg18I\""},{"key":"Date","value":"Wed, 14 Dec 2022 13:43:39 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Post state modified: true\"\n}"}],"_postman_id":"ba54915d-a893-4562-a159-eb9bcc7f11ed"}],"id":"434d8a11-5c2c-4c07-a182-89292f19ed4b","_postman_id":"434d8a11-5c2c-4c07-a182-89292f19ed4b","description":""},{"name":"Message","item":[{"name":"Get messages by post","id":"9822c8fd-b053-4a06-97e5-2322b4a295d6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8000/message/post/:id","description":"<p>Get a list of messages for the given post</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Number</td>\n<td>Id of the post</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["post",":id"],"host":["http://localhost:8000/message"],"query":[],"variable":[{"type":"any","value":"1","key":"id"}]}},"response":[{"id":"f3bbe1a8-0f30-4467-98a8-c211b9fd038a","name":"Get messages by post","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:8000/message/post/:id","host":["http://localhost:8000/message"],"path":["post",":id"],"variable":[{"key":"id","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"268"},{"key":"ETag","value":"W/\"10c-gEu5fV03wFprpu99Jjzk1/ACARI\""},{"key":"Date","value":"Tue, 13 Dec 2022 11:15:41 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 1,\n        \"text\": \"Tarkentaisitko, mikä vessa on kyseessä?\",\n        \"created_date\": \"2022-12-13T10:40:20.000Z\",\n        \"postid\": 1,\n        \"user\": \"Pirjo Mäkinen\",\n        \"userid\": 1\n    },\n    {\n        \"id\": 2,\n        \"text\": \"Some message\",\n        \"created_date\": \"2022-12-13T10:56:39.000Z\",\n        \"postid\": 1,\n        \"user\": \"Pirjo Mäkinen\",\n        \"userid\": 1\n    }\n]"}],"_postman_id":"9822c8fd-b053-4a06-97e5-2322b4a295d6"},{"name":"Send message","id":"f1e35ec7-4950-4a1d-bc7a-21754fbd1c2d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"postid\": 1,\r\n    \"text\": \"Some message\",\r\n    \"userid\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/message/","description":"<p>Send message for the post</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>postid</td>\n<td>Number</td>\n<td>Id of the post</td>\n</tr>\n<tr>\n<td>text</td>\n<td>String</td>\n<td>Message text</td>\n</tr>\n<tr>\n<td>userid</td>\n<td>Number</td>\n<td>Id of the sender</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":[""],"host":["http://localhost:8000/message"],"query":[],"variable":[]}},"response":[{"id":"91c7315f-8f1e-4ac7-a841-8dcaf05397ca","name":"Post message","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"postid\": 1,\r\n    \"text\": \"Some message\",\r\n    \"userid\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/message/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"40"},{"key":"ETag","value":"W/\"28-nxnYNkf8Y+FwARR6Vx8Zl4AC35Q\""},{"key":"Date","value":"Tue, 13 Dec 2022 10:56:39 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Message created with id: 2\"\n}"}],"_postman_id":"f1e35ec7-4950-4a1d-bc7a-21754fbd1c2d"},{"name":"Modify message","id":"9c8bc427-4d81-41f0-9da9-603b2a4f1638","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"text\": \"This is a modified message\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/message/:id","description":"<p>Modify the text content of the message</p>\n<h3 id=\"parameter\">Parameter</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>Number</td>\n<td>Id of the message</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"body\">Body</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>text</td>\n<td>String</td>\n<td>Message text</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":[":id"],"host":["http://localhost:8000/message"],"query":[],"variable":[{"type":"any","value":"1","key":"id"}]}},"response":[{"id":"9f9c992f-778b-44ab-9c4c-1308523e7bd4","name":"Modify message","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"text\": \"This is a modified message\"\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:8000/message/:id","host":["http://localhost:8000/message"],"path":[":id"],"variable":[{"key":"id","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"36"},{"key":"ETag","value":"W/\"24-FmUS//FfLRSW469NlkTxFNDYSjc\""},{"key":"Date","value":"Tue, 13 Dec 2022 11:32:17 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Message modified: true\"\n}"}],"_postman_id":"9c8bc427-4d81-41f0-9da9-603b2a4f1638"},{"name":"Get viewed messages","id":"37f751b4-c9ac-4187-9d4f-1fe158e51f6f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8000/message/viewed/:postid/:userid","description":"<p>Get a list of messages for given post viewed by user</p>\n<h3 id=\"parameters\">Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Field</strong></th>\n<th><strong>Type</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>postid</td>\n<td>Number</td>\n<td>Id of the post</td>\n</tr>\n<tr>\n<td>userid</td>\n<td>Number</td>\n<td>Id of the viewer</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"path":["viewed",":postid",":userid"],"host":["http://localhost:8000/message"],"query":[],"variable":[{"type":"any","value":"1","key":"postid"},{"type":"any","value":"1","key":"userid"}]}},"response":[{"id":"3ab1e408-54f3-4b85-9894-ac1cbc88aa15","name":"Get viewed messages","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:8000/message/viewed/:postid/:userid","host":["http://localhost:8000/message"],"path":["viewed",":postid",":userid"],"variable":[{"key":"postid","value":"1"},{"key":"userid","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"55"},{"key":"ETag","value":"W/\"37-yOaK8uv7iKVQRKYSLeFuuW2lGys\""},{"key":"Date","value":"Tue, 13 Dec 2022 11:55:59 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"userid\": 1,\n        \"messageid\": 1\n    },\n    {\n        \"userid\": 1,\n        \"messageid\": 2\n    }\n]"}],"_postman_id":"37f751b4-c9ac-4187-9d4f-1fe158e51f6f"},{"name":"Add message to viewed","id":"e5a26c50-389e-419a-881a-e0bc1a7dc770","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"userid\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/message/:id","description":"<p>Mark the given message to be viewed by user</p>\n","urlObject":{"protocol":"http","port":"8000","path":["message",":id"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"1","key":"id"}]}},"response":[{"id":"990a5039-b026-4580-ba23-7fd0c324293a","name":"Add viewed message","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"userid\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:8000/message/:id","protocol":"http","host":["localhost"],"port":"8000","path":["message",":id"],"variable":[{"key":"id","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"40"},{"key":"ETag","value":"W/\"28-ItWcwsuf/JNhMhOL/NJsJc3y6yg\""},{"key":"Date","value":"Tue, 13 Dec 2022 11:59:10 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Message added to viewed: 6\"\n}"}],"_postman_id":"e5a26c50-389e-419a-881a-e0bc1a7dc770"}],"id":"11d14a2e-b752-4022-b226-30a09d57b8a2","_postman_id":"11d14a2e-b752-4022-b226-30a09d57b8a2","description":""}],"variable":[{"key":"baseUrl","value":"http://localhost:8000/"}]}