Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Note: This is only for the MTOA Platform Team.

Description

Update enrollment of the application of the user

Package Details

Interface

IUserApplicationManagementManager

Syntax

await UserApplicationManagementManager.UpdateEnrollment(int appId, int userId, ICollection<EditUserApplicationService> useAppServices, int? organizationId = null);

Returns

void

API

POST - /api/v1/userapplications/{id}/updateenrollment

Parameters

Parameter

Description

Type

id

The identification number of the application.

Path

userId

The identification number of the user.

Query string

userAppServices

Services of the user application enrollment

Service id: service id of the user’s application enrollment that is going to be updated/added

Rold id: role id of the service that is going to be updated/added to.

IsSelected: true/false

If IsSelected is true, enroll the user in the application service if the user does not have the service. If IsSelected is false, remove the user's service enrollment if the user has the service.
(IsSelected is false, it will disregard role id.)

Request body

createdByUserId

User id who is updating the enrollment

Query string

Returns

HTTP 200 - OK

Example

const int applicationId = 12;
const int userId= 1234;
const int modifiedByUserId= 5678;

List<EditUserApplicationService> userUpdateAppServices = new List<EditUserApplicationService>();
userUpdateAppServices.Add(new EditUserApplicationService 
{
     IsSelected = false,
     RoleId = UserRoleType.Clerk,
     ServiceCd = 230
});
userUpdateAppServices.Add(new EditUserApplicationService 
{
     IsSelected = true,
     RoleId = UserRoleType.Manager,
     ServiceCd = 231 
});

await MtoaApi.UserApplicationManagementApi.UpdateEnrollment(applicationId, userId, userUpdateAppServices, modifiedByUserId);

  • No labels