{"info":{"_postman_id":"659c5aed-9d50-42f0-a578-1c858754c89d","name":"Students CGPA Collection","description":"<html><head></head><body><p>The <strong>Students CGPA API</strong> is a RESTful service built using <strong>Node.js</strong>, <strong>Express.js</strong>, and <strong>CORS middleware</strong>. It manages student academic records including branch, semester, and CGPA details.</p>\n<p>The API provides endpoints to:</p>\n<ul>\n<li><p>Retrieve all students</p>\n</li>\n<li><p>Fetch a student by ID</p>\n</li>\n<li><p>Filter students by branch</p>\n</li>\n<li><p>Get total student count</p>\n</li>\n<li><p>Calculate average CGPA</p>\n</li>\n<li><p>Retrieve the topper (highest CGPA holder)</p>\n</li>\n</ul>\n<h2 id=\"🌐-base-url\">🌐 Base URL</h2>\n<p>text</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>https://students-cgpa-api-rr39.onrender.com\n\n</code></pre><h2 id=\"🔐-authentication\">🔐 Authentication</h2>\n<p>No authentication is required for this API. All endpoints are publicly accessible.</p>\n<h2 id=\"📌-available-endpoints\">📌 Available Endpoints</h2>\n<hr>\n<h3 id=\"1-health-check\">1. Health Check</h3>\n<p><strong>GET</strong> <code>/</code></p>\n<p>Returns a simple confirmation message that the API is running.</p>\n<p><strong>Response Example:</strong></p>\n<p>json</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"message\": \"API is running successfully\"\n}\n\n</code></pre><hr>\n<h3 id=\"2-get-all-students\">2. Get All Students</h3>\n<p><strong>GET</strong> <code>/students</code></p>\n<p>Returns the complete list of student records.</p>\n<p><strong>Response Example:</strong></p>\n<p>json</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>[\n  {\n    \"id\": 1,\n    \"name\": \"Aarav Sharma\",\n    \"branch\": \"CSE\",\n    \"semester\": 8,\n    \"cgpa\": 9.3\n  },\n  {\n    \"id\": 2,\n    \"name\": \"Priya Patel\",\n    \"branch\": \"ECE\",\n    \"semester\": 6,\n    \"cgpa\": 8.7\n  },\n  {\n    \"id\": 3,\n    \"name\": \"Rahul Kumar\",\n    \"branch\": \"CSE\",\n    \"semester\": 8,\n    \"cgpa\": 8.9\n  }\n]\n\n</code></pre><hr>\n<h3 id=\"3-get-topper-student\">3. Get Topper Student</h3>\n<p><strong>GET</strong> <code>/students/topper</code></p>\n<p>Returns the student with the highest CGPA.</p>\n<p><strong>Success Response (200 OK):</strong></p>\n<p>json</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"id\": 1,\n  \"name\": \"Aarav Sharma\",\n  \"branch\": \"CSE\",\n  \"semester\": 8,\n  \"cgpa\": 9.3\n}\n\n</code></pre><p><strong>Error Response (404 Not Found):</strong></p>\n<p>json</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"error\": \"No students found\"\n}\n\n</code></pre><p><em>Returns 404 if no students exist.</em></p>\n<hr>\n<h3 id=\"4-get-average-cgpa\">4. Get Average CGPA</h3>\n<p><strong>GET</strong> <code>/students/average</code></p>\n<p>Calculates and returns the average CGPA of all students.</p>\n<p><strong>Response Example:</strong></p>\n<p>json</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"averageCGPA\": 8.97\n}\n\n</code></pre><hr>\n<h3 id=\"5-get-total-student-count\">5. Get Total Student Count</h3>\n<p><strong>GET</strong> <code>/students/count</code></p>\n<p>Returns the total number of students.</p>\n<p><strong>Response Example:</strong></p>\n<p>json</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"totalStudents\": 10\n}\n\n</code></pre><hr>\n<h3 id=\"6-get-student-by-id\">6. Get Student By ID</h3>\n<p><strong>GET</strong> <code>/students/:id</code></p>\n<p>Retrieves a student record based on unique ID.</p>\n<p><strong>Path Parameter:</strong></p>\n<ul>\n<li><code>id</code> (number) – Unique identifier of the student</li>\n</ul>\n<p><strong>Success Response (200 OK):</strong></p>\n<p>json</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"id\": 2,\n  \"name\": \"Priya Patel\",\n  \"branch\": \"ECE\",\n  \"semester\": 6,\n  \"cgpa\": 8.7\n}\n\n</code></pre><p><strong>Error Response (404 Not Found):</strong></p>\n<p>json</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"error\": \"Student not found\"\n}\n\n</code></pre><p><em>Returns 404 if student with given ID does not exist.</em></p>\n<hr>\n<h3 id=\"7-get-students-by-branch\">7. Get Students By Branch</h3>\n<p><strong>GET</strong> <code>/students/branch/:branchName</code></p>\n<p>Returns all students belonging to a specific branch (case-insensitive).</p>\n<p><strong>Path Parameter:</strong></p>\n<ul>\n<li><code>branchName</code> (string) – Branch code (e.g., <code>CSE</code>, <code>ECE</code>, <code>MECH</code>)</li>\n</ul>\n<p><strong>Example Request:</strong></p>\n<p>text</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET /students/branch/CSE\n\n</code></pre><p><strong>Response Example:</strong></p>\n<p>json</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>[\n  {\n    \"id\": 1,\n    \"name\": \"Aarav Sharma\",\n    \"branch\": \"CSE\",\n    \"semester\": 8,\n    \"cgpa\": 9.3\n  },\n  {\n    \"id\": 3,\n    \"name\": \"Rahul Kumar\",\n    \"branch\": \"CSE\",\n    \"semester\": 8,\n    \"cgpa\": 8.9\n  }\n]\n\n</code></pre><p><strong>Empty Response (if no students in branch):</strong></p>\n<p>json</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>[]\n\n</code></pre><hr>\n<h2 id=\"📊-student-data-model\">📊 Student Data Model</h2>\n<p>Each student object has the following structure:</p>\n<p>json</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n  \"id\": 1,\n  \"name\": \"Aarav Sharma\",\n  \"branch\": \"CSE\",\n  \"semester\": 8,\n  \"cgpa\": 9.3\n}\n\n</code></pre><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><code>id</code></td>\n<td>number</td>\n<td>Unique student identifier</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>Full name of the student</td>\n</tr>\n<tr>\n<td><code>branch</code></td>\n<td>string</td>\n<td>Academic branch (e.g., CSE, ECE)</td>\n</tr>\n<tr>\n<td><code>semester</code></td>\n<td>number</td>\n<td>Current semester (1-8 typically)</td>\n</tr>\n<tr>\n<td><code>cgpa</code></td>\n<td>number</td>\n<td>Cumulative Grade Point Average (0-10)</td>\n</tr>\n</tbody>\n</table>\n</div><hr>\n<h2 id=\"⚠️-error-handling\">⚠️ Error Handling</h2>\n<p>The API returns standard HTTP status codes and consistent error responses:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status Code</th>\n<th>Meaning</th>\n<th>Response Body Example</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>200</td>\n<td>OK – Request succeeded</td>\n<td>Varies by endpoint</td>\n</tr>\n<tr>\n<td>404</td>\n<td>Not Found – Resource missing</td>\n<td><code>{ \"error\": \"Student not found\" }</code></td>\n</tr>\n<tr>\n<td>500</td>\n<td>Internal Server Error</td>\n<td><code>{ \"error\": \"Internal server error\" }</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr>\n<hr>\n<h2 id=\"🛠-technical-stack\">🛠 Technical Stack</h2>\n<ul>\n<li><p><strong>Node.js</strong> – JavaScript runtime</p>\n</li>\n<li><p><strong>Express.js</strong> – Web framework</p>\n</li>\n<li><p><strong>CORS</strong> – Cross-Origin Resource Sharing middleware</p>\n</li>\n<li><p><strong>JSON middleware</strong> – Built-in Express JSON parser</p>\n</li>\n</ul>\n<hr>\n<h2 id=\"📝-notes-for-developers\">📝 Notes for Developers</h2>\n<ul>\n<li><p>All endpoints return JSON responses.</p>\n</li>\n<li><p>The branch filter is case-insensitive (<code>/branch/cse</code> works the same as <code>/branch/CSE</code>).</p>\n</li>\n<li><p>The student data is currently in-memory (resets on server restart). For production, consider connecting a database.</p>\n</li>\n<li><p>Rate limiting is not implemented; please use responsibly.</p>\n</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"50839260","collectionId":"659c5aed-9d50-42f0-a578-1c858754c89d","publishedId":"2sBXcGCyi5","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-02-24T06:33:50.000Z"},"item":[{"name":"Get All Students","id":"96b6958d-25ff-439f-a07a-7a62e13b68c4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://students-cgpa-api-rr39.onrender.com/students","description":"<h2 id=\"get-all-students\">Get All Students</h2>\n<p>Retrieves a list of all students currently stored in the system.</p>\n<p><strong>Method:</strong> <code>GET</code><br /><strong>URL:</strong> <a href=\"https://students-cgpa-api-rr39.onrender.com/students\">https://students-cgpa-api-rr39.onrender.com/students</a></p>\n<hr />\n<h3 id=\"response\">Response</h3>\n<p>Returns a JSON array of student objects. Each object 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><code>id</code></td>\n<td>integer</td>\n<td>Unique identifier for the student</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td>string</td>\n<td>Full name of the student</td>\n</tr>\n<tr>\n<td><code>branch</code></td>\n<td>string</td>\n<td>Academic branch (e.g. <code>CSE</code>, <code>IT</code>, <code>ECE</code>, <code>AI</code>, <code>Data Science</code>)</td>\n</tr>\n<tr>\n<td><code>semester</code></td>\n<td>integer</td>\n<td>Current semester of the student</td>\n</tr>\n<tr>\n<td><code>cgpa</code></td>\n<td>float</td>\n<td>Cumulative Grade Point Average of the student</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">[\n  {\"id\": 1, \"name\": \"Aarav Sharma\", \"branch\": \"CSE\", \"semester\": 8, \"cgpa\": 9.3},\n  {\"id\": 2, \"name\": \"Ishita Verma\", \"branch\": \"IT\", \"semester\": 7, \"cgpa\": 8.9},\n  {\"id\": 3, \"name\": \"Rohan Kulkarni\", \"branch\": \"ECE\", \"semester\": 6, \"cgpa\": 8.4}\n]\n\n</code></pre>\n<hr />\n<h3 id=\"response-codes\">Response Codes</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>200 OK</code></td>\n<td>Successfully retrieved the list of students</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["students"],"host":["students-cgpa-api-rr39","onrender","com"],"query":[],"variable":[]}},"response":[{"id":"8eb0e64e-9ad8-42e6-ba1c-b45fd1331fa3","name":"Get All Students","originalRequest":{"method":"GET","header":[],"url":"https://students-cgpa-api-rr39.onrender.com/students"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Date","value":"Tue, 24 Feb 2026 06:27:03 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"254"},{"key":"Connection","value":"keep-alive"},{"key":"CF-RAY","value":"9d2ce51a8abdedf5-BOM"},{"key":"access-control-allow-origin","value":"*"},{"key":"Content-Encoding","value":"br"},{"key":"etag","value":"W/\"2c2-eg8a8aTavyPAgNHP/P5m4llaFTk\""},{"key":"rndr-id","value":"7aa6df2e-a33d-400e"},{"key":"vary","value":"Accept-Encoding"},{"key":"x-powered-by","value":"Express"},{"key":"x-render-origin-server","value":"Render"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 1,\n        \"name\": \"Aarav Sharma\",\n        \"branch\": \"CSE\",\n        \"semester\": 8,\n        \"cgpa\": 9.3\n    },\n    {\n        \"id\": 2,\n        \"name\": \"Ishita Verma\",\n        \"branch\": \"IT\",\n        \"semester\": 7,\n        \"cgpa\": 8.9\n    },\n    {\n        \"id\": 3,\n        \"name\": \"Rohan Kulkarni\",\n        \"branch\": \"ECE\",\n        \"semester\": 6,\n        \"cgpa\": 8.4\n    },\n    {\n        \"id\": 4,\n        \"name\": \"Meera Iyer\",\n        \"branch\": \"CSE\",\n        \"semester\": 8,\n        \"cgpa\": 9.1\n    },\n    {\n        \"id\": 5,\n        \"name\": \"Kunal Deshmukh\",\n        \"branch\": \"IT\",\n        \"semester\": 5,\n        \"cgpa\": 7.8\n    },\n    {\n        \"id\": 6,\n        \"name\": \"Ananya Reddy\",\n        \"branch\": \"CSE\",\n        \"semester\": 6,\n        \"cgpa\": 8.7\n    },\n    {\n        \"id\": 7,\n        \"name\": \"Vikram Patil\",\n        \"branch\": \"ECE\",\n        \"semester\": 7,\n        \"cgpa\": 8.2\n    },\n    {\n        \"id\": 8,\n        \"name\": \"Priyanka Nair\",\n        \"branch\": \"AI\",\n        \"semester\": 4,\n        \"cgpa\": 8.8\n    },\n    {\n        \"id\": 9,\n        \"name\": \"Harsh Mehta\",\n        \"branch\": \"Data Science\",\n        \"semester\": 5,\n        \"cgpa\": 8\n    },\n    {\n        \"id\": 10,\n        \"name\": \"Neha Gupta\",\n        \"branch\": \"CSE\",\n        \"semester\": 6,\n        \"cgpa\": 7.9\n    }\n]"}],"_postman_id":"96b6958d-25ff-439f-a07a-7a62e13b68c4"},{"name":"Get the topper","id":"66e0bdea-91d6-4df7-917e-605f2d15181c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<h2 id=\"get-topper-student\">Get Topper Student</h2>\n<p>Retrieves the details of the top-performing student based on CGPA from the student records.</p>\n<p><strong>Endpoint:</strong> <code>GET /students/topper</code></p>\n<hr />\n<h3 id=\"response\">Response</h3>\n<p>Returns a single student object representing the topper.</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><code>id</code></td>\n<td><code>integer</code></td>\n<td>Unique identifier of the student</td>\n</tr>\n<tr>\n<td><code>name</code></td>\n<td><code>string</code></td>\n<td>Full name of the student</td>\n</tr>\n<tr>\n<td><code>branch</code></td>\n<td><code>string</code></td>\n<td>Academic branch/department (e.g., CSE, ECE)</td>\n</tr>\n<tr>\n<td><code>semester</code></td>\n<td><code>integer</code></td>\n<td>Current semester of the student</td>\n</tr>\n<tr>\n<td><code>cgpa</code></td>\n<td><code>float</code></td>\n<td>Cumulative Grade Point Average of the student</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"example-response\">Example Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"id\": 1,\n  \"name\": \"Aarav Sharma\",\n  \"branch\": \"CSE\",\n  \"semester\": 8,\n  \"cgpa\": 9.3\n}\n</code></pre>\n<hr />\n<h3 id=\"response-codes\">Response Codes</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status Code</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>200 OK</code></td>\n<td>Successfully retrieved the topper student details</td>\n</tr>\n<tr>\n<td><code>404 Not Found</code></td>\n<td>No student records found</td>\n</tr>\n<tr>\n<td><code>500 Internal Server Error</code></td>\n<td>Server encountered an unexpected error</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"9b3d60b6-d5ff-480c-b5b7-8712f3bd6d3e","name":"Get the topper","originalRequest":{"method":"GET","header":[],"url":"https://students-cgpa-api-rr39.onrender.com/students/topper"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Date","value":"Tue, 24 Feb 2026 06:26:45 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"67"},{"key":"Connection","value":"keep-alive"},{"key":"CF-RAY","value":"9d2ce4a84d41edf5-BOM"},{"key":"access-control-allow-origin","value":"*"},{"key":"Content-Encoding","value":"br"},{"key":"etag","value":"W/\"45-Zt+hMq9DFzGEG2U2YFMym5i2hhM\""},{"key":"rndr-id","value":"edf6360e-9f19-4d43"},{"key":"vary","value":"Accept-Encoding"},{"key":"x-powered-by","value":"Express"},{"key":"x-render-origin-server","value":"Render"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 1,\n    \"name\": \"Aarav Sharma\",\n    \"branch\": \"CSE\",\n    \"semester\": 8,\n    \"cgpa\": 9.3\n}"}],"_postman_id":"66e0bdea-91d6-4df7-917e-605f2d15181c"},{"name":"Get students average","id":"185c9f69-b4d3-4283-aee4-02931d617d51","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://students-cgpa-api-rr39.onrender.com/students/average","description":"<h2 id=\"get-average-cgpa-of-all-students\">Get Average CGPA of All Students</h2>\n<p>Retrieves the average CGPA (Cumulative Grade Point Average) calculated across all students in the system.</p>\n<hr />\n<h3 id=\"endpoint\">Endpoint</h3>\n<p><code>GET /students/average</code></p>\n<hr />\n<h3 id=\"response\">Response</h3>\n<p>Returns a JSON object containing the computed average CGPA.</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><code>averageCGPA</code></td>\n<td><code>number</code></td>\n<td>The average CGPA of all students, calculated as the mean of all individual student CGPAs.</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"example-response\">Example Response</h3>\n<p><strong>Status:</strong> <code>200 OK</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"averageCGPA\": 8.510000000000002\n}\n</code></pre>\n","urlObject":{"protocol":"https","path":["students","average"],"host":["students-cgpa-api-rr39","onrender","com"],"query":[],"variable":[]}},"response":[{"id":"d7b3fac3-f227-471f-af3a-c52e543e9521","name":"Get students average","originalRequest":{"method":"GET","header":[],"url":"https://students-cgpa-api-rr39.onrender.com/students/average"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Date","value":"Tue, 24 Feb 2026 06:26:34 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"37"},{"key":"Connection","value":"keep-alive"},{"key":"CF-RAY","value":"9d2ce465e9b5edf5-BOM"},{"key":"access-control-allow-origin","value":"*"},{"key":"Content-Encoding","value":"br"},{"key":"etag","value":"W/\"21-IuDXgLeYCcKyhvV4zEq3dXBALNI\""},{"key":"rndr-id","value":"0e92f6a4-529d-410e"},{"key":"vary","value":"Accept-Encoding"},{"key":"x-powered-by","value":"Express"},{"key":"x-render-origin-server","value":"Render"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"averageCGPA\": 8.510000000000002\n}"}],"_postman_id":"185c9f69-b4d3-4283-aee4-02931d617d51"},{"name":"Get total no. of students","id":"3d7b8f8e-ab35-41ff-8fa0-bef68d224b60","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://students-cgpa-api-rr39.onrender.com/students/count","description":"<h2 id=\"get-students-count\">Get Students Count</h2>\n<p>Returns the total number of students stored in the system.</p>\n<hr />\n<h3 id=\"endpoint\"><strong>Endpoint</strong></h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://students-cgpa-api-rr39.onrender.com/students/count\n\n</code></pre><hr />\n<h3 id=\"description\"><strong>Description</strong></h3>\n<p>This endpoint retrieves the total number of student records currently available in the database.</p>\n<hr />\n<h3 id=\"http-method\"><strong>HTTP Method</strong></h3>\n<p><code>GET</code></p>\n<hr />\n<h3 id=\"request-parameters\"><strong>Request Parameters</strong></h3>\n<p>None.</p>\n<hr />\n<h3 id=\"request-headers\"><strong>Request Headers</strong></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Content-Type</td>\n<td>No</td>\n<td><code>application/json</code> (default)</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"response\"><strong>Response</strong></h3>\n<h4 id=\"✅-success-response\">✅ Success Response</h4>\n<p><strong>Status Code:</strong> <code>200 OK</code></p>\n<p><strong>Content-Type:</strong> <code>application/json</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{    \"totalStudents\": 10}\n\n</code></pre><h4 id=\"response-fields\">Response Fields</h4>\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>totalStudents</td>\n<td>number</td>\n<td>Total number of students in the database</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"❌-error-responses\">❌ Error Responses</h3>\n<h4 id=\"500-internal-server-error\">500 Internal Server Error</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{    \"message\": \"Internal server error\"}\n\n</code></pre>","urlObject":{"protocol":"https","path":["students","count"],"host":["students-cgpa-api-rr39","onrender","com"],"query":[],"variable":[]}},"response":[{"id":"6249e242-647e-4f23-8473-9a025ea23008","name":"Get total no. of students","originalRequest":{"method":"GET","header":[],"url":"https://students-cgpa-api-rr39.onrender.com/students/count"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Date","value":"Tue, 24 Feb 2026 06:26:18 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"24"},{"key":"Connection","value":"keep-alive"},{"key":"CF-RAY","value":"9d2ce4037bbaedf5-BOM"},{"key":"access-control-allow-origin","value":"*"},{"key":"Content-Encoding","value":"br"},{"key":"etag","value":"W/\"14-ZCr578jhpX757IeGMYai54RJ+lQ\""},{"key":"rndr-id","value":"eae2b7a4-1a3f-431f"},{"key":"vary","value":"Accept-Encoding"},{"key":"x-powered-by","value":"Express"},{"key":"x-render-origin-server","value":"Render"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"totalStudents\": 10\n}"}],"_postman_id":"3d7b8f8e-ab35-41ff-8fa0-bef68d224b60"},{"name":"Get student by id","id":"2674232a-9602-4bfc-8ed4-bae9fb2283b8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://students-cgpa-api-rr39.onrender.com/students/:id","description":"<h2 id=\"get-student-by-id\">Get Student By ID</h2>\n<p>Retrieves detailed information for a specific student using their unique identifier.</p>\n<hr />\n<h3 id=\"endpoint\"><strong>Endpoint</strong></h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://students-cgpa-api-rr39.onrender.com/students/:id\n\n</code></pre><hr />\n<h3 id=\"description\"><strong>Description</strong></h3>\n<p>Fetches a single student record based on the provided <code>id</code> path parameter.</p>\n<hr />\n<h3 id=\"http-method\"><strong>HTTP Method</strong></h3>\n<p><code>GET</code></p>\n<hr />\n<h3 id=\"path-parameters\"><strong>Path Parameters</strong></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>number</td>\n<td>Yes</td>\n<td>Unique identifier of the student</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"example-request\"><strong>Example Request</strong></h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://students-cgpa-api-rr39.onrender.com/students/2\n\n</code></pre><hr />\n<h3 id=\"response\"><strong>Response</strong></h3>\n<h4 id=\"✅-success-response\">✅ Success Response</h4>\n<p><strong>Status Code:</strong> <code>200 OK</code><br /><strong>Content-Type:</strong> <code>application/json</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{    \"id\": 2,    \"name\": \"Ishita Verma\",    \"branch\": \"IT\",    \"semester\": 7,    \"cgpa\": 8.9}\n\n</code></pre><hr />\n<h3 id=\"response-fields\"><strong>Response Fields</strong></h3>\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>id</td>\n<td>number</td>\n<td>Unique student ID</td>\n</tr>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>Full name of the student</td>\n</tr>\n<tr>\n<td>branch</td>\n<td>string</td>\n<td>Academic branch (e.g., IT, CSE, ECE)</td>\n</tr>\n<tr>\n<td>semester</td>\n<td>number</td>\n<td>Current semester</td>\n</tr>\n<tr>\n<td>cgpa</td>\n<td>number</td>\n<td>Cumulative Grade Point Average</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"❌-error-responses\">❌ Error Responses</h3>\n<h4 id=\"404-not-found\">404 Not Found</h4>\n<p>Returned when no student exists with the provided ID.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{    \"message\": \"Student not found\"}\n\n</code></pre><hr />\n<h4 id=\"400-bad-request\">400 Bad Request</h4>\n<p>Returned when the <code>id</code> parameter is invalid.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{    \"message\": \"Invalid student ID\"}\n\n</code></pre><hr />\n<h4 id=\"500-internal-server-error\">500 Internal Server Error</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{    \"message\": \"Internal server error\"}\n\n</code></pre>","urlObject":{"protocol":"https","path":["students",":id"],"host":["students-cgpa-api-rr39","onrender","com"],"query":[],"variable":[{"type":"any","value":"2","key":"id"}]}},"response":[{"id":"d5a85b99-d648-4207-86fb-5c3b55623ec4","name":"Get student by id","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://students-cgpa-api-rr39.onrender.com/students/:id","protocol":"https","host":["students-cgpa-api-rr39","onrender","com"],"path":["students",":id"],"variable":[{"key":"id","value":"2"}]}},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Date","value":"Tue, 24 Feb 2026 06:25:58 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"65"},{"key":"Connection","value":"keep-alive"},{"key":"CF-RAY","value":"9d2ce3816d1cedf5-BOM"},{"key":"access-control-allow-origin","value":"*"},{"key":"Content-Encoding","value":"br"},{"key":"etag","value":"W/\"44-64FeOOnRRkGk1mACrdLClTX3vUI\""},{"key":"rndr-id","value":"435b9dd2-1e65-4a47"},{"key":"vary","value":"Accept-Encoding"},{"key":"x-powered-by","value":"Express"},{"key":"x-render-origin-server","value":"Render"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 2,\n    \"name\": \"Ishita Verma\",\n    \"branch\": \"IT\",\n    \"semester\": 7,\n    \"cgpa\": 8.9\n}"}],"_postman_id":"2674232a-9602-4bfc-8ed4-bae9fb2283b8"},{"name":"Get students by Branchname","id":"ffb7f997-33e3-4aa3-aea8-0f4923f526c6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://students-cgpa-api-rr39.onrender.com/students/branch/:branchName","description":"<h2 id=\"get-students-by-branch\">Get Students By Branch</h2>\n<p>Retrieves a list of students filtered by academic branch.</p>\n<hr />\n<h3 id=\"endpoint\"><strong>Endpoint</strong></h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://students-cgpa-api-rr39.onrender.com/students/branch/:branchName\n\n</code></pre><hr />\n<h3 id=\"description\"><strong>Description</strong></h3>\n<p>Returns all student records that belong to the specified branch.</p>\n<hr />\n<h3 id=\"http-method\"><strong>HTTP Method</strong></h3>\n<p><code>GET</code></p>\n<hr />\n<h3 id=\"path-parameters\"><strong>Path Parameters</strong></h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>branchName</td>\n<td>string</td>\n<td>Yes</td>\n<td>Name of the academic branch (e.g., IT, CSE)</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"example-request\"><strong>Example Request</strong></h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET https://students-cgpa-api-rr39.onrender.com/students/branch/IT\n\n</code></pre><hr />\n<h3 id=\"response\"><strong>Response</strong></h3>\n<h4 id=\"✅-success-response\">✅ Success Response</h4>\n<p><strong>Status Code:</strong> <code>200 OK</code><br /><strong>Content-Type:</strong> <code>application/json</code></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>[    {        \"id\": 2,        \"name\": \"Ishita Verma\",        \"branch\": \"IT\",        \"semester\": 7,        \"cgpa\": 8.9    },    {        \"id\": 5,        \"name\": \"Kunal Deshmukh\",        \"branch\": \"IT\",        \"semester\": 5,        \"cgpa\": 7.8    }]\n\n</code></pre><hr />\n<h3 id=\"response-structure\"><strong>Response Structure</strong></h3>\n<p>Returns an array of student objects.</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>id</td>\n<td>number</td>\n<td>Unique student ID</td>\n</tr>\n<tr>\n<td>name</td>\n<td>string</td>\n<td>Full name of the student</td>\n</tr>\n<tr>\n<td>branch</td>\n<td>string</td>\n<td>Academic branch</td>\n</tr>\n<tr>\n<td>semester</td>\n<td>number</td>\n<td>Current semester</td>\n</tr>\n<tr>\n<td>cgpa</td>\n<td>number</td>\n<td>Cumulative Grade Point Average</td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h3 id=\"❌-error-responses\">❌ Error Responses</h3>\n<h4 id=\"404-not-found\">404 Not Found</h4>\n<p>Returned when no students exist for the specified branch.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{    \"message\": \"No students found for this branch\"}\n\n</code></pre><hr />\n<h4 id=\"400-bad-request\">400 Bad Request</h4>\n<p>Returned when the <code>branchName</code> parameter is invalid or empty.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{    \"message\": \"Invalid branch name\"}\n\n</code></pre><hr />\n<h4 id=\"500-internal-server-error\">500 Internal Server Error</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{    \"message\": \"Internal server error\"}\n\n</code></pre>","urlObject":{"protocol":"https","path":["students","branch",":branchName"],"host":["students-cgpa-api-rr39","onrender","com"],"query":[],"variable":[{"type":"any","value":"IT","key":"branchName"}]}},"response":[{"id":"e820e823-3a07-4279-b85b-13bb8b0e3cb8","name":"Get students by Branchname","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://students-cgpa-api-rr39.onrender.com/students/branch/:branchName","protocol":"https","host":["students-cgpa-api-rr39","onrender","com"],"path":["students","branch",":branchName"],"variable":[{"key":"branchName","value":"IT"}]}},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Date","value":"Tue, 24 Feb 2026 06:25:31 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"98"},{"key":"Connection","value":"keep-alive"},{"key":"CF-RAY","value":"9d2ce2d8b8eeedf5-BOM"},{"key":"access-control-allow-origin","value":"*"},{"key":"Content-Encoding","value":"br"},{"key":"etag","value":"W/\"8d-4hxMCC1arYKWPUPsej8UiMEZlwU\""},{"key":"rndr-id","value":"08add2b5-4b3a-402e"},{"key":"vary","value":"Accept-Encoding"},{"key":"x-powered-by","value":"Express"},{"key":"x-render-origin-server","value":"Render"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 2,\n        \"name\": \"Ishita Verma\",\n        \"branch\": \"IT\",\n        \"semester\": 7,\n        \"cgpa\": 8.9\n    },\n    {\n        \"id\": 5,\n        \"name\": \"Kunal Deshmukh\",\n        \"branch\": \"IT\",\n        \"semester\": 5,\n        \"cgpa\": 7.8\n    }\n]"}],"_postman_id":"ffb7f997-33e3-4aa3-aea8-0f4923f526c6"},{"name":"HomePage","id":"27dbd0fa-7593-48d9-a73d-d41b88ea7ae9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://students-cgpa-api-rr39.onrender.com/","description":"<p><strong>Base URL:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>https://students-cgpa-api-rr39.onrender.com/\n\n</code></pre><p><strong>Root Response (JSON):</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{  \"message\": \"Welcome to Students CGPA API\",  \"description\": \"This API provides endpoints to manage and retrieve student academic information.\",  \"availableEndpoints\": {    \"GET /students\": \"Get all students\",    \"GET /students/:id\": \"Get a specific student by ID\",    \"GET /students/branch/:branchName\": \"Get all students from a specific branch\",    \"GET /students/topper\": \"Get the student with highest CGPA\",    \"GET /students/average\": \"Get average CGPA of all students\",    \"GET /students/count\": \"Get total number of students\"  },  \"documentation\": \"https://documenter.getpostman.com/view/50839260/2sBXcGCyi5\",  \"examples\": {    \"getAllStudents\": \"/students\",    \"getStudentById\": \"/students/1\",    \"getByBranch\": \"/students/branch/CSE\",    \"getTopper\": \"/students/topper\",    \"getAverage\": \"/students/average\",    \"getCount\": \"/students/count\"  }}\n\n\n\n</code></pre>","urlObject":{"protocol":"https","path":[""],"host":["students-cgpa-api-rr39","onrender","com"],"query":[],"variable":[]}},"response":[{"id":"0b894bd4-f3fb-44f4-a88b-537efbd8197d","name":"HomePage","originalRequest":{"method":"GET","header":[],"url":"https://students-cgpa-api-rr39.onrender.com/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Date","value":"Tue, 24 Feb 2026 06:22:18 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"364"},{"key":"Connection","value":"keep-alive"},{"key":"CF-RAY","value":"9d2cde23ff5ad8bc-BOM"},{"key":"access-control-allow-origin","value":"*"},{"key":"Content-Encoding","value":"br"},{"key":"etag","value":"W/\"308-5cevRja+yyW8zL7g5j9mjPzh9og\""},{"key":"rndr-id","value":"d091d39e-c2b4-49bc"},{"key":"vary","value":"Accept-Encoding"},{"key":"x-powered-by","value":"Express"},{"key":"x-render-origin-server","value":"Render"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Server","value":"cloudflare"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Welcome to Students CGPA API\",\n    \"description\": \"This API provides endpoints to manage and retrieve student academic information.\",\n    \"availableEndpoints\": {\n        \"GET /students\": \"Get all students\",\n        \"GET /students/:id\": \"Get a specific student by ID\",\n        \"GET /students/branch/:branchName\": \"Get all students from a specific branch\",\n        \"GET /students/topper\": \"Get the student with highest CGPA\",\n        \"GET /students/average\": \"Get average CGPA of all students\",\n        \"GET /students/count\": \"Get total number of students\"\n    },\n    \"documentation\": \"https://documenter.getpostman.com/view/50839260/2sBXcGCyi5\",\n    \"examples\": {\n        \"getAllStudents\": \"/students\",\n        \"getStudentById\": \"/students/1\",\n        \"getByBranch\": \"/students/branch/CSE\",\n        \"getTopper\": \"/students/topper\",\n        \"getAverage\": \"/students/average\",\n        \"getCount\": \"/students/count\"\n    }\n}"}],"_postman_id":"27dbd0fa-7593-48d9-a73d-d41b88ea7ae9"}]}