Routes
- 1 /organisation/new (done)
- 2 /organisation/<org_id> (done)
- 3 /organisation/<org_id>/admins (done)
- 4 /organisation/<org_id>/campaigns (PR - chaos-39)
- 5 /campaign/<campaign_id> (done)
- 6 /campaign/<campaign_id>/roles (done)
- 7 /role/new (PR CHAOS-38)
- 8 /role/<role_id> (done)
- 9 /role/<role_id>/applications (get is PR - chaos-40)
- 10 /application/<application_id> (not done - chaos-21)
- 11 /application/<application_id>/comments/ (not done chaos-18)
- 12 /comment/<comment_id> (not done - part of chaos-18 now)
- 13 /application/<application_id>/rating (not done - chaos-41)
- 14 /role/<role_id>/questions (not done - chaos-42)
- 15 /question/<question_id> (not done - chaos-43)
- 16 /user/<user_id> (done)
DONE, NOT DONE and WIP notes added 20 JAN 2022 by Joseph
Joseph 22 jan - need some thoughts on answers impl
/organisation/new (done)
status:POST | Create organisation {
"name": "NEW_NAME",
// optional
"logo": "POSSIBLE_LOGO"
} |
---|
/organisation/<org_id> (done)
status:GET | Get organisation details {
"name": "NEW_NAME",
"logo": null || "POSSIBLE_LOGO"
} |
---|---|
status:PUT | Edit organisation {
"name": "NEW_NAME",
// optional
"logo": "POSSIBLE_LOGO"
} |
status:DELETE | Delete organisation |
/organisation/<org_id>/admins (done)
status:GET | Gets list of superusers {
"admins": ["U1", "U2", "U3"]
} |
---|---|
status:PUT | Add superusers payload:
- USER_ID_1
- USER_ID_2 |
status:DELETE | Delete superusers payload:
- SUPERUSER_ID_1
- SUPERUSER_ID_2 |
/organisation/<org_id>/campaigns (PR - chaos-39)
status:GET | Gets list of campaigns. If not director will only show published campaigns. {
"campaigns": ["U1", "U2", "U3"]
}
Campaign is {
id: int
name: string
cover_image?: vec of bytes
description: string
starts_at: time
ends_at: time
published: bool (will always be true if non admin)
} |
---|
/campaign/<campaign_id> (done)
status:GET | Get campaign details (organisation, name, cover, description, start time, end time, draft-status) {
"organisation": "ORG",
"name": "CAMPAIGN_NAME",
"description": "alsdkfjaklsdjflasjdf",
"start_time": TIMESTAMP
"end_time": TIMESTAMP
"draft": BOOL
} |
---|---|
status:PUT | payload:
name: NEW_NAME
cover?: POSSIBLE_COVER
description: NEW_DESCRIPTION
start_time: DATETIME
end_time: DATETIME
draft: BOOL |
status:DELETE | Delete campaign |
/campaign/<campaign_id>/roles (done)
status:GET | Get campaign details (organisation, name, cover, description, start time, end time, draft-status) {
"roles": ["roleid1", "roleid2"]
} |
---|
/role/new (PR CHAOS-38)
status:POST | Create role payload:
campaign_id: INT
name: ROLE_NAME
description?: SLDKFJLSDKJF
min_availability: INT
max_availability: INT |
---|
/role/<role_id> (done)
status:GET | Get role details payload:
name: ROLE_NAME
description: null || SLDKFJLSDKJF
min_availability: INT
max_availability: INT |
---|---|
status:PUT | Edit role payload:
name: ROLE_NAME
description?: SLDKFJLSDKJF
min_availability: INT
max_availability: INT |
status:DELETE | Delete role |
/role/<role_id>/applications (get is PR - chaos-40)
status:GET | Get list of applications {
"applications": [
{
id: INT,
user_id: INT,
role_id: INT,
status: "Draft" | "Pending" | "Rejected" | "Success",
created_at: RFC 3339 datetime string,
updated_at: RFC 3339 datetime string
},
...
]
} |
---|---|
status:POST | Create application payload:
qid1:
description: MYANSWER
qid2:
description: MYANSWER
qid3:
description: MYANSWER |
/application/<application_id> (not done - chaos-21)
status:GET | Get an application payload:
qid1:
description: MYANSWER
qid2:
description: MYANSWER
qid3:
description: MYANSWER
comments:
- COMMENT_ID_1
- COMMENT_ID_2
ratings: <--- the actual ratings (not linking with an id, would be too cbbs)
- 5
- 2
- 3 |
---|
/application/<application_id>/comments/ (not done chaos-18)
status:POST | Create comment on an application payload:
description: TEXT |
---|
/comment/<comment_id> (not done - part of chaos-18 now)
status:GET | View comment payload:
author: REVIEWER6969
description: TEXT |
---|
/application/<application_id>/rating (not done - chaos-41)
status:PUT (can’t rate more than once) | Create rating on an application payload:
rating: INT |
---|
/role/<role_id>/questions (not done - chaos-42)
status:GET | Get list of questions. Each question has the same structure as the questions in the GET method for the below route. {
"questions": [Q1, Q2]
} |
---|
/question/<question_id> (not done - chaos-43)
status:GET | Gets question payload:
id: INT
role_id: INT
title: WHATDIDTHEFOXSAY
description?: NANANANANANNAA
max_bytes: INT
required: BOOL |
---|---|
status:PUT | Edits question payload:
title: WHATDIDTHEFOXSAY
description?: NANANANANANNAA
max_bytes: INT
required: BOOL |
status:DELETE | Deletes question |
/user/<user_id> (done)
status:GET | Gets user (all fields) |
---|---|
status:PUT | Edits user details payload:
zid: z2340895023984
degree: BACHELOR OF ENGINEERING (SOFTWARE)
email: alsdkjfljksdf@gmail.com
display_name: SHREK |
status:DELETE | Deletes user |