Versions Compared

Key

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

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

Code Block
IUserManager

Syntax

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

Returns

Code Block
ICollection<UserApplicationManagement>

API

GET - v1/users/{id}/applications

...

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

...

Code Block
{
  "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

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

...