GetByService() [UserManager]

Get a user by PKI

Description

The GetByService() method is used to get a user by PKI.

Package Details

Interface

IUserManager

Syntax

await _userManager.GetByService(int serviceId, UserType userType = UserType.All)

Returns

Task<ICollection<User>>

API

GET
/api/v1/services/{serviceId}/users?userType={userType}

Parameters

Parameter

Description

Parameter Type

Parameter

Description

Parameter Type

serviceId

The service Id to search for

Path

userType [UserType]

The user type (by default, it is External)

Query string

Returns

On success, 200 Ok

On error, 400 Bad Request

On authorization error, 403 Forbidden

Example

Get all users by PKI

int serviceId = 1; await _userManager.GetByPki(serviceId);

Get all internal users by PKI

int serviceId = 1; await _userManager.GetByPki(serviceId, UserType.Internal);

Get all external users by PKI

int serviceId = 1; await _userManager.GetByPki(serviceId, UserType.External);