{"info":{"_postman_id":"3ab53d52-9505-4602-b69c-5b0a1ea587c1","name":"users-server","description":"<html><head></head><body><p>StartFragment</p>\n<h1 id=\"users-server-api-documentation\">📘 Users Server API Documentation</h1>\n<h2 id=\"📌-project-overview\">📌 Project Overview</h2>\n<p>This project is a simple <strong>User Management REST API</strong> built using <strong>Node.js and Express.js</strong>.</p>\n<p>It supports full CRUD operations:</p>\n<ul>\n<li><p>Get all users</p>\n</li>\n<li><p>Get user by UID</p>\n</li>\n<li><p>Create user</p>\n</li>\n<li><p>Update user (PUT)</p>\n</li>\n<li><p>Partial update user (PATCH)</p>\n</li>\n<li><p>Delete user</p>\n</li>\n</ul>\n<hr>\n<h2 id=\"🚀-base-url\">🚀 Base URL</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>http://localhost:3000\n\n</code></pre><hr>\n<h1 id=\"user-object-structure\">📂 User Object Structure</h1>\n<p>Each user contains the following fields:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>att</td>\n<td>Number</td>\n<td>Attendance</td>\n</tr>\n<tr>\n<td>uid</td>\n<td>Number</td>\n<td>Unique User ID</td>\n</tr>\n<tr>\n<td>totalsub</td>\n<td>Number</td>\n<td>Total Submissions</td>\n</tr>\n<tr>\n<td>bonus</td>\n<td>Number</td>\n<td>Bonus Points</td>\n</tr>\n<tr>\n<td>name</td>\n<td>String</td>\n<td>User Name</td>\n</tr>\n</tbody>\n</table>\n</div><hr>\n<h1 id=\"1-get-all-users\">🔹 1. Get All Users</h1>\n<h3 id=\"method\">Method:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET\n\n</code></pre><h3 id=\"endpoint\">Endpoint:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>/user\n\n</code></pre><h3 id=\"example-url\">Example URL:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>http://localhost:3000/user\n\n</code></pre><h3 id=\"success-response-200-ok\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>[\n  {\n    \"att\": 80,\n    \"uid\": 108623,\n    \"totalsub\": 12,\n    \"bonus\": 20,\n    \"name\": \"jilan\"\n  }\n]\n\n</code></pre><hr>\n<h1 id=\"2-get-user-by-uid\">🔹 2. Get User By UID</h1>\n<h3 id=\"method-1\">Method:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET\n\n</code></pre><h3 id=\"endpoint-1\">Endpoint:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>/user/:uid\n\n</code></pre><h3 id=\"example\">Example:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>http://localhost:3000/user/108623\n\n</code></pre><h3 id=\"success-response-200-ok-1\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"att\": 80,\n  \"uid\": 108623,\n  \"totalsub\": 12,\n  \"bonus\": 20,\n  \"name\": \"jilan\"\n}\n\n</code></pre><h3 id=\"error-response-404-not-found\">Error Response (404 Not Found)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"message\": \"User not found\"\n}\n\n</code></pre><hr>\n<h1 id=\"3-create-new-user\">🔹 3. Create New User</h1>\n<h3 id=\"method-2\">Method:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST\n\n</code></pre><h3 id=\"endpoint-2\">Endpoint:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>/user\n\n</code></pre><h3 id=\"example-url-1\">Example URL:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>http://localhost:3000/user\n\n</code></pre><h3 id=\"request-body-json\">Request Body (JSON)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"att\": 75,\n  \"uid\": 109000,\n  \"totalsub\": 10,\n  \"bonus\": 15,\n  \"name\": \"rahul\"\n}\n\n</code></pre><h3 id=\"success-response-201-created\">Success Response (201 Created)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"message\": \"User created\",\n  \"user\": {\n    \"att\": 75,\n    \"uid\": 109000,\n    \"totalsub\": 10,\n    \"bonus\": 15,\n    \"name\": \"rahul\"\n  }\n}\n\n</code></pre><hr>\n<h1 id=\"4-update-user-full-replace\">🔹 4. Update User (Full Replace)</h1>\n<h3 id=\"method-3\">Method:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>PUT\n\n</code></pre><h3 id=\"endpoint-3\">Endpoint:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>/user/:uid\n\n</code></pre><h3 id=\"example-1\">Example:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>http://localhost:3000/user/108623\n\n</code></pre><h3 id=\"request-body-all-fields-required\">Request Body (All fields required)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"att\": 90,\n  \"totalsub\": 20,\n  \"bonus\": 50,\n  \"name\": \"jilan updated\"\n}\n\n</code></pre><h3 id=\"success-response-200-ok-2\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"message\": \"User replaced\",\n  \"user\": {\n    \"att\": 90,\n    \"uid\": 108623,\n    \"totalsub\": 20,\n    \"bonus\": 50,\n    \"name\": \"jilan updated\"\n  }\n}\n\n</code></pre><h3 id=\"error-response-404-not-found-1\">Error Response (404 Not Found)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"message\": \"User not found\"\n}\n\n</code></pre><hr>\n<h1 id=\"5-update-user-partial-update\">🔹 5. Update User (Partial Update)</h1>\n<h3 id=\"method-4\">Method:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>PATCH\n\n</code></pre><h3 id=\"endpoint-4\">Endpoint:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>/user/:uid\n\n</code></pre><h3 id=\"example-2\">Example:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>http://localhost:3000/user/108623\n\n</code></pre><h3 id=\"request-body-only-fields-to-update\">Request Body (Only fields to update)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"bonus\": 99\n}\n\n</code></pre><h3 id=\"success-response-200-ok-3\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"message\": \"User partially updated\",\n  \"user\": {\n    \"att\": 80,\n    \"uid\": 108623,\n    \"totalsub\": 12,\n    \"bonus\": 99,\n    \"name\": \"jilan\"\n  }\n}\n\n</code></pre><h3 id=\"error-response-404-not-found-2\">Error Response (404 Not Found)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"message\": \"User not found\"\n}\n\n</code></pre><hr>\n<h1 id=\"6-delete-user\">🔹 6. Delete User</h1>\n<h3 id=\"method-5\">Method:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>DELETE\n\n</code></pre><h3 id=\"endpoint-5\">Endpoint:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>/user/:uid\n\n</code></pre><h3 id=\"example-3\">Example:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>http://localhost:3000/user/108623\n\n</code></pre><h3 id=\"success-response-200-ok-4\">Success Response (200 OK)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"message\": \"User deleted successfully\",\n  \"user\": {\n    \"att\": 80,\n    \"uid\": 108623,\n    \"totalsub\": 12,\n    \"bonus\": 20,\n    \"name\": \"jilan\"\n  }\n}\n\n</code></pre><h3 id=\"error-response-404-not-found-3\">Error Response (404 Not Found)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"message\": \"User not found\"\n}\n\n</code></pre><hr>\n<h1 id=\"how-to-run-the-project\">🛠 How to Run the Project</h1>\n<ol>\n<li>Install dependencies:</li>\n</ol>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>npm install\n\n</code></pre><ol>\n<li>Start the server:</li>\n</ol>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>node index.js\n\n</code></pre><ol>\n<li>Server will run on:</li>\n</ol>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>http://localhost:3000\n\n</code></pre><hr>\n<h1 id=\"technologies-used\">📌 Technologies Used</h1>\n<ul>\n<li><p>Node.js</p>\n</li>\n<li><p>Express.js</p>\n</li>\n<li><p>Postman (for API testing)</p>\n</li>\n</ul>\n<hr>\n<h1 id=\"features\">✅ Features</h1>\n<ul>\n<li><p>RESTful API design</p>\n</li>\n<li><p>Proper HTTP status codes</p>\n</li>\n<li><p>Error handling</p>\n</li>\n<li><p>JSON request &amp; response</p>\n</li>\n<li><p>Full CRUD operations</p>\n</li>\n</ul>\n<p>EndFragment</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"📘 Users Server API Documentation","slug":"users-server-api-documentation"},{"content":"📂 User Object Structure","slug":"user-object-structure"},{"content":"🔹 1. Get All Users","slug":"1-get-all-users"},{"content":"🔹 2. Get User By UID","slug":"2-get-user-by-uid"},{"content":"🔹 3. Create New User","slug":"3-create-new-user"},{"content":"🔹 4. Update User (Full Replace)","slug":"4-update-user-full-replace"},{"content":"🔹 5. Update User (Partial Update)","slug":"5-update-user-partial-update"},{"content":"🔹 6. Delete User","slug":"6-delete-user"},{"content":"🛠 How to Run the Project","slug":"how-to-run-the-project"},{"content":"📌 Technologies Used","slug":"technologies-used"},{"content":"✅ Features","slug":"features"}],"owner":"50840642","collectionId":"3ab53d52-9505-4602-b69c-5b0a1ea587c1","publishedId":"2sBXcDFgQt","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-02-17T10:32:14.000Z"},"item":[{"name":"get user by uid","id":"29edf801-3565-4654-b753-2f679f6d9056","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/user/:uid","urlObject":{"protocol":"http","port":"3000","path":["user",":uid"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"108623","key":"uid"}]}},"response":[],"_postman_id":"29edf801-3565-4654-b753-2f679f6d9056"},{"name":"add user by uid","id":"9a17f50b-a30e-45d2-9705-a536a1043d66","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":" { \"att\": 80, \"uid\": 108623, \"totalsub\": 12, \"bonus\": 20, \"name\": \"jilan\" }","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/user","urlObject":{"protocol":"http","port":"3000","path":["user"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9a17f50b-a30e-45d2-9705-a536a1043d66"},{"name":"update user by uid","id":"19ecc139-a32d-44fb-a101-54b78c1f49c3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{ \"att\": \"100\", \"uid\": \"108726\", \"totalsub\": \"15\", \"bonus\": \"30\", \"name\": \"ronit\" }","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/user/:uid","urlObject":{"protocol":"http","port":"3000","path":["user",":uid"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"108726","key":"uid"}]}},"response":[],"_postman_id":"19ecc139-a32d-44fb-a101-54b78c1f49c3"},{"name":"get all users","id":"bc5692b6-1918-451f-ae08-cacbf675849f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/user","urlObject":{"protocol":"http","port":"3000","path":["user"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"bc5692b6-1918-451f-ae08-cacbf675849f"},{"name":"update user by PATCH","id":"6c68ff63-7256-43e9-bee2-e7a767fe5fd3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{ \"att\": \"100\", \"uid\": \"108726\", \"totalsub\": \"15\", \"bonus\": \"30\", \"name\": \"ronit\" }","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/user/:uid","urlObject":{"protocol":"http","port":"3000","path":["user",":uid"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"108726","key":"uid"}]}},"response":[],"_postman_id":"6c68ff63-7256-43e9-bee2-e7a767fe5fd3"},{"name":"delete user by uid","id":"1f953df4-77aa-4912-bbc2-33180e340776","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:3000/user/:uid","urlObject":{"protocol":"http","port":"3000","path":["user",":uid"],"host":["localhost"],"query":[],"variable":[{"type":"any","value":"108726","key":"uid"}]}},"response":[],"_postman_id":"1f953df4-77aa-4912-bbc2-33180e340776"}]}