Groups (Lära and Via HTM

TABLE OF CONTENTS

Groups: group/get
Groups: group/getlist
Groups: group/create
Groups: group/edit
Groups: group/delete
Groups: group/adduser
Groups: group/removeuser
Groups: group/getuserlist
Groups: group/getgrouplist
Groups: group/addgroup
Groups: group/removegroup
Groups: group/addbranch
Groups: group/removebranch
Groups: group/getbranchlist
Groups: group/getuserlistrecursive
Groups: group/getusergroups
Group error code descriptions

GROUPS

"Groups" are used to bring together users, subgroups and branches in order to simplify the management of access and enrolments in your environment. A group in the API is named "group".

Groups: group/get

https://www.domaine.com/lmsapi/group/get

Returns all the information relating to a group in your environment.
API call address : https://.../lmsapi/group/get

Request

Example of request call content for information on a group:

{
  "id": "vBW5xMw1VQ2A8DFaNy22zA%3d%3d"
}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the group.
(String type)

Response

Example of response call content for information on a group:

{
  "id": "vBW5xMw1VQ2A8DFaNy22zA",
  "name": {
    "texts": [{
        "text": "Mon groupe",
        "languageId": 1
      }
    ]
  },
  "creationDate": "2018-02-08T15:02:45.73",
  "createdByUserID": "%2fUtsC30QAPbKKJCD7cUkJA%3d%3d"
}

Field descriptions

NameComments/description
idUnique identifier of the group.
(String type)
nameName of the group as seen by users in the system, as multilingual texts (texts).
  • text: name of the group displayed for the specified language. (String type)
  • languageId: display language.
    • 1 = French (Canada)
    • 2 = English
    • 3 = French (France)
    • 4 = Spanish
  • (Number type)
creationDateDate the group was created.
This field is generated automatically upon creation.
createdByUserIDUnique identifier of the user who created the group.
This field is generated automatically upon creation.

IMPORTANT: When modifying, the methods require only the "id" value. The fields that are passed are updated; the fields that are not provided are simply not updated.

Groups: group/getlist

https://www.domaine.com/lmsapi/group/getlist

Returns the list of all the groups in your portal.
API call address : https://.../lmsapi/group/getlist

Returns all the groups in your portal

Request

Example of request call content for the list of groups:

{
  "filterDate": “YYYY-MM-DDTHH:MM:SSZ”
}

Field descriptions

Name
Required
Comments/description
filterDate Optional parameter corresponding to the creation date of the element. The method returns the list of objects that were created after the date passed as a filter.
Type: String (YYYY-MM-DDTHH:MM:SSZ)

Response

IMPORTANT: The date filter parameter is optional and corresponds to the creation date of the element. The method returns the list of objects that were created after the date passed as a filter. 

(Minimum creation date) - String (YYYY-MM-DDTHH:MM:SSZ)

Example of response call content for the list of groups:

[
    {
    "id": "vBW5xMw1VQ2A8DFaNy22zA",
    "name": {
      "texts": [{
          "text": "Mon groupe",
          "languageId": 1
        }
      ]
    },
    "creationDate": "2018-02-08T15:02:45.73",
    "createdByUserID": "%2fUtsC30QAPbKKJCD7cUkJA%3d%3d"
    }
  ]

Field descriptions

NameComments/description
idUnique identifier of the group.
(String type)
nameName of the group as seen by users in the system, as multilingual texts (texts).
  • text: name of the group displayed for the specified language. (String type)
  • languageId: display language.
    • 1 = French (Canada)
    • 2 = English
    • 3 = French (France)
    • 4 = Spanish
  • (Number type)
creationDateDate the group was created.
This field is generated automatically upon creation.
createdByUserIDUnique identifier of the user who created the group.
This field is generated automatically upon creation.

Groups: group/create

https://www.domaine.com/lmsapi/group/create

Creates a group in your environment.
API call address : https://.../lmsapi/group/create

Request

Example of request call content to create a group:

{
  "name": {
    "texts": [{
        "text": "Nouveau groupe",
        "languageId": 1
      }]
  }
}

Field descriptions

Name
Required
Comments/description
name
X
Name of the group as seen by users in the system, as multilingual texts (texts).
  • text: name of the group displayed for the specified language. (String type)
  • languageId: display language.
    • 1 = French (Canada)
    • 2 = English
    • 3 = French (France)
    • 4 = Spanish
  • (Number type)

Response

Example of response call content when creating a group:

{
  "id": "%2fq%2bUa3gORVJDR8DdOZ2CYA%3d%3d"
}

Field descriptions

NameComments/description
idUnique identifier of the created group.
(String type)

Groups: group/edit

https://www.domaine.com/lmsapi/group/edit

Modifies an existing group.
API call address : https://.../lmsapi/group/edit

Request

Example of request call content to edit a group:

{
  "id": "vBW5xMw1VQ2A8DFaNy22zA",
  "name": {
    "texts": [{
        "text": "Mon groupe",
        "languageId": 1
      }
    ]
  }
}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the group.
(String type)
name Name of the group as seen by users in the system, as multilingual texts (texts).
  • text: name of the group displayed for the specified language. (String type)
  • languageId: display language.
    • 1 = French (Canada)
    • 2 = English
    • 3 = French (France)
    • 4 = Spanish
  • (Number type)

Response

Example of response call content when editing a group:

{
  "id": "%2fq%2bUa3gORVJDR8DdOZ2CYA%3d%3d"
}

Field descriptions

NameComments/description
idUnique identifier of the modified group.
(String type)

Groups: group/delete

https://www.domaine.com/lmsapi/group/delete

Deletes an existing group.
API call address : https://.../lmsapi/group/delete

Request

Example of request call content to delete a group:

{
  "id": "%2fq%2bUa3gORVJDR8DdOZ2CYA%3d%3d" 
}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the group.
(String type)

Response

Example of response call content when deleting a group:

{
  "id": "%2fq%2bUa3gORVJDR8DdOZ2CYA%3d%3d"
}

Field descriptions

NameComments/description
idUnique identifier of the deleted group.
(String type)

Groups: group/adduser

https://www.domaine.com/lmsapi/group/AddUser

Adds a user to a group.
API call address : https://.../lmsapi/group/adduser

Request

Example of request call content to add a user to a group:

{
  "id": "DTUvbcrKNN3szXg6aQY%2fSg%3d%3d",
  "userId": "4zwet3FOX5xXfHX7YFuR8w%3d%3d"

}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the group.
(String type)
userId
X
Unique identifier of the user.
(String type)

Response

Example of response call content when adding a user to a group:

{
  "id": "DTUvbcrKNN3szXg6aQY%2fSg%3d%3d",
  "userId": "4zwet3FOX5xXfHX7YFuR8w%3d%3d"
}

Field descriptions

NameComments/description
idUnique identifier of the group.
(String type)
userIdUnique identifier of the user.
(String type)

Groups: group/removeuser

https://www.domaine.com/lmsapi/group/removeuser

Removes a user from a group.
API call address : https://.../lmsapi/group/removeuser

Request

Example of request call content to remove a user from a group:

{
  "id": "DTUvbcrKNN3szXg6aQY%2fSg%3d%3d",
  "userId": "vBW5xMw1VQ2A8DFaNy22zA%3d%3d"
}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the group.
(String type)
userId
X
Unique identifier of the user.
(String type)

Response

Example of response call content when removing a user from a group:

{
  "id": "DTUvbcrKNN3szXg6aQY%2fSg%3d%3d",
"userId": "vBW5xMw1VQ2A8DFaNy22zA%3d%3d"
}

Field descriptions

NameComments/description
idUnique identifier of the group.
(String type)
userIdUnique identifier of the user.
(String type)

Groups: group/getuserlist

https://www.domaine.com/lmsapi/group/getuserlist

Returns the list of users associated with a group.
API call address : https://.../lmsapi/group/getuserlist

Request

Example of request call content for the list of users associated with a group:

{
  "id": "DTUvbcrKNN3szXg6aQY%2fSg%3d%3d" 
}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the group.
(String type)

Response

Example of response call content for the list of users associated with a group:

[  {
    "id":"DTUvbcrKNN3szXg6aQY%2fSg%3d%3d",
    "userId":"4QQXEdQX%2b7gBIY5XZnf8wA%3d%3d"
  }, 
{
    "id":"DTUvbcrKNN3szXg6aQY%2fSg%3d%3d",
    "userId":"pzyzfI5r15GwFhURAZB8pQ%3d%3d"
  }
]

Field descriptions

NameComments/description
idUnique identifier of the group.
(String type)
userIdUnique identifier of the user.
(String type)

Groups: group/getgrouplist

https://www.domaine.com/lmsapi/group/getgrouplist

Returns the list of subgroups associated with a group.
API call address : https://.../lmsapi/group/getgrouplist

Request

Example of request call content for the list of subgroups associated with a group:

{
  "id": "DTUvbcrKNN3szXg6aQY%2fSg%3d%3d" 
}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the group.
(String type)

Response

Example of response call content for the list of subgroups associated with a group:

[  {
    "id":"tirQkNjqBn5Tk5vwRlAE1Q%3d%3d",
    "groupId":"4QQXEdQX%2b7gBIY5XZnf8wA%3d%3d"
  },
{
    "id":"tirQkNjqBn5Tk5vwRlAE1Q%3d%3d",
    "groupId":"pzyzfI5r15GwFhURAZB8pQ%3d%3d"
  }
]

Field descriptions

NameComments/description
idUnique identifier of the group.
(String type)
groupIdUnique identifier of the subgroup.
(String type)

Groups: group/addgroup

https://www.domaine.com/lmsapi/group/addgroup

Adds a subgroup to a group.
API call address : https://.../lmsapi/group/addgroup

Request

Example of request call content to add a subgroup to a group:

{
  "id": "tirQkNjqBn5Tk5vwRlAE1Q%3d%3d",
  "groupId": "nWJ7HZLyI8l2otoNsxuXgA%3d%3d"
}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the group.
(String type)
groupId
X
Unique identifier of the subgroup.
(String type)

Response

Example of response call content when adding a subgroup to a group:

{
  "id": "tirQkNjqBn5Tk5vwRlAE1Q%3d%3d",
  "groupId": "nWJ7HZLyI8l2otoNsxuXgA%3d%3d"
}

Field descriptions

NameComments/description
idUnique identifier of the group.
(String type)
groupIdUnique identifier of the subgroup.
(String type)

Groups: group/removegroup

https://www.domaine.com/lmsapi/group/removegroup

Removes a subgroup from a group.
API call address : https://.../lmsapi/group/removegroup

Request

Example of request call content to remove a subgroup from a group:

{
  "id": "tirQkNjqBn5Tk5vwRlAE1Q%3d%3d",
  "groupId": "nWJ7HZLyI8l2otoNsxuXgA%3d%3d"
}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the group.
(String type)
groupId
X
Unique identifier of the subgroup.
(String type)

Response

Example of response call content when removing a subgroup from a group:

{
  "id": "tirQkNjqBn5Tk5vwRlAE1Q%3d%3d",
  "groupId": "nWJ7HZLyI8l2otoNsxuXgA%3d%3d"
}

Field descriptions

NameComments/description
idUnique identifier of the group.
(String type)
groupIdUnique identifier of the subgroup.
(String type)

Groups: group/addbranch

https://www.domaine.com/lmsapi/group/AddBranch

Adds a branch to a group.
API call address : https://.../lmsapi/group/addbranch

Request

Example of request call content to add a branch to a group:

{
  "id": "DTUvbcrKNN3szXg6aQY%2fSg%3d%3d",
  "branchId": "nWJ7HZLyI8l2otoNsxuXgA%3d%3d"
}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the group.
(String type)
branchId
X
Unique identifier of the branch.
(String type)

Response

Example of response call content when adding a branch to a group:

{
  "id": "DTUvbcrKNN3szXg6aQY%2fSg%3d%3d",
  "branchId": "nWJ7HZLyI8l2otoNsxuXgA%3d%3d"
}

Field descriptions

NameComments/description
idUnique identifier of the group.
(String type)
branchIdUnique identifier of the branch.
(String type)

Groups: group/removebranch

https://www.domaine.com/lmsapi/group/removebranch

Removes a branch from a group.
API call address : https://.../lmsapi/group/removebranch

Request

Example of request call content to remove a branch from a group:

{
  "id": "DTUvbcrKNN3szXg6aQY%2fSg%3d%3d",
  "branchId": "nWJ7HZLyI8l2otoNsxuXgA%3d%3d"
}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the group.
(String type)
branchId
X
Unique identifier of the branch.
(String type)

Response

Example of response call content when removing a branch from a group:

{
  "id": "DTUvbcrKNN3szXg6aQY%2fSg%3d%3d",
  "branchId": "nWJ7HZLyI8l2otoNsxuXgA%3d%3d"
}

Field descriptions

NameComments/description
idUnique identifier of the group.
(String type)
branchIdUnique identifier of the branch.
(String type)

Groups: group/getbranchlist

https://www.domaine.com/lmsapi/group/getbranchlist

Returns the list of branches associated with a group.
API call address : https://.../lmsapi/group/getbranchlist

Request

Example of request call content for the list of branches associated with a group:

{
  "id": "vBW5xMw1VQ2A8DFaNy22zA%3d%3d" 
}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the group.
(String type)

Response

Example of response call content for the list of branches associated with a group:

[  
{
    "id":"DTUvbcrKNN3szXg6aQY%2fSg%3d%3d",
    "branchId":"9LB0KeSzFP7GNLmueeLHaA%3d%3d"
  }, 
{
    "id":"DTUvbcrKNN3szXg6aQY%2fSg%3d%3d",
    "branchId":"nWJ7HZLyI8l2otoNsxuXgA%3d%3d"
  }
]

Field descriptions

NameComments/description
idUnique identifier of the group.
(String type)
branchIdUnique identifier of the branch.
(String type)

Groups: group/getuserlistrecursive

https://www.domaine.com/lmsapi/group/getuserlistrecursive

Returns the list of users associated recursively with a group, including those of its subgroups.
API call address : https://.../lmsapi/group/getuserlistrecursive

Request

Example of request call content for the list of users associated recursively with a group:

{
  "id": "DTUvbcrKNN3szXg6aQY%2fSg%3d%3d" 
}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the group.
(String type)

Response

Example of response call content for the list of users associated recursively with a group:

[  {
    "id":"DTUvbcrKNN3szXg6aQY%2fSg%3d%3d",
    "userId":"4QQXEdQX%2b7gBIY5XZnf8wA%3d%3d"
  }, 
{
    "id":"DTUvbcrKNN3szXg6aQY%2fSg%3d%3d",
    "userId":"pzyzfI5r15GwFhURAZB8pQ%3d%3d"
  }
]

Field descriptions

NameComments/description
idUnique identifier of the group.
(String type)
userIdUnique identifier of the user.
(String type)

Groups: group/getusergroups

https://www.domaine.com/lmsapi/group/getusergroups

Returns the list of groups with which a user is associated.
API call address : https://.../lmsapi/group/getusergroups

Request

Example of request call content for the list of groups of a user:

{
  "id": "DTUvbcrKNN3szXg6aQY%2fSg%3d%3d" 
}

Field descriptions

Name
Required
Comments/description
id
X
Unique identifier of the user.
(String type)

Response

Example of response call content for the list of groups of a user:

[  {
    "id":"DTUvbcrKNN3szXg6aQY%2fSg%3d%3d",
    "groupId":"4QQXEdQX%2b7gBIY5XZnf8wA%3d%3d"
  }, 
{
    "id":"DTUvbcrKNN3szXg6aQY%2fSg%3d%3d",
    "groupId":"pzyzfI5r15GwFhURAZB8pQ%3d%3d"
  }
]

Field descriptions

NameComments/description
userIdUnique identifier of the user.
(String type)
groupIdUnique identifier of the subgroup.
(String type)

Group error code descriptions

Number

Message

Comments/description

900

Required id

You must provide an identifier for the group.

901

Invalid id

The identifier provided for the group is invalid.

902

Required name

You must provide a name for the group.

903

Invalid name length

The name provided must contain between 3 and 50 characters inclusively.

904

Group already associated

You cannot add groupX to groupY if groupY is part of groupX.

905

User already in group

The user you are trying to add to the group is already part of it.

906

User not in group

The user you are trying to remove from the group is not part of it.

907

Branch already in group

The branch you are trying to add to the group is already part of it.

908

Branch not in group

The branch you are trying to remove from the group is not part of it.

909

Group already in group

The group you are trying to add to the group is already part of it.

910

Group not in group

The group you are trying to remove from the group is not part of it.

911

Required user id

You must provide an identifier for the user

912

Invalid user id

The identifier provided for the user is invalid.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.