# Count courses

## Count courses

<mark style="color:blue;">`GET`</mark> `https://abc.hoola.vn/manage/api/courses/count-total-course`

#### Query Parameters

| Name  | Type   | Description                  |
| ----- | ------ | ---------------------------- |
| token | string | Account Authentication Token |

{% tabs %}
{% tab title="200 Query successfully" %}

```javascript
// Response Code "00". Query successfully.
// Return data:
{
    "respCode": "00",
    "totalCourse": 7,
    "msg": "Success"
}
```

{% endtab %}

{% tab title="400 Missing parameter" %}

```javascript
// Response Code "02". No token provided.
// Return data:
{
    "respCode": "02",
    "totalCourse": null,
    "msg": "No token"
}
```

{% endtab %}

{% tab title="401 Fail to verify your account" %}

```javascript
// Response Code "04". Token is invalid or has expired.
// Return data:
{
    "respCode": "04",
    "totalCourse": null,
    "msg": "Invalid token || Token has expired"
}
```

{% endtab %}

{% tab title="403 Your account is not authorized to perform the query" %}

```javascript
// Response Code "05". Your account is not authorized to perform the query.
// Return data:
{
    "respCode": "05",
    "totalCourse": null,
    "msg": "Your account does not have permission"
}
```

{% endtab %}

{% tab title="405 Wrong request method" %}

```javascript
// Response Code "01". Wrong request method. 
// Return data:
{
    "respCode": "01",
    "totalCourse": null,
    "msg": "Request method should be GET"
}
```

{% endtab %}

{% tab title="500 Server error" %}

```javascript
// Response Code "03". Server not able to authenticate your account.
// Return data:
{
    "respCode": "03",
    "totalCourse": null,
    "msg": "Server not able to authenticate your account"
}
```

{% endtab %}
{% endtabs %}

Example:

```javascript
// GET:
https://abc.hoola.vn/manage/api/courses/count-total-course?token=sdhg23797sdbv9186jdvk58
```
