You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An advanced guide to how to use our Academy REST API to retrieve various statistics / information.
5
+
An advanced guide to how to use our Academy REST APIs to retrieve various statistics/information.
6
6
categories: [Academy]
7
7
8
8
---
9
9
10
-
The following examples demonstrate how to retrieve statistics from the Academy REST API.
10
+
The following examples demonstrate how to retrieve information from the Academy REST APIs.
11
11
12
-
## Get the number of active learners
12
+
## Get the total number of registered learners in Academy
13
13
14
-
Use the Layer5 Cloud API to retrieve the number of *active* learners. Pass your [security token](https://docs.layer5.io/cloud/security/tokens/) as a Bearer token in the `Authorization` header (as shown in [Authenticating with API](https://docs.layer5.io/cloud/reference/api-reference/#authenticating-with-the-api)). The response JSON includes an array of user objects.
15
14
16
-
## Example: cURL Request
15
+
Use the Layer5 Cloud API to retrieve the *total* number of registered learners. Pass your [Security Token](https://docs.layer5.io/cloud/security/tokens/) as a Bearer token in the `Authorization` header (as shown in [Authenticating with API](https://docs.layer5.io/cloud/reference/api-reference/#authenticating-with-the-api)). The response JSON includes an array of user objects.
17
16
18
-
```bash
19
-
curl -s -X GET "https://cloud.layer5.io/api/identity/users/online" \
20
-
-H "Authorization: Bearer <your-token>” \
21
-
| jq 'length'
22
-
```
23
17
24
-
This returns the number of active learners.
25
-
```
26
-
30
27
-
```
18
+
{{< tabpane >}}
19
+
{{< tab header="cURL" >}}
20
+
curl -s -X GET "https://cloud.layer5.io/api/academy/cirricula" \
0 commit comments