Download OpenAPI specification:Download
This is the tentative API specification for Busan Science High School Alumni Website, Make BSS Great Again. Note that this project does not have any official relationship between Busan Science High School. Therefore, if you have any questions/suggestions/complaints, please contact our team with the email or contact information listed above.
All API calls require secured connection (only HTTPS). To use the APIs, the users need to retrieve access token by signin with username and password (basic authentication). As of now, we do not support multi-factor authentication, but before we service the application/website MFA will be supported.
Details of the Security Schemes are described below.
User to change the password by using the refresh token and current password. Logout from the other sessions once the change password operation success.
When user fail to provide correct current password or the new password does not comply with the password rule, it throws 400 BadRequest Error.
May get new refreshToken if current token is about to expire
currentPassword required | string |
newPassword required | string |
{- "currentPassword": "thisisprevpassword",
- "newPassword": "HelloWorld"
}
Create a new user account.
Need username and password to create the account, admission year, legal name, and email. Also accept nickname, phone number, and affiliation as optional fields
Email will be verified after the creation of the account, while the phone number will not be verified.
username and password that do not comply with rules may lead 400 Bad Request error.
username required | string |
password required | string |
admissionYear required | integer >= 1 |
legalName required | string |
nickname | string |
email required | string <email> |
object | |
object |
{- "username": "gildong123",
- "password": "gildongpw1",
- "admissionYear": 13,
- "legalName": "홍길동",
- "nickname": "GildongTheGreat",
- "email": "gildong.hong@gmail.com",
- "phoneNumber": {
- "countryCode": 82,
- "phoneNumber": 1012345678
}, - "affiliation": {
- "schoolCompany": "Busan Science High School",
- "majorDepartment": "Student"
}
}
{- "username": "gildong123"
}
List up users with matching search criteria. Only signed in user can search the article.
User can specify the search term with query string. Supported options are:
Other options will be ignored but will not throw error. The search result will be ordered by name.
50 results will be returned at most, user can search further by indicating page parameter in the query string.
admissionYear | integer >= 2002 Integer for admission year |
name | string name of the user |
username | string username uniquely indicating the user |
verified | boolean Flag used to display unverified user. Only verified user is displayed by default (default value of the flag is true). |
page | integer Indicating the page number that used to navigate the search result. |
[- {
- "username": "gildong123",
- "admissionYear": 2015,
- "nameKorean": "홍길동",
- "nameEnglish": "Gildong Hong",
- "email": "gildong.hong@example.com",
- "phoneNumber": {
- "countryCode": 82,
- "number": 1012345678
}
}, - {
- "username": "gilsoon123",
- "admissionYear": 2014,
- "nameKorean": "홍길순",
- "nameEnglish": "Gilsoon Hong",
- "email": "gilsoon.hong@example.com"
}
]
Retrieve user's information.
Returns user's public information if the other user try to retrieve the information. If owner/admin of the account try to retrieve the information, the private/public information associated with the user account will be returned.
This API requires username (provided as path parameter).
username required | string Username indicating user account. Same as user's login ID. |
{- "username": "gildong123",
- "admissionYear": 13,
- "legalName": "홍길동",
- "nickname": "Gildong Hong",
- "email": [
- {
- "email": "gildong.hong@example.com",
- "primaryAddr": true,
- "verified": true
}, - {
- "email": "gildong123@gmail.com",
- "primaryAddr": false,
- "verified": true
}, - {
- "email": "notverified@email.com",
- "primaryAddr": false,
- "verified": false
}
], - "phoneNumber": {
- "countryCode": 82,
- "phoneNumber": 1012345678
}, - "affiliation": {
- "schoolCompany": "Busan Science High School",
- "majorDepartment": "student"
}
}
Modify user's information. Only the owner of the account and admin account can use this API. Suspended and deleted users cannot be updated.
This API requires username (provided as path parameter). In the RequestBody, the contents to be modified are listed. User is only allowed to modify nickname, phone number, affiliation, and email.
If the user changed the email, the user need to verify the new email. Before the verification, the email will not be used for notification and public contact.
If part of requests failed, the other change requests will be proceed. It will respond with 200, but with "Partially processed" message in the response body.
username required | string Username indicating user account. Same as user's login ID. |
nickname | string |
object | |
object | |
Array of objects non-empty unique |
{- "nickname": "New Nickname",
- "phoneNumber": {
- "countryCode": 82,
- "phoneNumber": 123456789
}, - "affiliation": {
- "schoolCompany": "Best School",
- "majorDepartment": "Best Major"
}, - "emailChange": [
- {
- "email": "dummy@dummy.com",
- "requestType": "delete"
}, - {
- "email": "test@test.com",
- "requestType": "add"
}
]
}
Issue verification ticket and send it to the email in order to verify email of newly created user and changed email of existing user. Used to get new verification ticket as after calling new account creation API and user information update API will trigger verification process automatically and send the verification ticket to the provided email.
Need email address to be verified
email required | string <email> |
{- "email": "gildong.hong@example.com"
}
Verify email with the provided veify ticket/link generated by send email verify link API. This API require ticketID (provided as path parameter).
ticketID required | string ticketID that has been generated by send email verify link API. |
Find username by using email, name, and admission year.
If the user with matching information found, the part of the username (first three and last two characters) will be returned.
name required | string |
email required | string <email> |
admissionYear required | number >= 1 |
{- "name": "홍길동",
- "email": "gildong.hong@example.com",
- "admissionYear": 2015
}
{- "username": "gil*****23"
}
Find and send username by using email, name, admission year, and search result of find-username API.
If the user with matching information found, the email containing username will send.
name required | string |
email required | string <email> |
admissionYear required | number >= 1 |
maskedUsername required | string |
{- "name": "홍길동",
- "email": "gildong.hong@example.com",
- "admissionYear": 13,
- "maskedUsername": "gil*****23"
}
Send password reset link (ticketID) to user's email having matching name, username, email, and admission year information.
name required | string |
email required | string <email> |
admissionYear required | number >= 1 |
username required | string |
{- "name": "홍길동",
- "email": "gildong.hong@example.com",
- "admissionYear": 13,
- "username": "gildong123"
}
Reset password with the reset ticket/link generated by send password reset link API. This API require ticketID (provided as path parameter), username and new password.
ticketID required | string ticketID that has been generated by send password reset link API. |
username required | string |
newPassword required | string |
{- "username": "gildong123",
- "newPassword": "thisisnewpassword"
}
Users can report other fake/spam user to admin. They need to provide proper reasons why they think the other user is harmful or fake/spam account.
If the number of report counts spikes, the reported user is temporarily lost access to the website during investigation.
username required | string Username indicating user account. Same as user's login ID. |
reason required | string |
additionalComment | string |
{- "reason": "fake news",
- "additionalComment": "This information contains fake and dangerous information, which has been confirmed by the authorities."
}
Get list of challenge questions that let user to instantly approved as an alumni.
Only new users can do the challenge once.
If the approved user or new user that already consumed their attempt, it will throw 400
error.
[- {
- "question": "What is the city that we did not go during the field trip to USA?",
- "choicesList": [
- "Boston, MA",
- "New York City, NY",
- "Atlanta, GA",
- "New Haven, CT",
- "Philadelphia, PA"
]
}, - {
- "question": "What country did we visited for a travel?",
- "choicesList": [
- "Taipei, Taiwan",
- "Tokyo, Japan",
- "Qingdao, China",
- "Singapore",
- "Bangkok, Thailand"
]
}
]
Submit the answers of the challenge questions that generated by GET /user/promote API. The result of the challenge will be returned as the result.
This API should be used after the challenge question retrival API called.
answerList required | Array of any |
{- "answerList": [
- {
- "question": "What is the city that we did not go during the field trip to USA?",
- "answer": "Atlanta, GA"
}, - {
- "question": "What country did we visited for a travel?",
- "answer": "Tokyo, Japan"
}
]
}
{- "result": false
}
Users have authority to help admins to identify real alumni. They can upvote the other user as alumni of BSS.
If the upvotes the new user received exceed threshold, the user is considered as a verified BSS alumni.
username required | string Username indicating user account. Same as user's login ID. |
Retrieve the list of alumni members who upvoted the new user. This API will return the array of usernames and their names.
username required | string Username indicating user account. Same as user's login ID. |
[- {
- "username": "gildong123",
- "admissionYear": 2015,
- "nameKorean": "홍길동"
}, - {
- "username": "gilsoon123",
- "admissionYear": 2014,
- "nameKorean": "홍길순"
}
]
Users have authority to help admins to identify real alumni.
The users can cancel the upvote for the new user.
If they want to alert admin spam/fake user, they need to use report
features, rather than just deleting the upvote.
If the upvotes the new user received exceed threshold, the user is considered as a verified BSS alumni.
username required | string Username indicating user account. Same as user's login ID. |
Write a new post on board. Only Signed in user can upload the article.
Need title and category of the post, and the contents. Once the post successfully created, return the URL of the article. Note that article URL contains postID, and this is created by mixing generated date, userID, and title.
title required | string |
category | string |
content required | string <HTML> |
{- "title": "Hello World.",
- "category": "Group 1",
- "content": "<p>Hello World!!</p>"
}
{
}
List up posts with matching search criteria. Only Signed in user can search the article.
User can specify search terms as query string. Supported options are
Other options will be ignored but will not throw error. The search result will be ordered by last modified date.
50 results will be returned at most; user can search further by indicating page parameter in the query string.
title | string String that contains in the title of article(s). |
writer | string ID or Name of article's writer. |
content | string String that contains in the content of either article or related comments. |
category | string Name of category. Need to be match exactly. |
page | integer Indicating the page number that used to navigate the search result. |
[- {
- "postID": "BASE64URLPOSTID1",
- "title": "Hello World!!",
- "writer": "java",
- "createdDate": "2020-02-21T00:00:00.000Z",
- "numComments": 40
}, - {
- "POSTID": "ID39BASE64URL",
- "title": "Hello BSS!!",
- "writer": "alumniBSS",
- "createdDate": "2021-02-22T00:00:00.000Z",
- "numcomments": 100
}
]
Modify an existing post having matching postID. Only writer of the article or admin user can modify the post.
Can modify either title, category of the post, or the contents. Once the post successfully created, return the URL of the article.
postID required | string an unique, url-safe ID generated by mixing writer's ID, generated date, and the title of the article. |
title | string |
category | string |
content | string <HTML> |
{- "title": "Hello World.",
- "category": "Group 1",
- "content": "<p>Hello World!!</p>"
}
{
}
Retrieve a post having given postID. Every verified user can read the article.
postID required | string an unique, url-safe ID generated by mixing writer's ID, generated date, and the title of the article. |
{- "title": "Hello World.",
- "category": "Group 1",
- "content": "<p>Hello World!!</p>"
}
Give Like to the post. Every user with read access to the post can add Like.
postID required | string an unique, url-safe ID generated by mixing writer's ID, generated date, and the title of the article. |
{- "likeCount": 8
}
Remove Like to the post. Every user with read access to the post can remove Like.
postID required | string an unique, url-safe ID generated by mixing writer's ID, generated date, and the title of the article. |
{- "likeCount": 8
}
Retrieve Like counts of the post. Every user with read access to the post can retrieve the number of Likes.
postID required | string an unique, url-safe ID generated by mixing writer's ID, generated date, and the title of the article. |
{- "likeCount": 8
}
Users can report harmful article; they need to provide proper reasons why they think the article is harmful. Admin should review the article.
If the number of report counts spikes, the article is automatically blinded while the admin reviewing the contents.
postID required | string an unique, url-safe ID generated by mixing writer's ID, generated date, and the title of the article. |
reason required | string |
additionalComment | string |
{- "reason": "fake news",
- "additionalComment": "This information contains fake and dangerous information, which has been confirmed by the authorities."
}
Write a new comment associated with a post. Only signed in user can create a comment.
Need postID to indicate which article the user want to write a comment on. Each comment has unique comentID, which generated by mixing associated post's ID, writer's ID, generated datetime, and part of contents.
If user want to reply to an existing comment, specify parentComment field with commentID of parent's comment.
postID required | string <postID> |
content required | string |
parentComment | string <commentID> |
{- "postID": "BASE64URLPOSTID1",
- "content": "Hello World - This is a comment.",
- "parentComment": "COMMENTIDURLSAFEBASE64STRING"
}
List the comments associated with the post. Only signed in user can upload the article.
This API require postID as a query string in order to specify which article that user want to retrieve the comments.
By default, first 50 comments will be returned.
To navigate next comments, specify page
argument in query string.
Other options will be ignored but will not throw any exception. The comment will be ordered by generated date, and the child comments will follow the its parent.
postID required | string <postID> Unique ID indicating an article |
page | integer Indicating the page number that used to navigate the search result. |
[- {
- "commentID": "COMMENTIDURLSAFEBASE64STRING",
- "postID": "BASE64URLPOSTID1",
- "content": "Hello World - This is a comment."
}, - {
- "commentID": "COMMENTIDURLSAFE",
- "postID": "BASE64URLPOSTID1",
- "content": "Hello World - This is a comment.",
- "parentComment": "COMMENTIDURLSAFEBASE64STRING"
}
]
Delete the comment having given commentID. Only writer of the comment or admin user can delete the comment.
commentID required | string an unique, url-safe ID generated by mixing associated post's ID, writer's ID, generated datetime, and part of contents. |
Modify an existing comment having matching commentID. Only writer of the comment or admin user can modify the comment.
commentID required | string an unique, url-safe ID generated by mixing associated post's ID, writer's ID, generated datetime, and part of contents. |
postID required | string <postID> |
content required | string |
parentComment | string <commentID> |
{- "postID": "BASE64URLPOSTID1",
- "content": "Hello World - This is a comment.",
- "parentComment": "COMMENTIDURLSAFEBASE64STRING"
}
Users can report harmful comment; they need to provide proper reasons why they think the comment is harmful. Admin should review the comment.
If the number of report counts spikes, the comment is automatically blind while the admin reviewing the contents.
commentID required | string an unique, url-safe ID generated by mixing associated post's ID, writer's ID, generated datetime, and part of contents. |
reason required | string |
additionalComment | string |
{- "reason": "fake news",
- "additionalComment": "This information contains fake and dangerous information, which has been confirmed by the authorities."
}
Create new notification that will be displayed when user logged in.
New comments and replies on the article/comment that the user wrote are subject to the notification. The notifications will be grouped by postID or commentID based on the context of the notifications. The timestamp and replier's/commenter's id will be saved as an array for each commentID or postID.
Note that this API is only accessible from other API servers. Individual users, including admin, cannot call this API directly.
timestamp required | string <datetime> |
actionType required | string Enum: "comment" "reply" |
targetObjectID required | string <postID/commentID> |
toUsers required | Array of strings <username> |
{- "timestamp": "2017-07-21T17:32:28.000Z",
- "actionType": "comment",
- "targetObjectID": "BASE64URLPOSTID",
- "toUser": [
- "gilsoon123"
]
}
Retrieve list of notifications that has been created by create new notification API calls. Result is ordered by most recently created date-time.
All read notifications will be removed after 7 days from read.
[- {
- "timestamp": "2017-07-21T17:32:28.000Z",
- "actionType": "comment",
- "targetObjectID": "BASE64URLPOSTID",
- "fromUsers": [
- "gilsoon123",
- "gildong123"
], - "read": false
}, - {
- "timestamp": "2020-07-21T19:32:28.000Z",
- "actionType": "reply",
- "targetObjectID": "BASE64URLCOMMENTID",
- "fromUsers": [
- "tomthecat",
- "jerrytherat"
], - "read": true
}
]
Send HTML formatted email to the user.
Note that this API is only accessible from other API servers. Individual users, including admin, cannot call this API directly.
to required | Array of any |
title required | string |
content required | string <html> |
{- "to": [
- "admin@bshs.or.kr"
], - "title": "Hello MBGA",
- "content": "<p>Hello World!!</p>"
}
Send weekly digest to every users. Once this API called, it will generate weekly digest emails by combining templates with user's unread notifications, featured article, and other event information. Then, it will call sendEmail API to send the digest emails.
Note that this API is only accesible from other API servers. Individual users, including admin, cannot call this API directly.