{"info":{"_postman_id":"70e60e7c-5ca1-4af3-bb8c-21789deb7337","name":"Task Management System API","description":"<html><head></head><body><h2 id=\"base-url\">Base URL</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-plaintext\">http://localhost:3000/api/\n\n</code></pre>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Most endpoints require authentication using a Bearer token. Include the token in the Authorization header:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-plaintext\">Authorization: Bearer &lt;your_jwt_token&gt;\n\n</code></pre>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"36544059","collectionId":"70e60e7c-5ca1-4af3-bb8c-21789deb7337","publishedId":"2sAXjDevcF","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-08-22T15:17:17.000Z"},"item":[{"name":"User Management","item":[{"name":"Register User","id":"d4de2cc5-5787-4565-b37b-27c7cd4bdf5e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"user\",\r\n    \"password\": \"1234\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/register","description":"<p>This endpoint is used to register a new user. The request should be sent as an HTTP POST to <a href=\"http://localhost:3000/api/register\">http://localhost:3000/api/register</a> with a JSON payload in the raw request body. The request body should include the \"username\" and \"password\" fields.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li><p><code>username</code> (string, required): The username of the new user.</p>\n</li>\n<li><p><code>password</code> (string, required): The password for the new user.</p>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>Upon successful registration, the server will respond with a status code of 200 and a JSON object containing the newly created \"userId\".</p>\n<ul>\n<li><code>userId</code> (number): The unique identifier of the newly registered user.</li>\n</ul>\n<p>Example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"userId\": integer\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"3000","path":["api","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"d4de2cc5-5787-4565-b37b-27c7cd4bdf5e"},{"name":"Register User with a Specific role","id":"c583862b-831a-44d2-8675-f8ec45ec8940","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"jane_smith\",\r\n    \"password\": \"password456\",\r\n    \"role\": \"admin\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/register","description":"<h3 id=\"api-request-description\">API Request Description</h3>\n<p>This API endpoint is used to register a user by sending a POST request to the specified URL. The request should include the user's username, password, and role in the request body.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p><code>username</code> (string) - The username of the user to be registered.</p>\n</li>\n<li><p><code>password</code> (string) - The password for the user's account.</p>\n</li>\n<li><p><code>role</code> (string) - Specifies the type of account being created, such as 'admin' or 'user'</p>\n</li>\n</ul>\n<h3 id=\"api-response\">API Response</h3>\n<p>The response to the request is in JSON format with the following schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"userId\": integer\n}\n\n</code></pre>\n<p>The response includes the <code>userId</code> of the registered user, which is a unique identifier for the user account.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c583862b-831a-44d2-8675-f8ec45ec8940"},{"name":"Login User","id":"c7fae53e-ff15-4d65-8940-8d65450ace98","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"username\",\r\n    \"password\": \"password\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/login","description":"<h3 id=\"login-api\">Login API</h3>\n<p>This API endpoint is used to authenticate users and obtain a token for accessing protected resources.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p><code>username</code> (string, required): The username of the user.</p>\n</li>\n<li><p><code>password</code> (string, required): The password of the user.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>Upon a successful authentication, the API returns a JSON object with a <code>token</code> key containing the authentication token.</p>\n<p>Example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaWF0IjoxNzI0MzM4NTIwLCJleHAiOjE3MjQ0MjQ5MjB9.F5gs1LnKOPcYyjxlkDQxIOzCIUj7gYgc75WwCnC8ee8\"\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"3000","path":["api","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c7fae53e-ff15-4d65-8940-8d65450ace98"},{"name":"Change User Password (Admin & User themselves)","id":"06ca4e91-41f3-405d-ad27-8061dd6d2aae","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"password\": \"dummypassword\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/users/2/password","description":"<h3 id=\"update-user-password\">Update User Password</h3>\n<p>This endpoint allows the user to update the password for a specific user.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><code>password</code> (string, required): The new password for the user.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<ul>\n<li><p>Status: 200 OK</p>\n</li>\n<li><p>Content-Type: application/json</p>\n</li>\n<li><p><code>message</code> (string): A message indicating the result of the password update operation.</p>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"3000","path":["api","users","2","password"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"06ca4e91-41f3-405d-ad27-8061dd6d2aae"},{"name":"Fetch All Users (Admin Only)","id":"6c646764-6da7-4b17-8b5d-552fcdc78425","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/api/users","description":"<p>This endpoint retrieves a list of users from the server.</p>\n<p>The response of this request can be documented as a JSON schema as follows:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"type\": \"array\",\n    \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n            \"id\": {\n                \"type\": \"number\"\n            },\n            \"username\": {\n                \"type\": \"string\"\n            },\n            \"password\": {\n                \"type\": \"string\"\n            },\n            \"role\": {\n                \"type\": \"string\"\n            },\n            \"createdAt\": {\n                \"type\": \"string\"\n            },\n            \"updatedAt\": {\n                \"type\": \"string\"\n            }\n        }\n    }\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"3000","path":["api","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6c646764-6da7-4b17-8b5d-552fcdc78425"},{"name":"Fetch a User by ID (Admin Only)","id":"7c3b9328-070e-484b-b003-47c5e1ca2e37","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/api/users/:id","description":"<p>This endpoint retrieves user details based on the provided user ID. The request should be made using an HTTP GET method to the specified URL with the user's ID as a path parameter.</p>\n<h3 id=\"request\">Request</h3>\n<p>No request body is required for this endpoint.</p>\n<h4 id=\"path-parameters\">Path Parameters</h4>\n<ul>\n<li><code>id</code> (number) - The ID of the user for whom the details are to be retrieved.</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>Upon a successful request, the server will respond with a status code of 200 and a JSON object containing the user details including:</p>\n<ul>\n<li><p><code>id</code> (number) - The user's ID.</p>\n</li>\n<li><p><code>username</code> (string) - The username of the user.</p>\n</li>\n<li><p><code>password</code> (string) - The user's password.</p>\n</li>\n<li><p><code>role</code> (string) - The role of the user.</p>\n</li>\n<li><p><code>createdAt</code> (string) - The timestamp indicating when the user was created.</p>\n</li>\n<li><p><code>updatedAt</code> (string) - The timestamp indicating when the user was last updated.</p>\n</li>\n</ul>\n<p>In case of an error, appropriate status codes and error messages will be provided.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","users",":id"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"1","key":"id"}]}},"response":[],"_postman_id":"7c3b9328-070e-484b-b003-47c5e1ca2e37"},{"name":"Update a User by ID (Admin Only)","event":[{"listen":"test","script":{"id":"1457f48a-6a00-44bc-b1b6-2bcebc20c40d","exec":[""],"type":"text/javascript","packages":{}}}],"id":"e9d9c12c-57ca-4102-b991-7a63436a005c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"role\": \"admin\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/users/:id","description":"<p>The endpoint allows the client to update the details of a specific user, including the ability to update the username, the role, or both using an HTTP PUT request to the specified endpoint.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p><code>username</code> (string, optional): The new username for the user.</p>\n</li>\n<li><p><code>role</code> (string, optional): The new role for the user.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response is in JSON format and follows the schema below:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"type\": \"object\",\n    \"properties\": {\n        \"message\": {\n            \"type\": \"string\"\n        },\n        \"user\": {\n            \"type\": \"object\",\n            \"properties\": {\n                \"id\": {\n                    \"type\": \"integer\"\n                },\n                \"username\": {\n                    \"type\": \"string\"\n                },\n                \"password\": {\n                    \"type\": \"string\"\n                },\n                \"role\": {\n                    \"type\": \"string\"\n                },\n                \"createdAt\": {\n                    \"type\": \"string\"\n                },\n                \"updatedAt\": {\n                    \"type\": \"string\"\n                }\n            }\n        }\n    }\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"3000","path":["api","users",":id"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"1","key":"id"}]}},"response":[],"_postman_id":"e9d9c12c-57ca-4102-b991-7a63436a005c"},{"name":"Delete a User by ID (Admin Only)","id":"8621d7a2-9f6c-46e6-84ce-c35a08ebdc7b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:3000/api/users/:id","description":"<h3 id=\"delete-user-by-id\">Delete User by ID</h3>\n<p>This endpoint is used to delete a user by their ID.</p>\n<h4 id=\"request-parameters\">Request Parameters</h4>\n<ul>\n<li><code>id</code> (path parameter): The ID of the user to be deleted.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<ul>\n<li><p>Status: 200</p>\n</li>\n<li><p>Content Type: application/json</p>\n</li>\n<li><p>{ \"message\": \"\" }</p>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"3000","path":["api","users",":id"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"1","key":"id"}]}},"response":[],"_postman_id":"8621d7a2-9f6c-46e6-84ce-c35a08ebdc7b"}],"id":"dfb4673b-3497-4779-84cc-276bb14a5d06","description":"<p>Endpoints for User Management</p>\n","_postman_id":"dfb4673b-3497-4779-84cc-276bb14a5d06"},{"name":"Task Management","item":[{"name":"Create Task for a user","id":"e9655bd8-65e5-4407-bc5b-4c60c9986822","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"title\": \"Schedule Team Meeting\",\r\n  \"description\": \"Organize a meeting with the team to discuss the next project phase and assign tasks.\",\r\n  \"status\": \"Todo\",\r\n  \"priority\": \"Low\",\r\n  \"due_date\": \"2024-08-30\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/tasks","description":"<p>The <code>POST /api/tasks</code> endpoint is used to create a new task.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li><p><code>title</code> (string, required): The title of the task.</p>\n</li>\n<li><p><code>description</code> (string, required): The description of the task.</p>\n</li>\n<li><p><code>status</code> (string, required): The status of the task.</p>\n</li>\n<li><p><code>priority</code> (string, required): The priority of the task.</p>\n</li>\n<li><p><code>due_date</code> (string, required): The due date of the task.</p>\n</li>\n</ul>\n<h3 id=\"response-201---created\">Response (201 - Created)</h3>\n<p>The response will be in JSON format with the following schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"type\": \"object\",\n    \"properties\": {\n        \"id\": {\n            \"type\": \"number\"\n        },\n        \"title\": {\n            \"type\": \"string\"\n        },\n        \"description\": {\n            \"type\": \"string\"\n        },\n        \"status\": {\n            \"type\": \"string\"\n        },\n        \"priority\": {\n            \"type\": \"string\"\n        },\n        \"due_date\": {\n            \"type\": \"string\"\n        },\n        \"userId\": {\n            \"type\": \"number\"\n        },\n        \"updatedAt\": {\n            \"type\": \"string\"\n        },\n        \"createdAt\": {\n            \"type\": \"string\"\n        }\n    }\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"3000","path":["api","tasks"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e9655bd8-65e5-4407-bc5b-4c60c9986822"},{"name":"Fetch all Tasks assigned to user","id":"4987b98b-e0b0-4c29-8e04-a4683512993a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/api/tasks","description":"<h3 id=\"get-tasks\">Get Tasks</h3>\n<p>This endpoint is used to retrieve a list of tasks.</p>\n<h4 id=\"request\">Request</h4>\n<ul>\n<li>Method: GET</li>\n<li>URL: <code>http://localhost:3000/api/tasks</code></li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>Upon a successful request, the server will respond with a status code of 200 and a JSON array containing task objects. Each task object includes the following properties:</p>\n<ul>\n<li><code>id</code> (number): The unique identifier for the task.</li>\n<li><code>title</code> (string): The title of the task.</li>\n<li><code>description</code> (string): The description of the task.</li>\n<li><code>status</code> (string): The status of the task.</li>\n<li><code>priority</code> (string): The priority of the task.</li>\n<li><code>due_date</code> (string): The due date of the task.</li>\n<li><code>createdAt</code> (string): The creation date of the task.</li>\n<li><code>updatedAt</code> (string): The last update date of the task.</li>\n<li><code>userId</code> (number): The unique identifier of the user to whom the task belongs.</li>\n</ul>\n","urlObject":{"protocol":"http","port":"3000","path":["api","tasks"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"4987b98b-e0b0-4c29-8e04-a4683512993a"},{"name":"Update Task assigned to user","id":"4c9753ca-d597-49f7-9091-2994a711c0ed","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n  \"title\": \"Update Website Content\",\r\n  \"description\": \"Revise and update the website content to reflect the latest product information and promotions.\",\r\n  \"status\": \"In Progress\",\r\n  \"priority\": \"Medium\",\r\n  \"due_date\": \"2024-08-30\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/tasks/:taskid","description":"<p>This endpoint allows updating a specific task identified by the task ID.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li><p>The request body should be in raw JSON format and include the following parameters:</p>\n<ul>\n<li><p>\"title\" (string): The title of the task.</p>\n</li>\n<li><p>\"description\" (string): The description of the task.</p>\n</li>\n<li><p>\"status\" (string): The status of the task.</p>\n</li>\n<li><p>\"priority\" (string): The priority of the task.</p>\n</li>\n<li><p>\"due_date\" (string): The due date of the task.</p>\n</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>The response is in JSON format and includes the following schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": 0,\n  \"title\": \"\",\n  \"description\": \"\",\n  \"status\": \"\",\n  \"priority\": \"\",\n  \"due_date\": \"\",\n  \"createdAt\": \"\",\n  \"updatedAt\": \"\",\n  \"userId\": 0\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"3000","path":["api","tasks",":taskid"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"7","key":"taskid"}]}},"response":[],"_postman_id":"4c9753ca-d597-49f7-9091-2994a711c0ed"},{"name":"Delete Task assigned to user","id":"bd1f5a11-de46-4baf-9ddb-741d6b38be46","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:3000/api/tasks/:taskId","description":"<h3 id=\"delete-task\">Delete Task</h3>\n<p>This endpoint is used to delete a specific task by its ID.</p>\n<h4 id=\"request\">Request</h4>\n<ul>\n<li><p>Method: DELETE</p>\n</li>\n<li><p>URL: <code>http://localhost:3000/api/tasks/:taskId</code></p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response for this request is a JSON object with a key \"message\" indicating the result of the deletion operation.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","tasks",":taskId"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"7","key":"taskId"}]}},"response":[],"_postman_id":"bd1f5a11-de46-4baf-9ddb-741d6b38be46"},{"name":"Fetch All Tasks (Admin Only)","id":"2cd42249-99dd-406a-8b75-c4a23bbe313e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/tasks/all","description":"<h3 id=\"get-apitasksall\">GET /api/tasks/all</h3>\n<p>This endpoint retrieves all tasks.</p>\n<h4 id=\"request\">Request</h4>\n<p>No request body is required for this endpoint.</p>\n<h4 id=\"response\">Response</h4>\n<p>The response is in JSON format and returns an array of task objects. Each task object has the following properties:</p>\n<ul>\n<li><p><code>id</code> (number): The unique identifier for the task.</p>\n</li>\n<li><p><code>title</code> (string): The title of the task.</p>\n</li>\n<li><p><code>description</code> (string): The description of the task.</p>\n</li>\n<li><p><code>status</code> (string): The status of the task.</p>\n</li>\n<li><p><code>priority</code> (string): The priority of the task.</p>\n</li>\n<li><p><code>due_date</code> (string): The due date of the task.</p>\n</li>\n<li><p><code>createdAt</code> (string): The timestamp when the task was created.</p>\n</li>\n<li><p><code>updatedAt</code> (string): The timestamp when the task was last updated.</p>\n</li>\n<li><p><code>userId</code> (number): The unique identifier of the user to whom the task belongs.</p>\n</li>\n</ul>\n<h4 id=\"response-schema\">Response Schema</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n  {\n    \"id\": 0,\n    \"title\": \"\",\n    \"description\": \"\",\n    \"status\": \"\",\n    \"priority\": \"\",\n    \"due_date\": \"\",\n    \"createdAt\": \"\",\n    \"updatedAt\": \"\",\n    \"userId\": 0\n  }\n]\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"3000","path":["api","tasks","all"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"2cd42249-99dd-406a-8b75-c4a23bbe313e"},{"name":"Fetch Tasks by User ID (Admin Only)","id":"d07c130d-5a96-48e9-afef-5214b31c64c7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/api/tasks/user/:id","description":"<p>The API endpoint retrieves a list of tasks for a specific user identified by the provided ID.</p>\n<p>The response returned is a JSON array containing task objects with the following properties:</p>\n<ul>\n<li><p><code>id</code> (number): The unique identifier of the task.</p>\n</li>\n<li><p><code>title</code> (string): The title of the task.</p>\n</li>\n<li><p><code>description</code> (string): The description of the task.</p>\n</li>\n<li><p><code>status</code> (string): The status of the task.</p>\n</li>\n<li><p><code>priority</code> (string): The priority of the task.</p>\n</li>\n<li><p><code>due_date</code> (string): The due date of the task.</p>\n</li>\n<li><p><code>createdAt</code> (string): The timestamp when the task was created.</p>\n</li>\n<li><p><code>updatedAt</code> (string): The timestamp when the task was last updated.</p>\n</li>\n<li><p><code>userId</code> (number): The ID of the user to whom the task belongs.</p>\n</li>\n</ul>\n<p>This response can be documented as a JSON schema for the task object.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","tasks","user",":id"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"2","key":"id"}]}},"response":[],"_postman_id":"d07c130d-5a96-48e9-afef-5214b31c64c7"},{"name":"Assign task to a user by ID (Admin Only)","id":"1d40e9c1-7bed-4633-98b6-822923eb3afc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"userId\": 2\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/api/tasks/:taskId/assign","description":"<p>This endpoint allows you to assign a user to a specific task by sending an HTTP PUT request to <a href=\"http://localhost:3000/api/tasks/:taskId/assign\">http://localhost:3000/api/tasks/:taskId/assign</a>. The request should include a JSON payload in the raw request body type with the \"userId\" parameter.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li><code>userId</code> (number): The ID of the user to be assigned to the task.</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>Upon successful execution, the endpoint returns a status code of 200 and a JSON response with the following structure:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"\",\n    \"task\": {\n        \"id\": 0,\n        \"title\": \"\",\n        \"description\": \"\",\n        \"status\": \"\",\n        \"priority\": \"\",\n        \"due_date\": \"\",\n        \"createdAt\": \"\",\n        \"updatedAt\": \"\",\n        \"userId\": 0\n    }\n}\n\n</code></pre>\n<p>The response includes a \"message\" field and details of the assigned \"task\", including its ID, title, description, status, priority, due date, creation and update timestamps, and the assigned user's ID.</p>\n","urlObject":{"protocol":"http","port":"3000","path":["api","tasks",":taskId","assign"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"4","key":"taskId"}]}},"response":[],"_postman_id":"1d40e9c1-7bed-4633-98b6-822923eb3afc"}],"id":"c0fb76fe-47e5-4798-8327-31939947d89f","description":"<p>Endpoints for Task Management</p>\n","_postman_id":"c0fb76fe-47e5-4798-8327-31939947d89f"}]}