Migrate listProjects

This guide outlines the changes introduced in the List all projects v2 endpoint (previously known as listProjects in v1).

💡

Key changes

  • Pagination: Unlike v1, which returned all projects in a single call, API v2 is paginated with a limit of 500 projects per page. You must check the Link header for the next page URL.

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/projects
  • API v2: /api/v2/projects

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/projects'

API v2 input example

curl --request GET \
     --url https://app.360learning.com/api/v2/projects \
     --header '360-api-version: v2.0' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer access_token'

Main input differences

Change type

API v1

API v2

Added
Header parameter


360-api-version (Required): API version identifier. Example: v2.0.

Output changes

This section details the specific alterations to the successful output returned between API versions.

API v1 output example

[
  {
    "_id": "507f1f77bcf86cd799439011",
    "name": "Customer Onboarding",
    "completed": "true",
    "group": "507f1f77bcf86cd799439011"
  }
]

API v2 output example

[
  {
    "_id": "507f1f77bcf86cd799439011",
    "name": "Customer Onboarding",
    "completed": true,
    "groupId": "507f1f77bcf86cd799439011"
  }
]

Main output differences

API v2 uses cursor-based pagination. If your platform has more than 500 projects, the response will include a Link header. You must extract the URL within the < > brackets to fetch the immediate next page of results.

Change type

API v1

API v2

Modified
Output property

group: The unique ID of the group.

groupId: Renamed.

Added
Response header


Link: Contains the URL for the next page of results if applicable