Example 1
The method returns an error or a link for the user to access the user portal if the user previously started training.
If a link is returned, it should be displayed to the user, and no further method calls are made.
In all other cases, an error is returned with various codes. The list of available codes is described in Swagger as in the online documentation.
If a "404 user-not-found" error is received, method #2 is called.
Any error with code 422 means that the training plan is currently being calculated and the link will arrive soon. If this doesn't happen, you should contact the administrator of the account for which ASAP issued the API token.
Example 2
At this stage, we get the list of groups that the user can add himself or herself to. After the method receives the list, it needs to be filtered to display only those groups for which the isStarted parameter has the value "true".
Only in these groups has training begun, and the user can join only these groups.
If there are no such groups, the "404 groups-not-found" error is returned. In this case, you should contact the administrator of the account for which ASAP issued the API token.
Example 3
After a group is selected, personal data and a group identifier are passed to method #3. The result is either an error or a 201 response with the identifier of the added user. In this event of an error, you should contact the administrator of the account for which ASAP issued the API token.
Example 4
To receive report data on employee training:
Example 5
To move users between groups and create training group data for each employee of the company:
Example 6
Deleting an employee from the ASAP system.
To the top