Design a registrar service API: degree audits, enrollment verifications, and change logs.
- User
Design a registrar service API: degree audits, enrollment verifications, and change logs.
- Assistant
Design a registrar service API: degree audits, enrollment verifications, and change logs.
This RESTful API provides services for degree audits, enrollment verifications, and change logs in a university registrar system. It enables students, faculty, admins, and third parties (e.g., employers) to access official records securely.
https://api.university.edu/v1/registrarread:audits, write:audits, read:verifications, read:logs. Roles: student, faculty, admin, third-party.application/json?page=1&limit=20 for list endpoints. Responses include total, pages, data[].{
"error": {
"code": "INVALID_REQUEST",
"message": "Student ID is required",
"details": [...]
}
}
Common schemas (JSON):
// StudentIdentifier (path/query param)
{ "studentId": "string" } // UUID or student number (e.g., "stu-12345")
// Audit
{
"auditId": "string",
"studentId": "string",
"generatedAt": "2023-10-01T12:00:00Z",
"status": "complete|in-progress|failed",
"requirements": [
{
"name": "Core Courses",
"completed": 24,
"required": 30,
"status": "in-progress"
}
],
"graduationEligible": true
}
// Verification
{
"verificationId": "string",
"studentId": "string",
"issuedAt": "2023-10-01T12:00:00Z",
"status": "current|past|withdrawn",
"enrollmentTerm": "Fall 2023",
"unitsEnrolled": 12,
"pdfUrl": "https://storage.../verif-123.pdf" // Signed PDF for official use
}
// ChangeLogEntry
{
"logId": "string",
"studentId": "string",
"changedAt": "2023-10-01T12:00:00Z",
"actorId": "string", // User who made change
"action": "grade_updated|enrollment_added|degree_awarded",
"oldValue": "B+",
"newValue": "A-",
"field": "course.GR101.grade"
}
Manage progress reports toward degree completion.
| Method | Endpoint | Description | Auth Scopes/Roles | Request Example | Response Example |
|---|---|---|---|---|---|
GET | /audits/{studentId} | Retrieve latest audit (or list with pagination). | read:audits / student, faculty, admin | ?page=1&limit=10 | 200: { "data": [Audit[]], "total": 5, "pages": 1 } |
POST | /audits/{studentId}/generate | Generate a new audit (async; returns job ID). | write:audits / admin, faculty | {} | 201: { "jobId": "job-123", "status": "queued" } |
GET | /audits/{studentId}/{auditId} | Retrieve specific audit details. | read:audits / student, faculty, admin | - | 200: Audit |
GET | /audits/{studentId}/history | List audit history (paginated). | read:audits / student, admin | ?from=2023-01-01&to=2023-12-31 | 200: { "data": [Audit[]], ... } |
Generate and retrieve official enrollment confirmations (e.g., for loans, employment).
| Method | Endpoint | Description | Auth Scopes/Roles | Request Example | Response Example |
|---|---|---|---|---|---|
GET | /verifications/enrollment/{studentId} | Get latest/current verification. | read:verifications / student, third-party, admin | ?term=Fall2023 | 200: Verification |
POST | /verifications/enrollment/{studentId} | Request new verification (generates signed PDF). | read:verifications / student, admin | { "term": "Fall2023", "includeGpa": true } | 201: Verification (with pdfUrl) |
GET | /verifications/enrollment/{studentId}/history | List verification history (paginated). | read:verifications / student, admin | ?status=current&page=1 | 200: { "data": [Verification[]], ... } |
GET | /verifications/enrollment/{verificationId}/pdf | Download PDF (expires in 30 days). | read:verifications / any with token | - | 200: binary PDF |
Note: Third-party access requires pre-approved tokens with student consent (e.g., via FERPA).
Audit trail of all modifications to student records.
| Method | Endpoint | Description | Auth Scopes/Roles | Request Example | Response Example |
|---|---|---|---|---|---|
GET | /logs/{studentId} | Retrieve change logs (paginated, latest first). | read:logs / admin, faculty | ?page=1&limit=50&action=grade_updated | 200: { "data": [ChangeLogEntry[]], "total": 100, "pages": 2 } |
GET | /logs/{studentId}/summary | Aggregated summary (e.g., changes by type/date). | read:logs / admin | ?from=2023-01-01&to=2023-12-31&field=course.* | 200: { "totalChanges": 50, "byAction": { "grade_updated": 20 }, ... } |
GET | /logs/export/{studentId} | Export logs as CSV/JSON (rate-limited). | read:logs / admin | ?format=csv&from=2023-01-01 | 200: file download |
/webhooks/audits/complete for async notifications (e.g., audit ready).?studentId=...&from=ISODate&to=ISODate&status=...&action=...POST /audits/bulk-generate (body: ["stu-123", "stu-456"]) for admins./openapi.json for client generation.This design ensures scalability, security, and compliance (e.g., FERPA via audit logs and consent checks). Extendable for future features like degree conferral.