{"collection":{"info":{"_postman_id":"482ec4ae-f326-4dff-8c17-f7a5d2be499f","name":"MDMS  inbox Creation for pgr","description":"- \"tenant\" collection variable is for the schema being added to database\n- \"userTenant\" collection variable is for the auth token API, user specific tenant id to be added\n- \"i\" variable will always be 0,","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json","createdAt":"2025-07-16T06:41:35.000Z","updatedAt":"2025-07-16T06:59:14.000Z","lastUpdatedBy":"23418568","uid":"23418568-482ec4ae-f326-4dff-8c17-f7a5d2be499f"},"item":[{"name":"Auth","item":[{"name":"Employee Auth Token","event":[{"listen":"test","script":{"id":"b7ab0747-9e7d-43c6-b716-e6cca9008865","exec":["var jsonData = pm.response.json();","","pm.collectionVariables.set(\"authToken\", jsonData.access_token);","","var userInfo, userReqInfo;","for(let key in jsonData)","{","if(key.includes('UserRequest')){","   console.log(JSON.stringify(jsonData[key]));","   userInfo = JSON.stringify(jsonData[key])","}","}","pm.collectionVariables.set(\"userReqInfo\", userInfo);","",""],"type":"text/javascript","packages":{}}}],"id":"0d244914-df98-43b1-8fdb-48f313ec798c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"authority","value":"upyog.niua.org"},{"key":"accept","value":"application/json, text/plain, */*"},{"key":"accept-language","value":"en-GB,en;q=0.9"},{"key":"authorization","value":"Basic ZWdvdi11c2VyLWNsaWVudDo="},{"key":"content-type","value":"application/x-www-form-urlencoded"},{"key":"origin","value":"https://unified-dev.digit.org"},{"key":"referer","value":"https://unified-dev.digit.org/employee/user/login"},{"key":"sec-ch-ua","value":"\"Not?A_Brand\";v=\"8\", \"Chromium\";v=\"108\", \"Google Chrome\";v=\"108\""},{"key":"sec-ch-ua-mobile","value":"?0"},{"key":"sec-ch-ua-platform","value":"\"Linux\""},{"key":"sec-fetch-dest","value":"empty"},{"key":"sec-fetch-mode","value":"cors"},{"key":"sec-fetch-site","value":"same-origin"},{"key":"user-agent","value":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"username","value":"{{username}}","type":"text"},{"key":"password","value":"{{password}}","type":"text"},{"key":"grant_type","value":"password","type":"text"},{"key":"scope","value":"read","type":"text"},{"key":"tenantId","value":"{{userTenant}}","type":"text"},{"key":"userType","value":"EMPLOYEE","type":"text"}]},"url":{"raw":"{{url}}/user/oauth/token","host":["{{url}}"],"path":["user","oauth","token"]}},"response":[{"id":"239b3ccd-e322-44ac-b2e0-c7b89eb5ef4a","name":"Employee Auth Token","originalRequest":{"method":"POST","header":[{"key":"authority","value":"upyog.niua.org"},{"key":"accept","value":"application/json, text/plain, */*"},{"key":"accept-language","value":"en-GB,en;q=0.9"},{"key":"authorization","value":"{{authorization}}"},{"key":"content-type","value":"application/x-www-form-urlencoded"},{"key":"origin","value":"https://upyog.niua.org"},{"key":"referer","value":"https://upyog.niua.org/employee/user/login"},{"key":"sec-ch-ua","value":"\"Not?A_Brand\";v=\"8\", \"Chromium\";v=\"108\", \"Google Chrome\";v=\"108\""},{"key":"sec-ch-ua-mobile","value":"?0"},{"key":"sec-ch-ua-platform","value":"\"Linux\""},{"key":"sec-fetch-dest","value":"empty"},{"key":"sec-fetch-mode","value":"cors"},{"key":"sec-fetch-site","value":"same-origin"},{"key":"user-agent","value":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"username","value":"{{username}}","type":"text"},{"key":"password","value":"{{password}}","type":"text"},{"key":"grant_type","value":"password","type":"text"},{"key":"scope","value":"read","type":"text"},{"key":"tenantId","value":"{{tenantId}}","type":"text"},{"key":"userType","value":"{{userType}}","type":"text"}]},"url":{"raw":"{{url}}/user/oauth/token","host":["{{url}}"],"path":["user","oauth","token"],"query":[{"key":"_","value":"{{_}}","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 27 Feb 2024 09:09:44 GMT"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"X-RateLimit-Remaining-rate-limit-application_user_user_oauth_token_user_oauth_token_192.168.66.34","value":"3"},{"key":"X-RateLimit-Remaining-Quota-rate-limit-application_user_user_oauth_token_user_oauth_token_192.168.66.34","value":"10000"},{"key":"X-RateLimit-Quota-rate-limit-application_user_user_oauth_token_user_oauth_token_192.168.66.34","value":"10000"},{"key":"X-RateLimit-Reset-rate-limit-application_user_user_oauth_token_user_oauth_token_192.168.66.34","value":"60000"},{"key":"X-RateLimit-Limit-rate-limit-application_user_user_oauth_token_user_oauth_token_192.168.66.34","value":"4"},{"key":"Cache-Control","value":"no-store"},{"key":"Cache-Control","value":"no-cache, no-store, max-age=0, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"X-Frame-Options","value":"DENY"},{"key":"x-correlation-id","value":"79c23713-7363-42b2-a124-9161a2dc4f68"},{"key":"Strict-Transport-Security","value":"max-age=15724800; includeSubDomains"}],"cookie":[],"responseTime":null,"body":"{\n    \"access_token\": \"4163a5be-b3a9-4f81-a24f-0fbb4d961d79\",\n    \"token_type\": \"bearer\",\n    \"refresh_token\": \"e74af6c2-db80-41b1-b60c-53e7b5dfb723\",\n    \"expires_in\": 1857,\n    \"scope\": \"read\",\n    \"ResponseInfo\": {\n        \"api_id\": \"\",\n        \"ver\": \"\",\n        \"ts\": \"\",\n        \"res_msg_id\": \"\",\n        \"msg_id\": \"\",\n        \"status\": \"Access Token generated successfully\"\n    },\n    \"UserRequest\": {\n        \"id\": 10883,\n        \"uuid\": \"2e17a032-b113-4911-9449-fb53ba7a385a\",\n        \"userName\": \"MDMSAD2\",\n        \"name\": \"Jason\",\n        \"mobileNumber\": \"9100000041\",\n        \"emailId\": null,\n        \"locale\": null,\n        \"type\": \"EMPLOYEE\",\n        \"roles\": [\n            {\n                \"name\": \"Localisation admin\",\n                \"code\": \"LOC_ADMIN\",\n                \"tenantId\": \"pg\"\n            },\n            {\n                \"name\": \"MDMS ADMIN\",\n                \"code\": \"MDMS_ADMIN\",\n                \"tenantId\": \"pg\"\n            },\n            {\n                \"name\": \"Employee\",\n                \"code\": \"EMPLOYEE\",\n                \"tenantId\": \"pg\"\n            }\n        ],\n        \"active\": true,\n        \"tenantId\": \"pg\",\n        \"permanentCity\": null\n    }\n}","createdAt":"2025-07-16T06:41:36.000Z","updatedAt":"2025-07-16T06:41:36.000Z","uid":"23418568-239b3ccd-e322-44ac-b2e0-c7b89eb5ef4a"}],"createdAt":"2025-07-16T06:41:36.000Z","updatedAt":"2025-07-16T06:41:36.000Z","uid":"23418568-0d244914-df98-43b1-8fdb-48f313ec798c"}],"id":"fd66afb7-84c0-4757-a1ec-af219ce54a2b","createdAt":"2025-07-16T06:41:36.000Z","updatedAt":"2025-07-16T06:41:36.000Z","uid":"23418568-fd66afb7-84c0-4757-a1ec-af219ce54a2b"},{"name":"inbox-v2","event":[{"listen":"prerequest","script":{"id":"b84e27c5-845e-4f08-951e-446e647bf9fa","exec":["var data= [","  {","    \"tenantId\": pm.collectionVariables.get('tenant'),","    \"code\": \"INBOX.InboxQueryConfiguration\",","      \"description\": \"  \",","      \"definition\": {","        \"type\": \"object\",","        \"title\": \"Generated schema for Root\",","        \"$schema\": \"http://json-schema.org/draft-07/schema#\",","        \"required\": [","          \"module\",","          \"index\"","        ],","        \"x-unique\": [","          \"module\",","          \"index\"","        ],","        \"properties\": {","          \"index\": {","            \"type\": \"string\"","          },","          \"module\": {","            \"type\": \"string\"","          },","          \"sortBy\": {","            \"type\": \"object\",","            \"required\": [","              \"path\",","              \"defaultOrder\"","            ],","            \"properties\": {","              \"path\": {","                \"type\": \"string\"","              },","              \"defaultOrder\": {","                \"type\": \"string\"","              }","            }","          },","          \"sourceFilterPathList\": {","            \"type\": \"array\",","            \"items\": {","              \"type\": \"string\"","            }","          },","          \"allowedSearchCriteria\": {","            \"type\": \"array\",","            \"items\": {","              \"type\": \"object\",","              \"required\": [","                \"name\",","                \"path\",","                \"isMandatory\",","                \"operator\"","              ],","              \"properties\": {","                \"name\": {","                  \"type\": \"string\"","                },","                \"path\": {","                  \"type\": \"string\"","                },","                \"operator\": {","                  \"type\": \"string\"","                },","                \"isMandatory\": {","                  \"type\": \"boolean\"","                },","                \"isHashingRequired\": {","                  \"type\": \"boolean\"","                }","              }","            }","          }","        },","        \"x-ref-schema\": [],","        \"additionalProperties\": false","      },","      \"isActive\": true","    }","]","","pm.collectionVariables.set(\"data\", data);","","var obj = pm.collectionVariables.get(\"data\");","","pm.collectionVariables.set(\"req\", JSON.stringify(obj[pm.collectionVariables.get(\"i\")]))","","","",""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"5e932a4f-0275-4f0c-8dc9-16156d0c289e","exec":["var data = pm.collectionVariables.get(\"data\");","","var items = pm.collectionVariables.get(\"i\");","","","if (items < data.length){","","    pm.collectionVariables.set(\"i\", Number(items) + 1);","","    pm.execution.setNextRequest(pm.info.requestName);","}else{","    pm.collectionVariables.set(\"i\", 0);","}",""],"type":"text/javascript","packages":{}}}],"id":"cef21497-b4e3-4afe-b4d4-96f073da933e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"RequestInfo\": {\n        \"apiId\": \"asset-services\",\n        \"ver\": null,\n        \"ts\": null,\n        \"action\": null,\n        \"did\": null,\n        \"key\": null,\n        \"msgId\": \"search with from and to values\",\n        \"authToken\": \"{{authToken}}\",\n        \"correlationId\": null,\n        \"userInfo\": {{userReqInfo}}\n    },\n    \"SchemaDefinition\": {{req}}\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{url}}/mdms-v2/schema/v1/_create","host":["{{url}}"],"path":["mdms-v2","schema","v1","_create"]}},"response":[],"createdAt":"2025-07-16T06:41:36.000Z","updatedAt":"2025-07-16T06:51:16.000Z","uid":"23418568-cef21497-b4e3-4afe-b4d4-96f073da933e"},{"name":"INBOX.InboxQueryConfiguration","event":[{"listen":"prerequest","script":{"id":"1618dfda-419c-4c25-a8ac-5e535608c972","exec":["var requestName = pm.info.requestName;","pm.variables.get(\"variable_key\");","","var data= [","  {","    \"index\": \"pgr-services\",","    \"module\": \"RAINMAKER-PGR\",","    \"sortBy\": {","      \"path\": \"Data.service.auditDetails.createdTime\",","      \"defaultOrder\": \"ASC\"","    },","    \"sourceFilterPathList\": [","      \"Data.currentProcessInstance\",","      \"Data.service.serviceRequestId\",","      \"Data.service.address.locality.code\",","      \"Data.service.applicationStatus\",","      \"Data.service.user\",","      \"Data.service.auditDetails.createdTime\",","      \"Data.auditDetails\"","    ],","    \"allowedSearchCriteria\": [","      {","        \"name\": \"area\",","        \"path\": \"Data.service.address.locality.code.keyword\",","        \"operator\": \"EQUAL\",","        \"isMandatory\": false","      },","      {","        \"name\": \"status\",","        \"path\": \"Data.currentProcessInstance.state.uuid.keyword\",","        \"operator\": \"EQUAL\",","        \"isMandatory\": false","      },","      {","        \"name\": \"assignedToMe\",","        \"path\": \"Data.workflow.assignes.*.uuid.keyword\",","        \"operator\": \"EQUAL\",","        \"isMandatory\": false,","        \"isHashingRequired\": true","      },","      {","        \"name\": \"fromDate\",","        \"path\": \"Data.service.auditDetails.createdTime\",","        \"operator\": \"GTE\",","        \"isMandatory\": false","      },","      {","        \"name\": \"toDate\",","        \"path\": \"Data.service.auditDetails.createdTime\",","        \"operator\": \"LTE\",","        \"isMandatory\": false","      },","      {","        \"name\": \"complaintNumber\",","        \"path\": \"Data.service.serviceRequestId.keyword\",","        \"operator\": \"EQUAL\",","        \"isMandatory\": false","      },","      {","        \"name\": \"mobileNumber\",","        \"path\": \"Data.service.user.mobileNumber.keyword\",","        \"operator\": \"EQUAL\",","        \"isMandatory\": false","      }","    ]","  }","]","","pm.collectionVariables.set(\"requestName\", requestName);","","pm.collectionVariables.set(\"data\", data);","","var obj = pm.collectionVariables.get(\"data\");","","pm.collectionVariables.set(\"req\", JSON.stringify(obj[pm.collectionVariables.get(\"i\")]))","","","",""],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"a185ee77-2aa0-418c-914f-d7d82993da8e","exec":["var data = pm.collectionVariables.get(\"data\");","","var items = pm.collectionVariables.get(\"i\");","","","if (items < data.length){","","    pm.collectionVariables.set(\"i\", Number(items) + 1);","","    pm.execution.setNextRequest(pm.collectionVariables.get(\"requestName\"));","}else{","    pm.collectionVariables.set(\"i\", 0);","}",""],"type":"text/javascript","packages":{}}}],"id":"743fd9ce-593e-41c4-afb5-f8b441456eb5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"RequestInfo\": {\n        \"apiId\": \"asset-services\",\n        \"ver\": null,\n        \"ts\": null,\n        \"action\": null,\n        \"did\": null,\n        \"key\": null,\n        \"msgId\": \"search with from and to values\",\n        \"authToken\": \"{{authToken}}\",\n        \"correlationId\": null,\n        \"userInfo\": {{userReqInfo}}\n    },\n    \"Mdms\": {\n        \"tenantId\": \"{{tenant}}\",\n        \"schemaCode\": \"{{requestName}}\",\n        \"uniqueIdentifier\": null,\n        \"data\": {{req}},\n        \"isActive\": true\n    }\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"{{url}}/mdms-v2/v2/_create/INBOX.InboxQueryConfiguration","host":["{{url}}"],"path":["mdms-v2","v2","_create","INBOX.InboxQueryConfiguration"]}},"response":[],"createdAt":"2025-07-16T06:49:39.000Z","updatedAt":"2025-07-16T06:57:34.000Z","uid":"23418568-743fd9ce-593e-41c4-afb5-f8b441456eb5"}],"event":[{"listen":"prerequest","script":{"id":"5b9a6a34-acf9-47cb-802e-b0704c83176b","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"8ef6046d-dbec-4550-8d61-a1d38c180863","type":"text/javascript","exec":[""]}}],"variable":[{"key":"url","value":"https://unified-qa.digit.org","type":"string"},{"key":"username","value":"MDMSADMIN","type":"string"},{"key":"password","value":"eGov@123","type":"string"},{"key":"tenant","value":"pg","type":"string"},{"key":"userTenant","value":"pg","type":"string"},{"key":"i","value":"0","type":"string"},{"key":"req","value":""},{"key":"data","value":""},{"key":"authToken","value":""},{"key":"userReqInfo","value":""},{"value":"","type":"string","disabled":true},{"key":"requestName","value":""}]}}