Edit a path: Migration guide
This guide outlines the changes introduced in the Edit a path v2 endpoint (previously known as updatePath in v1).
Key changes
- Path created without steps: Fostering the concept of granularity, the API v2 endpoint focuses on creating the main shell of a path, without its steps. To add steps to the newly created path, you should use the endpoint Replace all steps
- HTTP Content-Type: The v2 endpoint consumes
multipart/form-dataas content-type (letting you upload a file to be used as the path's cover picture) whereas v1 consumedapplication/json- HTTP method: The v2 endpoint uses the
PATCHmethod whereas v1 usedPUTmethod.
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 - API v2:
/api/v2/paths/{pathId}
Input changes
This section details the specific alterations to the input requirements between API versions.
API v1 input example
curl --location -g --request PUT 'https://{{host}}/api/v1/paths/65736c4f43842214f65eebb0?company={{company})&apiKey={{apiKey}}' \
--data-raw '{
"name": "Let'\''s Learn Together!",
"description": "This is the description of the path.",
"authorMails": [
"[email protected]"
],
"ownerGroup": "6234e14c9ce27e1cbe0cebb9",
"linear": true,
"mandatoryReplay": false,
"sendAutomatedReminders": false,
"defaultLang": "en",
"sourceLang": "en"
}'API v2 input example
curl --request PATCH \
--url https://app.360learning.com/api/v2/paths/507f1f77bcf86cd799439011 \
--header '360-api-version: v2.0' \
--header 'accept: application/json' \
--header 'content-type: multipart/form-data' \
--form groupId=507f1f77bcf86cd799439011 \
--form 'name=Employee Onboarding' \
--form 'description=This path will teach you how to onboard a new employee!' \
--form authorId=507f1f77bcf86cd799439011 \
--form coAuthorIds=507f1f77bcf86cd799439011 \
--form min=0 \
--form max=2 \
--form 'additionalInformation=Training content 203' \
--form defaultLang=en \
--form linearProgression=true \
--form mandatoryReplay=true \
--form displayForum=false \
--form displayClassroomMessages=false \
--form automatedReminders=true \
--form notificationOnStepCreation=false \
--form 'coverPicture=data:image/jpeg;name=photo-1598875793784-55488654fb0b.jpeg;base64,/9j/4AAQSkZJRg[...] \Main input differences
Change type | API v1 | API v2 |
|---|---|---|
Removed |
| This parameter is removed from v2. Use Replace all tags in a path to input path' tags. |
Removed |
| This parameter is removed from v2. |
Modified |
|
|
Modified |
|
|
Added |
| |
Added |
|
Output changes
This section details the specific alterations to the successful output returned between API versions.
API v1 output example
{
"status": "path_updated",
"_id": "59f1fd5cb91bedcf09c77063"
}API v2 output example
{
"authorId": "507f1f77bcf86cd799439011",
"groupId": "507f1f77bcf86cd799439011",
"estimatedWeeklyCommitment": {
"min": 0,
"max": 0
},
"_id": "507f1f77bcf86cd799439011",
"coAuthorIds": [
"507f1f77bcf86cd799439011"
],
"createdAt": "2025-12-22T15:46:53.795Z",
"defaultLang": "bg",
"modifiedAt": "2025-12-22T15:46:53.795Z",
"name": "Employee Onboarding",
"options": {
"linearProgression": true,
"mandatoryReplay": true,
"displayForum": true,
"displayClassroomMessages": true,
"automatedReminders": true,
"notificationOnStepCreation": true
},
"sourceLang": "bg",
"status": "archived",
"steps": [],
"translations": [],
"additionalInformation": "Training content 203",
"coverPicture": "507f1f77bcf86cd799439011",
"description": "This path will teach you how to onboard a new employee!",
"estimatedDuration": {
"unit": "day",
"value": 0
}
}Main output differences
The response is completely different as the API v2 version returns the newly updated path, while API v1 was just acknowledging the path edition and returning the _id, so please refer to the Retrieve a path: Migration guide for more information.
| Change type | API v1 | API v2 |
|---|---|---|
| Removed Error code | 404 - group_not_found | |
| Removed Error code | 404 - path_not_found | |
| Removed Error code | 400 - invalid_path_name | |
| Removed Error code | 400 - invalid_path_owner_group | |
| Removed Error code | 400 - invalid_authors | |
| Removed Error code | 400 - invalid_skills | |
| Removed Error code | 400 - invalid_steps | |
| Removed Error code | 400 - invalid_certificate | |
| Removed Error code | 400 - invalid_start_date | |
| Removed Error code | 400 - invalid_end_date | |
| Removed Error code | 400 - invalid_instructors | |
| Added Error code | 400 - mainAuthorAsCoAuthor: The main author is present in the co-authors list. | |
| Added Error code | 400 - mediaNotFound: The given media ID does not correspond to any existing image media. | |
| Added Error code | 404 - groupNotFound: The given groupId does not correspond to any existing group. | |
| Added Error code | 404 - usersNotFound: At least one of the given users does not correspond to any existing and non-deleted user. | |
| Added Error code | 404 - pathNotFound: The given pathId does not correspond to any existing path. |
Updated about 2 months ago
