-
Notifications
You must be signed in to change notification settings - Fork 44
Open Saber API Examples
sknirmalkar89 edited this page Mar 8, 2021
·
9 revisions
POST - <BASE_URL>/add
Request Body
{
"id": "open-saber.registry.create",
"ver": "1.0",
"ets": "11234",
"params": {
"did": "",
"key": "",
"msgid": ""
},
"request": {
"Teacher": {
"signatures": [
{
"@type": "sc:GraphSignature2012",
"signatureFor": "http://localhost:8080/serialNum",
"creator": "https://example.com/i/pat/keys/5",
"created": "2017-09-23T20:21:34.000Z",
"nonce": "2bbgh3dgjg2302d-d2b3gi423d42",
"signatureValue": "eyiOiJKJ0eXA...OEjgFWFXk"
}
],
"serialNum": 102,
"teacherCode": "12223hjjj4d",
"nationalIdentifier": "12345678jj90123456",
"teacherName": "Marvin Pande",
"gender": "GenderTypeCode-MALE",
"birthDate": "1990-12-06T00:00:00.000Z",
"socialCategory": "SocialCategoryTypeCode-GENERAL",
"highestAcademicQualification": "AcademicQualificationTypeCode-PHD",
"highestTeacherQualification": "TeacherQualificationTypeCode-MED",
"yearOfJoiningService": "2014",
"teachingRole": {
"@type": "TeachingRole",
"teacherType": "TeacherTypeCode-HEAD",
"appointmentType": "TeacherAppointmentTypeCode-REGULAR",
"classesTaught": "ClassTypeCode-SECONDARYANDHIGHERSECONDARY",
"appointedForSubjects": "SubjectCode-ENGLISH",
"mainSubjectsTaught": [
"SubjectCode-SOCIALSTUDIES",
"SubjectCode-ENGLISH"
],
"appointmentYear": "2015"
},
"inServiceTeacherTrainingFromBRC": {
"daysOfInServiceTeacherTraining": "10"
},
"inServiceTeacherTrainingFromCRC": {
"daysOfInServiceTeacherTraining": "2"
},
"inServiceTeacherTrainingFromDIET": {
"daysOfInServiceTeacherTraining": "5.5"
},
"inServiceTeacherTrainingFromOthers": {
"@type": "InServiceTeacherTrainingFromOthers",
"daysOfInServiceTeacherTraining": "3.5"
},
"nonTeachingAssignmentsForAcademicCalendar": {
"@type": "NonTeachingAssignmentsForAcademicCalendar",
"daysOfNonTeachingAssignments": 6
},
"basicProficiencyLevel": [
{
"@type": "BasicProficiencyLevel",
"proficiencySubject": "SubjectCode-MATH",
"proficiencyAcademicQualification": "AcademicQualificationTypeCode-PHD"
},
{
"@type": "BasicProficiencyLevel",
"proficiencySubject": "SubjectCode-ENGLISH",
"proficiencyAcademicQualification": "AcademicQualificationTypeCode-HIGHERSECONDARY"
},
{
"@type": "BasicProficiencyLevel",
"proficiencySubject": "SubjectCode-SOCIALSTUDIES",
"proficiencyAcademicQualification": "AcademicQualificationTypeCode-SECONDARY"
}
],
"disabilityType": "DisabilityCode-NA",
"trainedForChildrenSpecialNeeds": "YesNoCode-YES",
"trainedinUseOfComputer": "YesNoCode-YES"
}
}
}
GET - <BASE_URL>/read(ID of the Teacher)
Request Body
{
"id": "open-saber.registry.read",
"ver": "1.0",
"ets": "11234",
"params": {
"did": "",
"key": "",
"msgid": ""
},
"request": {
"Teacher": {
"osid": "1-5addf222-baa0-4903-9974-dc38de76f4c0"
}
}
}
POST - <BASE_URL>/update
Request Body
{
"id": "open-saber.registry.update",
"ver": "1.0",
"ets": "11234",
"params": {
"did": "",
"key": "",
"msgid": ""
},
"request": {
"Teacher": {
"osid": "1-5addf222-baa0-4903-9974-dc38de76f4c0",
"teachingRole":{
"osid":"1-1d731b73-0334-4e0d-ba98-78bbf6b5e108",
"mainSubjectsTaught": ["SubjectCode-SOCIALSTUDIES","SubjectCode-LANGUAGE"]
}
}
}
}
POST - <BASE_URL>/update
Request Body
{
"id": "open-saber.registry.update",
"ver": "1.0",
"ets": "11234",
"params": {
"did": "",
"key": "",
"msgid": ""
},
"request": {
"Teacher": {
"osid": "1-5addf222-baa0-4903-9974-dc38de76f4c0",
"yearOfJoiningService":"2019"
}
}
}
DELETE - <BASE_URL>/delete(ID of the Teacher)
Reuqest Body
{
"id": "open-saber.registry.delete",
"ver": "1.0",
"ets": "11234",
"params": {
"did": "",
"key": "",
"msgid": ""
},
"request": {
"Teacher":{
"osid": "1-5addf222-baa0-4903-9974-dc38de76f4c0"
}
}
}