Migrate createCustomUserLink
This guide outlines the changes introduced in the Create a custom user link v2 endpoint (previously known as createCustomUserLink in v1).
Key changes
- User identification: The target user is now identified via a
userIdpath parameter. API v1 previously used the- Resource referencing: In the request body, you must now provide the unique
customLinkId. API v1 used a descriptivetypestring to reference the parent custom link.
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/customuserlinks - API v2:
/api/v2/users/{userId}/custom-links
Input changes
This section details the specific alterations to the input requirements between API versions.
API v1 input example
curl --location -g 'https://app.360learning.com/api/v1/customuserlinks' \
--header 'Content-Type: application/json' \
--data-raw '{
"mail": "[email protected]",
"url": "https://360learning.com",
"type": "calendar link"
}'API v2 input example
curl --request POST \
--url https://app.360learning.com/api/v2/users/507f1f77bcf86cd799439011/custom-links \
--header '360-api-version: v2.0' \
--header 'accept: application/json' \
--header 'authorization: Bearer access_token' \
--header 'content-type: application/json' \
--data '
{
"customLinkId": "628397d2a55c96814de83322",
"url": "https://360learning.com"
}
'Main input differences
Change type | API v1 | API v2 |
|---|---|---|
Removed |
| |
Removed |
| |
Added |
| |
Added |
| |
Added |
|
Output changes
This section details the specific alterations to the successful output returned between API versions.
API v1 output example
{
"customUserLink": {
"_id": "628398fdfa066876f0091e23",
"userId": "507f1f77bcf86cd799439011",
"customLinkId": "628397d2a55c96814de83322",
"url": "https://360learning.com"
},
"status": "custom_user_link_created"
}API v2 output example
{
"customLinkId": "628397d2a55c96814de83322",
"url": "https://360learning.com",
"_id": "682c9df2aa08d549dddd7b86"
}Main output differences
Change type | API v1 | API v2 |
|---|---|---|
Removed |
| |
Removed |
| |
Modified |
|
|
Modified | Response nested within a | Flattened response returning the created link object directly. |
Updated 22 days ago
