Global Admin: API
-
Web Services API | User web services | Activate user
Activate user Activates a user by id or username. Url: /integration/ws/management/rest/users//activate Method: PUT Headers: Accept: version/format header X-Cloud-Auth-Token*: authorization header X-Cloud-Synchronization: synchronization header Responses: 200: OK. Content: status: generic status location: generic location of the resultant resource, if any message: generic success or error message, if any responsePlatforms: response for every platform it concerns. Each one with the content: status: status in the platform location: location of the resultant resource in the platform, if any message: success or error message in the platform, if any Url example by user id: http://netex.dev.learningcloud.me/integration/ws/management/rest/users/ff808181556ee70e015572136a250012/activate Url example by username: http://netex.dev.learningcloud.me/integration/ws/management/rest/users/restuser.acme/activate Response example (synchronous): { "location": null, "message": "", "responsePlatforms": { "training": { "location": null, "message": null, "status": 200 }, "social": { "location": null, "message": null, "status": 204 }, "play": { "location": null, "message": null, "status": 204 }, "management": { "location": null, "message": null, "status": 204 } }, "status": 204 } Response example (asynchronous): { "location": null, "message": "", "responsePlatforms": { "training": { "location": null, "message": null, "status": 202 }, "social": { "location": null, "message": null, "status": 202 }, "play": { "location": null, "message": null, "status": 204 }, "management": { "location": null, "message": null, "status": 204 } }, "status": 204 }
-
Web Services API | User web services | Deactivate user
Deactivates a user by id or username. Url: /integration/ws/management/rest/users//deactivate Method: PUT Headers: Accept: version/format header X-Cloud-Auth-Token*: authorization header X-Cloud-Synchronization: synchronization header Content-Type (mandatory if optional message parameter included): application/json Responses: 200: OK. Content: status: generic status location: generic location of the resultant resource, if any message: generic success or error message, if any responsePlatforms: response for every platform it concerns. Each one with the content: status: status in the platform location: location of the resultant resource in the platform, if any message: success or error message in the platform, if any Url example by user id: http://.learningcloud.me/integration/ws/management/rest/users/ff808181556ee70e015572136a250012/deactivate Url example by username: http:// .learningcloud.me/integration/ws/management/rest/users/restuser.netex/deactivate Message parameter example: { "message": "Sorry, your user is deactivated." } Response example (synchronous): { "location": null, "message": "", "responsePlatforms": { "training": { "location": null, "message": null, "status": 200 }, "social": { "location": null, "message": null, "status": 204 }, "play": { "location": null, "message": null, "status": 204 }, "management": { "location": null, "message": null, "status": 204 } }, "status": 204 } Ejemplo de respuesta (asíncrona): { "location": null, "message": "", "responsePlatforms": { "training": { "location": null, "message": null, "status": 202 }, "social": { "location": null, "message": null, "status": 202 }, "play": { "location": null, "message": null, "status": 204 }, "management": { "location": null, "message": null, "status": 204 } }, "status": 204 }
-
Web Services API | User web services | Send welcome mail
Send welcome mail Sends a welcome mail to a user, by id or username. Url: /integration/ws/management/rest/users//welcomeMail Method: POST Headers: Accept: version/format header X-Cloud-Auth-Token*: authorization header X-Cloud-Synchronization: synchronization header (n/a in this service) Responses: 200: OK. Content: status: generic status location: generic location of the resultant resource, if any message: generic success or error message, if any responsePlatforms: response for lcloud platform. Each one with the content: status: status in the platform location: location of the resultant resource in the platform, if any message: success or error message in the platform, if any Url example by user id: http://.learningcloud.me/integration/ws/management/rest/users/ff808181556ee70e015572136a250012/welcomeMail Url example by username: http://.learningcloud.me/integration/ws/management/rest/users/restuser.netex/welcomeMail Response example (synchronous and asynchronous): { "location": null, "message": "Welcome mail sent to user", "responsePlatforms": { "management": { "location": null, "message": null, "status": 202 } }, "status": 204 }
-
Web Services API | User web services | Delete user
Delete user Deletes a user by id or username. Url: /integration/ws/management/rest/users/ Method: DELETE Headers: Accept: version/format header X-Cloud-Auth-Token*: authorization header X-Cloud-Synchronization: synchronization header Responses: 200: OK. Content: status: generic status location: generic location of the resultant resource, if any message: generic success or error message, if any responsePlatforms: response for every platform it concerns. Each one with the content: status: status in the platform location: location of the resultant resource in the platform, if any message: success or error message in the platform, if any Url example by user id: http://.learningcloud.me/integration/ws/management/rest/users/ff808181556ee70e015572136a250012 Url example by username: http://.learningcloud.me/integration/ws/management/rest/users/restuser.acme Response example (synchronous): { "location": null, "message": "", "responsePlatforms": { "training": { "location": null, "message": null, "status": 200 }, "social": { "location": null, "message": null, "status": 204 }, "management": { "location": null, "message": null, "status": 204 } }, "status": 204 } Response example (asynchronous): { "location": null, "message": "", "responsePlatforms": { "training": { "location": null, "message": null, "status": 202 }, "social": { "location": null, "message": null, "status": 202 }, "management": { "location": null, "message": null, "status": 204 } }, "status": 204 }
-
Web Services API | User Web services | List userGroups
Obtains a list of userGroups (always synchronously). Url: /integration/ws/management/rest/users//groups Method: GET Headers: Accept: version/format header X-Cloud-Auth-Token*: authorization header Parameters: startIndex: index of the first user to list count: maximum number of users to list (default and limit 500) Responses: 200: OK. Content: [ { "codGroup": "G1", "commonId": "8e0d68a750f942649e3d8b54eac2af18", "description": "G1", "externalId": null, "name": "G1", "parentCommondId": null, "roles": { "management": [ "user" ] } }, { "codGroup": "G2", "commonId": "bc8badf0a33949b9b08fba6dbcf3fb5a", "description": "G2", "externalId": null, "name": "G2", "parentCommondId": null, "roles": { "management": [ "user" ] } }]
-
Web Services API | User web services | Get User image
Get the user image. Url: /integration/ws/management/rest/users//image Method: GET Headers: Accept: version/format header X-Cloud-Auth-Token*: authorization header X-Cloud-Synchronization: synchronization header Parameters: No parameters Responses: 200: OK. Content: status: generic status location: generic location of the resultant resource, if any message: generic success or error message, if any responsePlatforms: response for every platform it concerns. Each one with the content: status: status in the platform location: location of the resultant resource in the platform, if any message: success or error message in the platform, if any Url example by user id: http://netex.dev.learningcloud.me/integration/ws/management/rest/users/ff808181556ee70e015572136a250012/image Url example by username: http://netex.dev.learningcloud.me/integration/ws/management/rest/users/restuser.netex/image Response example (synchronous): { "username": "user.netex", "base64image": "iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAMajAADGowHKKNqNAAAAGXRFWHRTb2Z0d2FyZQB3" }
-
Web Services API | User web services | Add Image to User
Add an image to an user. Url: /integration/ws/management/rest/users//image Method: POST Headers: Accept: version/format header X-Cloud-Auth-Token*: authorization header X-Cloud-Synchronization: synchronization header Content-Type*: application/json Parameters: image*: base64Image * : image_data, as a base64 encoded string mimeType * : image mimeType Responses: 200: OK. Content: status: generic status location: generic location of the resultant resource, if any message: generic success or error message, if any responsePlatforms: response for every platform it concerns. Each one with the content: status: status in the platform location: location of the resultant resource in the platform, if any message: success or error message in the platform, if any Url example by user id: http://netex.dev.learningcloud.me/integration/ws/management/rest/users/ff808181556ee70e015572136a250012/image Url example by username: http://netex.dev.learningcloud.me/integration/ws/management/rest/users/restuser.netex/image Response example (synchronous): { "location": null, "message": "", "responsePlatforms": { "training": { "location": null, "message": null, "status": 200 }, "social": { "location": null, "message": null, "status": 204 }, "play": { "location": null, "message": null, "status": 204 }, "management": { "location": null, "message": null, "status": 204 } }, "status": 204 } Response example (asynchronous): { "location": null, "message": "", "responsePlatforms": { "training": { "location": null, "message": null, "status": 202 }, "social": { "location": null, "message": null, "status": 202 }, "play": { "location": null, "message": null, "status": 204 }, "management": { "location": null, "message": null, "status": 204 } }, "status": 204 }
-
Web Services API | Push notification web services
Create push notification Creates (sends) a push notification. Url: /integration/ws/management/rest/pushnotification Method: POST Headers: Accept: version/format header X-Cloud-Auth-Token*: authorization header Parameters: customer: key name of the cutomer to which the notified users belong to commonId: user commonId of the user to which send the push notification. Mandatory when no registrationId is specified registrationId: firebase registration id to which send the push notification. Mandatory when no username is specified notification*: map with predefined parameters for the push notification (more information) data: map with custom parameters for the push notification * If parameter registrationId is specified, the push notification will be sent to the device it represents. Otherwise, parameter username must be specified, and push notification will be sent to all user's devices. Responses: 200: OK. Content: status: generic status location: generic location of the resultant resource, if any message: generic success or error message, if any responsePlatforms: response for every platform it concerns. Each one with the content: status: status in the platform location: location of the resultant resource in the platform, if any message: success or error message in the platform, if any Url example: http://netex.dev.learningcloud.me/integration/ws/management/rest/pushnotification Response example: { "location": null, "message": "", "responsePlatforms": {}, "status": 202 }
-
Web Services API | Groups Web services | Create group
Create a group. URL: /integration/ws/management/rest/groups Method: POST Headers: Accept: version/format header X-Cloud-Auth-Token*: authorization header X-Cloud-Synchronization: synchronization type(default async). Content-Type*: application/json Parameters: group*:group to be created (group parameter id is ignored during creation) name*: group name description: group description codGroup*: group code (external identifier) parentId: parent group identifier (internal or external). If parent group is not found, this parameter is ignored. 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 Responses: 200: OK. Content: status: general status location: resource generic location (if any) message: generic message, success or error (if any) responsePlatforms: response by platform, with: status: plataform status location: platform resource location (if any) message: plataform success or error message (if any) Request example: POST http://.pre.learningcloud.me/integration/ws/management/rest/groups 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"]}}} Response example: Header: Location: http://.pre.learningcloud.me/integration/ws/management/rest/groups/8a80807d5bcf2ebe015bcf3c9eeb0000 Payload: {"location":null,"message":"","responsePlatforms":{"management":{"location":null,"message":null,"status":201}},"status":201} (*) Field "isOrganization" only applies in customers with multiorganización enabled
-
Web Services API | Groups Web services | Get group
Get group Returns group data by id or group code. URL: /integration/ws/management/rest/groups/ Method: GET Headers: Accept: version/format header X-Cloud-Auth-Token*: authorization header Responses: 200: OK. Content: group data as JSON. Request example: GET (id): http://netex.dev.learningcloud.me/integration/ws/management/rest/groups/8a80807d5ab3d79f015ab3dcb2110000 GET (group code): http://netex.dev.learningcloud.me/integration/ws/management/rest/groups/teachers Response example: Payload: {"codGroup":"teachers","description":"Users included in this group will have LMS trainer role.","extra":{},"id":"ff8081815bcff9b5015bd28672f50009","image":{"url":"http://zblogged.com/wp-content/uploads/2015/11/17.jpg"},"name":"Teachers group","parentId":"root","roles":{"training":["trainer"]}} * Field "isOrganization" only applies in customers with multiorganización enabled