{"info":{"_postman_id":"7d6b297f-d514-4952-abf5-cefea16041c7","name":"ToDo App","description":"<html><head></head><body><h1 id=\"todo-app-api-reference\">ToDo App API Reference</h1>\n<p>This collection contains sample API requests to <a href=\"http:%5Clocalhost:5000\">ToDo App API</a>. ToDo API is organised around REST. This API has resource-oriented URLs, accepts JSON request bodies, and provides JSON-formatted responses.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"ToDo App API Reference","slug":"todo-app-api-reference"}],"owner":"10862083","collectionId":"7d6b297f-d514-4952-abf5-cefea16041c7","publishedId":"SzmmTZH2","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-05-17T21:18:52.000Z"},"item":[{"name":"User","item":[{"name":"Register User","id":"ce02e38a-ff51-41fc-bf79-9d510894b5b6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"username\" : \"farhan1ahmed\",\n\t\"password\" : \"qsc\",\n\t\"email\" : \"farhan1ahmed@hotmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:5000/register","description":"<p>A user can have their account registered for ToDo Application by using this API endpoint.</p>\n<ul>\n<li>If the email is already registered, the server will send back a <em>HTTP 409</em>  status code </li>\n<li>If the request does not contain full information, the server will return a <em>HTTP 401</em>  status code </li>\n<li>Successful account registration will result in a <em>HTTP 200</em>   status code</li>\n</ul>\n","urlObject":{"port":"5000","path":["register"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"081ff5ae-af13-4528-9279-f650ab69afbc","name":"Register User","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"username\" : \"UserName\",\n\t\"password\" : \"UserPassword\",\n\t\"email\" : \"user@gmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:5000/register"},"status":"CREATED","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"21"},{"key":"Server","value":"Werkzeug/1.0.0 Python/3.7.3"},{"key":"Date","value":"Sat, 16 May 2020 20:34:32 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"success\"\n}"}],"_postman_id":"ce02e38a-ff51-41fc-bf79-9d510894b5b6"},{"name":"Confirm Email","id":"44101422-232c-49e5-9f43-7baaf1adc55e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/confirm/<token>?status=","description":"<p>When a user registers, an email is sent to  their email address which contains the confirmation link. Clicking on the link will allow a user to confirm their account creation.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["confirm","<token>"],"host":["localhost"],"query":[{"description":{"content":"<p>Can be set to either 'confirm' or 'cancel'</p>\n","type":"text/plain"},"key":"status","value":""}],"variable":[]}},"response":[],"_postman_id":"44101422-232c-49e5-9f43-7baaf1adc55e"},{"name":"Login","event":[{"listen":"test","script":{"id":"f9030a9c-c8be-4f9b-a7c8-93bd3d05d806","exec":["var authCookie = postman.getResponseCookie(\"access_token_cookie\"); ","postman.setEnvironmentVariable('access_token', authCookie.value);"],"type":"text/javascript"}}],"id":"94253bf8-bb72-4f34-9ac8-7e0e3f5c0799","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"email\": \"farhan1ahmed@hotmail.com\",\n\t\"password\": \"qsc\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:5000/login","description":"<p>A User needs to specify their email and password inorder to login to their ToDo application account.</p>\n<ul>\n<li>Returns <em>HTTP 401</em> status code if the email address or password entered by the user is incorrect, or the user has not confirmed themselve after registering their account.</li>\n<li>Returns <em>HTTP 200</em> status code and Cookie containing <strong>access_token</strong> to allow logging into the account.</li>\n</ul>\n","urlObject":{"port":"5000","path":["login"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"196f429a-1044-47ab-ba7e-db2763031695","name":"Login","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"email\": \"farhan1ahmed@hotmail.com\",\n\t\"password\": \"qsc\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:5000/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"22"},{"key":"Set-Cookie","value":"access_token_cookie=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE1ODk2NjI1NTYsIm5iZiI6MTU4OTY2MjU1NiwianRpIjoiZmZhNjRlNTktZjAzOC00ZmM1LTk3NjItN2E1NTMwMDA2Yzg0IiwiZXhwIjoxNTg5NzQ4OTU2LCJpZGVudGl0eSI6IjIiLCJmcmVzaCI6ZmFsc2UsInR5cGUiOiJhY2Nlc3MifQ.C5fC76SZoIGAjkiTrfahNhh06_qlEqpswR8cepEfyQY; Path=/"},{"key":"Set-Cookie","value":"csrf_access_token=5791628bb0b13ce0c676dfde280ba245; Path=/"},{"key":"Server","value":"Werkzeug/1.0.0 Python/3.7.3"},{"key":"Date","value":"Sat, 16 May 2020 20:55:56 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Success\"\n}"}],"_postman_id":"94253bf8-bb72-4f34-9ac8-7e0e3f5c0799"},{"name":"After Login","id":"a7a0be4c-85d9-421c-8abd-d99eaa6b1a37","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:5000/hello","description":"<p>A sample API request to show that a user can access other API endpoints after logging in successfully</p>\n","urlObject":{"port":"5000","path":["hello"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a7a0be4c-85d9-421c-8abd-d99eaa6b1a37"},{"name":"Register using Facebook Account","id":"8f6c8f0b-0336-4cc3-94ee-c852f99be465","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/login/facebook","description":"<p>The user can call this API endpoint to get the \"Login using Facebook\" extension.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["login","facebook"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8f6c8f0b-0336-4cc3-94ee-c852f99be465"},{"name":"API_Facebook_Login","id":"7ff57aee-3e51-4137-81a0-ef9ffa73f59b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"userID\" : {{userID}}\n\t\"accessToken\": {{accessToken}}\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/API_facebook_login","description":"<p>Once a user logs into their Facebook account, this endpoint call uses the userID and access_token provided by Facebook.\nIt makes a request to the Facebook_API to get user details, and then creates a ToDo application account for the user based on the details provided by Facebook.</p>\n","urlObject":{"protocol":"http","port":"5000","path":["API_facebook_login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"7ff57aee-3e51-4137-81a0-ef9ffa73f59b"},{"name":"Logout","event":[{"listen":"test","script":{"id":"b91d9378-6768-40ed-b592-4592acc8cb6f","exec":[""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"c4ed8920-099d-4062-917a-c1655d61eb8b","exec":[""],"type":"text/javascript"}}],"id":"db9d8523-373b-454d-a858-f4a9357644a0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:5000/logout","description":"<p>A user can logout of their accounts using this API endpoint call.</p>\n","urlObject":{"port":"5000","path":["logout"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"93c59a25-0b8b-4af0-a4aa-c2b01f059a7c","name":"Logout","originalRequest":{"method":"GET","header":[{"key":"Authorization","type":"text","value":"Bearer {{access_token}}"}],"url":"localhost:5000/logout"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"37"},{"key":"Set-Cookie","value":"access_token_cookie=; Expires=Thu, 01-Jan-1970 00:00:00 GMT; Max-Age=0; Path=/"},{"key":"Set-Cookie","value":"csrf_access_token=; Expires=Thu, 01-Jan-1970 00:00:00 GMT; Max-Age=0; Path=/"},{"key":"Server","value":"Werkzeug/1.0.0 Python/3.7.3"},{"key":"Date","value":"Sat, 16 May 2020 21:03:40 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Logged Out successfully\"\n}"}],"_postman_id":"db9d8523-373b-454d-a858-f4a9357644a0"},{"name":"Forgot Password","id":"e3aeac29-39f2-4317-adfc-c15cb3bf1c85","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"email\": \"farhan1ahmed@hotmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:5000/forgot_password","description":"<p>A user can request for password change if they forget their current password and are unable to login to their account.</p>\n<ul>\n<li>Returns <em>HTTP 404</em> status code if the specified email address is not registered with ToDo application</li>\n<li>Returns <em>HTTP 403</em> status code if the specified email address belongs to a OAuth Facebook registration.</li>\n<li>Returns <em>HTTP 200</em> if reset-password-email is successfuly sent</li>\n</ul>\n","urlObject":{"port":"5000","path":["forgot_password"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"75ee04f5-af10-4b56-9f9c-4ad6e33ca1c0","name":"Forgot Password","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"email\": \"farhan1ahmed@hotmail.com\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:5000/forgot_password"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"21"},{"key":"Server","value":"Werkzeug/1.0.0 Python/3.7.3"},{"key":"Date","value":"Sat, 16 May 2020 21:05:34 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"success\"\n}"}],"_postman_id":"e3aeac29-39f2-4317-adfc-c15cb3bf1c85"},{"name":"Reset password","id":"258cf2f7-da32-4587-999d-59dca9e22dc1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"password\": \"hello456\" \n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/reset_password/<resettoken>","description":"<p>When a user requests for password change, an email is sent to their email address containing the reset password link.\nThe user can reset their password by assigning a new password.</p>\n<ul>\n<li>Returns <em>HTTP 404</em> if the email is not registered with the ToDo Application.</li>\n<li>Returns <em>HTTP 403</em> if no password is assigned to the <strong>password</strong> attribute.</li>\n<li>A successful password change returns <em>HTTP 200</em> status code</li>\n</ul>\n","urlObject":{"protocol":"http","port":"5000","path":["reset_password","<resettoken>"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"258cf2f7-da32-4587-999d-59dca9e22dc1"}],"id":"573d6957-dcd7-41b3-8e70-4e85f268606f","description":"<h2 id=\"this-collection-contains-api-requests-related-to-user-registration-confirmation-email-login-and-logout--the-following-are-the-details-related-to-a-user\"> This collection contains API requests related to User registration, confirmation email, login and logout. \nThe following are the details related to a User. </h2>\n<h2 id=\"user-attributes\">User Attributes</h2>\n<ul>\n<li><p><strong>id</strong> (Integer): Unique identifier </p>\n</li>\n<li><p><strong>username</strong> (String): Username for the user</p>\n</li>\n<li><p><strong>email</strong> (String): Email ID of the user </p>\n</li>\n<li><p><strong>password</strong> (String): User password</p>\n</li>\n<li><p><strong>user_type_id</strong> (Integer): There are two types of users\n * 1 : ToDo App Authorized User<br /> * 2 : Facebook Authorized User</p>\n</li>\n<li><p><strong>confirmed</strong> (Boolean): Attribute to show whether a user has been confirmed or not</p>\n</li>\n</ul>\n","event":[{"listen":"prerequest","script":{"id":"782ad3fc-3ea9-46d8-8481-6467d91c3e8c","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"1c4259ba-17a5-46d9-8674-8809b448a693","type":"text/javascript","exec":[""]}}],"_postman_id":"573d6957-dcd7-41b3-8e70-4e85f268606f"},{"name":"Tasks","item":[{"name":"Create Task","event":[{"listen":"prerequest","script":{"id":"7c800cd7-8fc3-4de8-9f1d-d7d8d235560d","exec":[""],"type":"text/javascript"}},{"listen":"test","script":{"id":"828b974a-ec74-4289-a745-74f1762c1b07","exec":["var authCookie = postman.getResponseCookie(\"access_token_cookie\"); ","postman.setEnvironmentVariable('access_token', authCookie.value);"],"type":"text/javascript"}}],"id":"c3ad124f-8a3b-434f-93c9-4ce480b5341f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"Title\": \"Create API Documentation\",\n\t\"Description\": \"The document will be used as a reference\",\n\t\"DueDate\": \"2020-05-15\" \n}","options":{"raw":{"language":"json"}}},"url":"localhost:5000/create","description":"<p>Creates a task with a unique title and stores it in to the database. The task is created as per the attributes defined by the user. The title of the tasks for each user must be unique. The task is marked 'Not Started' by default.</p>\n<ul>\n<li>Raises <em>exception</em> and returns <em>HTTP 409</em> if the Title is not unique</li>\n<li>Returns <em>HTTP 201</em> if the Task is created successfullly</li>\n</ul>\n","urlObject":{"port":"5000","path":["create"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"e9e5e2e7-8d49-43e5-b178-29821fbd964b","name":"Create Task","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"Title\": \"Create API Documentation\",\n\t\"Description\": \"The document will be used as a reference\",\n\t\"DueDate\": \"2020-05-15\" \n}","options":{"raw":{"language":"json"}}},"url":"localhost:5000/create"},"status":"CREATED","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"21"},{"key":"Server","value":"Werkzeug/1.0.0 Python/3.7.3"},{"key":"Date","value":"Sat, 16 May 2020 23:15:37 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"success\"\n}"}],"_postman_id":"c3ad124f-8a3b-434f-93c9-4ce480b5341f"},{"name":"List All Tasks","event":[{"listen":"test","script":{"id":"40df38e8-9b5a-4368-babb-de20f8b3886d","exec":["var authCookie = postman.getResponseCookie(\"access_token_cookie\"); ","postman.setEnvironmentVariable('access_token', authCookie.value);"],"type":"text/javascript"}}],"id":"389a6ff6-6638-49a1-afd6-e959b44c10d2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:5000/list_items/page","description":"<p>Returns a list of all tasks created by a user.\nThe request url takes in two parameters: <strong>start</strong> and <strong>limit</strong>. If these are not specified, the request will use the default values and return a paginated response starting at the first task and containing five tasks in total.</p>\n<ul>\n<li>Returns <em>HTTP 404</em> if the start parameter is set at a value greater than the total existing tasks.</li>\n<li>Returns a paginated list of tasks and a <em>HTTP 200</em> status code.</li>\n</ul>\n","urlObject":{"port":"5000","path":["list_items","page"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"27d15f03-e556-45ed-bbac-eaf79cc405a8","name":"List Tasks (Default parameters)","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"url":"localhost:5000/list_items/page"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"1062"},{"key":"Server","value":"Werkzeug/1.0.0 Python/3.7.3"},{"key":"Date","value":"Sat, 16 May 2020 23:24:53 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"limit\": 5,\n    \"next\": \"/list_items/page?start=6&limit=5\",\n    \"previous\": \"\",\n    \"start\": 1,\n    \"tasks\": [\n        {\n            \"CompletionDate\": null,\n            \"Description\": \"Changed last\",\n            \"DueDate\": \"Thu, 31 Dec 2020 00:00:00 GMT\",\n            \"Status\": \"Task in progress\",\n            \"Title\": \"Task 2\",\n            \"id\": 7,\n            \"userID\": 2\n        },\n        {\n            \"CompletionDate\": \"Mon, 04 May 2020 13:12:37 GMT\",\n            \"Description\": \"Task 1 Created\",\n            \"DueDate\": \"Thu, 31 Dec 2020 00:00:00 GMT\",\n            \"Status\": \"Completed\",\n            \"Title\": \"Task 3\",\n            \"id\": 9,\n            \"userID\": 2\n        },\n        {\n            \"CompletionDate\": \"Tue, 12 May 2020 16:52:26 GMT\",\n            \"Description\": \"Changed test\",\n            \"DueDate\": \"Fri, 22 May 2020 00:00:00 GMT\",\n            \"Status\": \"Completed\",\n            \"Title\": \"Task 4\",\n            \"id\": 10,\n            \"userID\": 2\n        },\n        {\n            \"CompletionDate\": \"Tue, 12 May 2020 17:21:29 GMT\",\n            \"Description\": \"Task 5 Created\",\n            \"DueDate\": \"Fri, 22 May 2020 00:00:00 GMT\",\n            \"Status\": \"Completed\",\n            \"Title\": \"Task 5\",\n            \"id\": 11,\n            \"userID\": 2\n        },\n        {\n            \"CompletionDate\": \"Tue, 12 May 2020 17:21:45 GMT\",\n            \"Description\": \"Task 5 Created\",\n            \"DueDate\": \"Fri, 22 May 2020 00:00:00 GMT\",\n            \"Status\": \"Completed\",\n            \"Title\": \"Task 6\",\n            \"id\": 12,\n            \"userID\": 2\n        }\n    ],\n    \"total_tasks\": 9\n}"},{"id":"e77be4f6-bc9c-425f-935c-c7ae1b91c7a2","name":"List Tasks (User-requested parameters)","originalRequest":{"method":"GET","header":[],"url":{"raw":"localhost:5000/list_items/page?start=2&limit=3","host":["localhost"],"port":"5000","path":["list_items","page"],"query":[{"key":"start","value":"2"},{"key":"limit","value":"3"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"727"},{"key":"Server","value":"Werkzeug/1.0.0 Python/3.7.3"},{"key":"Date","value":"Sat, 16 May 2020 23:26:34 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"limit\": 3,\n    \"next\": \"/list_items/page?start=5&limit=3\",\n    \"previous\": \"/list_items/page?start=1&limit=1\",\n    \"start\": 2,\n    \"tasks\": [\n        {\n            \"CompletionDate\": \"Mon, 04 May 2020 13:12:37 GMT\",\n            \"Description\": \"Task 1 Created\",\n            \"DueDate\": \"Thu, 31 Dec 2020 00:00:00 GMT\",\n            \"Status\": \"Completed\",\n            \"Title\": \"Task 3\",\n            \"id\": 9,\n            \"userID\": 2\n        },\n        {\n            \"CompletionDate\": \"Tue, 12 May 2020 16:52:26 GMT\",\n            \"Description\": \"Changed test\",\n            \"DueDate\": \"Fri, 22 May 2020 00:00:00 GMT\",\n            \"Status\": \"Completed\",\n            \"Title\": \"Task 4\",\n            \"id\": 10,\n            \"userID\": 2\n        },\n        {\n            \"CompletionDate\": \"Tue, 12 May 2020 17:21:29 GMT\",\n            \"Description\": \"Task 5 Created\",\n            \"DueDate\": \"Fri, 22 May 2020 00:00:00 GMT\",\n            \"Status\": \"Completed\",\n            \"Title\": \"Task 5\",\n            \"id\": 11,\n            \"userID\": 2\n        }\n    ],\n    \"total_tasks\": 9\n}"}],"_postman_id":"389a6ff6-6638-49a1-afd6-e959b44c10d2"},{"name":"List Single Item","event":[{"listen":"test","script":{"id":"c9e2e7c9-8c55-4889-98b6-e795dd44b520","exec":["var authCookie = postman.getResponseCookie(\"access_token_cookie\"); ","postman.setEnvironmentVariable('access_token', authCookie.value);"],"type":"text/javascript"}}],"id":"c92fce33-d823-4ff7-bb8b-41b03d23f1a9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:5000/list_item/16","description":"<p>Returns all the details regarding the task requested by the user. The API request url contains the id of the task that the user is asking for.</p>\n<ul>\n<li>Returns <em>HTTP 404</em> if there is not any task with the same id as specified by the user.</li>\n<li>Returns <em>HTTP 200</em> if the task is found successfully</li>\n</ul>\n","urlObject":{"port":"5000","path":["list_item","16"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"6edb1a25-a979-4752-993d-40dd94709e55","name":"List Single Item (No Content)","originalRequest":{"method":"GET","header":[{"key":"Authorization","type":"text","value":"Bearer {{access_token}}"}],"url":"localhost:5000/list_item/2"},"status":"NOT FOUND","code":404,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"24"},{"key":"Server","value":"Werkzeug/1.0.0 Python/3.7.3"},{"key":"Date","value":"Sat, 16 May 2020 23:32:09 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"No Content\"\n}"},{"id":"ee486d8b-bf46-4778-a2aa-14e7ed4c4b79","name":"List Single Item","originalRequest":{"method":"GET","header":[{"key":"Authorization","type":"text","value":"Bearer {{access_token}}"}],"url":"localhost:5000/list_item/16"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"212"},{"key":"Server","value":"Werkzeug/1.0.0 Python/3.7.3"},{"key":"Date","value":"Sat, 16 May 2020 23:33:19 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"CompletionDate\": null,\n    \"Description\": \"The document will be used as a reference\",\n    \"DueDate\": \"Fri, 15 May 2020 00:00:00 GMT\",\n    \"Status\": \"Not Started\",\n    \"Title\": \"Create API Documentation\",\n    \"id\": 16,\n    \"userID\": 2\n}"}],"_postman_id":"c92fce33-d823-4ff7-bb8b-41b03d23f1a9"},{"name":"Update item","event":[{"listen":"test","script":{"id":"1e96f17c-bc63-4a34-9c5e-8a6e3e31af36","exec":["var authCookie = postman.getResponseCookie(\"access_token_cookie\"); ","postman.setEnvironmentVariable('access_token', authCookie.value);"],"type":"text/javascript"}}],"id":"81c1321f-6a26-4907-a69f-d156b8a3b2ed","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n\t\"Description\": \"Sample Description updated\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:5000/update/15","description":"<p>A user can <strong>edit</strong> or <strong>update</strong> a task. The request url contains the id of the task to be updated. Following task attributes can be editted. </p>\n<ul>\n<li>Title</li>\n<li>Description</li>\n<li>DueDate</li>\n<li>Status_id (Completion Date is automatically filled if the task is marked as complete)</li>\n</ul>\n","urlObject":{"port":"5000","path":["update","15"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"72c7ce95-beff-4cdc-abb1-92a2aeb5cc00","name":"Update item (Mark a task as complete)","originalRequest":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"Status_id\": 3\n}","options":{"raw":{"language":"json"}}},"url":"localhost:5000/update/16"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"39"},{"key":"Server","value":"Werkzeug/1.0.0 Python/3.7.3"},{"key":"Date","value":"Sat, 16 May 2020 23:42:03 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Task updated successfully\"\n}"},{"id":"87687f21-84f2-452d-a855-6dd13ee14045","name":"Update item (Update Description)","originalRequest":{"method":"PATCH","header":[{"key":"Authorization","value":"Bearer {{access_token}}","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"Description\": \"Sample Description updated\"\n}","options":{"raw":{"language":"json"}}},"url":"localhost:5000/update/15"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"39"},{"key":"Server","value":"Werkzeug/1.0.0 Python/3.7.3"},{"key":"Date","value":"Sat, 16 May 2020 23:44:32 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Task updated successfully\"\n}"}],"_postman_id":"81c1321f-6a26-4907-a69f-d156b8a3b2ed"},{"name":"Delete Task","event":[{"listen":"test","script":{"id":"c6b7d9b5-7608-4dec-9ed7-a22e25ed713f","exec":["var authCookie = postman.getResponseCookie(\"access_token_cookie\"); ","postman.setEnvironmentVariable('access_token', authCookie.value);"],"type":"text/javascript"}}],"id":"66f8f106-cc07-48ef-a4bf-61a446231cd1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"localhost:5000/delete/8","description":"<p>A user can simply delete a task by specifying the task_id in the request url.</p>\n<ul>\n<li>Returns <em>HTTP 404</em> if no task with the specified id is found</li>\n<li>Returns <em>HTTP 200</em> if the task is deleted successfully.</li>\n</ul>\n","urlObject":{"port":"5000","path":["delete","8"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"66f8f106-cc07-48ef-a4bf-61a446231cd1"},{"name":"Upload","event":[{"listen":"test","script":{"id":"a3b0f447-bdee-485f-a9ef-c0297c92c39f","exec":["var authCookie = postman.getResponseCookie(\"access_token_cookie\"); ","postman.setEnvironmentVariable('access_token', authCookie.value);"],"type":"text/javascript"}}],"id":"8df9d9e0-1a15-478b-babd-01b929aa8d89","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"formdata","formdata":[{"key":"attachment","type":"file","src":"/C:/Users/hp/Desktop/Emumba Training/sample_upload.txt"}]},"url":"localhost:5000/upload_attachment/16","description":"<p>The user can upload a file as an attachment to a task.</p>\n<ul>\n<li>Returns <em>HTTP 404</em>   if there is no such task</li>\n<li>Returns <em>HTTP 200</em>   if the attachment is uploaded successfully</li>\n</ul>\n","urlObject":{"port":"5000","path":["upload_attachment","16"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"6e1005c0-67fc-4777-b57a-7e84992cf203","name":"Upload","originalRequest":{"method":"PUT","header":[],"body":{"mode":"formdata","formdata":[{"key":"attachment","type":"file","src":"/C:/Users/hp/Desktop/Emumba Training/sample_upload.txt"}]},"url":"localhost:5000/upload_attachment/16"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"40"},{"key":"Server","value":"Werkzeug/1.0.0 Python/3.7.3"},{"key":"Date","value":"Sat, 16 May 2020 23:49:17 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"File uploaded successfully\"\n}"}],"_postman_id":"8df9d9e0-1a15-478b-babd-01b929aa8d89"},{"name":"Download","event":[{"listen":"prerequest","script":{"id":"6c26f9b2-4ed0-4bac-8adc-98807ff37e38","exec":[""],"type":"text/javascript"}},{"listen":"test","script":{"id":"7bb5aef5-6721-4bba-a2fa-2c23268c65ab","exec":[""],"type":"text/javascript"}}],"id":"9b99e7df-f056-483b-9b47-dcd9b65e53e3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:5000/download_attachment/16","description":"<p>A user can download the attachment from a task, that they had uploaded previously.</p>\n<ul>\n<li>Returns <em>HTTP 404</em> if there is no such task, or the task does not have any attachment with it it.</li>\n<li>Returns the attachment as a response content and <em>HTTP 200</em> status code.</li>\n</ul>\n","urlObject":{"port":"5000","path":["download_attachment","16"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9b99e7df-f056-483b-9b47-dcd9b65e53e3"},{"name":"Delete Attachment","event":[{"listen":"test","script":{"id":"3e8a6a3a-cb8f-409a-8991-bd085f90cc4b","exec":["var authCookie = postman.getResponseCookie(\"access_token_cookie\"); ","postman.setEnvironmentVariable('access_token', authCookie.value);"],"type":"text/javascript"}}],"id":"00dea7b3-0f78-4199-bc4d-412684d2062e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"localhost:5000/delete_attachment/16","description":"<p>A user can delete an existing attachment from a task.</p>\n<ul>\n<li>Returns <em>HTTP 404</em> if there is no such task, or the task does not contain any attachment.</li>\n<li>Deletes the attachment and returns <em>HTTP 200</em>   status code</li>\n</ul>\n","urlObject":{"port":"5000","path":["delete_attachment","16"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"6790e054-fde9-4bdd-a551-b66fd9bbd530","name":"Delete Attachment","originalRequest":{"method":"DELETE","header":[],"url":"localhost:5000/delete_attachment/16"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"45"},{"key":"Server","value":"Werkzeug/1.0.0 Python/3.7.3"},{"key":"Date","value":"Sun, 17 May 2020 00:38:53 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Attachment deleted successfully\"\n}"}],"_postman_id":"00dea7b3-0f78-4199-bc4d-412684d2062e"},{"name":"Similar tasks","id":"4cfbd78f-5a21-4ec5-8c7c-66e4b24ad1da","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:5000/similar_tasks","description":"<p>Returns a list of tasks which are similar based on their description</p>\n","urlObject":{"port":"5000","path":["similar_tasks"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"8309ff9a-f2f0-4877-ba3a-723da3355615","name":"Similar tasks","originalRequest":{"method":"GET","header":[{"key":"Authorization","type":"text","value":"Bearer {{access_token}}"}],"url":"localhost:5000/similar_tasks"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"56"},{"key":"Server","value":"Werkzeug/1.0.0 Python/3.7.3"},{"key":"Date","value":"Sun, 17 May 2020 00:28:16 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"['Task 11 and Task 12 are similar tasks!']\"\n}"}],"_postman_id":"4cfbd78f-5a21-4ec5-8c7c-66e4b24ad1da"}],"id":"a467c6ce-9409-466f-a086-2d37ab580cdc","description":"<h2 id=\"this-collection-contains-api-requests-related-to-task-management-a-user-can-create-edit-delete-and-list-their-tasks-the-following-are-the-details-related-to-a-task\"> This collection contains API requests related to task management. A user can create, edit, delete and list their tasks.\nThe following are the details related to a Task. </h2>\n<h2 id=\"task-attributes\">Task Attributes</h2>\n<ul>\n<li><strong>id</strong> (Integer): Unique identifier </li>\n<li><strong>Title</strong> (String): Title of the task</li>\n<li><strong>Description</strong> (String): Brief description about the task</li>\n<li><strong>Status_id</strong> (Integer): There are three valid status for a task\n * 1 : 'Not Started'<br /> * 2 : 'Task in progress'\n * 3 : 'Completed' </li>\n<li><strong>CreationDate</strong> (DateTime): The date on which the task was created</li>\n<li><strong>DueDate</strong> (DateTime): The date on which the task is due</li>\n<li><strong>CompletionDate</strong> (DateTime): The date on which the task was completed</li>\n<li><strong>Attachment_name</strong> (DateTime): The name of the file attached with the task</li>\n<li><strong>Attachment_data</strong> (DateTime): The path of the file as stored on the server</li>\n<li><strong>userID</strong> (Integer): Foreign key relating the tasks with its user</li>\n</ul>\n","event":[{"listen":"prerequest","script":{"id":"0363b66f-8187-43a0-8349-5df0912dbea8","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"d6ec4762-434a-4735-8100-0c2879a41371","type":"text/javascript","exec":[""]}}],"_postman_id":"a467c6ce-9409-466f-a086-2d37ab580cdc"},{"name":"Reports","item":[{"name":"max_tasks_day","id":"883488ac-522b-4a41-8f45-e230f4a8f342","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:5000/reports/max_tasks_day","description":"<p>This API endpoint generates a report showing the day which had the maximum number of tasks completed in a single day.</p>\n<ul>\n<li>Returns <em>HTTP 404</em>    if the user does not have any completed tasks.</li>\n<li>Returns <em>HTTP 200</em>    along with the response.</li>\n</ul>\n","urlObject":{"port":"5000","path":["reports","max_tasks_day"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"50cdbae7-5573-48da-9d85-4d2fc1eca518","name":"max_tasks_day","originalRequest":{"method":"GET","header":[{"key":"Authorization","type":"text","value":"Bearer {{access_token}}"}],"url":"localhost:5000/reports/max_tasks_day"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"59"},{"key":"Server","value":"Werkzeug/1.0.0 Python/3.7.3"},{"key":"Date","value":"Sun, 17 May 2020 00:45:21 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"date\": [\n        \"Tue, 12 May 2020 00:00:00 GMT\"\n    ],\n    \"max_count\": 3\n}"}],"_postman_id":"883488ac-522b-4a41-8f45-e230f4a8f342"},{"name":"tasks_count_breakdown","id":"9fef7488-b50d-4dac-87f0-290124797b00","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:5000/reports/tasks_count_breakdown","description":"<p>This API endpoint generates a report showing the number of total tasks, completed tasks and remaining tasks.</p>\n<ul>\n<li>Returns <em>HTTP 404</em>    if the user does not have any tasks.</li>\n<li>Returns <em>HTTP 200</em>    along with the response.</li>\n</ul>\n","urlObject":{"port":"5000","path":["reports","tasks_count_breakdown"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"1fa8a2b6-4cce-41b0-8f4e-bc8bc9a960af","name":"tasks_count_breakdown","originalRequest":{"method":"GET","header":[{"key":"Authorization","type":"text","value":"Bearer {{access_token}}"}],"url":"localhost:5000/reports/tasks_count_breakdown"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"62"},{"key":"Server","value":"Werkzeug/1.0.0 Python/3.7.3"},{"key":"Date","value":"Sun, 17 May 2020 00:49:40 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"completed_tasks\": 5,\n    \"remaining_tasks\": 4,\n    \"total_tasks\": 9\n}"}],"_postman_id":"9fef7488-b50d-4dac-87f0-290124797b00"},{"name":"avg_tasks_per_day","id":"1ab4b896-6c5e-448d-8b9f-7d4bbf12d0d9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:5000/reports/avg_tasks_per_day","description":"<p>This API endpoint generates a report showing the average number of tasks completed since the day the first task was created.</p>\n<ul>\n<li>Returns <em>HTTP 404</em>    if the user does not have any tasks.</li>\n<li>Returns <em>HTTP 200</em>    along with the response.</li>\n</ul>\n","urlObject":{"port":"5000","path":["reports","avg_tasks_per_day"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"62749764-771f-472b-a72c-291a7153fcf9","name":"avg_tasks_per_day","originalRequest":{"method":"GET","header":[],"url":"localhost:5000/reports/avg_tasks_per_day"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"34"},{"key":"Server","value":"Werkzeug/1.0.0 Python/3.7.3"},{"key":"Date","value":"Sun, 17 May 2020 00:50:30 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"avg_tasks\": 0.23809523809523808\n}"}],"_postman_id":"1ab4b896-6c5e-448d-8b9f-7d4bbf12d0d9"},{"name":"late_tasks","id":"6778d0e5-dc59-4088-95ed-9b1397fb6fa6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:5000/reports/late_tasks","description":"<p>This API endpoint generates a report showing the count of tasks which have missed their due dates, and are therefore late.</p>\n<ul>\n<li>Returns <em>HTTP 404</em>    if the user does not have any tasks.</li>\n<li>Returns <em>HTTP 200</em>    along with the response.</li>\n</ul>\n","urlObject":{"port":"5000","path":["reports","late_tasks"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"88379226-09cb-463a-be66-32c375a9f25a","name":"late_tasks","originalRequest":{"method":"GET","header":[],"url":"localhost:5000/reports/late_tasks"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"12"},{"key":"Server","value":"Werkzeug/1.0.0 Python/3.7.3"},{"key":"Date","value":"Sun, 17 May 2020 00:52:25 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"count\": 4\n}"}],"_postman_id":"6778d0e5-dc59-4088-95ed-9b1397fb6fa6"},{"name":"tasks_opened_week","id":"1a163c2d-2be3-4028-86b9-48f47df3e9e6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{access_token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:5000/reports/tasks_opened_week","description":"<p>This API endpoint generates a report showing the number of tasks created on every day of the week since the time of account creation.</p>\n<ul>\n<li>Returns <em>HTTP 404</em>    if the user does not have any tasks.</li>\n<li>Returns <em>HTTP 200</em>    along with the response.</li>\n</ul>\n","urlObject":{"port":"5000","path":["reports","tasks_opened_week"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"2bad45b0-3a4b-41bf-abd8-1ca636bdb28b","name":"tasks_opened_week","originalRequest":{"method":"GET","header":[],"url":"localhost:5000/reports/tasks_opened_week"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"99"},{"key":"Server","value":"Werkzeug/1.0.0 Python/3.7.3"},{"key":"Date","value":"Sun, 17 May 2020 00:53:47 GMT"}],"cookie":[],"responseTime":null,"body":"{\n    \"Friday\": 0,\n    \"Monday\": 1,\n    \"Saturday\": 1,\n    \"Sunday\": 1,\n    \"Thursday\": 3,\n    \"Tuesday\": 3,\n    \"Wednesday\": 0\n}"}],"_postman_id":"1a163c2d-2be3-4028-86b9-48f47df3e9e6"}],"id":"0a9f5ee8-4f79-40c5-a521-18d8ad685c0d","description":"<p>This collection contains the API endpoint requests that allow a user to generate multiple reports. The reports provides the users with some insightful data regarding their account and some stats and figures that allows them to have an overview of their activity on ToDo Application.</p>\n","event":[{"listen":"prerequest","script":{"id":"f8e2893a-098c-4fbb-a25a-4ff8f961d20c","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"2a884142-3958-42e6-93a9-d27ff3cd7a24","type":"text/javascript","exec":[""]}}],"_postman_id":"0a9f5ee8-4f79-40c5-a521-18d8ad685c0d"}],"event":[{"listen":"prerequest","script":{"id":"504309b4-5b47-4605-af66-1979b37463e7","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"d392fb8b-6416-45a8-be03-7c34d70c4bab","type":"text/javascript","exec":[""]}}]}