Developer Helpers (Validations)

Introduction 🔗︎ click to copy

Developers working with a rich data source and platform like Mydex will want to be able to ask questions of the platform in real time, to help them know what they can do and what is available.

The following routes are made available on Mydex's Master Reference Data Services (MRD) API. They are designed to help understand what data is available within the PDS Master Schema, what datasets and fields exist and what their formats are.

In some cases, it is also possible to see what values are accepted for certain types of field, and whether input (that you can supply) would be accepted or not as an allowed value. It's for this reason that the Developer Helper endpoints are also referred to as 'Validations'.

You may find it beneficial to consume certain endpoints, such as the 'lookup' endpoints, in order to pre-define a set of valid options when rendering a form that offers choices.

If you have other helper functions that you feel would be of use do let us know by sending us a request via our documentation feedback email address which can be found at https://dev.mydex.org/support.html.

Endpoints 🔗︎ click to copy

Please note: all paths below are to be appended to the domain https://api-mrd.mydex.org

Description Path/Parameters Returned data
Get all PDS datasets. GET /validations/mds/datasets
  • dataset_machine_name
  • dataset_name
  • status
Get all datasets and fields. GET /validations/mds/datasets-and-fields
  • dataset_machine_name
  • dataset_name
  • status
  • pds_file_type
  • fields
Get all datasets by type. GET /validations/mds/datasets/type/:type
Where :type must be either 'metadata' or 'transactional'
  • dataset_machine_name
  • dataset_name
  • status
Get datasets by status.
Up to 3 statuses supported, separated by /
e.g /live/implement/in development.
GET /validations/mds/datasets/:status
  • dataset_machine_name
  • dataset_name
  • status
Get a dataset and its fields. GET /validations/mds/dataset/:dataset
  • field_name
  • display_name
  • data_type
  • not_null
  • default
  • field_description
  • field_example
  • length
  • field_order
  • status
Get the data types of fields in a dataset. GET /validations/mds/:dataset/fieldtypes
  • field_name
  • display_name
  • data_type
Get the data type of a field. GET /validations/mds/type/:field
  • field_name
  • display_name
  • data_type
Search for a field GET /validations/mds/search/:search
  • search term
  • matching fields
Get the acceptable values for a particular field. GET /validations/lookup/:field

The following fields are currently available to lookup
  • bank_acc_type
  • comm_type
  • country
  • dl_group
  • dl_issuing_authority
  • edu_org_type
  • gender
  • home_tenancy
  • marital_status
  • medication_dosage_units
  • mode_of_study
  • pronouns
  • property_type
  • race_ethnicity
  • title
  • utility_service
Allowed values as appropriate
Validate input against a field's acceptable values. GET /validations/lookup/:field/:user_input result: true/false
Get information about all Templates on the Mydex Template System. GET /validations/mts/templates
  • id
  • template_name
  • template_machine_name
  • module_name
  • module_route
  • full_route
  • module_subsection
  • subsection_route
  • route
Get information about a specific Template on the MTS. GET /validations/mts/templates/:template_name
Example:
GET /validations/mts/templates/About Me
  • id
  • template_name
  • template_machine_name
  • module_name
  • module_route
  • full_route
  • module_subsection
  • subsection_route
  • route
Get information about a specific Module of a Template on the MTS. GET /validations/mts/templates/:template_name/:module_name
Example:
GET /validations/mts/templates/About Me/This is Me
  • id
  • template_name
  • template_machine_name
  • module_name
  • module_route
  • full_route
  • module_subsection
  • subsection_route
  • route
Get information about a specific Subsection of a Module on the MTS. GET /validations/mts/templates/:template_name/:module_name/:module_subsection
Example:
GET /validations/mts/templates/About Me/This is Me/Contact Details
  • id
  • template_name
  • template_machine_name
  • module_name
  • module_route
  • full_route
  • module_subsection
  • subsection_route
  • route
Get information about Feature Blocks. GET /validations/mts/features
  • id
  • feature_name
  • feature_machine_name
  • feature_group
  • route
  • feature_group_machine_name
Get information about Feature Blocks by group. GET /validations/mts/features/group/:feature_group
Example:
GET /validations/mts/features/group/Measurements
  • id
  • feature_name
  • feature_machine_name
  • feature_group
  • route
  • feature_group_machine_name