> For the complete documentation index, see [llms.txt](https://dentalwhale.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dentalwhale.gitbook.io/documentation/orca-api/getcourseusers.md).

# getCourseUsers

Get user list by enrolled courses

## Get user videos and quizzes by courses

<mark style="color:green;">`POST`</mark> `{{HOST}}api/getCourseUsers?page=1&search=&per_page=20&is_test=1`

This endpoint allows you to get free cakes.

#### Query Parameters

| Name      | Type    | Description                                  |
| --------- | ------- | -------------------------------------------- |
| filter    | number  | 1/2/3  ce credit filters                     |
| order     | string  | asc or  desc (default)                       |
| order\_by | string  | Sort column name                             |
| is\_test  | integer | 1 show test account, 0 show non test account |
| per\_page | integer | Number of record per page, 20 by default     |
| search    | string  | Filter data                                  |
| page      | integer | Current page number                          |

#### Request Body

| Name        | Type   | Description                                                      |
| ----------- | ------ | ---------------------------------------------------------------- |
| short\_name | string | If any data is provided by default we are using  business-master |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{
    "link": {
        "first": "http://localhost:8080/api/orca_admin/getCourseUsers?per_page=20&is_test=false&page=1",
        "last": "http://localhost:8080/api/orca_admin/getCourseUsers?per_page=20&is_test=false&page=1",
        "next": null,
        "prev": null
    },
    "meta": {
        "from": 1,
        "current_page": 1,
        "last_page": 1,
        "path": "http://localhost:8080/api/orca_admin/getCourseUsers",
        "per_page": "20",
        "to": 2,
        "total": 2
    },
    "data": {
        "users": [
            {
                "first_name": "Testorcausercon",
                "last_name": "HansonUserCon",
                "username": "testconorca",
                "user_id": 183,
                "ce_credit": 1,
                "awarded_at": null,
                "user_who_award": null,
                "course": {
                    "secondTrackTotal": "07:27:37",
                    "videoLenghtTotal": "07:28:18",
                    "totalVideos": 31,
                    "percent": 99.85
                },
                "quiz": {
                    "gradesTotal": 2900,
                    "quizTaked": "29",
                    "topGrade": 100,
                    "gradesMedia": 100,
                    "quizApproved": "29",
                    "quizTotal": "29",
                    "ceCredit": 1
                }
            },
            {
                "first_name": "Dax",
                "last_name": "Bels",
                "username": "daxter05222020b",
                "user_id": 34,
                "ce_credit": 0,
                "awarded_at": null,
                "user_who_award": null,
                "course": {
                    "secondTrackTotal": "00:00",
                    "videoLenghtTotal": "07:28:18",
                    "totalVideos": "31",
                    "percent": 0
                },
                "quiz": {
                    "gradesTotal": 0,
                    "quizTaked": 0,
                    "topGrade": 0,
                    "gradesMedia": 0,
                    "quizApproved": 0,
                    "quizTotal": "29",
                    "ceCredit": 0
                }
            }
        ],
        "courseFullName": "Business Masters"
    },
    "message": "",
    "errorCode": "",
    "errors": []
}
```

{% endtab %}

{% tab title="400 Could not find a cake matching this query." %}

```
{
    "link": {
        "first": "/api/orca_admin/getCourseUsers?page=1",
        "last": "/api/orca_admin/getCourseUsers?page=1",
        "next": "",
        "prev": ""
    },
    "meta": {
        "current_page": 1,
        "from": null,
        "last_page": 1,
        "path": "/api/orca_admin/getCourseUsers",
        "per_page": 10,
        "to": null,
        "total": 0
    },
    "data": [],
    "message": "",
    "errorCode": "",
    "errors": [
        "API error: Funtion doesn't exist"
    ]
}
```

{% endtab %}
{% endtabs %}
