List all sessions in a path: Migration guide
This guide outlines the changes introduced in the List all sessions in a path v2 endpoint (previously known as getPathSessions in v1).
Key changesThe workflow is a bit different from v1 to v2 on this one. Using v1
getPathSessions, you were able to list all sessions for all paths within your platform. This is no longer possible, and with v2 listing sessions is only possible at a given path level. This means that to achieve the exact same behavior as with v1getPathSessions, you should:
- Call the List all paths to list all paths in the platform
- For each path, retrieve its session by calling the List all sessions in a path
This migration guide will focus on the differences between the v1 getPathSessions and the v2 List all sessions in a path.
- Pagination: The v2 endpoint is paginated and returns 100 path session per page.
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/sessions - API v2:
/api/v2/paths/{pathId}/sessions
Behavior changes
As previously mentioned, with v2 you can only retrieve sessions at the path level, not for the whole platform independently of the path.
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/sessions?company={{company}}&apiKey={{apiKey}}'API v2 input example
curl --request GET \
--url https://app.360learning.com/api/v2/paths/pathId/sessions \
--header '360-api-version: v2.0' \
--header 'accept: application/json'Main input differences
Change type | API v1 | API v2 |
|---|---|---|
Added |
|
Output changes
This section details the specific alterations to the successful output returned between API versions.
API v1 output example
[
{
"sessionName": "Onboarding 2022",
"sessionId": "608001aa34941e74870c2fe4",
"sessionOwnerGroup": "5bea9b5750e8673025d3761d",
"sessionModifiedAt": "2021-12-08T12:00:26.336Z",
"instructorsMails": [
"[email protected]"
],
"startDate": "2018-11-14T14:42:20.000Z",
"pathName": "Onboarding Program",
"pathId": "5bec344cb53db526e1eafc8a",
"pathOwnerGroup": "5bea9b5750e8673025d3761d",
"pathModifiedAt": "2021-11-24T11:53:26.399Z",
"authorsMail": [
"[email protected]"
],
"pathEstimatedDuration": {
"value": 13,
"unit": "day"
},
"lang": "en",
"linear": false,
"certificateOutlineId": "59cd049cd2f65e2a7bb32794",
"description": "Description of the session",
"steps": [
{
"_id": "58eb5c621a92bb4fbaa6b2b0",
"type": "course"
},
{
"_id": "58ebaab81a92bb4fb526b2bc",
"type": "path"
},
{
"_id": "58eb5cb81a92bb4fcc26b2bc",
"type": "program"
}
],
"enrolledGroups": [
"5f450da9ec565d1b7caa40ff",
"5f450daccc565d1b7c6940ff"
]
}
]API v2 output example
[
{
"mainInstructorId": "507f1f77bcf86cd799439011",
"registrationRequestValidation": "disabled",
"startDate": "2025-09-24T13:04:12.039Z",
"endDate": "2025-09-24T13:04:12.039Z",
"userLimit": 0,
"automaticReenrollment": {
"type": "certificationExpiryDate",
"delayDays": 90
},
"ipFiltering": {
"active": true,
"authorizedAddresses": "'141.25.186.74', '56.231.*.85', '96.127.36.47/28', etc"
},
"_id": "507f1f77bcf86cd799439011",
"createdAt": "2025-09-24T13:04:12.039Z",
"groupId": "507f1f77bcf86cd799439011",
"instructorIds": [
"507f1f77bcf86cd799439011"
],
"isAudienceBuilder": true,
"modifiedAt": "2025-09-24T13:04:12.039Z",
"name": "Employee Onboarding October Session.",
"pathId": "507f1f77bcf86cd799439011",
"translations": [
{
"lang": "fr",
"published": true,
"translatorIds": [
"507f1f77bcf86cd799439011"
],
"translatedFields": {
"name": "Accueil des employés Session d'Octobre"
}
}
],
"additionalInformation": "A0015221",
"rootSessionId": "507f1f77bcf86cd799439011"
}
]Main output differences
This section outlines the primary changes in the structure and content of a successful API response. Key alterations include the renaming and restructuring of several session-related properties, the removal of path-specific details previously embedded within the session response, and the absence of direct enrollment information (e.g., enrolled groups), which was present in v1. New fields for audience management and instructor assignment have also been introduced.
API v2 also introduces pagination for the List all sessions in a path endpoint. Instead of returning all sesions in a single response, it now returns a maximum of 100 sessions 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 |
|
|
Removed |
|
|
Removed |
|
|
Removed |
|
|
Removed |
|
|
Removed |
|
|
Removed |
|
|
Removed |
|
|
Removed |
|
|
Removed |
|
|
Removed |
|
|
Removed |
|
|
Removed |
| |
Modified |
|
|
Modified |
|
|
Modified |
|
|
Modified |
|
|
Modified |
|
|
Modified |
|
|
Modified |
|
|
Added |
| |
Added |
| |
Added |
| |
Added |
| |
Added |
| |
Added |
| |
Added |
|
Updated 7 days ago
