SamaySetu API Docs LogoSamaySetu API Docs Logo
SamaySetu API Docsv1.0.0
  • Documentation
  • API Reference
Information
Authentication
Accounts & Access
Academic Structure
    Academic Years
    Departments
    Divisions
    Batches
      List BatchesgetCreate BatchpostList Batches by DivisiongetGet BatchgetUpdate BatchputDelete BatchdeleteSuggested Batch StrengthgetValidate Division Batchesget
Curriculum & Infrastructure
Faculty Management
Timetable Management
Analytics & System
Security Governance
SamaySetu API Documentation
SamaySetu API Documentation

Batches

Lab student batches, strength suggestions, and division capacity checks


List Batches

GET
https://api.samaysetu.example
/admin/api/batches

Returns all student lab batches within the caller's authorized scope.

Required Permission: batch.read (JWT Bearer + scope check).

List Batches › Responses

OK

​Batch[]
Batch
name
​string · minLength: 0 · maxLength: 50 · required
strength
​integer · int32 · min: 0 · required
createdAt
​string · date-time
​Division
id
​integer · int64
updatedAt
​string · date-time
GET/admin/api/batches
curl https://api.samaysetu.example/admin/api/batches \ --header 'Authorization: Bearer <token>'
Example Responses
[ { "id": 7, "name": "B1", "strength": 24, "division": { "id": 12, "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 72, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-18T11:00:00Z", "updatedAt": "2026-06-18T11:00:00Z" }, "createdAt": "2026-06-18T11:30:00Z", "updatedAt": "2026-06-18T11:30:00Z" }, { "id": 8, "name": "B2", "strength": 24, "division": { "id": 12, "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 72, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-18T11:00:00Z", "updatedAt": "2026-06-18T11:00:00Z" }, "createdAt": "2026-06-18T11:30:00Z", "updatedAt": "2026-06-18T11:30:00Z" } ]
json
application/json

Create Batch

POST
https://api.samaysetu.example
/admin/api/batches

Creates a student lab batch under a division.

Required Permission: batch.create (JWT Bearer + scope check).

Create Batch › Request Body

Batch
name
​string · minLength: 0 · maxLength: 50 · required
strength
​integer · int32 · min: 0 · required
createdAt
​string · date-time
​Division
id
​integer · int64
updatedAt
​string · date-time

Create Batch › Responses

OK

Batch
name
​string · minLength: 0 · maxLength: 50 · required
strength
​integer · int32 · min: 0 · required
createdAt
​string · date-time
​Division
id
​integer · int64
updatedAt
​string · date-time
POST/admin/api/batches
curl https://api.samaysetu.example/admin/api/batches \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "name": "B1", "strength": 24, "division": { "id": 12, "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 72, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-18T11:00:00Z", "updatedAt": "2026-06-18T11:00:00Z" } }'
Example Request Body
{ "name": "B1", "strength": 24, "division": { "id": 12, "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 72, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-18T11:00:00Z", "updatedAt": "2026-06-18T11:00:00Z" } }
json
application/json
Example Responses
{ "id": 7, "name": "B1", "strength": 24, "division": { "id": 12, "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 72, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-18T11:00:00Z", "updatedAt": "2026-06-18T11:00:00Z" }, "createdAt": "2026-06-18T11:30:00Z", "updatedAt": "2026-06-18T11:30:00Z" }
json
application/json

List Batches by Division

GET
https://api.samaysetu.example
/admin/api/batches/division/{divisionId}

Returns student batches belonging to a division.

Required Permission: batch.read (JWT Bearer + scope check).

List Batches by Division › path Parameters

divisionId
​integer · int64 · required

Path parameter divisionId.

List Batches by Division › Responses

OK

​Batch[]
Batch
name
​string · minLength: 0 · maxLength: 50 · required
strength
​integer · int32 · min: 0 · required
createdAt
​string · date-time
​Division
id
​integer · int64
updatedAt
​string · date-time
GET/admin/api/batches/division/{divisionId}
curl https://api.samaysetu.example/admin/api/batches/division/:divisionId \ --header 'Authorization: Bearer <token>'
Example Responses
[ { "id": 7, "name": "B1", "strength": 24, "division": { "id": 12, "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 72, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-18T11:00:00Z", "updatedAt": "2026-06-18T11:00:00Z" }, "createdAt": "2026-06-18T11:30:00Z", "updatedAt": "2026-06-18T11:30:00Z" }, { "id": 8, "name": "B2", "strength": 24, "division": { "id": 12, "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 72, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-18T11:00:00Z", "updatedAt": "2026-06-18T11:00:00Z" }, "createdAt": "2026-06-18T11:30:00Z", "updatedAt": "2026-06-18T11:30:00Z" }, { "id": 9, "name": "B3", "strength": 24, "division": { "id": 12, "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 72, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-18T11:00:00Z", "updatedAt": "2026-06-18T11:00:00Z" }, "createdAt": "2026-06-18T11:30:00Z", "updatedAt": "2026-06-18T11:30:00Z" } ]
json
application/json

Get Batch

GET
https://api.samaysetu.example
/admin/api/batches/{id}

Returns a single student lab batch by ID.

Required Permission: batch.read (JWT Bearer + scope check).

Get Batch › path Parameters

id
​integer · int64 · required

Path parameter id.

Get Batch › Responses

OK

Batch
name
​string · minLength: 0 · maxLength: 50 · required
strength
​integer · int32 · min: 0 · required
createdAt
​string · date-time
​Division
id
​integer · int64
updatedAt
​string · date-time
GET/admin/api/batches/{id}
curl https://api.samaysetu.example/admin/api/batches/:id \ --header 'Authorization: Bearer <token>'
Example Responses
{ "id": 7, "name": "B1", "strength": 24, "division": { "id": 12, "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 72, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-18T11:00:00Z", "updatedAt": "2026-06-18T11:00:00Z" }, "createdAt": "2026-06-18T11:30:00Z", "updatedAt": "2026-06-18T11:30:00Z" }
json
application/json

Update Batch

PUT
https://api.samaysetu.example
/admin/api/batches/{id}

Updates batch roll range, strength, or division link.

Required Permission: batch.update (JWT Bearer + scope check).

Update Batch › path Parameters

id
​integer · int64 · required

Path parameter id.

Update Batch › Request Body

Batch
name
​string · minLength: 0 · maxLength: 50 · required
strength
​integer · int32 · min: 0 · required
createdAt
​string · date-time
​Division
id
​integer · int64
updatedAt
​string · date-time

Update Batch › Responses

OK

Batch
name
​string · minLength: 0 · maxLength: 50 · required
strength
​integer · int32 · min: 0 · required
createdAt
​string · date-time
​Division
id
​integer · int64
updatedAt
​string · date-time
PUT/admin/api/batches/{id}
curl https://api.samaysetu.example/admin/api/batches/:id \ --request PUT \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "name": "B1", "strength": 25, "division": { "id": 12, "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 72, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-18T11:00:00Z", "updatedAt": "2026-06-18T11:00:00Z" } }'
Example Request Body
{ "name": "B1", "strength": 25, "division": { "id": 12, "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 72, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-18T11:00:00Z", "updatedAt": "2026-06-18T11:00:00Z" } }
json
application/json
Example Responses
{ "id": 7, "name": "B1", "strength": 25, "division": { "id": 12, "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 72, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-18T11:00:00Z", "updatedAt": "2026-06-18T11:00:00Z" }, "createdAt": "2026-06-18T11:30:00Z", "updatedAt": "2026-06-18T11:30:00Z" }
json
application/json

Delete Batch

DELETE
https://api.samaysetu.example
/admin/api/batches/{id}

Deletes a batch by ID.

Required Permission: batch.delete (JWT Bearer + scope check).

Delete Batch › path Parameters

id
​integer · int64 · required

Path parameter id.

Delete Batch › Responses

Batch deleted successfully (no content).

No data returned
DELETE/admin/api/batches/{id}
curl https://api.samaysetu.example/admin/api/batches/:id \ --request DELETE \ --header 'Authorization: Bearer <token>'
Example Responses
No example specified for this content type

Suggested Batch Strength

GET
https://api.samaysetu.example
/admin/api/batches/division/{divisionId}/suggested-strength

Returns recommended batch strength and roll-number range metadata for a division.

Required Permission: batch.read (JWT Bearer + scope check).

Suggested Batch Strength › path Parameters

divisionId
​integer · int64 · required

Path parameter divisionId.

Suggested Batch Strength › Responses

OK

Suggested student capacity for creating the next batch in a division.
SuggestedBatchStrengthResponse
suggestedStrength
​integer · int32 · required
GET/admin/api/batches/division/{divisionId}/suggested-strength
curl https://api.samaysetu.example/admin/api/batches/division/:divisionId/suggested-strength \ --header 'Authorization: Bearer <token>'
Example Responses
{ "suggestedStrength": 24 }
json
application/json

Validate Division Batches

GET
https://api.samaysetu.example
/admin/api/batches/division/{divisionId}/validation

Checks roll-number continuity, overlap, and total strength against division capacity.

Required Permission: batch.read (JWT Bearer + scope check).

Validate Division Batches › path Parameters

divisionId
​integer · int64 · required

Path parameter divisionId.

Validate Division Batches › Responses

OK

Division batch capacity and allocation check returned by GET /admin/api/batches/division/{divisionId}/validation.
DivisionBatchValidationResponse
divisionId
​integer · int64 · required
divisionName
​string · required
divisionStrength
​integer · int32 · required
batchCount
​integer · int32 · required
totalBatchStrength
​integer · int32 · required
unallocatedStudents
​integer · int32 · required
isValid
​boolean · required
status
​string · required
GET/admin/api/batches/division/{divisionId}/validation
curl https://api.samaysetu.example/admin/api/batches/division/:divisionId/validation \ --header 'Authorization: Bearer <token>'
Example Responses
{ "divisionId": 12, "divisionName": "TY-A", "divisionStrength": 72, "batchCount": 3, "totalBatchStrength": 72, "unallocatedStudents": 0, "isValid": true, "status": "COMPLETE" }
json
application/json

DivisionsCourses