Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Create a new document

...

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

...

Parameter

...

Description

...

Parameter Type

Sample request body

...

languagejson
  • userId: User to withdraw

  • serviceId: The id of the service

  • organizationId: The optional id of the organization

Returns

On success, 200 Ok

...

Example

Code Block
languagec#
int myServiceId = 12345
int myOrganizationId = 323;

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

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