Save Period (Add/Update)
curl -X POST http://yourdomain.com/api/academic/period/save \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN_HERE" \
-d '{
"clientId": "client1",
"periodData": {
"period_id": null, # Use null for adding new period or provide period_id for updating
"period_name": "Period 1",
"start_time": "08:00:00",
"end_time": "08:45:00"
}
}'
Delete Period
curl -X POST http://yourdomain.com/api/academic/period/delete \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN_HERE" \
-d '{
"clientId": "client1",
"period_id": 1 # Provide the period_id to be deleted
}'
curl -X POST http://yourdomain.com/api/academic/period/list \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN_HERE" \
-d '{
"clientId": "client1",
"limit": 10, # Optional: number of records to fetch
"offset": 0 # Optional: offset for pagination
}'
Get Period Details by ID
curl -X POST http://yourdomain.com/api/academic/period/get \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN_HERE" \
-d '{
"clientId": "client1",
"period_id": 1 # Provide the period_id to get the details
}'
These commands now include the clientId field in the JSON data for all requests. Adjust the period_id, period_name, start_time, and end_time as needed for your specific use case.