Description
Gets a list of regulated entity ids and their English and French display names for a specified service and entity.
Package Details
Interface
IServiceRegulatedEntityManager
Syntax
Task<ICollection<ServiceRegulatedEntityIdType>> GetList(int serviceId, string type)
Returns
ICollection<ServiceRegulatedEntityIdType>
API
GET - /api/v1/services/{id}/regulated-entities
Parameters
[ { "Id": 1, "EnglishDisplayName": "Vessel Name", "FrenchDisplayName": "Nom du bâtiment" }, { "Id": 2, "EnglishDisplayName": "Canadian Vessel?", "FrenchDisplayName": "Bâtiment canadien?" }, { "Id": 3, "EnglishDisplayName": "IMO", "FrenchDisplayName": "OMI" }, { "Id": 4, "EnglishDisplayName": "Official No.", "FrenchDisplayName": "Numéro officiel" } ]
Returns
HTTP 200 - OK
Returns a list of regulated entities with their ids, English and French display names. The ids are returned based on a sort order.
Is there’s no regulated entity ids found, an empty list is returned.
Example
//Use your service id and entity type. const int serviceId = 1230; const string entity = "VESSEL"; var serviceRegulatedEntityIdTypes = await MtoaApi.ServiceRegulatedEntityApi.GetList(serviceId, entity);