Integrate MDMS Service

Overview

We will call into MDMS deployed in the sandbox environment. All MDMS config data needs to be uploaded into the MDMS repository (DEV branch if you are deploying/testing in your dev environment).

Steps

Integration with MDMS requires the following steps to be followed:

  1. Add a new MDMS file in MDMS repo. For this guide, a sample MDMS file has already been added available here. Copy this file into your repository.

  2. Restart MDMS service after adding the new file via Jenkins build UI.

  3. Once restarted, hit the curl mentioned below to verify that the new file has been properly added .

curl --location --request POST 'https://yourserver.digit.org/egov-mdms-service/v1/_search' \
--header 'Content-Type: application/json' \
--data-raw '{
    "RequestInfo": {
        "apiId": "asset-services",
        "ver": null,
        "ts": null,
        "action": null,
        "did": null,
        "key": null,
        "msgId": "search with from and to values",
        "authToken": "{{devAuth}}"
    },
    "MdmsCriteria": {
        "tenantId": "pb",
        "moduleDetails": [
            {
                "moduleName": "BTR",
                "masterDetails": [
                    {
                        "name": "RegistrationCharges"
                    }
                ]
            }
        ]
    }
}' 
  1. Call the MDMS service post verification from within our application and fetch the required master data. For this, create a Java class by the name of MdmsUtil under utils folder. Annotate this class with @Component and put the following content in the class -

  1. Add the following properties in application.properties file -

Last updated

Was this helpful?