Edit a path session: Migration guide
This guide details how the Edit a path session endpoint has changed (previously known as updatePathSession in v1).
Key changes
- Endpoint structure: The v2 endpoint now requires both the
pathIdandsessionIdas path parameters, whereas v1 only required thesession_id.- Instructor management: Instructor assignment now uses unique IDs instead of email addresses and differentiates between a single
mainInstructorIdand multipleinstructorIds.- Open access support: API v2 introduced enhanced support for open access registrations (including a new input parameter for user limits).
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/:session_id - API v2:
/api/v2/paths/{pathId}/sessions/{sessionId}
Behavior changes
- In API v1, if
registrationRequestwas not included in the query, validation of open access registrations was deactivated by default. In API v2,registrationRequestValidationexplicitly usesdisabledfor this purpose, and new options likeadminsAndManagersandadminsCoachesInstructorsManagershave been added for more granular control over registration validation. - API v1 automatically removed the user limit for self-registration if an API call was made to this endpoint, and there was no way to set or restore it via the API. API v2 introduces a
userLimitbody parameter, allowing explicit control over the maximum number of learners for self-enrollment.
Input changes
This section details the specific alterations to the input requirements between API versions.
API v1 input example
curl --location -g --request PATCH 'https://app.360learning.com/api/v1/paths/sessions/5bead809990d8862f3c514aa?company={{company}}&apiKey={{apiKey}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"sessionName": "Onboarding session",
"sessionOwnerGroup": "62bdbc00293a604543f44387",
"instructorsMails": [
"[email protected]",
"[email protected]"
],
"startDate": "2025-06-20T08:55:28.495Z",
"endDate": "2025-06-20T08:55:28.495Z",
"registrationRequest": "instructors"
}'API v2 input example
curl --request PATCH \
--url https://app.360learning.com/api/v2/paths/6854284dde395b87af7657c6/sessions/5bead809990d8862f3c514aa \
--header '360-api-version: v2.0' \
--header 'accept: application/json' \
--header 'authorization: Bearer your_access_token' \
--header 'content-type: application/json' \
--data '
{
"additionalInformation": "A0015221",
"instructorIds": [
"507f1f77bcf86cd799439011"
],
"mainInstructorId": "507f1f77bcf86cd799439011",
"name": "Onboarding session",
"groupId": "507f1f77bcf86cd799439011",
"registrationRequestValidation": "disabled",
"startDate": "2025-06-20T08:55:28.495Z",
"endDate": "2025-06-20T08:55:28.495Z",
"userLimit": 0
}
'Main input differences
Change type | API v1 | API v2 |
|---|---|---|
Removed |
|
|
Modified |
|
|
Modified |
|
|
Modified |
|
|
Modified |
|
|
Added |
| |
Added |
| |
Added |
| |
Added |
|
|
Output changes
This section details the specific alterations to the successful output returned between API versions.
API v1 output example
{
"status": "session_updated"
}API v2 output example
{
"mainInstructorId": "507f1f77bcf86cd799439011",
"registrationRequestValidation": "disabled",
"startDate": "2025-06-20T08:55:28.495Z",
"endDate": "2025-06-20T08:55:28.495Z",
"userLimit": 0,
"_id": "507f1f77bcf86cd799439011",
"createdAt": "2025-06-20T08:55:28.495Z",
"groupId": "507f1f77bcf86cd799439011",
"instructorIds": [
"507f1f77bcf86cd799439011"
],
"isAudienceBuilder": true,
"modifiedAt": "2025-06-20T08:55:28.495Z",
"name": "Onboarding session",
"pathId": "507f1f77bcf86cd799439011",
"translations": [
{
"lang": "fr",
"published": true,
"translatorIds": [
"507f1f77bcf86cd799439011"
],
"translatedFields": {
"name": "Accueil des employés Session de juin"
}
}
],
"additionalInformation": "A0015221",
"automaticReenrollment": {
"type": "certificationExpiryDate",
"delayDays": 90
},
"rootSessionId": "507f1f77bcf86cd799439011"
}Main output differences
API v2 provides a more detailed response object, including the full session details, whereas v1 returned only a status message.
Change type | API v1 | API v2 |
|---|---|---|
Removed |
| |
Modified |
|
|
Added |
| |
Added |
| |
Added |
| |
Added |
| |
Added |
| |
Added |
| |
Added |
| |
Added |
| |
Added |
| |
Added |
| |
Added |
| |
Added |
| |
Added |
| |
Added |
| |
Added |
| |
Added |
| |
Added |
|
Updated 7 days ago
