Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Note: This is only for the MTOA Platform Team.

Description

Gets list of UserApplicationManagement object based on the user id, role ids and application id. The role ids and application id are optional.

Package Details

Interface

IUserManager

Syntax

Task<ICollection<UserApplicationManagement>> GetApplicationsByUserId(int userId, List<UserRoleType> roleIds, int? appId)

Returns

ICollection<UserApplicationManagement>

API

GET - v1/users/{id}/applications

Parameters

Parameter

Description

Type

id

Stakeholder id

Path

role Ids (optional)

User’s role id. (if it is more than one, comma delimited. For example: "1,2").

Query string

Application id (optional) 

Application id.

Query string

Returns

HTTP 200 - OK

Returns list of applications with roles

Sample response body – Returns values for the specified application id.

{
  "Id": 1,
  "EnglishName": "Manufacturers and Importers of Small Vessels (MISV)",
  "FrenchName": "Fabricants et importateurs de petits bâtiments (FIPB)",
  "ManageInternalAccountInd": false,
  "Roles": [
    {
      "RoleId": 5,
      "EnglishName": "Canadian Responsible Officer",
      "FrenchName": "Agent responsable canadien",
      "Permissions": []
    },
    {
      "RoleId": 6,
      "EnglishName": "Compliance Officer",
      "FrenchName": "Agent de comformité",
      "Permissions": []
    }
  ]
}

Example

var applications = await _userManager.GetApplicationsByUserId (id, roleIdList, appId);

 

  • No labels