> For the complete documentation index, see [llms.txt](https://kdjw.docs.jakting.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kdjw.docs.jakting.com/score/semester-score.md).

# 获取学期考试成绩

{% hint style="warning" %}
在获取学期考试成绩时，你需要传入「学期」。

可以在 **获取当前学期** 和 **获取所有学期列表** 两个 API 中获得对应的字符串。
{% endhint %}

{% content-ref url="/pages/-MT\_sJuW8rEiT7I4OwdE" %}
[获取当前学期](https://kdjw.docs.jakting.com/term/current-term.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MT\_tHooJPwwqRK7nUc6" %}
[获取所有学期列表](https://kdjw.docs.jakting.com/term/all-term.md)
{% endcontent-ref %}

{% hint style="info" %}
官方在请求学期考试成绩 API 前，也按顺序（当前 → 所有）访问了上面两个提到的 API。
{% endhint %}

## 获取学期考试成绩

<mark style="color:green;">`POST`</mark> `http://kdfw.hnust.edu.cn/bbxyhd/student/termGPA`

#### Headers

| Name  | Type   | Description            |
| ----- | ------ | ---------------------- |
| token | string | 你在登录 API 处获得的 token 字段 |

#### Request Body

| Name     | Type   | Description                 |
| -------- | ------ | --------------------------- |
| type     | string | 1   （未知的一个参数，改成 2 好像结果一样）   |
| semester | string | 可从学期 API 中获得。eg：2020-2021-1 |

{% tabs %}
{% tab title="200 有效总学分/总学分绩点/平均学分绩点 似乎是从入学到实际目前的，应该不是指入学到查询学期。" %}

```yaml
{
    "Msg": "success",
    "code": "1",
    "data": [
        {
            "studentID": "（学号）",
            "xqgpa": [],
            "achievement": [
                ...
                {
                    "curriculumAttributes": "（课程属性：必修/选修 等）",
                    "courseName": "（课程名称）",
                    "courseNature": "（课程性质：公共基础课/通识教育课/学科基础课/专业课 等）",
                    "examinationNature": "（考试性质：正常考试 等）",
                    "credit": （学分：难得的让数字以 number 返回）,
                    "cj0708id": "（应该是用来辨认特定学生的）",
                    "fraction": "（成绩：具体分数/优良中 等）"
                },
                ...
            ],
            "name": "（姓名）",
            "yxzxf": "（大概是有效总学分）",
            "zxfjd": "（大概是总学分绩点）",
            "pjxfjd": "（平均学分绩点）"
        }
    ]
}
```

{% endtab %}
{% endtabs %}
