{"info":{"_postman_id":"9be5f57b-b93b-4565-85c5-351307ae27f6","name":"Notes-RestApi","description":"<html><head></head><body><p>Project on GitHub: <a href=\"https://github.com/Mi-As/Note-RestApi/\">https://github.com/Mi-As/Note-RestApi/</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"12797884","collectionId":"9be5f57b-b93b-4565-85c5-351307ae27f6","publishedId":"TVKHVFRm","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-09-27T16:04:44.000Z"},"item":[{"name":"Authentication","item":[{"name":"/login","id":"b695aa1a-9f23-4d95-aaa5-1f01c6df6e7a","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\":\"\",\n\t\"password\":\"\"\n}"},"url":"localhost:5000/login","description":"<p>login with email and password; \nreturns access and refresh token for identification</p>\n","urlObject":{"port":"5000","path":["login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b695aa1a-9f23-4d95-aaa5-1f01c6df6e7a"},{"name":"/refresh","id":"2dbaae9d-8285-498f-90e4-697c2df08adc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"Bearer {{jwt_refresh_token}}"}],"url":"localhost:5000/refresh","description":"<p>refreshs token if it isn't valid anymore</p>\n","urlObject":{"port":"5000","path":["refresh"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"2dbaae9d-8285-498f-90e4-697c2df08adc"},{"name":"/logout","id":"a9fc03ee-36a6-412a-ab84-2023fcba5072","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"Bearer {{jwt_token}}"}],"url":"localhost:5000/logout","description":"<p>logout current user (add token to blacklist)</p>\n","urlObject":{"port":"5000","path":["logout"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a9fc03ee-36a6-412a-ab84-2023fcba5072"}],"id":"85acdc12-f4cf-44d5-b2cc-56c7446d6b30","description":"<p>Token based authentication.</p>\n","event":[{"listen":"prerequest","script":{"id":"1c423579-4764-40ac-8bc9-80e2cfc95f72","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"e156e1d2-5421-41f7-8ba1-7b580e8f3cf3","type":"text/javascript","exec":[""]}}],"_postman_id":"85acdc12-f4cf-44d5-b2cc-56c7446d6b30"},{"name":"Users","item":[{"name":"/user","id":"fbdace54-bf01-49c3-b9d2-b6832bb8e9e2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\":\"\",\n    \"email\":\"\",\n    \"password\":\"\"\n}"},"url":"localhost:5000/user","description":"<p>creates new user</p>\n<p>parameters must include: name, email, password</p>\n","urlObject":{"port":"5000","path":["user"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"fbdace54-bf01-49c3-b9d2-b6832bb8e9e2"},{"name":"/user","id":"a497a4cf-1fc2-4e24-8436-2028081fe9ba","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{jwt_token}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":"localhost:5000/user","description":"<p>shows current user data</p>\n","urlObject":{"port":"5000","path":["user"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a497a4cf-1fc2-4e24-8436-2028081fe9ba"},{"name":"/user","id":"83db1b90-62a9-4631-9034-5587b9f0ee99","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Authorization","type":"text","value":"Bearer {{jwt_fresh_token}}"},{"key":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"localhost:5000/user","description":"<p>updates current user data</p>\n<p>parameters to update:\nname, email, password</p>\n","urlObject":{"port":"5000","path":["user"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"83db1b90-62a9-4631-9034-5587b9f0ee99"},{"name":"/user","id":"8f04c900-42c8-4c6c-a1a3-81ff65d43aa7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{jwt_fresh_token}}","type":"text"},{"key":"Content-Type","value":"application/json","type":"text"}],"url":"localhost:5000/user","description":"<p>deletes current user</p>\n","urlObject":{"port":"5000","path":["user"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8f04c900-42c8-4c6c-a1a3-81ff65d43aa7"},{"name":"/user/<public_id>","id":"42a99aed-e0ab-4bd9-be25-e1dedfd5f2f6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"description":"<p>admin rights requiered</p>\n","key":"Authorization","type":"text","value":"Bearer {{jwt_token}}"},{"key":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"role\":\"\"\n}"},"url":"localhost:5000/user/<public_id>","description":"<p>updates user role from requested user; role has to already exist</p>\n<p>parameters: role</p>\n","urlObject":{"port":"5000","path":["user","<public_id>"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"42a99aed-e0ab-4bd9-be25-e1dedfd5f2f6"}],"id":"1f7a2bbf-a319-48f3-8c63-dd4c51430e75","description":"<p>After you created a new user, you can work with notes.</p>\n","event":[{"listen":"prerequest","script":{"id":"7e9c0b9f-9e7b-42b3-9461-fdf1c6085ac6","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"b59ee122-68f7-4f54-a949-91dea0f9bf8e","type":"text/javascript","exec":[""]}}],"_postman_id":"1f7a2bbf-a319-48f3-8c63-dd4c51430e75"},{"name":"Notes","item":[{"name":"Tags","item":[{"name":"/notes/tags","id":"d2ac1ee2-cc72-4742-9ac1-d378c05da4ae","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{jwt_token}}","type":"text"},{"key":"Content","value":"application/json","type":"text"}],"url":"localhost:5000/notes/tags","description":"<p>get and filter tags from current user</p>\n<p>filter parameters: name, id</p>\n","urlObject":{"port":"5000","path":["notes","tags"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"d2ac1ee2-cc72-4742-9ac1-d378c05da4ae"},{"name":"/notes/tags","id":"c14b7b0c-1094-41b2-8356-29af07f6e917","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{jwt_token}}","type":"text"},{"key":"Content","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\":\"\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:5000/notes/tags","description":"<p>rename requested tags</p>\n<p>filter parameters: name, id</p>\n","urlObject":{"port":"5000","path":["notes","tags"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c14b7b0c-1094-41b2-8356-29af07f6e917"},{"name":"/notes/tags","id":"e8e1432a-9a89-48e1-8cbe-ca31c91b18c1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{jwt_token}}","type":"text"},{"key":"Content","value":"application/json","type":"text"}],"url":"localhost:5000/notes/tags","description":"<p>delete requested tags</p>\n<p>filter parameters: name, id</p>\n","urlObject":{"port":"5000","path":["notes","tags"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e8e1432a-9a89-48e1-8cbe-ca31c91b18c1"}],"id":"89da9bd7-6d02-4592-a258-24e34f0c44c5","_postman_id":"89da9bd7-6d02-4592-a258-24e34f0c44c5","description":""},{"name":"Types","item":[{"name":"/notes/types","id":"f80ea9a4-d003-4e81-a76e-31265c451cc8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"description":"<p>admin rights requiered</p>\n","key":"Authorization","type":"text","value":"Bearer {{jwt_token}}"},{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"name\":\"\"\n}"},"url":"localhost:5000/notes/types","description":"<p>creates a new note type; name has to be unique</p>\n<p>parameters: name</p>\n","urlObject":{"port":"5000","path":["notes","types"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"f80ea9a4-d003-4e81-a76e-31265c451cc8"},{"name":"/notes/types","id":"bea23300-3d49-47e9-8067-c292d3556e12","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content","value":"application/json","type":"text"}],"url":"localhost:5000/notes/types","description":"<p>get and filter types</p>\n<p>filter parameters: name, id</p>\n","urlObject":{"port":"5000","path":["notes","types"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"bea23300-3d49-47e9-8067-c292d3556e12"},{"name":"/notes/types","id":"b8a071d8-ce72-4a69-b81a-a548493fa8d7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{jwt_token}}","description":"<p>admin rights requiered</p>\n","type":"text"},{"key":"Content","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"name\":\"\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:5000/notes/types","description":"<p>rename requested type</p>\n<p>filter parameters: name, id</p>\n","urlObject":{"port":"5000","path":["notes","types"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b8a071d8-ce72-4a69-b81a-a548493fa8d7"},{"name":"/notes/types","id":"b58a097e-fe5d-4f59-9097-048c7a7243ad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer {{jwt_token}}","description":"<p>admin rights requiered</p>\n","type":"text"},{"key":"Content","value":"application/json","type":"text"}],"url":"localhost:5000/notes/types","description":"<p>delete requested types</p>\n<p>filter parameters: name, id</p>\n","urlObject":{"port":"5000","path":["notes","types"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b58a097e-fe5d-4f59-9097-048c7a7243ad"}],"id":"67ff9e28-5e92-4bb5-a420-b82158eb4dd6","_postman_id":"67ff9e28-5e92-4bb5-a420-b82158eb4dd6","description":""},{"name":"/notes","id":"e002affc-9685-497a-8c31-732aff74fb34","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"Bearer {{jwt_token}}"},{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"text\":\"\",\n    \"type\":\"\",\n    \"tags\":[\"\"]\n}"},"url":"localhost:5000/notes","description":"<p>creates a new note for current user</p>\n<p>parameters (none of them are required):\ntext, type (has to already exist), tags</p>\n","urlObject":{"port":"5000","path":["notes"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e002affc-9685-497a-8c31-732aff74fb34"},{"name":"/notes","id":"8e09f472-753b-429d-98ef-474f5ba58b8a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","type":"text","value":"Bearer {{jwt_token}}"},{"key":"Content","type":"text","value":"application/json"}],"url":"localhost:5000/notes","description":"<p>shows requested notes from current user</p>\n<p>filter parameters:\nid, is_active, from_date, till_date, type_name, tag_list</p>\n","urlObject":{"port":"5000","path":["notes"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8e09f472-753b-429d-98ef-474f5ba58b8a"},{"name":"/notes","id":"18be54aa-9ebd-45be-b6f7-b45a2867cde4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Authorization","type":"text","value":"Bearer {{jwt_token}}"},{"key":"Content","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"localhost:5000/notes","description":"<p>updates requested note from current user</p>\n<p>parameters to update:\ntext, type, tags</p>\n<p>filter parameters: id, is_active, from_date, till_date, type_name, tag_list</p>\n","urlObject":{"port":"5000","path":["notes"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"18be54aa-9ebd-45be-b6f7-b45a2867cde4"},{"name":"/notes","id":"6c5300c4-17f8-41ef-8767-67a59e8a4f10","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","type":"text","value":"Bearer {{jwt_token}}"},{"key":"Content","type":"text","value":"application/json"}],"url":"localhost:5000/notes","description":"<p>deletes requested notes from current user</p>\n<p>filter parameters: id, is_active, from_date, till_date, type_name, tag_list</p>\n","urlObject":{"port":"5000","path":["notes"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6c5300c4-17f8-41ef-8767-67a59e8a4f10"}],"id":"9d75efc2-b11e-4d80-a1ce-67d419ca40c5","description":"<p>You can allocate types to your notes and sort them by custom tags.</p>\n","event":[{"listen":"prerequest","script":{"id":"3deaf332-a681-4620-89a8-b5716f5e58bb","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"75467b25-bcde-46fd-a7bb-827412ed71c7","type":"text/javascript","exec":[""]}}],"_postman_id":"9d75efc2-b11e-4d80-a1ce-67d419ca40c5"},{"name":"/","id":"a5dddd2a-7d8c-45c9-a31d-dea4d354d94f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"localhost:5000","description":"<p>hello world</p>\n","urlObject":{"port":"5000","host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"cf9b6636-ea8a-42e6-a7c8-cfb5e4fb7b40","name":"Default","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"http://127.0.0.1:5000/ "},"code":200,"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":""}],"_postman_id":"a5dddd2a-7d8c-45c9-a31d-dea4d354d94f"},{"name":"/protected","id":"80cdb5ab-c55c-46c7-bfac-e930f59649d3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Authorization","value":"Bearer {{jwt_token}}","description":"<p>Replace {{jwt_token}} with your access token</p>\n","type":"text"}],"url":"localhost:5000/protected","urlObject":{"port":"5000","path":["protected"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"80cdb5ab-c55c-46c7-bfac-e930f59649d3"},{"name":"/protected-fresh","id":"37a7f968-e35c-4b8d-a185-054648973224","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"},{"key":"Authorization","type":"text","value":"Bearer {{jwt_fresh_token}}"}],"url":"localhost:5000/protected-fresh","urlObject":{"port":"5000","path":["protected-fresh"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"37a7f968-e35c-4b8d-a185-054648973224"}],"variable":[{"key":"hostname","value":"localhost"},{"key":"port","value":"5000"}]}