List all courses: Migration guide
Transitioning from v1's getCourses to v2's List all courses endpoint involves several key changes. This guide details those changes, including modifications to request parameters, response formats, and overall functionality, to ensure a smooth migration.
Key changes
- Pagination: To improve performance, we've added pagination to this endpoint in v2. Now, you'll receive your results in pages of 500 items. For more information, see our Pagination guide.
- Filtering: The API v2 uses the Left-Hand side (LHS) bracket notation in query parameters for filtering. For more information, see our Filtering guide.
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/courses - API v2:
/api/v2/courses
Input changes
This section details the specific alterations to the input requirements between API versions.
API v1 input example
curl --location 'https://app.360learning.com/api/v1/courses?company={{company}}&apiKey={{apiKey}}&createdBefore=2025-01-01T00%3A00%3A00.000Z&modifiedAfter=2024-06-30T00%3A00%3A00.000Z&modifiedBefore=2024-07-30T00%3A00%3A00.000Z&createdAfter=2024-01-01T00%3A00%3A00.000Z'API v2 input example
curl --request GET \
--url 'https://app.360learning.com/api/v2/courses?createdAt[lt]=2025-01-01&createdAt[gte]=2024-01-01&modifiedAt[lt]=2024-07-30&modifiedAt[gte]=2024-06-30' \
--header '360-api-version: v2.0' \
--header 'accept: application/json' \
--header 'authorization: Bearer access_token'Main input differences
Change type | API v1 | API 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
[
{
"_id": "58eb5c621a92bb4fb526b2b0",
"author": "edouard.lansalut#[email protected]",
"creationDate": "2018-04-16T13:19:01.000Z",
"defaultLang": "fr",
"description": "Description du module de démo",
"lang": "en",
"modificationDate": "2018-04-16T17:55:48.032Z",
"name": "Module de démo",
"sourceLang": "en",
"status": "published",
"type": "internal",
"coAuthors": [
"edouard.lansalut#[email protected]"
],
"courseDuration": 15,
"group": "57ec5cb81abbbb4fb526b2bd",
"groupName": "Onboardess",
"reactionScore": 100,
"relevanceScore": 50,
"translationsLangs": [
{
"lang": "fr",
"published": true,
"translators": [
"edouard.lansalut#[email protected]"
]
}
]
}
]API v2 output example
[
{
"_id": "507f1f77bcf86cd799439011",
"authorId": "507f1f77bcf86cd799439011",
"coAuthorIds": [
"507f1f77bcf86cd799439011"
],
"createdAt": "2025-03-21T09:34:01.971Z",
"defaultLang": "bg",
"groupId": "507f1f77bcf86cd799439011",
"modifiedAt": "2025-03-21T09:34:01.971Z",
"name": "Employee Onboarding",
"sourceLang": "bg",
"status": "archived",
"translations": [
{
"lang": "fr",
"published": true,
"translatorIds": [
"507f1f77bcf86cd799439011"
],
"translatedFields": {
"name": "Accueil des employés",
"description": "Ce module vous apprend à intégrer un nouveau collaborateur !"
}
}
],
"type": "external",
"description": "This course will teach you how to onboard a new employee!",
"duration": 0,
"externalPlatform": "Udemy"
}
]Main output differences
Change type | API v1 | API v2 |
|---|---|---|
Removed |
| |
Removed |
| |
Modified |
|
|
Modified |
|
|
Modified |
|
|
Modified |
|
|
Modified |
|
|
Modified |
|
|
Modified |
|
|
Modified |
|
|
Modified |
|
|
Added |
| |
Added |
| |
Added |
|
Updated 2 months ago
