GetUserRolesByApplication

Note: This is only for the MTOA Platform Team.

Description

Retrieves a user's role per service based on an application identification number.

Package Details

Interface

IUserApplicationManagementManager

Syntax

await UserApplicationManagementManager.GetUserRolesByApplication(int applicationId, int userId, bool isActive = true);

Returns

ApplicationUserRole

API

GET - /api/v1/userapplications/{id}/roles?userId={userId}&isActive={true|false}

Parameters

Parameter

Description

Type

Parameter

Description

Type

id

Required

The identification number of the application.

Must be a valid application number.

Path

userId

Required

The user’s identification number the role(s) per service(s).

Must be a valid user id.

Query string

isActive

Optional

If the value is set to true:

Only return services where the user’s enrollment status is set to ‘ACTIVE’ and DATE_STOP_DTE is null.

If the value is set to false:

Returns all services regardless of the of the enrollment status where DATE_STOP_DTE is null.

Default value is ‘true’.

Query string

Returns

HTTP 200 - OK

A list of the user’s roles per service is returned.

Example JSON.

HTTP 400 - Bad Request

Error

Message

MTAPI Status Code

Error

Message

MTAPI Status Code

Invalid user id

UserId:{userId} couldn't be found.

4041003

Invalid application id

Application id:{id} couldn't be found.

623001

Get user roles by application failed.

Get user roles for application id: {id} with user id: {userId} failed.

623011

Example