REST API endpoints for the Placement Cell Automation System.
Most endpoints require authentication. Include JWT token in headers:
Authorization: Bearer <your_jwt_token>GET /api/studentsQuery parameters:
batch- Filter by passing year (e.g., 2024)branch- Filter by branch (CSE, ECE, AI/DS)placed- Filter by placement status (true/false)minCgpa- Minimum CGPAmaxBacklogs- Maximum backlogs
Example:
curl http://localhost:3000/api/students?batch=2024&branch=CSE&minCgpa=7.0GET /api/students/:idPOST /api/students
Content-Type: application/json
{
"rollNumber": "S20210001",
"name": "John Doe",
"email": "s20210001@iiits.in",
"mobile": "9876543210",
"branch": "CSE",
"cgpa": 8.5,
"passingOutYear": 2025
}PATCH /api/students/:id
Content-Type: application/json
{
"cgpa": 8.7,
"placed": true
}DELETE /api/students/:idGET /api/students/statsResponse:
{
"success": true,
"data": {
"total": 720,
"placed": 450,
"percentage": 62.5
}
}GET /api/companiesGET /api/companies/:idPOST /api/companies
Content-Type: application/json
{
"name": "Google",
"website": "https://google.com",
"industry": "Technology",
"description": "Search engine company"
}PATCH /api/companies/:idGET /api/companies/statsPOST /api/companies/syncGET /api/driveQuery parameters:
status- Filter by status (active, completed, etc.)
GET /api/drive/:idPOST /api/drive
Content-Type: application/json
{
"company": "company_id",
"jobTitle": "Software Engineer",
"employmentType": "Full-time",
"ctc": "12 LPA",
"batches": [2024, 2025],
"minCgpa": 7.0,
"maxBacklogs": 0
}PATCH /api/drive/:id
Content-Type: application/json
{
"status": "completed"
}DELETE /api/drive/:idGET /api/eoiGET /api/eoi/:idPOST /api/eoi
Content-Type: application/json
{
"driveId": "drive_id",
"deadline": "2024-12-31T23:59:59Z",
"formId": "form_id",
"headlineMessage": "Apply now!"
}POST /api/eoi/send
Content-Type: application/json
{
"eoiId": "eoi_id",
"studentIds": ["student_id_1", "student_id_2"]
}GET /api/eoi/:id/applicantsGET /api/forms/listGET /api/forms/:idPOST /api/forms/create
Content-Type: application/json
{
"title": "Software Engineer Application",
"description": "Apply for SDE role",
"fields": [
{
"id": 1,
"label": "Full Name",
"type": "text",
"required": true
},
{
"id": 2,
"label": "Resume Link",
"type": "url",
"required": true
}
]
}POST /api/forms/:id/respond
Content-Type: application/json
{
"responses": [
{
"fieldId": 1,
"response": "John Doe"
},
{
"fieldId": 2,
"response": "https://resume.com/johndoe"
}
]
}GET /api/forms/responses/:formIdPOST /api/auth/login
Content-Type: application/json
{
"email": "user@iiits.in",
"password": "password123"
}Response:
{
"success": true,
"token": "jwt_token_here",
"user": {
"id": "user_id",
"email": "user@iiits.in",
"role": "student"
}
}GET /api/auth/sessionGET /api/adminsPOST /api/admins
Content-Type: application/json
{
"name": "Admin User",
"email": "admin@iiits.in",
"password": "securepassword"
}GET /api/reports/students/:studentIdResponse includes:
- Student details
- Applications submitted
- Interview rounds
- Placement status
GET /api/reports/companies/:companyIdAll endpoints return errors in this format:
{
"success": false,
"message": "Error description",
"error": "Detailed error (in development only)"
}Common HTTP status codes:
200- Success201- Created400- Bad Request401- Unauthorized403- Forbidden404- Not Found500- Internal Server Error
API endpoints are rate-limited to prevent abuse:
- 100 requests per 15 minutes per IP
- 1000 requests per hour per authenticated user
List endpoints support pagination:
GET /api/students?page=1&limit=50Response includes:
{
"success": true,
"data": [...],
"pagination": {
"page": 1,
"limit": 50,
"total": 720,
"pages": 15
}
}# Login
TOKEN=$(curl -X POST http://localhost:3000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"admin@iiits.in","password":"admin123"}' \
| jq -r '.token')
# Use token
curl http://localhost:3000/api/students \
-H "Authorization: Bearer $TOKEN"- Import collection (if available)
- Set environment variables:
base_url:http://localhost:3000token: Your JWT token
- Use
{{base_url}}and{{token}}in requests