Skip to content

Web API

Stefan Fjällemark edited this page Aug 16, 2023 · 16 revisions

General

The Module Registry also have an open web API.

Protection

  • Only accessible over https.
  • Using personal API keys. They can be granted and revoked for individual users.

Current API

NOTE: API-keys in examples are invalid!

Currently the following data can be retrieved:

Meetings

Instead om maintaining your own meeting information, you can reterive meeting information from the Module Registry:

https://moduleregistry.azurewebsites.net/api/meetings?apikey={your API-key}&culture={language}&countries={country-codes}
  • Your API-key can be found in your User Settings. Administrators must grant you API-access.
  • Language controls the presentation language of the data retrieved. Language is the two-letter ISO code. Defaults to en English.
  • Countries is optional for filtering result to one or several countries. Valid values are a comma-separated list of domain suffixes.

Example of retrieving all meetings in Sweden, Denmark and Norway in Swedish:

https://moduleregistry.azurewebsites.net/api/meetings?apikey=69ee281b-6517-4eaf-9132-a5d5d3cb6251&culture=sv&countries=se,dk,no

Cargo types

Retrieves all cargo types currently available in the Module Registry. Includes translations to all supported languages.

NOTE: Cargo types with NHM-code zero are generic types.

https://moduleregistry.azurewebsites.net/api/cargoes?apikey={your API-key}
  • Your API-key can be found in your User Settings. Administrators must grant you API-access.

Layout Vehicles

Vehicles used at a specific meeting layout.

https://moduleregistry.azurewebsites.net/api/layouts/{layout-id}/vehicles?apikey={your API-key}
  • Layout Id is the id of the layout in the Module Registry. Layout id can be retrieved when logging in and showing the layout details.
  • Your API-key can be found in your User Settings. Administrators must grant you API-access.

Further expansion

In addition to the current available data in the API, other data may be of interest outside the Module Registry.

Possible Functions

  • Get all modules of a certain scale and/or standard.
  • Get all modules that are submitted to a meeting or layout.

Filtering on some common properties can be supported, for example stations only.

Possible Formats

  • Standard formats as JSON and XML. This will be hierarchical structured data.
  • Formats suitable for importing into spreadsheet applications such as CSV. This will be flattened record oriented data.

Protocols

  • Support the OPEN API standards and metadata endpoints.
  • Standard https GET requests, example