/
How to Publish the UI Spec and ID schema

How to Publish the UI Spec and ID schema

NOTE: The procedure below is followed for api-internal.mec2.mosip.net,    the same is applicable for all other environments using the relevant URLs and Databases.

               Here the steps are given for publishing a new process, the same can be followed for the update, lost and biometric processes. detailed the steps for adding certificates for a credential partner in MOSIP.

Instructions

 

Step1

Authenticate using the swagger URL given below             

https://api-internal.mec2.mosip.net/v1/authmanager/swagger-ui/index.html?configUrl=/v1/authmanager/v3/api-docs/swagger-config#/authmanager/clientIdSecretKey   

        Give Try it out, Get the secret key from Rancheràmec2àStorageàSecretsà keycloak client secretsàmosip-reg-client and Paste it here. The Body should be as follows. 

Execute it. The Response will be as follows.

· Step 2:

To upload the JSON, Use the swagger URL –master data/ui-spec-controller/post-Ui-spec

 https://api-internal.mec2.mosip.net/v1/masterdata/swagger-ui/index.html?configUrl=/v1/masterdata/v3/api-docs/swagger-config#/ui-spec-controller/defineUISpec 

· Give try it out.

  • Identity Schema -  Get the ID from the databaseàmosip_masteràschemasàmasteràtablesàIdentity_schemaàselect script and run the queryàcopy the latest Id from the table and paste it into the body.

  • Domain, Title, Description, Type-  Check the latest version of the ui-spec in the databaseàmosip_masteràschemasàmasteràtablesàUI-specàselect script and run the queryàFind the last updated version of the new process(say 0.8) and the copy and paste the relevant details from the table.

 

Jsonspec- Copy the respective JSON for the new process, remove the extra braces and paste.

· The sample body will be as follows.

· Execute, The response code will be as follows, when the upload is successful.

 

· From the response body copy the id and refer to the below pic.

Step 3:·

To publish the UI-spec-

Use the master data swagger URL /Ui-spec-controller/put-Uispec-publish.

· Try it out and paste the id value in place of the ID of the request body. Refer below,

https://api-internal.mec2.mosip.net/v1/masterdata/swagger-ui/index.html?configUrl=/v1/masterdata/v3/api-docs/swagger-config#/schema-controller/publishSchema.

· And follow the same steps as of step 3 in publishing the UI-Spec.

· To confirm the publish, check in the databaseàmosip_masteràschemasàmasteràtables àIdentity_schemaàselect  script and run the queryàThe last updated version will be found(say 0.2 to 0.3).

 

Related articles

Related content