Adopt New MDMS - Steps
Overview
This guide details the steps to promote a master to MDMS v2. It includes defining a schema with a unique identifier, creating the schema via an API endpoint, and verifying the created schema. Once verified, data can be added and searched using corresponding API endpoints.
Steps
Define a schema for the master that you want to promote to MDMS v2.
Ensure that the schema has a unique field (a unique field can also be composite) which enforces the data being added against that schema to be unique.
If the data does not have the scope for having unique identifiers. For example - complex masters like - https://github.com/egovernments/health-campaign-mdms/blob/QA/data/default/health/project-task-configuration.json - consider adding a redundant field which can serve as the unique identifier.
Hit the following API endpoint to create schema in the system - /mdms-v2/schema/v1/_create
Now that the schema has been created, verify the created schema by searching for it using the following API endpoint - /mdms-v2/schema/v1/_search
Once the schema is in place, data can be created against the created schema using the following API endpoint - /mdms-v2/v2/_create/{schemaCode}
Once the data is created, data can be verified by searching it by using the following API endpoint - /mdms-v2/v2/_search
Last updated