Create a group: Migration guide
This guide outlines the changes introduced in the Create a group v2 endpoint (formerly createGroup in API v1).
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/groups - API v2:
/api/v2/groups
Behavior changes (if applicable)
API v2 returns a 201 status code upon successful group creation, along with the details of the created group in the response body. v1 returned a 200 status with a JSON body containing a status message and the group ID.
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/groups?company={{company}}&apiKey={{apiKey}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'name=Engineering Team' \
--data-urlencode 'public=true' \
--data-urlencode 'custom=Unit 101' \
--data-urlencode 'parent=507f1f77bcf86cd799439011' \
--data-urlencode 'bannerImageId=567b608aaa92bb411526b31a'API v2 input example
curl --request POST \
--url https://app.360learning.com/api/v2/groups \
--header '360-api-version: v2.0' \
--header 'accept: application/json' \
--header 'authorization: Bearer access_token' \
--header 'content-type: application/json' \
--data '
{
"public": true,
"parentId": "507f1f77bcf86cd799439011",
"name": "Engineering Team",
"custom": "Unit 101"
}
'Main input differences
Change type | API v1 | API v2 |
|---|---|---|
Removed |
| |
Modified |
|
|
Output changes
This section details the specific alterations to the output returned between API versions.
API v1 output example
{
"status": "group_created",
"id": "596f7256b6afcb59a2dd60ef"
}API v2 output example
{
"public": true,
"parentId": "507f1f77bcf86cd799439011",
"_id": "507f1f77bcf86cd799439011",
"name": "Engineering Team",
"custom": "Unit 101"
}Main output differences
API v2 provides a more detailed and standardized response upon successful creation, including the full representation of the created group.
Change type | API v1 | API v2 |
|---|---|---|
Removed |
| |
Modified |
|
|
Modified |
|
|
Added |
| |
Added |
| |
Added |
| |
Added |
| |
Added |
|
Updated 7 days ago
