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

« Previous Version 3 Next »

Enroll a user into a given service

Description

The EnrollUser() method is used to enroll a user given a service and (optionally) an organization.

Package Details

Interface

IServiceManager

Syntax

ServiceManager.EnrollUser( int userId, int serviceId, int? organizationId = null )

Returns

Task

API

[POST] /api/v1/services/{id}/enrolluser

Parameters

  • userId: User to enroll

  • serviceId: Service for which the user will be enrolled to

  • organizationId: The optional id of the organization

Returns

200 OK

Example

int myServiceId = 12345
int myOrganizationId = 323;

_serviceManager.EnrollUser(CurrentUser.Id, myServiceId, myOrganizationId);

// No organization
_serviceManager.EnrollUser(CurrentUser.Id, myServiceId);

  • No labels