Web Services API | Groups Web services | Update group
Modified on: Thu, 13 Apr 2023 4:30 PMUpdate group
Updates group data by id or group code.
- URL: /integration/ws/management/rest/groups/<id_grupo_o_codGroup>
- Method: PUT
-
Headers:
- Accept: version/format header
- X-Cloud-Auth-Token*: authorization header
- X-Cloud-Synchronization : synchronization type(default async ).
- Content-Type*: application/json
-
Parameters:
- id or codGroup, included in URL.
-
group*: group to be updated (id, codGroup and parentId are ignored):
- name*: group name
- description: group description
-
image: group image. Can be::
- url: image url ({"url": "image_url"})
- base64: image data ({"base64Image": "image_data", "mimeType": "image_mimeType"})
-
roles: group roles as a map. Allowed values are:
- management: user, groupadmin, admin
- training: user, trainer, groupadmin,admin
- social: user, admin
- play: user, author, validator, admin
- talent: admin, employee
- content: author, manager, reviewer, projectowner
- extra:
- isOrganization (*): Enable group as organization in customer
- id or codGroup, included in URL.
-
Responses:
-
200: OK. Content:
- status: plataform status
-
location: platform resource location (if any)
- message: plataform success or error message (if any)
- status: general status
- location: resource generic location (if any)
- message: generic message, success or error (if any)
- responsePlatforms: response by platform, with:
-
200: OK. Content:
-
Request example:
-
PUT (id):
http://<tenant>.learningcloud.me/integration/ws/management/rest/groups/8a80807d5ab3d79f015ab3dcb2110000
-
PUT (group code):
http://<tenant>.learningcloud.me/integration/ws/management/rest/groups/teachers
-
Payload: {"group":{"codGroup":"teachers","description":"Users included in this group will have LMS trainer role.","extra":{},"image":{"url":null},"name":"Teachers group","parentId":"8a80807d5ab3d79f015ab3dcb2110000","roles":{"training":["trainer"]}}}
-
PUT (id):
-
Response example:
- Payload: {"codGroup":"teachers","description":"Users included in this group will have LMS trainer role.","isOrganization":true,"extra":{},"id":"ff8081815bcff9b5015bd28672f50009","image":{"url":"http://zblogged.com/wp-content/uploads/2015/11/17.jpg"},"name":"Teachers group","parentId":"8a80807d5ab3d79f015ab3dcb2110000","roles":{"training":["trainer"]}}
(*) Field "isOrganization" only applies in customers with multiorganización enabled and root groups