List all enrollments: Migration guide
This guide outlines the changes introduced in the List all enrollments v2 endpoint (previously known as getGroups in v1).
Documentation links
Here are the links to the API reference for:
Endpoint mapping
Here's the direct correlation between the v1 and v2 endpoint URLs:
- API v1:
/api/v1/paths/:path_id/users - API v2:
/api/v2/paths/{pathId}/enrollments
Input changes
This section details the specific alterations to the input requirements between API versions.
API v1 input example
curl --location -g 'https://{{host}}/api/v1/paths/567b608a1a92bb4fb526b31a/users?company={{company}}&apiKey={{apiKey}}'API v2 input example
curl --request GET \
--url https://app.360learning.com/api/v2/paths/507f1f77bcf86cd799439011/enrollments \
--header '360-api-version: v2.0' \
--header 'accept: application/json'Main input differences
| Change type | API v1 | API v2 |
|---|---|---|
| Modified Path parameter | path_id (Required) Path's unique identifier. |
|
| Added Query parameter | sessionId (Optional): filters enrollments for a specific session using its unique ID. | |
| Added Query parameter | createdAt (Optional): filters enrollments by enrollment date range using the LHS bracket notation. The date format is now YYYY-MM-DD. |
Output changes
This section details the specific alterations to the successful output returned between API versions.
API v1 output example
[
{
"_id": "5bead809990d886aa3c5146d",
"mail": "[email protected]",
"firstName": "Jean",
"lastName": "Martin1"
},
{
"_id": "5bead8aa990d8862f3c5146f",
"mail": "[email protected]",
"firstName": "Jean",
"lastName": "Martin2"
}
]API v2 output example
[
{
"_id": "507f1f77bcf86cd799439011",
"createdAt": "2025-07-01T08:17:42.042Z",
"isSelfEnrolled": true,
"sessionId": "507f1f77bcf86cd799439011",
"userId": "507f1f77bcf86cd799439011"
}
]Main output differences
API v2 introduces pagination for the List all enrollments endpoint. Instead of returning all enrollments in a single response, it now returns a maximum of 5000 enrollments per page. To retrieve subsequent pages, you need to follow the URL provided in the Link header of the response.
| Change type | API v1 | API v2 |
|---|---|---|
| Removed Output property | mail: Removed from endpoint v2 version, not replaced. | Use the response property userId in the Retrieve a user endpoint to get user's details. |
| Removed Output property | firstName: Removed from endpoint v2 version, not replaced. | Use the response property userId in the Retrieve a user endpoint to get user's details. |
| Removed Output property | lastName: Removed from endpoint v2 version, not replaced. | Use the response property userId in the Retrieve a user endpoint to get user's details. |
| Added Output property | createdAt (Required): Date of user's enrollment in the path, in the formatYYYY-MM-DDTHH:mm:ss.sssZ | |
| Added Output property | isSelfEnrolled : (Required) indicate whether the learner self-enrolled to this path session or not. | |
| Added Output property | sessionId : (Required) unique ID of the path session the learner enrolled into. | |
| Modified Output property | _id : (Required) unique ID of the user. | userId : (Required) unique ID of the user. |
| Modified Success response | 200: Returns an array of all enrollments. | 200: Returns one page of 5000 enrollments. |
| Added Header | Link: String. URL (between < and >) to fetch the immediate next page of results. Only included if there is another page of results. |
Updated 10 months ago
Did this page help you?

