{"info":{"_postman_id":"6aef0f71-1d5c-44e5-ae92-5162642ed00b","name":"Teamwork Api","description":"<html><head></head><body><p>Teamwork is an internal social network for organizations’ employees. The goal of this\napplication is to facilitate more interaction between colleagues and facilitate team bonding </p>\n<p>These are the backend routes for the teamwork api which include POST GET PATCH DELETE</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"8823206","collectionId":"6aef0f71-1d5c-44e5-ae92-5162642ed00b","publishedId":"SVn2NbR1","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2019-10-02T06:53:50.000Z"},"item":[{"name":"Signup","event":[{"listen":"test","script":{"id":"1b20daca-7476-4175-af32-d7ec322aebbd","exec":["var genToken = JSON.parse(responseBody);","postman.setEnvironmentVariable('bearer', genToken.data.token);",""],"type":"text/javascript"}}],"id":"dc136d03-7bf7-4de6-89bd-5df0f6788cc7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"firstname\": \"Micheal\",\n    \"lastname\": \"Douglas\",\n\t\"email\": \"micheal@test.com\",\n    \"password\": \"Michealtest1!\",\n    \"confirmPassword\": \"Michealtest1!\",\n    \"gender\": \"Male\",\n    \"jobRole\": \"Backend engineer\",\n    \"department\": \"Egineering\",\n    \"address\": \"Kampala\"\n}"},"url":"localhost:3000/api/v1/auth/signup","description":"<p>This is a POST request allowing a user to create an account on the Teamwork app and returns a jwt token for the user to make subrequest calls</p>\n","urlObject":{"port":"3000","path":["api","v1","auth","signup"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"dc136d03-7bf7-4de6-89bd-5df0f6788cc7"},{"name":"Signin","event":[{"listen":"test","script":{"id":"37fade39-5244-482e-8788-7446fb5afd8b","exec":["var genToken = JSON.parse(responseBody);","postman.setEnvironmentVariable('bearer', genToken.data.token);",""],"type":"text/javascript"}}],"id":"fe537fbd-baa7-4a5b-8abd-2e94355af9dc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"email\": \"jessica@test.com\",\n    \"password\": \"Jessicatest1!\"\n}"},"url":"localhost:3000/api/v1/auth/signin","description":"<p>This is a sigin/login POST request allowing a user to successfully login into his/her account and returns a jwt token for the user to make subrequest calls</p>\n","urlObject":{"port":"3000","path":["api","v1","auth","signin"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"fe537fbd-baa7-4a5b-8abd-2e94355af9dc"},{"name":"Post Article","id":"f6b19c16-8c41-4e19-90c2-ff3b1600d7c5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"{{bearer}}","type":"text"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"title\": \"Front end\",\n\t\"article\": \"Do you want to be a frontend designer join the HUB\"\n}"},"url":"localhost:3000/api/v1/articles","description":"<p>This is a POST request which enables a user to create and post an article that can be seen by other colleagues and returns a status of 200 with the new article posted and an id</p>\n","urlObject":{"port":"3000","path":["api","v1","articles"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"f6b19c16-8c41-4e19-90c2-ff3b1600d7c5"},{"name":"View Articles","id":"ad7e3964-63c2-4b98-88b3-97606d265518","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"{{bearer}}","type":"text"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"localhost:3000/api/v1/feeds","description":"<p>This is a GET request that allows users to view articles posted by other users and returns a status of 200 with the articles posted</p>\n","urlObject":{"port":"3000","path":["api","v1","feeds"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"ad7e3964-63c2-4b98-88b3-97606d265518"},{"name":"View Specific Article","id":"17ec4770-cc22-461b-9bd7-0b2698c46764","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"{{bearer}}","type":"text"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"localhost:3000/api/v1/articles/2","description":"<p>This route is a GET request that fetches and shows a specific article with an ID provided and returns a status of 200</p>\n","urlObject":{"port":"3000","path":["api","v1","articles","2"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"17ec4770-cc22-461b-9bd7-0b2698c46764"},{"name":"Edit Article","id":"a40d74b9-2e14-488b-9f98-b4ecafb98ba1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[{"key":"Authorization","value":"{{bearer}}","type":"text"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"title\": \"Freelancing\",\n\t\"article\": \"Do you want to be a freelance developer and earn alot of money, say no more with upwork.com up on the market\"\n}"},"url":"localhost:3000/api/v1/articles/2","description":"<p>A PATCH request that edits an already posted article with a given ID and returns a status of 200</p>\n","urlObject":{"port":"3000","path":["api","v1","articles","2"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a40d74b9-2e14-488b-9f98-b4ecafb98ba1"},{"name":"Comment on Article","id":"043bfdaa-593f-4a69-a55a-836002102a1b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"{{bearer}}","type":"text"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"flag\": true\n}"},"url":"localhost:3000/api/v2/articles/457060e8-7273-48bf-8f56-ed423eb7432c/comments/443def19-7eb4-40f1-bac2-a4d1ebfb9369","description":"<p>A POST request that enables a user to post a comment on a specific article with an ID provided and returns a status of 201</p>\n","urlObject":{"port":"3000","path":["api","v2","articles","457060e8-7273-48bf-8f56-ed423eb7432c","comments","443def19-7eb4-40f1-bac2-a4d1ebfb9369"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"043bfdaa-593f-4a69-a55a-836002102a1b"},{"name":"Delete Article","id":"00b32c78-790f-44af-86a2-f163052c3b00","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"{{bearer}}","type":"text"},{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"localhost:3000/api/v1/articles/4","description":"<p>A DELETE request enabling a user to delete a posted article with a specific ID and returns a status of 204 </p>\n","urlObject":{"port":"3000","path":["api","v1","articles","4"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"00b32c78-790f-44af-86a2-f163052c3b00"},{"name":"Flag Article","id":"24680f89-b8ac-466b-ab61-064f85ab761e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"{{bearer}}"}],"body":{"mode":"raw","raw":"{\n\t\"flag\": true\n}"},"url":"localhost:3000/api/v1/articles/1","description":"<p>This is a post request which a posts a flag on a specific article with an given id and it is boolean i.e either true or false</p>\n","urlObject":{"port":"3000","path":["api","v1","articles","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"24680f89-b8ac-466b-ab61-064f85ab761e"},{"name":"Delete flagged Article","id":"1890edf8-8abf-4dcf-8529-f5bd0b0654ae","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","type":"text","value":"{{bearer}}"}],"url":"localhost:3000/api/v1/flagged/articles/1","description":"<p>This is an admin DELETE route and it deletes a specific article with a given ID that the admin has viewed to be flagged inappropiate by other users</p>\n","urlObject":{"port":"3000","path":["api","v1","flagged","articles","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"1890edf8-8abf-4dcf-8529-f5bd0b0654ae"}]}