SamaySetu API Docs LogoSamaySetu API Docs Logo
SamaySetu API Docsv1.0.0
  • Documentation
  • API Reference
Information
Authentication
Accounts & Access
Academic Structure
Curriculum & Infrastructure
    Courses
    Rooms & Labs
    Time Slots
      List Time SlotsgetList All Time SlotsgetCreate Time SlotpostList Time Slots by TypegetGet Time SlotgetUpdate Time SlotputDelete Time Slotdelete
Faculty Management
Timetable Management
Analytics & System
Security Governance
SamaySetu API Documentation
SamaySetu API Documentation

Time Slots

Daily period and break window definitions


List Time Slots

GET
https://api.samaysetu.example
/api/time-slots

Returns all configured periods and breaks visible to authenticated users.

Access: Authenticated caller (Authorization: Bearer <token>).

List Time Slots › Responses

OK

​TimeSlot[]
TimeSlot
endTime
​string · required
startTime
​string · required
createdAt
​string · date-time
durationMinutes
​integer · int32 · min: 1
id
​integer · int64
isActive
​boolean
isBreak
​boolean
slotName
​string · minLength: 0 · maxLength: 50
type
​string · minLength: 0 · maxLength: 20
GET/api/time-slots
curl https://api.samaysetu.example/api/time-slots \ --header 'Authorization: Bearer <token>'
Example Responses
[ { "id": 2, "slotName": "Period 2", "startTime": "10:00", "endTime": "11:00", "durationMinutes": 60, "isBreak": false, "isActive": true, "type": "TYPE_1", "createdAt": "2026-06-15T08:00:00Z" }, { "id": 3, "slotName": "Period 3", "startTime": "11:15", "endTime": "12:15", "durationMinutes": 60, "isBreak": false, "isActive": true, "type": "TYPE_1", "createdAt": "2026-06-15T08:00:00Z" } ]
json
application/json

List All Time Slots

GET
https://api.samaysetu.example
/admin/api/time-slots

Returns all time slots for administrative management.

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

List All Time Slots › Responses

OK

​TimeSlot[]
TimeSlot
endTime
​string · required
startTime
​string · required
createdAt
​string · date-time
durationMinutes
​integer · int32 · min: 1
id
​integer · int64
isActive
​boolean
isBreak
​boolean
slotName
​string · minLength: 0 · maxLength: 50
type
​string · minLength: 0 · maxLength: 20
GET/admin/api/time-slots
curl https://api.samaysetu.example/admin/api/time-slots \ --header 'Authorization: Bearer <token>'
Example Responses
[ { "id": 2, "slotName": "Period 2", "startTime": "10:00", "endTime": "11:00", "durationMinutes": 60, "isBreak": false, "isActive": true, "type": "TYPE_1", "createdAt": "2026-06-15T08:00:00Z" }, { "id": 3, "slotName": "Period 3", "startTime": "11:15", "endTime": "12:15", "durationMinutes": 60, "isBreak": false, "isActive": true, "type": "TYPE_1", "createdAt": "2026-06-15T08:00:00Z" } ]
json
application/json

Create Time Slot

POST
https://api.samaysetu.example
/admin/api/time-slots

Creates a new class period or break slot.

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

Create Time Slot › Request Body

TimeSlot
endTime
​string · required
startTime
​string · required
createdAt
​string · date-time
durationMinutes
​integer · int32 · min: 1
id
​integer · int64
isActive
​boolean
isBreak
​boolean
slotName
​string · minLength: 0 · maxLength: 50
type
​string · minLength: 0 · maxLength: 20

Create Time Slot › Responses

OK

TimeSlot
endTime
​string · required
startTime
​string · required
createdAt
​string · date-time
durationMinutes
​integer · int32 · min: 1
id
​integer · int64
isActive
​boolean
isBreak
​boolean
slotName
​string · minLength: 0 · maxLength: 50
type
​string · minLength: 0 · maxLength: 20
POST/admin/api/time-slots
curl https://api.samaysetu.example/admin/api/time-slots \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "slotName": "Period 2", "startTime": "10:00", "endTime": "11:00", "durationMinutes": 60, "isBreak": false, "isActive": true, "type": "TYPE_1" }'
Example Request Body
{ "slotName": "Period 2", "startTime": "10:00", "endTime": "11:00", "durationMinutes": 60, "isBreak": false, "isActive": true, "type": "TYPE_1" }
json
application/json
Example Responses
{ "id": 2, "slotName": "Period 2", "startTime": "10:00", "endTime": "11:00", "durationMinutes": 60, "isBreak": false, "isActive": true, "type": "TYPE_1", "createdAt": "2026-06-15T08:00:00Z" }
json
application/json

List Time Slots by Type

GET
https://api.samaysetu.example
/admin/api/time-slots/type/{type}

Returns time slots matching schedule type (for example TYPE_1 or TYPE_2).

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

List Time Slots by Type › path Parameters

type
​string · required

Path parameter type.

List Time Slots by Type › Responses

OK

​TimeSlot[]
TimeSlot
endTime
​string · required
startTime
​string · required
createdAt
​string · date-time
durationMinutes
​integer · int32 · min: 1
id
​integer · int64
isActive
​boolean
isBreak
​boolean
slotName
​string · minLength: 0 · maxLength: 50
type
​string · minLength: 0 · maxLength: 20
GET/admin/api/time-slots/type/{type}
curl https://api.samaysetu.example/admin/api/time-slots/type/:type \ --header 'Authorization: Bearer <token>'
Example Responses
[ { "id": 2, "slotName": "Period 2", "startTime": "10:00", "endTime": "11:00", "durationMinutes": 60, "isBreak": false, "isActive": true, "type": "TYPE_1", "createdAt": "2026-06-15T08:00:00Z" }, { "id": 3, "slotName": "Period 3", "startTime": "11:15", "endTime": "12:15", "durationMinutes": 60, "isBreak": false, "isActive": true, "type": "TYPE_1", "createdAt": "2026-06-15T08:00:00Z" } ]
json
application/json

Get Time Slot

GET
https://api.samaysetu.example
/admin/api/time-slots/{id}

Returns a single time slot record by ID.

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

Get Time Slot › path Parameters

id
​integer · int64 · required

Path parameter id.

Get Time Slot › Responses

OK

TimeSlot
endTime
​string · required
startTime
​string · required
createdAt
​string · date-time
durationMinutes
​integer · int32 · min: 1
id
​integer · int64
isActive
​boolean
isBreak
​boolean
slotName
​string · minLength: 0 · maxLength: 50
type
​string · minLength: 0 · maxLength: 20
GET/admin/api/time-slots/{id}
curl https://api.samaysetu.example/admin/api/time-slots/:id \ --header 'Authorization: Bearer <token>'
Example Responses
{ "id": 2, "slotName": "Period 2", "startTime": "10:00", "endTime": "11:00", "durationMinutes": 60, "isBreak": false, "isActive": true, "type": "TYPE_1", "createdAt": "2026-06-15T08:00:00Z" }
json
application/json

Update Time Slot

PUT
https://api.samaysetu.example
/admin/api/time-slots/{id}

Updates start/end time, duration, break flag, or schedule type of an existing slot.

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

Update Time Slot › path Parameters

id
​integer · int64 · required

Path parameter id.

Update Time Slot › Request Body

TimeSlot
endTime
​string · required
startTime
​string · required
createdAt
​string · date-time
durationMinutes
​integer · int32 · min: 1
id
​integer · int64
isActive
​boolean
isBreak
​boolean
slotName
​string · minLength: 0 · maxLength: 50
type
​string · minLength: 0 · maxLength: 20

Update Time Slot › Responses

OK

TimeSlot
endTime
​string · required
startTime
​string · required
createdAt
​string · date-time
durationMinutes
​integer · int32 · min: 1
id
​integer · int64
isActive
​boolean
isBreak
​boolean
slotName
​string · minLength: 0 · maxLength: 50
type
​string · minLength: 0 · maxLength: 20
PUT/admin/api/time-slots/{id}
curl https://api.samaysetu.example/admin/api/time-slots/:id \ --request PUT \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "slotName": "Period 2", "startTime": "10:05", "endTime": "11:05", "durationMinutes": 60, "isBreak": false, "isActive": true, "type": "TYPE_1" }'
Example Request Body
{ "slotName": "Period 2", "startTime": "10:05", "endTime": "11:05", "durationMinutes": 60, "isBreak": false, "isActive": true, "type": "TYPE_1" }
json
application/json
Example Responses
{ "id": 2, "slotName": "Period 2", "startTime": "10:05", "endTime": "11:05", "durationMinutes": 60, "isBreak": false, "isActive": true, "type": "TYPE_1", "createdAt": "2026-06-15T08:00:00Z" }
json
application/json

Delete Time Slot

DELETE
https://api.samaysetu.example
/admin/api/time-slots/{id}

Deletes a time slot by ID.

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

Delete Time Slot › path Parameters

id
​integer · int64 · required

Path parameter id.

Delete Time Slot › Responses

OK

string
DELETE/admin/api/time-slots/{id}
curl https://api.samaysetu.example/admin/api/time-slots/:id \ --request DELETE \ --header 'Authorization: Bearer <token>'
Example Responses
Time slot deleted successfully
json
application/json

Rooms & LabsFaculty