New and Updated Endpoints
Question Category, ENUM - [ MENTOR
, MENTEE
]
Add Questions
POST /api/admin/programs/{programId}/questions/{Question_Category} HTTP/1.1
Host: localhost:8080
Content-Type: application/json
[
{
"question": "What is your highest level of education?"
},
{
"question": "What is your current position/job role?"
},
{
"question": "What is your organisation/institute?"
}
]
Status: 200 OK
[
{
"id": 1,
"category": "MENTOR",
"program": {
"id": 2,
"title": "test program 1",
"headline": "scholarx test ",
"imageUrl": "sdf",
"landingPageUrl": "slk",
"state": "MENTOR_APPLICATION"
},
"question": "What is your highest level of education?"
},
{
"id": 2,
"category": "MENTOR",
"program": {
"id": 2,
"title": "test program 1",
"headline": "scholarx test ",
"imageUrl": "sdf",
"landingPageUrl": "slk",
"state": "MENTOR_APPLICATION"
},
"question": "What is your current position/job role?"
},
{
"id": 3,
"category": "MENTOR",
"program": {
"id": 2,
"title": "test program 1",
"headline": "scholarx test ",
"imageUrl": "sdf",
"landingPageUrl": "slk",
"state": "MENTOR_APPLICATION"
},
"question": "What is your organisation/institute?"
}
]
Get Questions
GET /api/programs/{programId}/questions/{Question_Category} HTTP/1.1
Host: localhost:8080
Status: 200 OK
[
{
"id": 1,
"category": "MENTOR",
"program": {
"id": 2,
"title": "test program 1",
"headline": "scholarx test ",
"imageUrl": "sdf",
"landingPageUrl": "slk",
"state": "MENTOR_APPLICATION"
},
"question": "What is your highest level of education?"
},
{
"id": 2,
"category": "MENTOR",
"program": {
"id": 2,
"title": "test program 1",
"headline": "scholarx test ",
"imageUrl": "sdf",
"landingPageUrl": "slk",
"state": "MENTOR_APPLICATION"
},
"question": "What is your current position/job role?"
},
{
"id": 3,
"category": "MENTOR",
"program": {
"id": 2,
"title": "test program 1",
"headline": "scholarx test ",
"imageUrl": "sdf",
"landingPageUrl": "slk",
"state": "MENTOR_APPLICATION"
},
"question": "What is your organisation/institute?"
}
]
Apply as a mentor
POST /api/programs/{programId}/mentor HTTP/1.1
Host: localhost:8080
Content-Type: application/json
[
{
"question": {
"id": 1
},
"response": "PhD"
},
{
"question": {
"id": 2
},
"response": "PhD Candidate"
},
{
"question": {
"id": 3
},
"response": "Monash University"
}
]
Status: 200 OK
{
"id": 3,
"profile": {
"id": 1,
"uid": "3rt9kAbxZR",
"email": "jondoe@gmail.com",
"firstName": "Jon",
"lastName": "Doe",
"imageUrl": "https://media-exp1.licdn.com/dms/image/C5103AQEDtOL8DCcMnQ/profile-displayphoto-shrink_100_100/0/1574510520118?e=1625702400&v=beta&t=kXh5dC_5vmr_cZvfKWCrKchgTgA3rQXNvrWjHCkGeGs",
"headline": null,
"type": "DEFAULT",
"name": "JonDoe",
"attributes": null,
"authorities": [
{
"authority": "DEFAULT"
}
]
},
"state": "PENDING",
"program": {
"id": 2,
"title": "test program 1",
"headline": "scholarx test ",
"imageUrl": "sdf",
"landingPageUrl": "slk",
"state": "MENTOR_APPLICATION"
}
}
Get mentor responses
- With
profileId
and programId
GET /api/programs/{programId}/responses/mentor HTTP/1.1
Host: localhost:8080
- With
mentorId
GET /api/programs/{programId}/responses/mentor?mentorId={mentorId} HTTP/1.1
Host: localhost:8080
[
{
"id": {
"questionId": 1,
"mentorId": 3
},
"question": {
"id": 1,
"category": "MENTOR",
"program": {
"id": 2,
"title": "test program 1",
"headline": "scholarx test ",
"imageUrl": "sdf",
"landingPageUrl": "slk",
"state": "MENTOR_APPLICATION"
},
"question": "What is your highest level of education?"
},
"mentor": {
"id": 3,
"profile": {
"id": 1,
"uid": "3rt9kAbxZR",
"email": "jondoe@gmail.com",
"firstName": "Jon",
"lastName": "Doe",
"imageUrl": "https://media-exp1.licdn.com/dms/image/C5103AQEDtOL8DCcMnQ/profile-displayphoto-shrink_100_100/0/1574510520118?e=1625702400&v=beta&t=kXh5dC_5vmr_cZvfKWCrKchgTgA3rQXNvrWjHCkGeGs",
"headline": null,
"type": "DEFAULT",
"name": "JonDoe",
"attributes": null,
"authorities": [
{
"authority": "DEFAULT"
}
]
},
"state": "PENDING",
"program": {
"id": 2,
"title": "test program 1",
"headline": "scholarx test ",
"imageUrl": "sdf",
"landingPageUrl": "slk",
"state": "MENTOR_APPLICATION"
}
},
"response": "PhD"
},
{
"id": {
"questionId": 2,
"mentorId": 3
},
"question": {
"id": 2,
"category": "MENTOR",
"program": {
"id": 2,
"title": "test program 1",
"headline": "scholarx test ",
"imageUrl": "sdf",
"landingPageUrl": "slk",
"state": "MENTOR_APPLICATION"
},
"question": "What is your current position/job role?"
},
"mentor": {
"id": 3,
"profile": {
"id": 1,
"uid": "3rt9kAbxZR",
"email": "jondoe@gmail.com",
"firstName": "Jon",
"lastName": "Doe",
"imageUrl": "https://media-exp1.licdn.com/dms/image/C5103AQEDtOL8DCcMnQ/profile-displayphoto-shrink_100_100/0/1574510520118?e=1625702400&v=beta&t=kXh5dC_5vmr_cZvfKWCrKchgTgA3rQXNvrWjHCkGeGs",
"headline": null,
"type": "DEFAULT",
"name": "JonDoe",
"attributes": null,
"authorities": [
{
"authority": "DEFAULT"
}
]
},
"state": "PENDING",
"program": {
"id": 2,
"title": "test program 1",
"headline": "scholarx test ",
"imageUrl": "sdf",
"landingPageUrl": "slk",
"state": "MENTOR_APPLICATION"
}
},
"response": "PhD Candidate"
},
{
"id": {
"questionId": 3,
"mentorId": 3
},
"question": {
"id": 3,
"category": "MENTOR",
"program": {
"id": 2,
"title": "test program 1",
"headline": "scholarx test ",
"imageUrl": "sdf",
"landingPageUrl": "slk",
"state": "MENTOR_APPLICATION"
},
"question": "What is your organisation/institute?"
},
"mentor": {
"id": 3,
"profile": {
"id": 1,
"uid": "3rt9kAbxZR",
"email": "jondoe@gmail.com",
"firstName": "Jon",
"lastName": "Doe",
"imageUrl": "https://media-exp1.licdn.com/dms/image/C5103AQEDtOL8DCcMnQ/profile-displayphoto-shrink_100_100/0/1574510520118?e=1625702400&v=beta&t=kXh5dC_5vmr_cZvfKWCrKchgTgA3rQXNvrWjHCkGeGs",
"headline": null,
"type": "DEFAULT",
"name": "JonDoe",
"attributes": null,
"authorities": [
{
"authority": "DEFAULT"
}
]
},
"state": "PENDING",
"program": {
"id": 2,
"title": "test program 1",
"headline": "scholarx test ",
"imageUrl": "sdf",
"landingPageUrl": "slk",
"state": "MENTOR_APPLICATION"
}
},
"response": "Monash University"
}
]
Edit Mentor Responses
PUT /api/programs/{programId}/responses/mentor HTTP/1.1
Host: localhost:8080
Content-Type: application/json
[
{
"id": {
"questionId": 1,
"mentorId": 3
},
"response": "PhD, something else"
},
{
"id": {
"questionId": 2,
"mentorId": 3
},
"response": "PhD Candidate, ML Engineer"
},
{
"id": {
"questionId": 3,
"mentorId": 3
},
"response": "Monash University"
}
]
[
{
"id": {
"questionId": 1,
"mentorId": 3
},
"question": {
"id": 1,
"category": "MENTOR",
"program": {
"id": 2,
"title": "test program 1",
"headline": "scholarx test ",
"imageUrl": "sdf",
"landingPageUrl": "slk",
"state": "MENTOR_APPLICATION"
},
"question": "What is your highest level of education?"
},
"mentor": {
"id": 3,
"profile": {
"id": 1,
"uid": "3rt9kAbxZR",
"email": "jondoe@gmail.com",
"firstName": "Jon",
"lastName": "Doe",
"imageUrl": "https://media-exp1.licdn.com/dms/image/C5103AQEDtOL8DCcMnQ/profile-displayphoto-shrink_100_100/0/1574510520118?e=1625702400&v=beta&t=kXh5dC_5vmr_cZvfKWCrKchgTgA3rQXNvrWjHCkGeGs",
"headline": null,
"type": "DEFAULT",
"name": "JonDoe",
"attributes": null,
"authorities": [
{
"authority": "DEFAULT"
}
]
},
"state": "PENDING",
"program": {
"id": 2,
"title": "test program 1",
"headline": "scholarx test ",
"imageUrl": "sdf",
"landingPageUrl": "slk",
"state": "MENTOR_APPLICATION"
}
},
"response": "PhD, something else"
},
{
"id": {
"questionId": 2,
"mentorId": 3
},
"question": {
"id": 2,
"category": "MENTOR",
"program": {
"id": 2,
"title": "test program 1",
"headline": "scholarx test ",
"imageUrl": "sdf",
"landingPageUrl": "slk",
"state": "MENTOR_APPLICATION"
},
"question": "What is your current position/job role?"
},
"mentor": {
"id": 3,
"profile": {
"id": 1,
"uid": "3rt9kAbxZR",
"email": "jondoe@gmail.com",
"firstName": "Jon",
"lastName": "Doe",
"imageUrl": "https://media-exp1.licdn.com/dms/image/C5103AQEDtOL8DCcMnQ/profile-displayphoto-shrink_100_100/0/1574510520118?e=1625702400&v=beta&t=kXh5dC_5vmr_cZvfKWCrKchgTgA3rQXNvrWjHCkGeGs",
"headline": null,
"type": "DEFAULT",
"name": "JonDoe",
"attributes": null,
"authorities": [
{
"authority": "DEFAULT"
}
]
},
"state": "PENDING",
"program": {
"id": 2,
"title": "test program 1",
"headline": "scholarx test ",
"imageUrl": "sdf",
"landingPageUrl": "slk",
"state": "MENTOR_APPLICATION"
}
},
"response": "PhD Candidate, ML Engineer"
},
{
"id": {
"questionId": 3,
"mentorId": 3
},
"question": {
"id": 3,
"category": "MENTOR",
"program": {
"id": 2,
"title": "test program 1",
"headline": "scholarx test ",
"imageUrl": "sdf",
"landingPageUrl": "slk",
"state": "MENTOR_APPLICATION"
},
"question": "What is your organisation/institute?"
},
"mentor": {
"id": 3,
"profile": {
"id": 1,
"uid": "3rt9kAbxZR",
"email": "jondoe@gmail.com",
"firstName": "Jon",
"lastName": "Doe",
"imageUrl": "https://media-exp1.licdn.com/dms/image/C5103AQEDtOL8DCcMnQ/profile-displayphoto-shrink_100_100/0/1574510520118?e=1625702400&v=beta&t=kXh5dC_5vmr_cZvfKWCrKchgTgA3rQXNvrWjHCkGeGs",
"headline": null,
"type": "DEFAULT",
"name": "JonDoe",
"attributes": null,
"authorities": [
{
"authority": "DEFAULT"
}
]
},
"state": "PENDING",
"program": {
"id": 2,
"title": "test program 1",
"headline": "scholarx test ",
"imageUrl": "sdf",
"landingPageUrl": "slk",
"state": "MENTOR_APPLICATION"
}
},
"response": "Monash University"
}
]