---
# System prepended metadata

title: FSE SB1 I4-Yihong Wang API Design Doc

---

# FSE SB1 I4-Yihong Wang API Design Doc
> API Design Ref: [ESN REST API Sample](https://docs.google.com/spreadsheets/d/1aHaiGxGVdY-UrNUoj1SaZdNqx7HnisuxNiucPQXcJE0/edit#gid=1001548426)


[TOC]


## Self Assessment API
> Need JWT Auth for API Call

### Get Quiz

#### Route
```
GET /api/quizzes
```

#### Payload
> N/A

#### Response

##### Code 200 OK
```json
{
    type: QUIZ, // enum
    data: {
       quizzes: [
           {
               quiz_title: string,
               option1: string, // TBD, Front-end format?
               option2: string,
               option3: string, 
               option4: string,
               correct_answer: string
           },
           ...
       ],
    },
}
```


### Save Quiz

#### Route
```
POST /api/quizzes
```

#### Payload
> N/A

#### Response

##### Code 200 OK
```json
{
    type: QUIZ, // enum
    data: {
       quizzes: [
           {
               quiz_title: string,
               option1: string, // TBD, Front-end format?
               option2: string,
               option3: string, 
               option4: string,
               correct_answer: string
           },
           ...
       ],
    },
}
```
