{"openapi":"3.0.1","info":{"title":"API for Student CRU.","description":"This CRU API is related to student data.","version":"1"},"servers":[{"url":"https://student-api-75e61b-dev.apps.silver.devops.gov.bc.ca","description":"Generated server url"}],"security":[{"OAUTH2":["READ_STUDENT","WRITE_STUDENT","READ_STUDENT_HISTORY","READ_STUDENT_CODES","DELETE_STUDENT"]}],"tags":[{"name":"Endpoint to support student history data table view in frontend, with sort, filter and pagination.","description":"This API endpoint exposes flexible way to query the entity by leveraging JPA specifications."},{"name":"Endpoint to support data table view in frontend, with sort, filter and pagination.","description":"This API endpoint exposes flexible way to query the entity by leveraging JPA specifications."},{"name":"Endpoint to support history data table view in frontend, with sort, filter and pagination.","description":"This API endpoint exposes flexible way to query the audit history entity by leveraging JPA specifications."},{"name":"Endpoint to retrieve unique student records with sort, filter and pagination from audit records.","description":"Endpoint to retrieve unique student records with sort, filter and pagination from audit records."}],"paths":{"/api/v1/student/{id}":{"put":{"tags":["student-controller"],"operationId":"updateStudent","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudentUpdate"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Student"}}}},"404":{"description":"NOT FOUND","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Student"}}}},"400":{"description":"BAD REQUEST","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Student"}}}}}},"delete":{"tags":["student-controller"],"operationId":"deleteById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"404":{"description":"NOT FOUND."},"204":{"description":"NO CONTENT"},"500":{"description":"INTERNAL SERVER ERROR."}}}},"/api/v1/student":{"get":{"tags":["student-controller"],"operationId":"findStudent","parameters":[{"name":"pen","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Student"}}}}}}},"post":{"tags":["student-controller"],"operationId":"createStudent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudentCreate"}}},"required":true},"responses":{"201":{"description":"CREATED","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Student"}}}},"400":{"description":"BAD REQUEST","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Student"}}}}}}},"/api/v1/student/{studentID}":{"get":{"tags":["student-controller"],"operationId":"readStudent","parameters":[{"name":"studentID","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Student"}}}},"404":{"description":"NOT FOUND","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Student"}}}}}}},"/api/v1/student/{studentID}/history/paginated":{"get":{"tags":["Endpoint to support student history data table view in frontend, with sort, filter and pagination."],"operationId":"findStudentHistoryByStudentID","parameters":[{"name":"studentID","in":"path","required":true,"schema":{"type":"string"}},{"name":"pageNumber","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":10}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":""}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageStudentHistory"}}}},"500":{"description":"INTERNAL SERVER ERROR.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageStudentHistory"}}}}}}},"/api/v1/student/status-codes":{"get":{"tags":["student-controller"],"operationId":"getStatusCodes","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StatusCode"}}}}}}}},"/api/v1/student/sex-codes":{"get":{"tags":["student-controller"],"operationId":"getSexCodes","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SexCode"}}}}}}}},"/api/v1/student/paginated":{"get":{"tags":["Endpoint to support data table view in frontend, with sort, filter and pagination."],"operationId":"findAll","parameters":[{"name":"pageNumber","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":10}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"searchCriteriaList","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageStudent"}}}},"500":{"description":"INTERNAL SERVER ERROR.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageStudent"}}}}}}},"/api/v1/student/history/paginated":{"get":{"tags":["Endpoint to support history data table view in frontend, with sort, filter and pagination."],"operationId":"findAll_1","parameters":[{"name":"pageNumber","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":10}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"searchCriteriaList","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageStudentHistory"}}}},"500":{"description":"INTERNAL SERVER ERROR.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageStudentHistory"}}}}}}},"/api/v1/student/history/paginated/distinct/students":{"get":{"tags":["Endpoint to retrieve unique student records with sort, filter and pagination from audit records."],"operationId":"findDistinctStudents","parameters":[{"name":"pageNumber","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":10}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":""}},{"name":"searchCriteriaList","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageStudent"}}}},"400":{"description":"BAD REQUEST","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageStudent"}}}},"500":{"description":"INTERNAL SERVER ERROR.","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageStudent"}}}}}}},"/api/v1/student/history-activity-codes":{"get":{"tags":["student-history-controller"],"operationId":"getStudentHistoryActivityCodes","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StudentHistoryActivityCode"}}}}}}}},"/api/v1/student/grade-codes":{"get":{"tags":["student-controller"],"operationId":"getGradeCodes","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GradeCode"}}}}}}}},"/api/v1/student/gender-codes":{"get":{"tags":["student-controller"],"operationId":"getGenderCodes","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GenderCode"}}}}}}}},"/api/v1/student/document-type-codes":{"get":{"tags":["student-controller"],"operationId":"getDocTypeCodes","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocTypeCode"}}}}}}}},"/api/v1/student/demog-codes":{"get":{"tags":["student-controller"],"operationId":"getDemogCodes","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DemogCode"}}}}}}}}},"components":{"schemas":{"StudentUpdate":{"required":["demogCode","dob","emailVerified","historyActivityCode","legalLastName","pen","sexCode","statusCode"],"type":"object","properties":{"createUser":{"maxLength":100,"minLength":0,"type":"string"},"updateUser":{"maxLength":100,"minLength":0,"type":"string"},"createDate":{"type":"string"},"updateDate":{"type":"string"},"studentID":{"type":"string"},"pen":{"maxLength":9,"minLength":9,"type":"string"},"legalFirstName":{"maxLength":25,"minLength":0,"type":"string"},"legalMiddleNames":{"maxLength":25,"minLength":0,"type":"string"},"legalLastName":{"maxLength":25,"minLength":0,"type":"string"},"dob":{"type":"string"},"sexCode":{"type":"string"},"genderCode":{"type":"string"},"usualFirstName":{"maxLength":25,"minLength":0,"type":"string"},"usualMiddleNames":{"maxLength":25,"minLength":0,"type":"string"},"usualLastName":{"maxLength":25,"minLength":0,"type":"string"},"email":{"maxLength":80,"minLength":0,"type":"string"},"emailVerified":{"maxLength":1,"minLength":0,"pattern":"[YN]","type":"string"},"deceasedDate":{"type":"string"},"postalCode":{"maxLength":7,"minLength":0,"type":"string"},"mincode":{"maxLength":8,"minLength":0,"type":"string"},"localID":{"maxLength":12,"minLength":0,"type":"string"},"gradeCode":{"maxLength":2,"minLength":0,"type":"string"},"gradeYear":{"maxLength":4,"minLength":0,"type":"string"},"demogCode":{"maxLength":1,"minLength":0,"type":"string"},"statusCode":{"maxLength":1,"minLength":0,"type":"string"},"memo":{"maxLength":4000,"minLength":0,"type":"string"},"trueStudentID":{"type":"string"},"documentTypeCode":{"maxLength":10,"minLength":0,"type":"string"},"dateOfConfirmation":{"type":"string"},"historyActivityCode":{"type":"string"}}},"Student":{"required":["demogCode","dob","emailVerified","legalLastName","pen","sexCode","statusCode"],"type":"object","properties":{"createUser":{"maxLength":100,"minLength":0,"type":"string"},"updateUser":{"maxLength":100,"minLength":0,"type":"string"},"createDate":{"type":"string"},"updateDate":{"type":"string"},"studentID":{"type":"string"},"pen":{"maxLength":9,"minLength":9,"type":"string"},"legalFirstName":{"maxLength":25,"minLength":0,"type":"string"},"legalMiddleNames":{"maxLength":25,"minLength":0,"type":"string"},"legalLastName":{"maxLength":25,"minLength":0,"type":"string"},"dob":{"type":"string"},"sexCode":{"type":"string"},"genderCode":{"type":"string"},"usualFirstName":{"maxLength":25,"minLength":0,"type":"string"},"usualMiddleNames":{"maxLength":25,"minLength":0,"type":"string"},"usualLastName":{"maxLength":25,"minLength":0,"type":"string"},"email":{"maxLength":80,"minLength":0,"type":"string"},"emailVerified":{"maxLength":1,"minLength":0,"pattern":"[YN]","type":"string"},"deceasedDate":{"type":"string"},"postalCode":{"maxLength":7,"minLength":0,"type":"string"},"mincode":{"maxLength":8,"minLength":0,"type":"string"},"localID":{"maxLength":12,"minLength":0,"type":"string"},"gradeCode":{"maxLength":2,"minLength":0,"type":"string"},"gradeYear":{"maxLength":4,"minLength":0,"type":"string"},"demogCode":{"maxLength":1,"minLength":0,"type":"string"},"statusCode":{"maxLength":1,"minLength":0,"type":"string"},"memo":{"maxLength":4000,"minLength":0,"type":"string"},"trueStudentID":{"type":"string"},"documentTypeCode":{"maxLength":10,"minLength":0,"type":"string"},"dateOfConfirmation":{"type":"string"}}},"StudentCreate":{"required":["demogCode","dob","emailVerified","historyActivityCode","legalLastName","pen","sexCode","statusCode"],"type":"object","properties":{"createUser":{"maxLength":100,"minLength":0,"type":"string"},"updateUser":{"maxLength":100,"minLength":0,"type":"string"},"createDate":{"type":"string"},"updateDate":{"type":"string"},"studentID":{"type":"string"},"pen":{"maxLength":9,"minLength":9,"type":"string"},"legalFirstName":{"maxLength":25,"minLength":0,"type":"string"},"legalMiddleNames":{"maxLength":25,"minLength":0,"type":"string"},"legalLastName":{"maxLength":25,"minLength":0,"type":"string"},"dob":{"type":"string"},"sexCode":{"type":"string"},"genderCode":{"type":"string"},"usualFirstName":{"maxLength":25,"minLength":0,"type":"string"},"usualMiddleNames":{"maxLength":25,"minLength":0,"type":"string"},"usualLastName":{"maxLength":25,"minLength":0,"type":"string"},"email":{"maxLength":80,"minLength":0,"type":"string"},"emailVerified":{"maxLength":1,"minLength":0,"pattern":"[YN]","type":"string"},"deceasedDate":{"type":"string"},"postalCode":{"maxLength":7,"minLength":0,"type":"string"},"mincode":{"maxLength":8,"minLength":0,"type":"string"},"localID":{"maxLength":12,"minLength":0,"type":"string"},"gradeCode":{"maxLength":2,"minLength":0,"type":"string"},"gradeYear":{"maxLength":4,"minLength":0,"type":"string"},"demogCode":{"maxLength":1,"minLength":0,"type":"string"},"statusCode":{"maxLength":1,"minLength":0,"type":"string"},"memo":{"maxLength":4000,"minLength":0,"type":"string"},"trueStudentID":{"type":"string"},"documentTypeCode":{"maxLength":10,"minLength":0,"type":"string"},"dateOfConfirmation":{"type":"string"},"historyActivityCode":{"type":"string"}}},"PageStudentHistory":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/StudentHistory"}},"number":{"type":"integer","format":"int32"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"first":{"type":"boolean"},"last":{"type":"boolean"},"empty":{"type":"boolean"}}},"PageableObject":{"type":"object","properties":{"offset":{"type":"integer","format":"int64"},"sort":{"$ref":"#/components/schemas/SortObject"},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"paged":{"type":"boolean"},"unpaged":{"type":"boolean"}}},"SortObject":{"type":"object","properties":{"empty":{"type":"boolean"},"sorted":{"type":"boolean"},"unsorted":{"type":"boolean"}}},"StudentHistory":{"required":["demogCode","dob","emailVerified","legalLastName","pen","sexCode","statusCode"],"type":"object","properties":{"createUser":{"maxLength":100,"minLength":0,"type":"string"},"updateUser":{"maxLength":100,"minLength":0,"type":"string"},"createDate":{"type":"string"},"updateDate":{"type":"string"},"studentID":{"type":"string"},"pen":{"maxLength":9,"minLength":9,"type":"string"},"legalFirstName":{"maxLength":25,"minLength":0,"type":"string"},"legalMiddleNames":{"maxLength":25,"minLength":0,"type":"string"},"legalLastName":{"maxLength":25,"minLength":0,"type":"string"},"dob":{"type":"string"},"sexCode":{"type":"string"},"genderCode":{"type":"string"},"usualFirstName":{"maxLength":25,"minLength":0,"type":"string"},"usualMiddleNames":{"maxLength":25,"minLength":0,"type":"string"},"usualLastName":{"maxLength":25,"minLength":0,"type":"string"},"email":{"maxLength":80,"minLength":0,"type":"string"},"emailVerified":{"maxLength":1,"minLength":0,"pattern":"[YN]","type":"string"},"deceasedDate":{"type":"string"},"postalCode":{"maxLength":7,"minLength":0,"type":"string"},"mincode":{"maxLength":8,"minLength":0,"type":"string"},"localID":{"maxLength":12,"minLength":0,"type":"string"},"gradeCode":{"maxLength":2,"minLength":0,"type":"string"},"gradeYear":{"maxLength":4,"minLength":0,"type":"string"},"demogCode":{"maxLength":1,"minLength":0,"type":"string"},"statusCode":{"maxLength":1,"minLength":0,"type":"string"},"memo":{"maxLength":4000,"minLength":0,"type":"string"},"trueStudentID":{"type":"string"},"documentTypeCode":{"maxLength":10,"minLength":0,"type":"string"},"dateOfConfirmation":{"type":"string"},"studentHistoryID":{"type":"string"},"historyActivityCode":{"type":"string"}}},"StatusCode":{"type":"object","properties":{"statusCode":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"displayOrder":{"type":"integer","format":"int32"},"effectiveDate":{"type":"string"},"expiryDate":{"type":"string"}}},"SexCode":{"type":"object","properties":{"sexCode":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"displayOrder":{"type":"integer","format":"int32"},"effectiveDate":{"type":"string"},"expiryDate":{"type":"string"}}},"PageStudent":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/Student"}},"number":{"type":"integer","format":"int32"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"first":{"type":"boolean"},"last":{"type":"boolean"},"empty":{"type":"boolean"}}},"StudentHistoryActivityCode":{"type":"object","properties":{"historyActivityCode":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"displayOrder":{"type":"integer","format":"int32"},"effectiveDate":{"type":"string"},"expiryDate":{"type":"string"}}},"GradeCode":{"type":"object","properties":{"gradeCode":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"displayOrder":{"type":"integer","format":"int32"},"effectiveDate":{"type":"string"},"expiryDate":{"type":"string"}}},"GenderCode":{"type":"object","properties":{"genderCode":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"displayOrder":{"type":"integer","format":"int32"},"effectiveDate":{"type":"string"},"expiryDate":{"type":"string"}}},"DocTypeCode":{"type":"object","properties":{"documentTypeCode":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"displayOrder":{"type":"integer","format":"int32"},"effectiveDate":{"type":"string"},"expiryDate":{"type":"string"}}},"DemogCode":{"type":"object","properties":{"demogCode":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"displayOrder":{"type":"integer","format":"int32"},"effectiveDate":{"type":"string"},"expiryDate":{"type":"string"}}}}}}