All endpoints are capable of returning 500. In this case the body contains an error: string
.
Endpoints marked as "needs credentials" returns 401 with error: "USER_NOT_FOUND"
when the user is not found.
Endpoints marked as "needs eval access" additionally returns 401 with error: "USER_NO_EVALS"
when the user exists but has no evals access. Evals access can be granted after completing the challenge, or manually granted.
- Needs credentials
Status: 200
- Body:
token
:string
salt
:string
courseInfo
:array
courseId
:number
courseTitle
:string
courseRatingIndex
:number
courseOceUrl
:string
challengeTries
:number
maxChallengeTries
:number
Status: 403
- When the user has already verified challenge
- Body:
error
:"ALREADY_ENABLED"
Status: 429
- When the user has reached the max tries
- Body:
error
:"MAX_TRIES_REACHED"
- Needs credentials
- Body:
token
:string
salt
:string
answers
:array
courseRatingId
:number
courseRatingIndex
:number
answer
:string
Status: 200
- Body:
results
:boolean[]
challengeTries
:number
maxChallengeTries
:number
Status: 400
- When the token/salt is invalid (does not decrypt to valid information), or when the request is of invalid shape
- Body:
error
:"INVALID_REQUEST"
Status: 403
- When the user has already verified challenge
- Body:
error
:"ALREADY_ENABLED"
Status: 429
- When the user has reached the max tries
- Body:
error
:"MAX_TRIES_REACHED"
- This route should only be requested by Ferry
Status: 200
- No body
Status: 401
- When there is no secret header with request
- Body:
error
:"NOT_FERRY"
- Needs eval access
Status: 200
- Body:
- See the
evalsBySeason
query
- See the
Status: 200
- Body:
- See the
catalogBySeason
query
- See the
DEPRECATED: use /api/catalog/evals/{season}
instead
DEPRECATED: use /api/catalog/public/{season}
instead
Status: 200
- Body:
auth
:boolean
netId
:NetId | null
user
:User | null
- Query:
redirect
:string | undefined
Status: 302
- Redirects to the provided
redirect
query parameter (if it's an allowed origin), orhttps://coursetable.com
otherwise
- Needs credentials
Status: 200
- No body
Status: 400
- If there is no user
- Body
error
:"USER_NOT_FOUND"
- Needs credentials
- Body:
friendNetId
:NetId
Status: 200
- No body
Status: 400
- When
friendNetId
is not provided or is the same as the user's, or when there's no existing friend request - Body:
error
:"INVALID_REQUEST" | "SAME_USER" | "NO_FRIEND_REQUEST"
- Needs credentials
- Body:
friendNetId
:NetId
Status: 200
- No body
Status: 400
- When
friendNetId
is not provided, is the same as the user's, or does not exist - Body:
error
:"INVALID_REQUEST" | "SAME_USER" | "FRIEND_NOT_FOUND"
- Needs credentials
- Body:
friendNetId
:NetId
Status: 200
- No body
Status: 400
- When
friendNetId
is not provided, is the same as the user's, or is not a friend - Body:
error
:"INVALID_REQUEST" | "SAME_USER" | "FRIEND_NOT_FOUND" | "ALREADY_FRIENDS" | "ALREADY_RECEIVED_REQUEST" | "ALREADY_SENT_REQUEST"
- Needs credentials
Status: 200
- Body:
requests
:array
netId
:NetId
name
:string | null
- Needs credentials
Status: 200
-
Body:
-
friends
:type Friends = { [netId: NetId]: { name: string | null; worksheets: { [season: Season]: { [worksheetNumber: number]: { crn: Crn; color: string; }[]; }; }; }; };
-
- Needs credentials
Status: 200
- Body:
names
:array
netId
:string
first
:string | null
last
:string | null
college
:string | null
- TODO: do we really need to return literally every user's name to client side?
- For internal use by Canny
- Needs credentials
- Body:
action
:"add" | "remove" | "update"
season
:string
crn
:number
worksheetNumber
:number
color
:string
(must be a valid color string)
Status: 200
- No body
Status: 400
- When the request body is invalid
- Body:
error
:"INVALID_REQUEST" | "ALREADY_BOOKMARKED" | "NOT_BOOKMARKED"
- Needs credentials
Status: 200
-
Body:
-
netId
:NetId
-
evaluationsEnabled
:boolean | null
-
year
:number | null
-
school
:string | null
-
data
:type Data = { [season: Season]: { [worksheetNumber: number]: { crn: Crn; color: string; }[]; }; };
-
Status: 200
- Body:
"pong"