WithdrawUser()

Withdraw a user from a given service

Description

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

Package Details

Interface

IServiceManager

Syntax

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

Returns

Task

API Endpoint

[DELETE] /api/v1/services/{id}/withdrawuser

Parameters

  • userId: User to withdraw

  • serviceId: The id of the service

  • organizationId: The optional id of the organization

Returns

On success, 200 Ok

On error, 400 Bad Request

On authorization error, 403 Forbidden

Example

int myServiceId = 12345 int myOrganizationId = 323; _serviceManager.WithdrawUser(CurrentUser.Id, myServiceId, myOrganizationId); // No organization _serviceManager.WithdrawUser(CurrentUser.Id, myServiceId);