Note: This is only for the MTOA Platform Team.
Description
Gets a UserApplicationManagement object with the user’s application roles and permissions based on the application identification number.
Package Details
Interface
IUserApplicationManagementManager
Syntax
Task<UserApplicationManagement> GetApplicationByApplicationId(int appId)
Returns
UserApplicationManagement
API
GET - /api/v1/userapplications
Parameters
Parameter | Description | Type |
---|---|---|
id | The identification number of the application. The application must exist. | Path |
Returns
HTTP 200 - OK
Returns the user application information with roles and permissions of a specific application.
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, "EnglishAcronym": "MISV", "FrenchAcronym": "FIPB", "EnglishDescription": "Submit declarations of conformity (DoC) and annual production reports (APR) required to import small vessels into Canada.", "FrenchDescription": "Soumettre les déclarations de conformité (DoC) et les rapports annuels de production (APR) requis pour importer de petits navires au Canada.", "Roles": [ { "RoleId": 5, "EnglishName": "Canadian Responsible Officer", "FrenchName": "Agent responsable canadien", "Permissions": [ { "PermissionId": 13, "EnglishName": "Sign and submit service requests", "FrenchName": "Signer et soumettre des demandes de service" }, { "PermissionId": 17, "EnglishName": "Manage service requests", "FrenchName": "Gérer les demandes de service" } ] }, { "RoleId": 6, "EnglishName": "Compliance Officer", "FrenchName": "Agent de comformité", "Permissions": [ { "PermissionId": 17, "EnglishName": "Manage service requests", "FrenchName": "Gérer les demandes de service" } ] } ] }
Example
const int applicationId = 1234; // get the application information. var application = await MtoaApi.UserApplicationManagementApi.GetApplicationByApplicationId(applicationId);