Versions Compared

Key

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

...

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

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

Code Block
languagec#
int serviceId = 1;
await _userManager.GetByPki(serviceId);

Get all internal users by PKI

Code Block
languagec#
int serviceId = 1;
await _userManager.GetByPki(serviceId, UserType.Internal);

Get all external users by PKI

Code Block
languagec#
int serviceId = 1;
await _userManager.GetByPki(serviceId, UserType.External);