-
Notifications
You must be signed in to change notification settings - Fork 2
Deadlines Endpoints
N Vijay Narayanan edited this page Aug 16, 2022
·
13 revisions
POST: /api/deadlines
- Authorization Required:
authorizeAdmin
Request Body:
{
deadline: {
cohortYear: number
desc?: string
name: string
dueBy: dateTime
type: enum
evaluatingDeadlineId?: number; // If type == "Evaluation"
}
}
GET: /api/deadlines
- Authorization Required:
authorizeAdmin
| Query Param | Description | Optional |
|---|---|---|
| cohortYear | Cohort year of the deadline | true |
| name | Name of the deadline to do string matching | true |
Sample Response:
{
deadlines: [
{
id: 1,
cohortYear: 2022,
name: "Milestone 1",
desc: "This is the first Milestone",
dueBy: "2022-06-18T02:42:34.564Z",
createdOn: "2022-06-08T02:42:34.564Z",
updatedAt: ""2022-06-09T02:42:34.564Z""
type: "Milestone",
evaluatingMilestoneId: null (if type == "Evaluation", this would be a number)
evaluating: null (if type == "Evaluation", this would be a Deadline object, refer to the request body of deadline creation for an example)
}
]
]
GET: /api/deadlines/:deadlineId
- Authorization Required:
authorizeAdmin - Currently unused
Sample Response:
{
id: 1,
cohortYear: 2022,
name: "Milestone 1",
desc: "This is the first Milestone",
dueBy: "2022-06-18T02:42:34.564Z",
type: "Milestone"
}
PUT: /api/deadlines/:deadlineId
- Authorization Required:
authorizeAdmin
Request Body:
{
deadline: {
name?: string
dueBy?: dateTime
type?: enum
evaluatingMilestoneId?: number
}
}
DELETE: /api/deadlines/:deadlineId
- Authorization Required:
authorizeAdmin
GET: /api/deadlines/:deadlineId/questions
- Authorization Required:
authorizeAdmin
Sample Response:
{
deadline: {
id: 1,
cohortYear: 2022,
name: "Milestone 1",
desc: "This is the first Milestone"
dueBy: "2022-06-18T02:42:34.564Z",
createdOn: "2022-06-08T02:42:34.564Z",
updatedAt: "2022-06-09T02:42:34.564Z",
type: "Milestone",
evaluatingMilestoneId: null,
evaluating: null
},
sections: [{
id: 1,
name: "Deliverables",
desc: "Milestone 1 Deliverables",
sectionNumber: 1,
deadlineId: 10,
questions: [{
id: 3,
questionNumber: 1,
question: "Poster Link",
desc: "",
type: "Url",
isAnonymous: false,
sectionId: 1,
options:[]
}]
}]
PUT: /api/deadlines/:deadlineId/questions
- Authorization Required:
authorizeAdmin
Sample Request Body:
- (sections order is implied by index)
- (questions order is implied by index)
- (options order is implied by index)
{
sections: [
{
name: "Poster Evaluation",
desc: "How good is this team's poster submission?"
questions: [
{
question: "How well did this team do?",
desc: "Rate the team based on ...",
type: "ShortAnswer"
},
{
question: "What would you rate this team?",
desc: "Please rate this team on ...",
type: "MultipleChoice",
options: [
"1 / 5 - Good enough for Vostok",
"2 / 5 - Good enough for enough for Gemini"
]
}
]
},
{
name: "Video Evaluation",
desc: "How good is this team's video submission?",
questions: [
{
question: "How well did this team do?",
desc: "Rate the team based on ...",
type: "ShortAnswer"
},
{
question: "What would you rate this team?",
desc: "Please rate this team on ...",
type: "MultipleChoice",
options: [
"1 / 5 - Good enough for Vostok",
"2 / 5 - Good enough for enough for Gemini"
]
}
]
}
]
}
-
Auth Endpoints
/api/auth -
Users Endpoints
/api/users -
Students Endpoints
/api/students -
Advisers Endpoints
/api/advisers -
Mentors Endpoints
/api/mentors -
Administrators Endpoints
/api/administrators -
Cohorts Endpoints
/api/cohorts -
Deadlines Endpoints
/api/deadlines -
Projects Endpoints
/api/projects -
Dashboard Endpoints
/api/dashboard -
Evaluation Relationships Endpoints
/api/relations -
Submissions Endpoints
/api/submissions -
Announcements Endpoints
/api/announcements -
Application Endpoints
/api/application -
Vote Events Endpoints
/api/vote-events -
AI Endpoints
/api/ai