diff --git a/src/.env.sample b/src/.env.sample index aeea479e..b7c705af 100644 --- a/src/.env.sample +++ b/src/.env.sample @@ -196,4 +196,6 @@ EVENT_TENANT_LISTENER_API='http://interface:3567/scp/v1/tenant/add' #Enable / disable organization event EVENT_ENABLE_ORGANIZATION_EVENTS=true #Event Kafka topic for organization create/update -EVENT_ORGANIZATION_KAFKA_TOPIC='dev.organizationEvent' \ No newline at end of file +EVENT_ORGANIZATION_KAFKA_TOPIC='dev.organizationEvent' +#Service name for health Check +SERVICE_NAME = 'UserService' \ No newline at end of file diff --git a/src/api-doc/MentorED-Users.postman_collection.json b/src/api-doc/MentorED-Users.postman_collection.json index 41305594..d8e946cc 100644 --- a/src/api-doc/MentorED-Users.postman_collection.json +++ b/src/api-doc/MentorED-Users.postman_collection.json @@ -1,9 +1,9 @@ { "info": { - "_postman_id": "372fb1dd-162b-4318-90c3-b67dfbf9e5a0", + "_postman_id": "e58f7535-ddce-4632-96fc-d9c3d5bc7bc0", "name": "MentorED-Users", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "40647259" + "_exporter_id": "21498549" }, "item": [ { @@ -11,18 +11,92 @@ "item": [ { "name": "Create Account", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "/* const apiKey = pm.collectionVariables.get(\"MAILSLURP_KEY\");", + "const inboxId = pm.collectionVariables.get(\"inboxId\");", + "if (!apiKey || !inboxId) throw new Error(\"MAILSLURP_KEY or inboxId missing\");", + "", + "const timeout = 30000; // wait up to 30s for email", + "const url = `https://api.mailslurp.com/inboxes/getLatestEmail?inboxId=${inboxId}&timeoutMillis=${timeout}`;", + "", + "pm.sendRequest({", + " url,", + " method: \"GET\",", + " header: {", + " \"x-api-key\": apiKey,", + " \"Content-Type\": \"application/json\"", + " }", + "}, function (err, res) {", + " if (err) {", + " console.error(err);", + " return;", + " }", + " if (res && res.status === 'OK') {", + " const body = res.json().body || res.json().text || \"\";", + " // extract 6-digit code", + " const m = body.match(/(\\d{6})/);", + " if (m) {", + " pm.collectionVariables.set(\"otp\", m[1]);", + " console.log(\"otp extracted:\", m[1]);", + " } else {", + " console.warn(\"OTP not found in email body\");", + " }", + " } else {", + " console.warn(\"No email found or non-200 status\", res && res.status);", + " }", + "});", + " */" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "const apiKey = pm.collectionVariables.get(\"MAILSLURP_KEY\");", + "const inboxId = pm.collectionVariables.get(\"inboxId\"); // or pm.environment.get(\"inboxId\")", + "", + "if (!apiKey) throw new Error(\"MAILSLURP_KEY missing\");", + "", + "pm.sendRequest({", + " url: `https://api.mailslurp.com/inboxes/${inboxId}`,", + " method: \"DELETE\",", + " header: {", + " \"x-api-key\": apiKey,", + " \"Content-Type\": \"application/json\"", + " }", + "}, function (err, res) {", + " if (err) {", + " console.error(err);", + " return;", + " }", + " console.log(\"Deleted inbox\", inboxId, \"status\", res.status);", + "});", + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], "request": { "method": "POST", "header": [ { "key": "origin", - "value": "localhost", + "value": "{{origin}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"name\": \"Nevil Mathew\",\n \"email\": \"nevil@tunerlabs.com\",\n \"password\": \"PASSword###11\"\n}", + "raw": "{\n \"name\": \"Nevil Mathew\",\n \"email\": \"nevil123@tunerlabs.com\",\n \"password\": \"PASSword###11\",\n \"otp\": 123456,\n \"state\": \"6853e0168500f000144a3ea4\",\n \"district\": \"6853e0828500f000144a3ec3\",\n \"block\": \"6853e0bb8500f000144a3f89\",\n \"cluster\": \"6853e0e58500f000144a4bba\",\n \"school\": \"6853e8cd8500f000144ba572\",\n \"registration_code\": \"\",\n \"professional_role\": \"682593bd97b5680013e6a16c\",\n \"professional_subroles\": [\n \"6825a7a597b5680013e841c2\"\n ]\n}", "options": { "raw": { "language": "json" @@ -35,7 +109,315 @@ "path": ["v1", "account", "create"] } }, - "response": [] + "response": [ + { + "name": "Create with phone", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "origin", + "value": "{{origin}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"User Phone\",\n \"phone\": \"1123454786\",\n \"phone_code\": \"+91\",\n \"password\": \"PASSword###11\",\n \"secret_code\": \"sot\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/create", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "create"] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Server", + "value": "nginx/1.18.0 (Ubuntu)" + }, + { + "key": "Date", + "value": "Tue, 13 May 2025 19:31:53 GMT" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "4055" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-powered-by", + "value": "Express" + }, + { + "key": "access-control-allow-origin", + "value": "*" + }, + { + "key": "RateLimit-Policy", + "value": "500;w=60" + }, + { + "key": "RateLimit", + "value": "limit=500, remaining=496, reset=10" + }, + { + "key": "content-language", + "value": "en" + }, + { + "key": "x-request-ids", + "value": "6e4d2048-17f7-4e22-8274-5ef3dc2f53db" + }, + { + "key": "etag", + "value": "W/\"fd7-Sdrd8TzWZBcfht5r2KUktc2W9G0\"" + } + ], + "cookie": [], + "body": "{\n \"responseCode\": \"OK\",\n \"message\": \"Sign-up successful, Please wait while logging in.\",\n \"result\": {\n \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoyOCwibmFtZSI6IlVzZXIgUGhvbmUiLCJzZXNzaW9uX2lkIjozMDEsIm9yZ2FuaXphdGlvbl9pZHMiOlsiMTIiXSwib3JnYW5pemF0aW9uX2NvZGVzIjpbInNvdCJdLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm9yZ2FuaXphdGlvbnMiOlt7ImlkIjoxMiwibmFtZSI6IlNPVCIsImNvZGUiOiJzb3QiLCJkZXNjcmlwdGlvbiI6IlMgTyBUIiwic3RhdHVzIjoiQUNUSVZFIiwicmVsYXRlZF9vcmdzIjpudWxsLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm1ldGEiOm51bGwsImNyZWF0ZWRfYnkiOjEsInVwZGF0ZWRfYnkiOm51bGwsInJvbGVzIjpbeyJpZCI6MjMsInRpdGxlIjoibWVudGVlIiwibGFiZWwiOiJtZW50ZWUiLCJ1c2VyX3R5cGUiOjAsInN0YXR1cyI6IkFDVElWRSIsIm9yZ2FuaXphdGlvbl9pZCI6MTAsInZpc2liaWxpdHkiOiJQVUJMSUMiLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsInRyYW5zbGF0aW9ucyI6bnVsbH0seyJpZCI6NDEsInRpdGxlIjoibGVhcm5lciIsImxhYmVsIjoiTGVhcm5lciIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiQUNUSVZFIiwib3JnYW5pemF0aW9uX2lkIjoxMCwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwidHJhbnNsYXRpb25zIjpudWxsfV19XX0sImlhdCI6MTc0NzE2NDcxMywiZXhwIjoxNzQ3MjUxMTEzfQ.1JcUltTp8kvJcZmoogmsX4Rd2Jplpf-uZECfzNaVkUA\",\n \"refresh_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoyOCwibmFtZSI6IlVzZXIgUGhvbmUiLCJzZXNzaW9uX2lkIjozMDEsIm9yZ2FuaXphdGlvbl9pZHMiOlsiMTIiXSwib3JnYW5pemF0aW9uX2NvZGVzIjpbInNvdCJdLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm9yZ2FuaXphdGlvbnMiOlt7ImlkIjoxMiwibmFtZSI6IlNPVCIsImNvZGUiOiJzb3QiLCJkZXNjcmlwdGlvbiI6IlMgTyBUIiwic3RhdHVzIjoiQUNUSVZFIiwicmVsYXRlZF9vcmdzIjpudWxsLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm1ldGEiOm51bGwsImNyZWF0ZWRfYnkiOjEsInVwZGF0ZWRfYnkiOm51bGwsInJvbGVzIjpbeyJpZCI6MjMsInRpdGxlIjoibWVudGVlIiwibGFiZWwiOiJtZW50ZWUiLCJ1c2VyX3R5cGUiOjAsInN0YXR1cyI6IkFDVElWRSIsIm9yZ2FuaXphdGlvbl9pZCI6MTAsInZpc2liaWxpdHkiOiJQVUJMSUMiLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsInRyYW5zbGF0aW9ucyI6bnVsbH0seyJpZCI6NDEsInRpdGxlIjoibGVhcm5lciIsImxhYmVsIjoiTGVhcm5lciIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiQUNUSVZFIiwib3JnYW5pemF0aW9uX2lkIjoxMCwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwidHJhbnNsYXRpb25zIjpudWxsfV19XX0sImlhdCI6MTc0NzE2NDcxMywiZXhwIjoxNzQ3NzY5NTEzfQ.cmLSNaiY3UPcvfx5XxoFQ_pZCyry60qNRGnly6z4u1s\",\n \"user\": {\n \"id\": 28,\n \"email\": null,\n \"email_verified\": \"false\",\n \"name\": \"User Phone\",\n \"username\": \"userphone_x41gtkigdpreg-\",\n \"phone\": \"1123454786\",\n \"phone_code\": \"+91\",\n \"location\": null,\n \"about\": null,\n \"share_link\": null,\n \"status\": \"ACTIVE\",\n \"image\": null,\n \"has_accepted_terms_and_conditions\": false,\n \"languages\": null,\n \"preferred_language\": \"en\",\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_at\": \"2025-05-13T19:31:53.655Z\",\n \"updated_at\": \"2025-05-13T19:31:53.655Z\",\n \"deleted_at\": null,\n \"organizations\": [\n {\n \"id\": 12,\n \"name\": \"SOT\",\n \"code\": \"sot\",\n \"description\": \"S O T\",\n \"status\": \"ACTIVE\",\n \"related_orgs\": null,\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_by\": 1,\n \"updated_by\": null,\n \"roles\": [\n {\n \"id\": 23,\n \"title\": \"mentee\",\n \"label\": \"mentee\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": 10,\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\",\n \"translations\": null\n },\n {\n \"id\": 41,\n \"title\": \"learner\",\n \"label\": \"Learner\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": 10,\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\",\n \"translations\": null\n }\n ]\n }\n ]\n }\n },\n \"meta\": {\n \"formsVersion\": [\n {\n \"id\": 2,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 3,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 4,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 5,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 1,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 6,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 7,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 8,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 9,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 10,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 11,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 12,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 13,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 14,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 15,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 16,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 17,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 18,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 19,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 20,\n \"type\": \"KR001\",\n \"version\": 0\n }\n ],\n \"correlation\": \"6e4d2048-17f7-4e22-8274-5ef3dc2f53db\"\n }\n}" + }, + { + "name": "Create with email", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "origin", + "value": "{{origin}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"User a\",\n \"email\": \"a@sot.com\",\n \"password\": \"PASSword###11\",\n \"secret_code\": \"sot\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/create", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "create"] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Server", + "value": "nginx/1.18.0 (Ubuntu)" + }, + { + "key": "Date", + "value": "Tue, 13 May 2025 20:10:28 GMT" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "4015" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-powered-by", + "value": "Express" + }, + { + "key": "access-control-allow-origin", + "value": "*" + }, + { + "key": "RateLimit-Policy", + "value": "500;w=60" + }, + { + "key": "RateLimit", + "value": "limit=500, remaining=498, reset=55" + }, + { + "key": "content-language", + "value": "en" + }, + { + "key": "x-request-ids", + "value": "3a96f65b-bb9a-4829-a69f-bcdf7d04cdd0" + }, + { + "key": "etag", + "value": "W/\"faf-mx9TTPd3lh1imXhhASssR02fa9c\"" + } + ], + "cookie": [], + "body": "{\n \"responseCode\": \"OK\",\n \"message\": \"Sign-up successful, Please wait while logging in.\",\n \"result\": {\n \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoyOSwibmFtZSI6IlVzZXIgYSIsInNlc3Npb25faWQiOjMyNCwib3JnYW5pemF0aW9uX2lkcyI6WyIxMiJdLCJvcmdhbml6YXRpb25fY29kZXMiOlsic290Il0sInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwib3JnYW5pemF0aW9ucyI6W3siaWQiOjEyLCJuYW1lIjoiU09UIiwiY29kZSI6InNvdCIsImRlc2NyaXB0aW9uIjoiUyBPIFQiLCJzdGF0dXMiOiJBQ1RJVkUiLCJyZWxhdGVkX29yZ3MiOm51bGwsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwibWV0YSI6bnVsbCwiY3JlYXRlZF9ieSI6MSwidXBkYXRlZF9ieSI6bnVsbCwicm9sZXMiOlt7ImlkIjoyMywidGl0bGUiOiJtZW50ZWUiLCJsYWJlbCI6Im1lbnRlZSIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiQUNUSVZFIiwib3JnYW5pemF0aW9uX2lkIjoxMCwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwidHJhbnNsYXRpb25zIjpudWxsfSx7ImlkIjo0MSwidGl0bGUiOiJsZWFybmVyIiwibGFiZWwiOiJMZWFybmVyIiwidXNlcl90eXBlIjowLCJzdGF0dXMiOiJBQ1RJVkUiLCJvcmdhbml6YXRpb25faWQiOjEwLCJ2aXNpYmlsaXR5IjoiUFVCTElDIiwidGVuYW50X2NvZGUiOiJzaGlrc2hhbG9rYW0iLCJ0cmFuc2xhdGlvbnMiOm51bGx9XX1dfSwiaWF0IjoxNzQ3MTY3MDI4LCJleHAiOjE3NDcyNTM0Mjh9.fvcaXfM4eQq1K8R8RboQFGSzCt3nxhrOEMoVBsVFRWw\",\n \"refresh_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoyOSwibmFtZSI6IlVzZXIgYSIsInNlc3Npb25faWQiOjMyNCwib3JnYW5pemF0aW9uX2lkcyI6WyIxMiJdLCJvcmdhbml6YXRpb25fY29kZXMiOlsic290Il0sInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwib3JnYW5pemF0aW9ucyI6W3siaWQiOjEyLCJuYW1lIjoiU09UIiwiY29kZSI6InNvdCIsImRlc2NyaXB0aW9uIjoiUyBPIFQiLCJzdGF0dXMiOiJBQ1RJVkUiLCJyZWxhdGVkX29yZ3MiOm51bGwsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwibWV0YSI6bnVsbCwiY3JlYXRlZF9ieSI6MSwidXBkYXRlZF9ieSI6bnVsbCwicm9sZXMiOlt7ImlkIjoyMywidGl0bGUiOiJtZW50ZWUiLCJsYWJlbCI6Im1lbnRlZSIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiQUNUSVZFIiwib3JnYW5pemF0aW9uX2lkIjoxMCwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwidHJhbnNsYXRpb25zIjpudWxsfSx7ImlkIjo0MSwidGl0bGUiOiJsZWFybmVyIiwibGFiZWwiOiJMZWFybmVyIiwidXNlcl90eXBlIjowLCJzdGF0dXMiOiJBQ1RJVkUiLCJvcmdhbml6YXRpb25faWQiOjEwLCJ2aXNpYmlsaXR5IjoiUFVCTElDIiwidGVuYW50X2NvZGUiOiJzaGlrc2hhbG9rYW0iLCJ0cmFuc2xhdGlvbnMiOm51bGx9XX1dfSwiaWF0IjoxNzQ3MTY3MDI4LCJleHAiOjE3NDc3NzE4Mjh9.juw5DnwELVp-rx8ZOWe_zFvKnU51uHXEx-_2kIlV7aQ\",\n \"user\": {\n \"id\": 29,\n \"email\": \"a@sot.com\",\n \"email_verified\": \"false\",\n \"name\": \"User a\",\n \"username\": \"usera_bremf0p96oruee\",\n \"phone\": null,\n \"location\": null,\n \"about\": null,\n \"share_link\": null,\n \"status\": \"ACTIVE\",\n \"image\": null,\n \"has_accepted_terms_and_conditions\": false,\n \"languages\": null,\n \"preferred_language\": \"en\",\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_at\": \"2025-05-13T20:10:28.687Z\",\n \"updated_at\": \"2025-05-13T20:10:28.687Z\",\n \"deleted_at\": null,\n \"organizations\": [\n {\n \"id\": 12,\n \"name\": \"SOT\",\n \"code\": \"sot\",\n \"description\": \"S O T\",\n \"status\": \"ACTIVE\",\n \"related_orgs\": null,\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_by\": 1,\n \"updated_by\": null,\n \"roles\": [\n {\n \"id\": 23,\n \"title\": \"mentee\",\n \"label\": \"mentee\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": 10,\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\",\n \"translations\": null\n },\n {\n \"id\": 41,\n \"title\": \"learner\",\n \"label\": \"Learner\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": 10,\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\",\n \"translations\": null\n }\n ]\n }\n ]\n }\n },\n \"meta\": {\n \"formsVersion\": [\n {\n \"id\": 2,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 3,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 4,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 5,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 1,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 6,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 7,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 8,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 9,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 10,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 11,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 12,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 13,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 14,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 15,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 16,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 17,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 18,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 19,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 20,\n \"type\": \"KR001\",\n \"version\": 0\n }\n ],\n \"correlation\": \"3a96f65b-bb9a-4829-a69f-bcdf7d04cdd0\"\n }\n}" + } + ] + }, + { + "name": "Registration Otp", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "/* // Create MailSlurp inbox and set env vars", + "const apiKey = pm.collectionVariables.get(\"MAILSLURP_KEY\");", + "if (!apiKey) throw new Error(\"Set MAILSLURP_KEY environment variable\");", + "", + "pm.sendRequest({", + " url: \"https://api.mailslurp.com/inboxes\",", + " method: \"POST\",", + " header: {", + " \"x-api-key\": apiKey,", + " \"Content-Type\": \"application/json\"", + " },", + " body: {", + " mode: \"raw\",", + " raw: JSON.stringify({ description: \"temp inbox for signup\" })", + " }", + "}, function (err, res) {", + " if (err) {", + " console.error(err);", + " return;", + " }", + " const json = res.json();", + " pm.collectionVariables.set(\"inboxId\", json.id);", + " pm.collectionVariables.set(\"emailAddress\", json.emailAddress);", + " console.log(\"inboxId\", json.id, \"email\", json.emailAddress);", + "});", + "", + "", + "postman.setNextRequest(\"Create Account\");", + " */" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Origin", + "value": "{{origin}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"Nevil\",\n \"email\": \"nevil1234@tunerlabs.com\",\n \"password\": \"PASSword###11\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/registrationOtp", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "registrationOtp"] + } + }, + "response": [ + { + "name": "Registration Otp with email", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Origin", + "value": "localhost", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"User a\",\n \"email\": \"aaasasaqajaksdanlk@sot.com\",\n \"password\": \"PASSword###11\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/registrationOtp", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "registrationOtp"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Language", + "value": "en" + }, + { + "key": "X-Request-Ids", + "value": "157c9c1f-2f35-4e46-8cbc-1ea83ddda01e" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "231" + }, + { + "key": "ETag", + "value": "W/\"e7-lbN0qmDK4s2o5fQe2/LrdlSR8cE\"" + }, + { + "key": "Date", + "value": "Wed, 14 May 2025 10:51:59 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"responseCode\": \"OK\",\n \"message\": \"OTP has been sent to your registered email ID. Please enter the otp to complete the registration process.\",\n \"result\": [],\n \"meta\": {\n \"formsVersion\": [],\n \"correlation\": \"157c9c1f-2f35-4e46-8cbc-1ea83ddda01e\"\n }\n}" + } + ] }, { "name": "Login Account", @@ -44,9 +426,1408 @@ "listen": "test", "script": { "exec": [ - "var jsonBody = JSON.parse(responseBody);", + "var jsonBody = pm.response.json();", "pm.environment.set(\"token\", jsonBody.result.access_token);", - "pm.environment.set(\"refresh_token\", jsonBody.result.refresh_token);" + "pm.environment.set(\"refresh_token\", jsonBody.result.refresh_token);", + "", + "pm.test(\"Response content type is application/json\", function () {", + " pm.expect(pm.response.headers.get(\"Content-Type\")).to.equal(", + " \"application/json; charset=utf-8\"", + " );", + "});", + "var responseSchema = {", + " type: \"object\",", + " properties: {", + " responseCode: {", + " type: \"string\",", + " },", + " message: {", + " type: \"string\",", + " },", + " result: {", + " type: \"object\",", + " properties: {", + " access_token: {", + " type: \"string\",", + " },", + " refresh_token: {", + " type: \"string\",", + " },", + " user: {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " email: {", + " type: \"string\",", + " },", + " email_verified: {", + " type: \"string\",", + " },", + " name: {", + " type: \"string\",", + " },", + " username: {", + " type: \"string\",", + " },", + " phone: {", + " type: \"string\",", + " },", + " phone_code: {", + " type: \"null\",", + " },", + " location: {", + " type: \"object\",", + " properties: {", + " value: {", + " type: \"string\",", + " },", + " label: {", + " type: \"string\",", + " },", + " },", + " required: [\"value\", \"label\"],", + " },", + " about: {", + " type: \"string\",", + " },", + " share_link: {", + " type: \"string\",", + " },", + " status: {", + " type: \"string\",", + " },", + " image: {", + " type: \"string\",", + " },", + " has_accepted_terms_and_conditions: {", + " type: \"boolean\",", + " },", + " languages: {", + " type: \"array\",", + " items: [", + " {", + " type: \"object\",", + " properties: {", + " value: {", + " type: \"string\",", + " },", + " label: {", + " type: \"string\",", + " },", + " },", + " required: [\"value\", \"label\"],", + " },", + " ],", + " },", + " preferred_language: {", + " type: \"object\",", + " properties: {", + " value: {", + " type: \"string\",", + " },", + " label: {", + " type: \"string\",", + " },", + " },", + " required: [\"value\", \"label\"],", + " },", + " tenant_code: {", + " type: \"string\",", + " },", + " meta: {", + " type: \"null\",", + " },", + " created_at: {", + " type: \"string\",", + " },", + " updated_at: {", + " type: \"string\",", + " },", + " deleted_at: {", + " type: \"null\",", + " },", + " organizations: {", + " type: \"array\",", + " items: [", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " name: {", + " type: \"string\",", + " },", + " code: {", + " type: \"string\",", + " },", + " description: {", + " type: \"string\",", + " },", + " status: {", + " type: \"string\",", + " },", + " related_orgs: {", + " type: \"array\",", + " items: {},", + " },", + " tenant_code: {", + " type: \"string\",", + " },", + " meta: {", + " type: \"null\",", + " },", + " created_by: {", + " type: \"null\",", + " },", + " updated_by: {", + " type: \"integer\",", + " },", + " roles: {", + " type: \"array\",", + " items: [", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " title: {", + " type: \"string\",", + " },", + " label: {", + " type: \"string\",", + " },", + " user_type: {", + " type: \"integer\",", + " },", + " status: {", + " type: \"string\",", + " },", + " organization_id: {", + " type: \"integer\",", + " },", + " visibility: {", + " type: \"string\",", + " },", + " tenant_code: {", + " type: \"string\",", + " },", + " translations: {", + " type: \"null\",", + " },", + " },", + " required: [", + " \"id\",", + " \"title\",", + " \"label\",", + " \"user_type\",", + " \"status\",", + " \"organization_id\",", + " \"visibility\",", + " \"tenant_code\",", + " \"translations\",", + " ],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " title: {", + " type: \"string\",", + " },", + " label: {", + " type: \"null\",", + " },", + " user_type: {", + " type: \"integer\",", + " },", + " status: {", + " type: \"string\",", + " },", + " organization_id: {", + " type: \"integer\",", + " },", + " visibility: {", + " type: \"string\",", + " },", + " tenant_code: {", + " type: \"string\",", + " },", + " translations: {", + " type: \"null\",", + " },", + " },", + " required: [", + " \"id\",", + " \"title\",", + " \"label\",", + " \"user_type\",", + " \"status\",", + " \"organization_id\",", + " \"visibility\",", + " \"tenant_code\",", + " \"translations\",", + " ],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " title: {", + " type: \"string\",", + " },", + " label: {", + " type: \"string\",", + " },", + " user_type: {", + " type: \"integer\",", + " },", + " status: {", + " type: \"string\",", + " },", + " organization_id: {", + " type: \"integer\",", + " },", + " visibility: {", + " type: \"string\",", + " },", + " tenant_code: {", + " type: \"string\",", + " },", + " translations: {", + " type: \"null\",", + " },", + " },", + " required: [", + " \"id\",", + " \"title\",", + " \"label\",", + " \"user_type\",", + " \"status\",", + " \"organization_id\",", + " \"visibility\",", + " \"tenant_code\",", + " \"translations\",", + " ],", + " },", + " ],", + " },", + " },", + " required: [", + " \"id\",", + " \"name\",", + " \"code\",", + " \"description\",", + " \"status\",", + " \"related_orgs\",", + " \"tenant_code\",", + " \"meta\",", + " \"created_by\",", + " \"updated_by\",", + " \"roles\",", + " ],", + " },", + " ],", + " },", + " identifier: {", + " type: \"string\",", + " },", + " },", + " required: [", + " \"id\",", + " \"email\",", + " \"email_verified\",", + " \"name\",", + " \"username\",", + " \"phone\",", + " \"phone_code\",", + " \"location\",", + " \"about\",", + " \"share_link\",", + " \"status\",", + " \"image\",", + " \"has_accepted_terms_and_conditions\",", + " \"languages\",", + " \"preferred_language\",", + " \"tenant_code\",", + " \"meta\",", + " \"created_at\",", + " \"updated_at\",", + " \"deleted_at\",", + " \"organizations\",", + " \"identifier\",", + " ],", + " },", + " },", + " required: [\"access_token\", \"refresh_token\", \"user\"],", + " },", + " meta: {", + " type: \"object\",", + " properties: {", + " formsVersion: {", + " type: \"array\",", + " items: [", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " {", + " type: \"object\",", + " properties: {", + " id: {", + " type: \"integer\",", + " },", + " type: {", + " type: \"string\",", + " },", + " version: {", + " type: \"integer\",", + " },", + " },", + " required: [\"id\", \"type\", \"version\"],", + " },", + " ],", + " },", + " correlation: {", + " type: \"string\",", + " },", + " },", + " required: [\"formsVersion\", \"correlation\"],", + " },", + " },", + " required: [\"responseCode\", \"message\", \"result\", \"meta\"],", + "};", + "", + "var response = pm.response.json();", + "pm.test(\"Schema is valid\", function () {", + " pm.expect(tv4.validate(response, responseSchema)).to.be.true;", + "});", + "pm.test(\"Response status is 200 OK\", function () {", + " pm.response.to.have.status(200);", + "});" ], "type": "text/javascript", "packages": {} @@ -58,13 +1839,13 @@ "header": [ { "key": "origin", - "value": "localhost", + "value": "{{origin}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"identifier\": \"nevilmathe_ftwpept_4stxhk\",\n \"password\": \"PASSword###11\"\n}", + "raw": "{\n //\"identifier\": \"{{emailAddress}}\",\n \"identifier\": \"nevil@tunerlabs.com\",\n \"password\": \"PASSword###11\"\n}", "options": { "raw": { "language": "json" @@ -77,7 +1858,254 @@ "path": ["v1", "account", "login"] } }, - "response": [] + "response": [ + { + "name": "Login with phone", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "origin", + "value": "{{origin}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"identifier\": \"1123454786\",\n \"phone_code\":\"+91\",\n \"password\": \"PASSword###11\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/login", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "login"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Server", + "value": "nginx/1.18.0 (Ubuntu)" + }, + { + "key": "Date", + "value": "Tue, 13 May 2025 20:13:37 GMT" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "4082" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-powered-by", + "value": "Express" + }, + { + "key": "access-control-allow-origin", + "value": "*" + }, + { + "key": "RateLimit-Policy", + "value": "500;w=60" + }, + { + "key": "RateLimit", + "value": "limit=500, remaining=499, reset=60" + }, + { + "key": "content-language", + "value": "en" + }, + { + "key": "x-request-ids", + "value": "6340ed53-0029-457f-b872-b5d240a31974" + }, + { + "key": "etag", + "value": "W/\"ff2-/Rka1S+3Om5CC5g2Apr8nhTsqf0\"" + } + ], + "cookie": [], + "body": "{\n \"responseCode\": \"OK\",\n \"message\": \"User logged in successfully.\",\n \"result\": {\n \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoyOCwibmFtZSI6IlVzZXIgUGhvbmUiLCJzZXNzaW9uX2lkIjozMjYsIm9yZ2FuaXphdGlvbl9pZHMiOlsiMTIiXSwib3JnYW5pemF0aW9uX2NvZGVzIjpbInNvdCJdLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm9yZ2FuaXphdGlvbnMiOlt7ImlkIjoxMiwibmFtZSI6IlNPVCIsImNvZGUiOiJzb3QiLCJkZXNjcmlwdGlvbiI6IlMgTyBUIiwic3RhdHVzIjoiQUNUSVZFIiwicmVsYXRlZF9vcmdzIjpudWxsLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm1ldGEiOm51bGwsImNyZWF0ZWRfYnkiOjEsInVwZGF0ZWRfYnkiOm51bGwsInJvbGVzIjpbeyJpZCI6MjMsInRpdGxlIjoibWVudGVlIiwibGFiZWwiOiJtZW50ZWUiLCJ1c2VyX3R5cGUiOjAsInN0YXR1cyI6IkFDVElWRSIsIm9yZ2FuaXphdGlvbl9pZCI6MTAsInZpc2liaWxpdHkiOiJQVUJMSUMiLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsInRyYW5zbGF0aW9ucyI6bnVsbH0seyJpZCI6NDEsInRpdGxlIjoibGVhcm5lciIsImxhYmVsIjoiTGVhcm5lciIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiQUNUSVZFIiwib3JnYW5pemF0aW9uX2lkIjoxMCwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwidHJhbnNsYXRpb25zIjpudWxsfV19XX0sImlhdCI6MTc0NzE2NzIxNywiZXhwIjoxNzQ3MjUzNjE3fQ.sbuypdcniz1mBK44GX2FRtjojqyGx0IkrM_69Y28vO0\",\n \"refresh_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoyOCwibmFtZSI6IlVzZXIgUGhvbmUiLCJzZXNzaW9uX2lkIjozMjYsIm9yZ2FuaXphdGlvbl9pZHMiOlsiMTIiXSwib3JnYW5pemF0aW9uX2NvZGVzIjpbInNvdCJdLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm9yZ2FuaXphdGlvbnMiOlt7ImlkIjoxMiwibmFtZSI6IlNPVCIsImNvZGUiOiJzb3QiLCJkZXNjcmlwdGlvbiI6IlMgTyBUIiwic3RhdHVzIjoiQUNUSVZFIiwicmVsYXRlZF9vcmdzIjpudWxsLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm1ldGEiOm51bGwsImNyZWF0ZWRfYnkiOjEsInVwZGF0ZWRfYnkiOm51bGwsInJvbGVzIjpbeyJpZCI6MjMsInRpdGxlIjoibWVudGVlIiwibGFiZWwiOiJtZW50ZWUiLCJ1c2VyX3R5cGUiOjAsInN0YXR1cyI6IkFDVElWRSIsIm9yZ2FuaXphdGlvbl9pZCI6MTAsInZpc2liaWxpdHkiOiJQVUJMSUMiLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsInRyYW5zbGF0aW9ucyI6bnVsbH0seyJpZCI6NDEsInRpdGxlIjoibGVhcm5lciIsImxhYmVsIjoiTGVhcm5lciIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiQUNUSVZFIiwib3JnYW5pemF0aW9uX2lkIjoxMCwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwidHJhbnNsYXRpb25zIjpudWxsfV19XX0sImlhdCI6MTc0NzE2NzIxNywiZXhwIjoxNzQ3NzcyMDE3fQ.dxzdstS5JdgJG897pzwHnYgvail05kjBmnoY7Fdjz4s\",\n \"user\": {\n \"id\": 28,\n \"email\": null,\n \"email_verified\": \"false\",\n \"name\": \"User Phone\",\n \"username\": \"userphone_x41gtkigdpreg-\",\n \"phone\": \"6e7718cb6079828bc2e2980f0016f9eb\",\n \"phone_code\": \"+91\",\n \"location\": null,\n \"about\": null,\n \"share_link\": null,\n \"status\": \"ACTIVE\",\n \"image\": null,\n \"has_accepted_terms_and_conditions\": false,\n \"languages\": null,\n \"preferred_language\": \"en\",\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_at\": \"2025-05-13T19:31:53.655Z\",\n \"updated_at\": \"2025-05-13T19:31:53.655Z\",\n \"deleted_at\": null,\n \"organizations\": [\n {\n \"id\": 12,\n \"name\": \"SOT\",\n \"code\": \"sot\",\n \"description\": \"S O T\",\n \"status\": \"ACTIVE\",\n \"related_orgs\": null,\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_by\": 1,\n \"updated_by\": null,\n \"roles\": [\n {\n \"id\": 23,\n \"title\": \"mentee\",\n \"label\": \"mentee\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": 10,\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\",\n \"translations\": null\n },\n {\n \"id\": 41,\n \"title\": \"learner\",\n \"label\": \"Learner\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": 10,\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\",\n \"translations\": null\n }\n ]\n }\n ],\n \"identifier\": \"1123454786\"\n }\n },\n \"meta\": {\n \"formsVersion\": [\n {\n \"id\": 2,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 3,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 4,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 5,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 1,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 6,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 7,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 8,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 9,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 10,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 11,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 12,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 13,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 14,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 15,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 16,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 17,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 18,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 19,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 20,\n \"type\": \"KR001\",\n \"version\": 0\n }\n ],\n \"correlation\": \"6340ed53-0029-457f-b872-b5d240a31974\"\n }\n}" + }, + { + "name": "Login With username", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "origin", + "value": "{{origin}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"identifier\": \"userphone_x41gtkigdpreg-\",\n \"password\": \"PASSword###11\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/login", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "login"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Server", + "value": "nginx/1.18.0 (Ubuntu)" + }, + { + "key": "Date", + "value": "Tue, 13 May 2025 20:14:26 GMT" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "4096" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-powered-by", + "value": "Express" + }, + { + "key": "access-control-allow-origin", + "value": "*" + }, + { + "key": "RateLimit-Policy", + "value": "500;w=60" + }, + { + "key": "RateLimit", + "value": "limit=500, remaining=496, reset=11" + }, + { + "key": "content-language", + "value": "en" + }, + { + "key": "x-request-ids", + "value": "f8886640-20e7-4676-bb87-13c5848c1ed8" + }, + { + "key": "etag", + "value": "W/\"1000-G5Vc5n867I+KtYgRcbwXNs5InJ4\"" + } + ], + "cookie": [], + "body": "{\n \"responseCode\": \"OK\",\n \"message\": \"User logged in successfully.\",\n \"result\": {\n \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoyOCwibmFtZSI6IlVzZXIgUGhvbmUiLCJzZXNzaW9uX2lkIjozMjgsIm9yZ2FuaXphdGlvbl9pZHMiOlsiMTIiXSwib3JnYW5pemF0aW9uX2NvZGVzIjpbInNvdCJdLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm9yZ2FuaXphdGlvbnMiOlt7ImlkIjoxMiwibmFtZSI6IlNPVCIsImNvZGUiOiJzb3QiLCJkZXNjcmlwdGlvbiI6IlMgTyBUIiwic3RhdHVzIjoiQUNUSVZFIiwicmVsYXRlZF9vcmdzIjpudWxsLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm1ldGEiOm51bGwsImNyZWF0ZWRfYnkiOjEsInVwZGF0ZWRfYnkiOm51bGwsInJvbGVzIjpbeyJpZCI6MjMsInRpdGxlIjoibWVudGVlIiwibGFiZWwiOiJtZW50ZWUiLCJ1c2VyX3R5cGUiOjAsInN0YXR1cyI6IkFDVElWRSIsIm9yZ2FuaXphdGlvbl9pZCI6MTAsInZpc2liaWxpdHkiOiJQVUJMSUMiLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsInRyYW5zbGF0aW9ucyI6bnVsbH0seyJpZCI6NDEsInRpdGxlIjoibGVhcm5lciIsImxhYmVsIjoiTGVhcm5lciIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiQUNUSVZFIiwib3JnYW5pemF0aW9uX2lkIjoxMCwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwidHJhbnNsYXRpb25zIjpudWxsfV19XX0sImlhdCI6MTc0NzE2NzI2NiwiZXhwIjoxNzQ3MjUzNjY2fQ.7wV5yAwdVYRiCssP3_lPPhIfOcC7yBDHHDGxgHAPVpo\",\n \"refresh_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoyOCwibmFtZSI6IlVzZXIgUGhvbmUiLCJzZXNzaW9uX2lkIjozMjgsIm9yZ2FuaXphdGlvbl9pZHMiOlsiMTIiXSwib3JnYW5pemF0aW9uX2NvZGVzIjpbInNvdCJdLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm9yZ2FuaXphdGlvbnMiOlt7ImlkIjoxMiwibmFtZSI6IlNPVCIsImNvZGUiOiJzb3QiLCJkZXNjcmlwdGlvbiI6IlMgTyBUIiwic3RhdHVzIjoiQUNUSVZFIiwicmVsYXRlZF9vcmdzIjpudWxsLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm1ldGEiOm51bGwsImNyZWF0ZWRfYnkiOjEsInVwZGF0ZWRfYnkiOm51bGwsInJvbGVzIjpbeyJpZCI6MjMsInRpdGxlIjoibWVudGVlIiwibGFiZWwiOiJtZW50ZWUiLCJ1c2VyX3R5cGUiOjAsInN0YXR1cyI6IkFDVElWRSIsIm9yZ2FuaXphdGlvbl9pZCI6MTAsInZpc2liaWxpdHkiOiJQVUJMSUMiLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsInRyYW5zbGF0aW9ucyI6bnVsbH0seyJpZCI6NDEsInRpdGxlIjoibGVhcm5lciIsImxhYmVsIjoiTGVhcm5lciIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiQUNUSVZFIiwib3JnYW5pemF0aW9uX2lkIjoxMCwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwidHJhbnNsYXRpb25zIjpudWxsfV19XX0sImlhdCI6MTc0NzE2NzI2NiwiZXhwIjoxNzQ3NzcyMDY2fQ.bh4BytkLV3xDOu56-DWHshpWJvmpErghDna889FX8Do\",\n \"user\": {\n \"id\": 28,\n \"email\": null,\n \"email_verified\": \"false\",\n \"name\": \"User Phone\",\n \"username\": \"userphone_x41gtkigdpreg-\",\n \"phone\": \"6e7718cb6079828bc2e2980f0016f9eb\",\n \"phone_code\": \"+91\",\n \"location\": null,\n \"about\": null,\n \"share_link\": null,\n \"status\": \"ACTIVE\",\n \"image\": null,\n \"has_accepted_terms_and_conditions\": false,\n \"languages\": null,\n \"preferred_language\": \"en\",\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_at\": \"2025-05-13T19:31:53.655Z\",\n \"updated_at\": \"2025-05-13T19:31:53.655Z\",\n \"deleted_at\": null,\n \"organizations\": [\n {\n \"id\": 12,\n \"name\": \"SOT\",\n \"code\": \"sot\",\n \"description\": \"S O T\",\n \"status\": \"ACTIVE\",\n \"related_orgs\": null,\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_by\": 1,\n \"updated_by\": null,\n \"roles\": [\n {\n \"id\": 23,\n \"title\": \"mentee\",\n \"label\": \"mentee\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": 10,\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\",\n \"translations\": null\n },\n {\n \"id\": 41,\n \"title\": \"learner\",\n \"label\": \"Learner\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": 10,\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\",\n \"translations\": null\n }\n ]\n }\n ],\n \"identifier\": \"userphone_x41gtkigdpreg-\"\n }\n },\n \"meta\": {\n \"formsVersion\": [\n {\n \"id\": 2,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 3,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 4,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 5,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 1,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 6,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 7,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 8,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 9,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 10,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 11,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 12,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 13,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 14,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 15,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 16,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 17,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 18,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 19,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 20,\n \"type\": \"KR001\",\n \"version\": 0\n }\n ],\n \"correlation\": \"f8886640-20e7-4676-bb87-13c5848c1ed8\"\n }\n}" + }, + { + "name": "Login With Email", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "origin", + "value": "{{origin}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"identifier\": \"user@shikshalokam.com\",\n \"password\": \"PASSword###11\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/login", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "login"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Server", + "value": "nginx/1.18.0 (Ubuntu)" + }, + { + "key": "Date", + "value": "Tue, 13 May 2025 20:15:16 GMT" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "4577" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "x-powered-by", + "value": "Express" + }, + { + "key": "access-control-allow-origin", + "value": "*" + }, + { + "key": "RateLimit-Policy", + "value": "500;w=60" + }, + { + "key": "RateLimit", + "value": "limit=500, remaining=499, reset=60" + }, + { + "key": "content-language", + "value": "en" + }, + { + "key": "x-request-ids", + "value": "3c0bd341-b4dd-4340-8d0f-340ace421091" + }, + { + "key": "etag", + "value": "W/\"11e1-iWrwHPStib5yka70onv6JbLHEog\"" + } + ], + "cookie": [], + "body": "{\n \"responseCode\": \"OK\",\n \"message\": \"User logged in successfully.\",\n \"result\": {\n \"access_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoxMiwibmFtZSI6IlVzZXIgQSBzaGlrc2hhbG9rYW0iLCJzZXNzaW9uX2lkIjozMjksIm9yZ2FuaXphdGlvbl9pZHMiOlsiMTEiXSwib3JnYW5pemF0aW9uX2NvZGVzIjpbInNsIl0sInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwib3JnYW5pemF0aW9ucyI6W3siaWQiOjExLCJuYW1lIjoiU2hpa3NoYWxva2FtIiwiY29kZSI6InNsIiwiZGVzY3JpcHRpb24iOiJTaGlrc2hhTG9rYW0gaXMgc3RyaXZpbmcgdG8gY3JlYXRlIGEgbmF0aW9uYWwgY29udmVyc2F0aW9uIGFib3V0IGVkdWNhdGlvbiBsZWFkZXJzaGlwIHRoZSB3aGF0IHdoeSBhbmQgaG93IG9mIGl0Iiwic3RhdHVzIjoiQUNUSVZFIiwicmVsYXRlZF9vcmdzIjpudWxsLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm1ldGEiOm51bGwsImNyZWF0ZWRfYnkiOjEsInVwZGF0ZWRfYnkiOm51bGwsInJvbGVzIjpbeyJpZCI6MjMsInRpdGxlIjoibWVudGVlIiwibGFiZWwiOiJtZW50ZWUiLCJ1c2VyX3R5cGUiOjAsInN0YXR1cyI6IkFDVElWRSIsIm9yZ2FuaXphdGlvbl9pZCI6MTAsInZpc2liaWxpdHkiOiJQVUJMSUMiLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsInRyYW5zbGF0aW9ucyI6bnVsbH0seyJpZCI6NDEsInRpdGxlIjoibGVhcm5lciIsImxhYmVsIjoiTGVhcm5lciIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiQUNUSVZFIiwib3JnYW5pemF0aW9uX2lkIjoxMCwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwidHJhbnNsYXRpb25zIjpudWxsfV19XX0sImlhdCI6MTc0NzE2NzMxNiwiZXhwIjoxNzQ3MjUzNzE2fQ.7aWoNcFTYI8JsVr-6aWOZXTAqnj5SpUtab73b8igCBA\",\n \"refresh_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjoxMiwibmFtZSI6IlVzZXIgQSBzaGlrc2hhbG9rYW0iLCJzZXNzaW9uX2lkIjozMjksIm9yZ2FuaXphdGlvbl9pZHMiOlsiMTEiXSwib3JnYW5pemF0aW9uX2NvZGVzIjpbInNsIl0sInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwib3JnYW5pemF0aW9ucyI6W3siaWQiOjExLCJuYW1lIjoiU2hpa3NoYWxva2FtIiwiY29kZSI6InNsIiwiZGVzY3JpcHRpb24iOiJTaGlrc2hhTG9rYW0gaXMgc3RyaXZpbmcgdG8gY3JlYXRlIGEgbmF0aW9uYWwgY29udmVyc2F0aW9uIGFib3V0IGVkdWNhdGlvbiBsZWFkZXJzaGlwIHRoZSB3aGF0IHdoeSBhbmQgaG93IG9mIGl0Iiwic3RhdHVzIjoiQUNUSVZFIiwicmVsYXRlZF9vcmdzIjpudWxsLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsIm1ldGEiOm51bGwsImNyZWF0ZWRfYnkiOjEsInVwZGF0ZWRfYnkiOm51bGwsInJvbGVzIjpbeyJpZCI6MjMsInRpdGxlIjoibWVudGVlIiwibGFiZWwiOiJtZW50ZWUiLCJ1c2VyX3R5cGUiOjAsInN0YXR1cyI6IkFDVElWRSIsIm9yZ2FuaXphdGlvbl9pZCI6MTAsInZpc2liaWxpdHkiOiJQVUJMSUMiLCJ0ZW5hbnRfY29kZSI6InNoaWtzaGFsb2thbSIsInRyYW5zbGF0aW9ucyI6bnVsbH0seyJpZCI6NDEsInRpdGxlIjoibGVhcm5lciIsImxhYmVsIjoiTGVhcm5lciIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiQUNUSVZFIiwib3JnYW5pemF0aW9uX2lkIjoxMCwidmlzaWJpbGl0eSI6IlBVQkxJQyIsInRlbmFudF9jb2RlIjoic2hpa3NoYWxva2FtIiwidHJhbnNsYXRpb25zIjpudWxsfV19XX0sImlhdCI6MTc0NzE2NzMxNiwiZXhwIjoxNzQ3NzcyMTE2fQ.Kl92B7kNf0YvYAiKJ7ZbKF0o_hFrHzxH1nGqbI-3L80\",\n \"user\": {\n \"id\": 12,\n \"email\": \"95c030f3897cb805da27d1b3f7c6e004c377e4ea658c9a2f494e45df7c2f6b67\",\n \"email_verified\": \"false\",\n \"name\": \"User A shikshalokam\",\n \"username\": \"userashiks_7zamif0hf_b9jg\",\n \"phone\": null,\n \"phone_code\": null,\n \"location\": null,\n \"about\": null,\n \"share_link\": null,\n \"status\": \"ACTIVE\",\n \"image\": null,\n \"has_accepted_terms_and_conditions\": false,\n \"languages\": null,\n \"preferred_language\": \"en\",\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_at\": \"2025-05-13T11:23:48.687Z\",\n \"updated_at\": \"2025-05-13T11:23:48.687Z\",\n \"deleted_at\": null,\n \"organizations\": [\n {\n \"id\": 11,\n \"name\": \"Shikshalokam\",\n \"code\": \"sl\",\n \"description\": \"ShikshaLokam is striving to create a national conversation about education leadership the what why and how of it\",\n \"status\": \"ACTIVE\",\n \"related_orgs\": null,\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_by\": 1,\n \"updated_by\": null,\n \"roles\": [\n {\n \"id\": 23,\n \"title\": \"mentee\",\n \"label\": \"mentee\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": 10,\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\",\n \"translations\": null\n },\n {\n \"id\": 41,\n \"title\": \"learner\",\n \"label\": \"Learner\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": 10,\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\",\n \"translations\": null\n }\n ]\n }\n ],\n \"identifier\": \"user@shikshalokam.com\"\n }\n },\n \"meta\": {\n \"formsVersion\": [\n {\n \"id\": 2,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 3,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 4,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 5,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 1,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 6,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 7,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 8,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 9,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 10,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 11,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 12,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 13,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 14,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 15,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 16,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 17,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 18,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 19,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 20,\n \"type\": \"KR001\",\n \"version\": 0\n }\n ],\n \"correlation\": \"3c0bd341-b4dd-4340-8d0f-340ace421091\"\n }\n}" + } + ] }, { "name": "Accept Terms & Condition", @@ -86,7 +2114,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -102,26 +2130,21 @@ "name": "Reset Password", "request": { "method": "POST", - "header": [], - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "key": "email", - "value": "ankit.s@pacewisdomss.com", - "type": "text" - }, - { - "key": "password", - "value": "test123", - "type": "text" - }, - { - "key": "otp", - "value": "336969", - "type": "text" + "header": [ + { + "key": "Origin", + "value": "{{origin}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"identifier\": \"8848355670\",\n \"phone_code\": \"+91\", //optional, required when identifier is a phone number\n \"password\": \"PASSword###111\",\n \"otp\": 774554\n}", + "options": { + "raw": { + "language": "json" } - ] + } }, "url": { "raw": "{{UserDevBaseUrl}}user/v1/account/resetPassword", @@ -138,19 +2161,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "urlencoded", "urlencoded": [ - { - "key": "", - "value": "", - "type": "text", - "disabled": true - }, { "key": "refresh_token", "value": "{{refresh_token}}", @@ -172,26 +2189,19 @@ "method": "POST", "header": [ { - "key": "X-auth-token", - "value": " {{token}}", - "type": "text", - "disabled": true + "key": "Origin", + "value": "{{origin}}", + "type": "text" } ], "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "key": "email", - "value": "ankit.s@pacewisdomss.com", - "type": "text" - }, - { - "key": "password", - "value": "\"\"", - "type": "text" + "mode": "raw", + "raw": "{\n \"identifier\": \"nevil@tunerlabs.com\",\n //\"phone_code\":\"+91\", //optional, required when identifier is a phone number\n \"password\": \"PASSword###111\"\n}", + "options": { + "raw": { + "language": "json" } - ] + } }, "url": { "raw": "{{UserDevBaseUrl}}user/v1/account/generateOtp", @@ -200,7 +2210,82 @@ }, "description": "To generate and regenerate otp" }, - "response": [] + "response": [ + { + "name": "Generate Otp", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Origin", + "value": "localhost", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"identifier\": \"123445678\",\n \"phone_code\":\"+91\",\n \"password\": \"PASSword###111\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/generateOtp", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "generateOtp"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "Content-Language", + "value": "en" + }, + { + "key": "X-Request-Ids", + "value": "d18c50ab-9d3c-4aa9-b9b1-373490e727ec" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "221" + }, + { + "key": "ETag", + "value": "W/\"dd-QWC6Spp+Nd2YvDBIj7hIgweMu0A\"" + }, + { + "key": "Date", + "value": "Tue, 13 May 2025 17:09:19 GMT" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "Keep-Alive", + "value": "timeout=5" + } + ], + "cookie": [], + "body": "{\n \"responseCode\": \"OK\",\n \"message\": \"OTP has been sent to your registered email ID. Please enter the number to update your password.\",\n \"result\": [],\n \"meta\": {\n \"formsVersion\": [],\n \"correlation\": \"d18c50ab-9d3c-4aa9-b9b1-373490e727ec\"\n }\n}" + } + ] }, { "name": "Logout Account", @@ -209,14 +2294,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" }, { "key": "Content-Type", "value": "application/json", - "type": "text", - "disabled": true + "type": "text" } ], "body": { @@ -244,30 +2328,35 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "url": { - "raw": "{{UserDevBaseUrl}}user/v1/account/list?type=mentor&page=1&limit=2&search=p", + "raw": "{{UserDevBaseUrl}}user/v1/account/list?type=mentor", "host": ["{{UserDevBaseUrl}}user"], "path": ["v1", "account", "list"], "query": [ { "key": "type", - "value": "mentor" + "value": "mentor", + "description": "Required" }, { "key": "page", - "value": "1" + "value": "1", + "disabled": true }, { "key": "limit", - "value": "2" + "value": "100", + "disabled": true }, { "key": "search", - "value": "p" + "value": "p", + "description": "Base64 URL encoded", + "disabled": true } ] } @@ -275,59 +2364,57 @@ "response": [] }, { - "name": "Registration Otp", + "name": "List User with Id", "request": { "method": "POST", "header": [ { "key": "X-auth-token", - "value": " {{token}}", - "type": "text", - "disabled": true + "value": "{{token}}", + "type": "text" } ], "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "key": "email", - "value": "nevil@tunerlabs.com", - "type": "text" - }, + "mode": "raw", + "raw": "{\n \"user_ids\": [\n 4,\n 5,\n 6\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/search?type=ALL&tenant_code=default", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "search"], + "query": [ { - "key": "password", - "value": "testing", - "type": "text" + "key": "type", + "value": "ALL" }, { - "key": "name", - "value": "Nevil", - "type": "text" + "key": "tenant_code", + "value": "default" } ] - }, - "url": { - "raw": "{{UserDevBaseUrl}}user/v1/account/registrationOtp", - "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "account", "registrationOtp"] } }, "response": [] }, { - "name": "List User with Id", + "name": "Change Password", "request": { "method": "POST", "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"userIds\" : [4,5,6]\n}", + "raw": "{\n \"oldPassword\": \"PASSword###111\",\n \"newPassword\": \"PASSword###11\"\n}", "options": { "raw": { "language": "json" @@ -335,58 +2422,98 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/account/list", + "raw": "{{UserDevBaseUrl}}user/v1/account/changePassword", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "account", "list"] + "path": ["v1", "account", "changePassword"] } }, "response": [] }, { - "name": "Change Password", + "name": "Delete account", "request": { - "method": "POST", + "method": "DELETE", "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "key": "oldPassword", - "value": "password", - "type": "text" - }, - { - "key": "newPassword", - "value": "Password@123", - "type": "text" + "mode": "raw", + "raw": "{\n \"password\": \"PASSword###11\"\n}", + "options": { + "raw": { + "language": "json" } - ] + } }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/account/changePassword", + "raw": "{{UserDevBaseUrl}}user/v1/account/delete", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "delete"] + } + }, + "response": [] + }, + { + "name": "User sessions", + "request": { + "method": "POST", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", + "type": "text" + } + ], + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/sessions?status=ACTIVE&period=1h", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "account", "changePassword"], + "path": ["v1", "account", "sessions"], "query": [ { - "key": "oldPassword", - "value": "password", - "disabled": true + "key": "status", + "value": "ACTIVE" }, { - "key": "newPassword", - "value": "Password@123", - "disabled": true + "key": "period", + "value": "1h", + "description": "Filters results to only those whose started_at occurred within the given duration (e.g., 30m, 1h, 2d)." } ] } }, "response": [] + }, + { + "name": "Validate User session", + "request": { + "method": "POST", + "header": [ + { + "key": "internal_access_token", + "value": "{{internal_access_token}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"token\": \"bearer {{token}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/account/validateUserSession", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "account", "validateUserSession"] + } + }, + "response": [] } ] }, @@ -395,22 +2522,125 @@ "item": [ { "name": "Read User", - "protocolProfileBehavior": { - "disableBodyPruning": true - }, "request": { "method": "GET", "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" + } + ], + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/user/read", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "user", "read"], + "query": [ + { + "key": "language", + "value": "kn", + "disabled": true + } + ] + } + }, + "response": [ + { + "name": "Read User", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", + "type": "text" + }, + { + "key": "internal_access_token", + "value": "{{internal_access_token}}", + "type": "text", + "disabled": true + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/user/read", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "user", "read"], + "query": [ + { + "key": "language", + "value": "kn", + "disabled": true + } + ] + } }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Server", + "value": "nginx/1.18.0 (Ubuntu)" + }, + { + "key": "Date", + "value": "Tue, 13 May 2025 20:19:11 GMT" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "2657" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "RateLimit-Policy", + "value": "50;w=60" + }, + { + "key": "RateLimit", + "value": "limit=50, remaining=46, reset=7" + }, + { + "key": "ETag", + "value": "W/\"a61-hZxcWpBTuLIcgh9jPjyqUaSRS4s\"" + } + ], + "cookie": [], + "body": "{\n \"responseCode\": \"OK\",\n \"message\": \"Profile fetched successfully.\",\n \"result\": {\n \"id\": \"12\",\n \"email\": \"user@shikshalokam.com\",\n \"email_verified\": \"false\",\n \"name\": \"User A shikshalokam\",\n \"username\": \"userashiks_7zamif0hf_b9jg\",\n \"phone\": null,\n \"phone_code\": null,\n \"location\": null,\n \"about\": null,\n \"share_link\": null,\n \"status\": \"ACTIVE\",\n \"image\": null,\n \"has_accepted_terms_and_conditions\": false,\n \"languages\": null,\n \"preferred_language\": \"en\",\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_at\": \"2025-05-13T11:23:48.687Z\",\n \"updated_at\": \"2025-05-13T11:23:48.687Z\",\n \"deleted_at\": null,\n \"organizations\": [\n {\n \"id\": \"11\",\n \"name\": \"Shikshalokam\",\n \"code\": \"sl\",\n \"description\": \"ShikshaLokam is striving to create a national conversation about education leadership the what why and how of it\",\n \"status\": \"ACTIVE\",\n \"related_orgs\": null,\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_by\": 1,\n \"updated_by\": null,\n \"roles\": [\n {\n \"id\": \"23\",\n \"title\": \"mentee\",\n \"label\": \"mentee\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": \"10\",\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\"\n },\n {\n \"id\": \"41\",\n \"title\": \"learner\",\n \"label\": \"Learner\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": \"10\",\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\"\n }\n ]\n }\n ],\n \"permissions\": [\n {\n \"module\": \"user\",\n \"request_type\": [\n \"POST\",\n \"DELETE\",\n \"GET\",\n \"PUT\",\n \"PATCH\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"form\",\n \"request_type\": [\n \"POST\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"cloud-services\",\n \"request_type\": [\n \"POST\",\n \"DELETE\",\n \"GET\",\n \"PUT\",\n \"PATCH\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"organization\",\n \"request_type\": [\n \"POST\",\n \"GET\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"entity-type\",\n \"request_type\": [\n \"POST\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"entity\",\n \"request_type\": [\n \"GET\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"account\",\n \"request_type\": [\n \"GET\",\n \"POST\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"user-role\",\n \"request_type\": [\n \"GET\"\n ],\n \"service\": \"user\"\n }\n ],\n \"image_cloud_path\": null\n },\n \"meta\": {\n \"formsVersion\": [\n {\n \"id\": 2,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 3,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 4,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 5,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 1,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 6,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 7,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 8,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 9,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 10,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 11,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 12,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 13,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 14,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 15,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 16,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 17,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 18,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 19,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 20,\n \"type\": \"KR001\",\n \"version\": 0\n }\n ],\n \"correlation\": \"d90ad4db-8a17-4bab-9a9f-491856a67657\"\n }\n}" + } + ] + }, + { + "name": "Get user by ID", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ { "key": "internal_access_token", "value": "{{internal_access_token}}", - "type": "text", - "disabled": true + "type": "text" } ], "body": { @@ -418,19 +2648,127 @@ "raw": "" }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/user/read/1", + "raw": "{{UserDevBaseUrl}}user/v1/user/profileById/:id?tenant_code=default", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "user", "read", "1"], + "path": ["v1", "user", "profileById", ":id"], "query": [ { - "key": "language", - "value": "kn", - "disabled": true + "key": "username", + "value": "nevilmathe_ftwpept_4stxhk", + "disabled": true + }, + { + "key": "email", + "value": "nevil@tunerlabs.com", + "disabled": true + }, + { + "key": "phone", + "value": "8848355670", + "disabled": true + }, + { + "key": "phone_code", + "value": "%2B91", + "disabled": true + }, + { + "key": "tenant_code", + "value": "default" + } + ], + "variable": [ + { + "key": "id", + "value": "1" + } + ] + } + }, + "response": [ + { + "name": "Read User", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", + "type": "text" + }, + { + "key": "internal_access_token", + "value": "{{internal_access_token}}", + "type": "text", + "disabled": true + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/user/read", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "user", "read"], + "query": [ + { + "key": "language", + "value": "kn", + "disabled": true + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Server", + "value": "nginx/1.18.0 (Ubuntu)" + }, + { + "key": "Date", + "value": "Tue, 13 May 2025 20:19:11 GMT" + }, + { + "key": "Content-Type", + "value": "application/json; charset=utf-8" + }, + { + "key": "Content-Length", + "value": "2657" + }, + { + "key": "Connection", + "value": "keep-alive" + }, + { + "key": "X-Powered-By", + "value": "Express" + }, + { + "key": "Access-Control-Allow-Origin", + "value": "*" + }, + { + "key": "RateLimit-Policy", + "value": "50;w=60" + }, + { + "key": "RateLimit", + "value": "limit=50, remaining=46, reset=7" + }, + { + "key": "ETag", + "value": "W/\"a61-hZxcWpBTuLIcgh9jPjyqUaSRS4s\"" } - ] + ], + "cookie": [], + "body": "{\n \"responseCode\": \"OK\",\n \"message\": \"Profile fetched successfully.\",\n \"result\": {\n \"id\": \"12\",\n \"email\": \"user@shikshalokam.com\",\n \"email_verified\": \"false\",\n \"name\": \"User A shikshalokam\",\n \"username\": \"userashiks_7zamif0hf_b9jg\",\n \"phone\": null,\n \"phone_code\": null,\n \"location\": null,\n \"about\": null,\n \"share_link\": null,\n \"status\": \"ACTIVE\",\n \"image\": null,\n \"has_accepted_terms_and_conditions\": false,\n \"languages\": null,\n \"preferred_language\": \"en\",\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_at\": \"2025-05-13T11:23:48.687Z\",\n \"updated_at\": \"2025-05-13T11:23:48.687Z\",\n \"deleted_at\": null,\n \"organizations\": [\n {\n \"id\": \"11\",\n \"name\": \"Shikshalokam\",\n \"code\": \"sl\",\n \"description\": \"ShikshaLokam is striving to create a national conversation about education leadership the what why and how of it\",\n \"status\": \"ACTIVE\",\n \"related_orgs\": null,\n \"tenant_code\": \"shikshalokam\",\n \"meta\": null,\n \"created_by\": 1,\n \"updated_by\": null,\n \"roles\": [\n {\n \"id\": \"23\",\n \"title\": \"mentee\",\n \"label\": \"mentee\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": \"10\",\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\"\n },\n {\n \"id\": \"41\",\n \"title\": \"learner\",\n \"label\": \"Learner\",\n \"user_type\": 0,\n \"status\": \"ACTIVE\",\n \"organization_id\": \"10\",\n \"visibility\": \"PUBLIC\",\n \"tenant_code\": \"shikshalokam\"\n }\n ]\n }\n ],\n \"permissions\": [\n {\n \"module\": \"user\",\n \"request_type\": [\n \"POST\",\n \"DELETE\",\n \"GET\",\n \"PUT\",\n \"PATCH\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"form\",\n \"request_type\": [\n \"POST\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"cloud-services\",\n \"request_type\": [\n \"POST\",\n \"DELETE\",\n \"GET\",\n \"PUT\",\n \"PATCH\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"organization\",\n \"request_type\": [\n \"POST\",\n \"GET\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"entity-type\",\n \"request_type\": [\n \"POST\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"entity\",\n \"request_type\": [\n \"GET\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"account\",\n \"request_type\": [\n \"GET\",\n \"POST\"\n ],\n \"service\": \"user\"\n },\n {\n \"module\": \"user-role\",\n \"request_type\": [\n \"GET\"\n ],\n \"service\": \"user\"\n }\n ],\n \"image_cloud_path\": null\n },\n \"meta\": {\n \"formsVersion\": [\n {\n \"id\": 2,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 3,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 4,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 5,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 1,\n \"type\": \"profileTest\",\n \"version\": 0\n },\n {\n \"id\": 6,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 7,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 8,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 9,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 10,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 11,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 12,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 13,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 14,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 15,\n \"type\": \"KR001\",\n \"version\": 0\n },\n {\n \"id\": 16,\n \"type\": \"homelist\",\n \"version\": 0\n },\n {\n \"id\": 17,\n \"type\": \"projectHome\",\n \"version\": 0\n },\n {\n \"id\": 18,\n \"type\": \"surveyHome\",\n \"version\": 0\n },\n {\n \"id\": 19,\n \"type\": \"form\",\n \"version\": 0\n },\n {\n \"id\": 20,\n \"type\": \"KR001\",\n \"version\": 0\n }\n ],\n \"correlation\": \"d90ad4db-8a17-4bab-9a9f-491856a67657\"\n }\n}" } - }, - "response": [] + ] }, { "name": "Update User", @@ -439,13 +2777,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"name\": \"Nevil\",\n \"location\": [\n \"ap\"\n ],\n \"about\": \"This is teswt\",\n \"has_accepted_terms_and_conditions\": true,\n \"image\": \"https://cloudstorage.com/container/abc.png\",\n \"languages\": [\n \"en_in\",\n \"en_in\"\n ]\n}", + "raw": "{\n \"name\": \"NEVIL\",\n \"location\": \"ap\",\n \"about\": \"This is teswt\",\n \"has_accepted_terms_and_conditions\": true,\n \"image\": \"https://cloudstorage.com/container/abc.png\",\n \"state\": \"67037c725fb1cfaa2c13839e\",\n \"roles\": [\n 8\n ],\n \"district\": \"67f4e1933bad83b75d4958e3\",\n \"block\": \"67f4e2197bd713b75309c8b1\",\n \"cluster\": \"67f4e25a3bad83b75d4958e7\",\n \"school\": \"67f4e2fa3bad83b75d4958ef\",\n \"professional_role\": \"67f4e2fa3bad83b75d4958ef\",\n \"professional_subroles\": [\n \"67f4e2fa3bad83b75d4958ef\"\n ]\n}", "options": { "raw": { "language": "json" @@ -470,7 +2808,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -493,7 +2831,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -529,7 +2867,30 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/user-role/list", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "user-role", "list"] + } + }, + "response": [] + }, + { + "name": "Create", + "request": { + "method": "POST", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", "type": "text" }, { @@ -541,12 +2902,70 @@ ], "body": { "mode": "raw", - "raw": "" + "raw": "{\n \"title\": \"role\",\n \"user_type\": 0,\n \"visibility\": \"PUBLIC\",\n \"label\": \"Session Manager\",\n \"status\": \"ACTIVE\"\n}", + "options": { + "raw": { + "language": "json" + } + } }, "url": { - "raw": "{{interfaceBaseUrl}}elevate-user/v1/user-role/list", - "host": ["{{interfaceBaseUrl}}elevate-user"], - "path": ["v1", "user-role", "list"] + "raw": "{{UserDevBaseUrl}}user/v1/user-role/create", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "user-role", "create"] + } + }, + "response": [] + }, + { + "name": "Update", + "request": { + "method": "POST", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", + "type": "text" + }, + { + "key": "internal_access_token", + "value": "{{internal_access_token}}", + "type": "text", + "disabled": true + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"title\": \"mentee\",\n \"user_type\": 0,\n \"visibility\": \"PUBLIC\",\n \"label\": \"MENTEE\",\n \"status\": \"ACTIVE\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/user-role/update/5", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "user-role", "update", "5"] + } + }, + "response": [] + }, + { + "name": "Delete", + "request": { + "method": "DELETE", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", + "type": "text" + } + ], + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/user-role/delete/177", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "user-role", "delete", "177"] } }, "response": [] @@ -563,7 +2982,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "bearer {{token}}", "type": "text" } ], @@ -591,7 +3010,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -605,9 +3024,9 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/form/read/1", + "raw": "{{UserDevBaseUrl}}user/v1/form/read", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "form", "read", "1"] + "path": ["v1", "form", "read"] } }, "response": [] @@ -619,13 +3038,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"type\": \"profile\",\n \"sub_type\": \"profileForm\",\n \"data\": {\n \"template_name\": \"defaultTemplate\",\n \"fields\": {\n \"controls\": [\n {\n \"name\": \"name\",\n \"label\": \"Your name\",\n \"value\": \"mentor\",\n \"class\": \"ion-no-margin\",\n \"type\": \"text\",\n \"position\": \"floating\",\n \"placeHolder\": \"Please enter your full name\",\n \"errorMessage\": \"This field can only contain alphabets\",\n \"showValidationError\": true,\n \"validators\": {\n \"required\": true,\n \"pattern\": \"^[^0-9!@#%$&()\\\\-`.+,/\\\"]*$\"\n },\n \"options\": []\n },\n {\n \"name\": \"location\",\n \"label\": \"Select your location\",\n \"value\": [\n {\n \"value\": \"AP\",\n \"label\": \"Andhra Pradesh\"\n }\n ],\n \"class\": \"ion-no-margin\",\n \"type\": \"select\",\n \"position\": \"floating\",\n \"errorLabel\": \"Location\",\n \"errorMessage\": \"Please select your location\",\n \"validators\": {\n \"required\": true\n },\n \"options\": [\n {\n \"value\": \"AP\",\n \"label\": \"Andhra Pradesh\"\n },\n {\n \"value\": \"AR\",\n \"label\": \"Arunachal Pradesh\"\n },\n {\n \"value\": \"As\",\n \"label\": \"Assam\"\n },\n {\n \"value\": \"BR\",\n \"label\": \"Bihar\"\n },\n {\n \"value\": \"CG\",\n \"label\": \"Chhattisgarh\"\n },\n {\n \"value\": \"GA\",\n \"label\": \"Goa\"\n },\n {\n \"value\": \"GJ\",\n \"label\": \"Gujarat\"\n },\n {\n \"value\": \"HR\",\n \"label\": \"Haryana\"\n },\n {\n \"value\": \"HP\",\n \"label\": \"Himachal Pradesh\"\n },\n {\n \"value\": \"JH\",\n \"label\": \"Jharkhand\"\n },\n {\n \"value\": \"KN\",\n \"label\": \"Karnataka\"\n },\n {\n \"value\": \"KL\",\n \"label\": \"Kerala\"\n },\n {\n \"value\": \"MP\",\n \"label\": \"Madhya Pradesh\"\n },\n {\n \"value\": \"MH\",\n \"label\": \"Maharashtra\"\n },\n {\n \"value\": \"MN\",\n \"label\": \"Manipur\"\n },\n {\n \"value\": \"ML\",\n \"label\": \"Meghalaya\"\n },\n {\n \"value\": \"MZ\",\n \"label\": \"Mizoram\"\n },\n {\n \"value\": \"NL\",\n \"label\": \"Nagaland\"\n },\n {\n \"value\": \"OD\",\n \"label\": \"Odisha\"\n },\n {\n \"value\": \"PB\",\n \"label\": \"Punjab\"\n },\n {\n \"value\": \"RJ\",\n \"label\": \"Rajasthan\"\n },\n {\n \"value\": \"SK\",\n \"label\": \"Sikkim\"\n },\n {\n \"value\": \"TN\",\n \"label\": \"Tamil Nadu\"\n },\n {\n \"value\": \"TS\",\n \"label\": \"Telangana\"\n },\n {\n \"value\": \"TR\",\n \"label\": \"Tripura\"\n },\n {\n \"value\": \"UP\",\n \"label\": \"Uttar Pradesh\"\n },\n {\n \"value\": \"UK\",\n \"label\": \"Uttarakhand\"\n },\n {\n \"value\": \"WB\",\n \"label\": \"West Bengal\"\n }\n ]\n },\n {\n \"name\": \"designation\",\n \"label\": \"Your role\",\n \"class\": \"ion-no-margin\",\n \"value\": [\n {\n \"value\": \"teacher\",\n \"label\": \"Teacher\"\n },\n {\n \"value\": \"HM\",\n \"label\": \"Head master\"\n }\n ],\n \"type\": \"chip\",\n \"position\": \"\",\n \"disabled\": false,\n \"showSelectAll\": true,\n \"errorLabel\": \"Designation\",\n \"errorMessage\": \"Enter your role\",\n \"addNewPopupHeader\": \"Add a new role\",\n \"validators\": {\n \"required\": true\n },\n \"showAddOption\": true,\n \"options\": [\n {\n \"value\": \"teacher\",\n \"label\": \"Teacher\"\n },\n {\n \"value\": \"HM\",\n \"label\": \"Head master\"\n },\n {\n \"value\": \"BEO\",\n \"label\": \"Block education officer\"\n },\n {\n \"value\": \"DEO\",\n \"label\": \"District education officer\"\n }\n ]\n },\n {\n \"name\": \"experience\",\n \"label\": \"Your experience in years\",\n \"value\": \"10\",\n \"class\": \"ion-no-margin\",\n \"type\": \"text\",\n \"position\": \"floating\",\n \"placeHolder\": \"Ex. 5 years\",\n \"errorMessage\": \"Enter your experience in years\",\n \"isNumberOnly\": true,\n \"validators\": {\n \"required\": true,\n \"maxLength\": 2\n },\n \"options\": []\n },\n {\n \"name\": \"about\",\n \"label\": \"Tell us about yourself\",\n \"value\": \"mentor\",\n \"class\": \"ion-no-margin\",\n \"type\": \"textarea\",\n \"position\": \"floating\",\n \"errorMessage\": \"This field cannot be empty\",\n \"placeHolder\": \"Please use only 150 character\",\n \"validators\": {\n \"required\": true,\n \"maxLength\": 150\n },\n \"options\": []\n },\n {\n \"name\": \"areasOfExpertise\",\n \"label\": \"Your expertise\",\n \"class\": \"ion-no-margin\",\n \"value\": [\n {\n \"value\": \"eduLdship\",\n \"label\": \"Educational leadership\"\n }\n ],\n \"type\": \"chip\",\n \"position\": \"\",\n \"disabled\": false,\n \"showSelectAll\": true,\n \"errorLabel\": \"Expertise\",\n \"errorMessage\": \"Enter your expertise\",\n \"addNewPopupHeader\": \"Add your expertise\",\n \"validators\": {\n \"required\": true\n },\n \"showAddOption\": true,\n \"options\": [\n {\n \"value\": \"eduLdship\",\n \"label\": \"Educational leadership\"\n },\n {\n \"value\": \"schoolProcess\",\n \"label\": \"School process\"\n }\n ]\n },\n {\n \"name\": \"educationQualification\",\n \"label\": \"Education qualification\",\n \"value\": \"mentor\",\n \"class\": \"ion-no-margin\",\n \"type\": \"text\",\n \"position\": \"floating\",\n \"errorLabel\": \"Education qualification\",\n \"errorMessage\": \"Enter education qualification\",\n \"placeHolder\": \"Ex. BA, B.ED\",\n \"validators\": {\n \"required\": true\n },\n \"options\": []\n },\n {\n \"name\": \"languages\",\n \"label\": \"Languages\",\n \"class\": \"ion-no-margin\",\n \"value\": [\n {\n \"value\": \"english\",\n \"label\": \"English\"\n }\n ],\n \"type\": \"chip\",\n \"position\": \"\",\n \"disabled\": false,\n \"showSelectAll\": true,\n \"errorLabel\": \"Medium\",\n \"errorMessage\": \"Enter language\",\n \"addNewPopupHeader\": \"Add new language\",\n \"validators\": {\n \"required\": true\n },\n \"showAddOption\": true,\n \"options\": [\n {\n \"value\": \"english\",\n \"label\": \"English\"\n },\n {\n \"value\": \"hindi\",\n \"label\": \"Hindi\"\n }\n ]\n }\n ]\n }\n }\n}", + "raw": "{\n \"type\": \"user\",\n \"sub_type\": \"registration\",\n \"data\": {\n \"template_name\": \"defaultTemplate\",\n \"fields\": {\n \"result\": [\n {\n \"hint\": null,\n \"name\": \"firstName\",\n \"type\": \"text\",\n \"label\": \"First Name\",\n \"order\": \"1\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"^(?=.*[a-zA-Z])[a-zA-Z ]+$\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"maxLength\": null,\n \"minLength\": null,\n \"isEditable\": true,\n \"isPIIField\": null,\n \"isRequired\": true,\n \"validation\": [\n \"string\"\n ],\n \"placeholder\": \"ENTER_FIRST_NAME\",\n \"isMultiSelect\": false,\n \"maxSelections\": 0,\n \"sourceDetails\": {}\n },\n {\n \"hint\": null,\n \"name\": \"lastName\",\n \"type\": \"text\",\n \"label\": \"Last Name\",\n \"order\": \"3\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"^(?=.*[a-zA-Z])[a-zA-Z ]+$\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"maxLength\": null,\n \"minLength\": null,\n \"isEditable\": true,\n \"isPIIField\": null,\n \"isRequired\": false,\n \"validation\": [\n \"string\"\n ],\n \"placeholder\": \"ENTER_LAST_NAME\",\n \"isMultiSelect\": false,\n \"maxSelections\": 0,\n \"sourceDetails\": {}\n },\n {\n \"hint\": null,\n \"name\": \"Username\",\n \"type\": \"text\",\n \"label\": \"Username\",\n \"order\": \"3\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"maxLength\": null,\n \"minLength\": null,\n \"isEditable\": true,\n \"isPIIField\": null,\n \"isRequired\": true,\n \"validation\": [\n \"string\"\n ],\n \"placeholder\": \"ENTER_USERNAME\",\n \"isMultiSelect\": false,\n \"maxSelections\": 0,\n \"sourceDetails\": {}\n },\n {\n \"hint\": null,\n \"name\": \"email\",\n \"type\": \"email\",\n \"label\": \"Email\",\n \"order\": \"4\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": null,\n \"coreField\": 1,\n \"dependsOn\": null,\n \"maxLength\": null,\n \"minLength\": null,\n \"isEditable\": true,\n \"isPIIField\": null,\n \"isRequired\": false,\n \"validation\": [\n \"string\"\n ],\n \"placeholder\": \"ENTER_EMAIL\",\n \"isMultiSelect\": false,\n \"maxSelections\": 0,\n \"sourceDetails\": {}\n },\n {\n \"hint\": null,\n \"name\": \"mobile\",\n \"type\": \"text\",\n \"label\": \"Contact Number\",\n \"order\": \"5\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"^[0-9]{10}$\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": false,\n \"validation\": [\n \"mobile\"\n ],\n \"placeholder\": \"ENTER_CONTACT_NUMBER\",\n \"isMultiSelect\": false,\n \"maxSelections\": 0,\n \"sourceDetails\": {}\n },\n {\n \"hint\": null,\n \"name\": \"password\",\n \"type\": \"text\",\n \"label\": \"Password\",\n \"order\": \"6\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": true,\n \"validation\": [\n \"password\"\n ],\n \"placeholder\": \"ENTER_PASSWORD\",\n \"isMultiSelect\": false,\n \"maxSelections\": 0,\n \"sourceDetails\": {}\n },\n {\n \"hint\": null,\n \"name\": \"confirm_password\",\n \"type\": \"text\",\n \"label\": \"Confirm Password\",\n \"order\": \"6\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": true,\n \"validation\": [\n \"password\"\n ],\n \"placeholder\": \"ENTER_CONFIRM_PASSWORD\",\n \"isMultiSelect\": false,\n \"maxSelections\": 0,\n \"sourceDetails\": {}\n },\n {\n \"hint\": null,\n \"name\": \"Role\",\n \"type\": \"drop_down\",\n \"label\": \"Role\",\n \"order\": \"7\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": true,\n \"validation\": {\n \"isEditable\": true,\n \"isRequired\": true,\n \"isMultiSelect\": true,\n \"maxSelections\": 1\n }\n },\n {\n \"hint\": null,\n \"name\": \"Sub-Role\",\n \"type\": \"drop_down\",\n \"label\": \"Sub-Role\",\n \"order\": \"8\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": true,\n \"validation\": {\n \"isEditable\": true,\n \"isRequired\": false,\n \"isMultiSelect\": true,\n \"maxSelections\": 10\n }\n },\n {\n \"hint\": null,\n \"name\": \"Udise\",\n \"type\": \"text\",\n \"label\": \"Udise\",\n \"order\": \"9\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": true,\n \"validation\": {\n \"isEditable\": true,\n \"isRequired\": true,\n \"isMultiSelect\": false\n }\n },\n {\n \"hint\": null,\n \"name\": \"State\",\n \"type\": \"text\",\n \"label\": \"State\",\n \"order\": \"10\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": true,\n \"validation\": {\n \"isEditable\": true,\n \"isRequired\": true,\n \"isMultiSelect\": false\n }\n },\n {\n \"hint\": null,\n \"name\": \"District\",\n \"type\": \"text\",\n \"label\": \"District\",\n \"order\": \"11\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": true,\n \"validation\": {\n \"isEditable\": true,\n \"isRequired\": true,\n \"isMultiSelect\": false\n }\n },\n {\n \"hint\": null,\n \"name\": \"Block\",\n \"type\": \"text\",\n \"label\": \"Block\",\n \"order\": \"12\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": true,\n \"validation\": {\n \"isEditable\": true,\n \"isRequired\": true,\n \"isMultiSelect\": false\n }\n },\n {\n \"hint\": null,\n \"name\": \"Cluster\",\n \"type\": \"text\",\n \"label\": \"Cluster\",\n \"order\": \"13\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": true,\n \"validation\": {\n \"isEditable\": true,\n \"isRequired\": true,\n \"isMultiSelect\": false\n }\n },\n {\n \"hint\": null,\n \"name\": \"School\",\n \"type\": \"text\",\n \"label\": \"School\",\n \"order\": \"14\",\n \"fieldId\": null,\n \"options\": [],\n \"pattern\": \"\",\n \"coreField\": 1,\n \"dependsOn\": null,\n \"isEditable\": true,\n \"isPIIField\": true,\n \"isRequired\": true,\n \"validation\": {\n \"isEditable\": true,\n \"isRequired\": true,\n \"isMultiSelect\": false\n }\n }\n ],\n \"meta\": {\n \"registration_code\": {\n \"name\": \"District\",\n \"value_ref\": \"external_id\"\n }\n },\n \"context\": \"USERS\",\n \"contextType\": \"LEARNER\"\n }\n }\n\t}", "options": { "raw": { "language": "json" @@ -652,7 +3071,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" }, { @@ -663,13 +3082,13 @@ } ], "url": { - "raw": "{{UserDevBaseUrl}}user/v1/cloud-services/file/getSignedUrl?fileName=laptop1.jpg", + "raw": "{{UserDevBaseUrl}}user/v1/cloud-services/file/getSignedUrl?fileName=27-oct-bulkupload.csv", "host": ["{{UserDevBaseUrl}}user"], "path": ["v1", "cloud-services", "file", "getSignedUrl"], "query": [ { "key": "fileName", - "value": "laptop1.jpg" + "value": "27-oct-bulkupload.csv" } ] } @@ -683,7 +3102,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" }, { @@ -694,13 +3113,13 @@ } ], "url": { - "raw": "{{UserDevBaseUrl}}user/v1/cloud-services/file/getDownloadableUrl?filePath=users/2-1695710833829-user_creation.csv", + "raw": "{{UserDevBaseUrl}}user/v1/cloud-services/file/getDownloadableUrl?filePath=users/59-1747832592343-samplecsvlocal.csv", "host": ["{{UserDevBaseUrl}}user"], "path": ["v1", "cloud-services", "file", "getDownloadableUrl"], "query": [ { "key": "filePath", - "value": "users/2-1695710833829-user_creation.csv" + "value": "users/59-1747832592343-samplecsvlocal.csv" } ] } @@ -714,7 +3133,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" }, { @@ -744,14 +3163,14 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "url": { - "raw": "{{UserDevBaseUrl}}user/v1/admin/deleteUser/1", + "raw": "{{UserDevBaseUrl}}user/v1/admin/deleteUser/40", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "admin", "deleteUser", "1"] + "path": ["v1", "admin", "deleteUser", "40"] } }, "response": [] @@ -769,7 +3188,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"name\": \"system\",\n \"email\": \"system@admin.com\",\n \"password\": \"testing\",\n \"secret_code\": \"W5bF7gesuS0xsNWmpsKy\"\n}", + "raw": "{\n \"name\": \"system\",\n \"email\": \"system@admin.com\",\n \"password\": \"PASSword###11\",\n \"secret_code\": \"W5bF7gesuS0xsNWmpsKy\"\n}", "options": { "raw": { "language": "json" @@ -795,16 +3214,23 @@ "var jsonBody = JSON.parse(responseBody);", "pm.environment.set(\"token\", jsonBody.result.access_token);" ], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], "request": { "method": "POST", - "header": [], + "header": [ + { + "key": "Origin", + "value": "default-qa.tekdinext.com", + "type": "text" + } + ], "body": { "mode": "raw", - "raw": "{\n \"email\":\"system@admin.com\",\n \"password\":\"testing\"\n}", + "raw": "{\n \"identifier\": \"nevil@tunerlabs.com\",\n \"password\": \"PASSword###11\"\n}", "options": { "raw": { "language": "json" @@ -826,13 +3252,18 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", + "type": "text" + }, + { + "key": "tenant-id", + "value": "shikshalokam", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"email\": \"suman@cc.com\",\n \"organization_id\": 1\n}", + "raw": "{\n \"identifier\": \"bracadmin2025@yopmail.com\", //or \"user_id\": \"3\",\n \"organization_id\":58\n}", "options": { "raw": { "language": "json" @@ -848,13 +3279,18 @@ "response": [] }, { - "name": "Deactivate Org", + "name": "Deactivate Organisation", "request": { "method": "POST", "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", + "type": "text" + }, + { + "key": "tenant-id", + "value": "shikshalokam", "type": "text" } ], @@ -868,9 +3304,9 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/admin/deactivateOrg/2", + "raw": "{{UserDevBaseUrl}}user/v1/admin/deactivateOrg/gxs", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "admin", "deactivateOrg", "2"], + "path": ["v1", "admin", "deactivateOrg", "gxs"], "query": [ { "key": "status", @@ -881,6 +3317,96 @@ } }, "response": [] + }, + { + "name": "Raw query", + "request": { + "method": "POST", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", + "type": "text" + }, + { + "key": "tenant-id", + "value": "shikshalokam", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"query\": \"SELECT * FROM users u INNER JOIN user_organization_roles ur ON u.id = ur.user_id AND u.tenant_code = ur.tenant_code WHERE u.id > 1 AND u.tenant_code = 'default'\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/admin/executeRawQuery", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "admin", "executeRawQuery"], + "query": [ + { + "key": "page", + "value": "", + "disabled": true + }, + { + "key": "limit", + "value": "", + "disabled": true + } + ] + } + }, + "response": [] + }, + { + "name": "Assign role to a user", + "request": { + "method": "POST", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", + "type": "text" + }, + { + "key": "tenant-id", + "value": "shikshalokam", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"user_id\": 2,\n \"role_id\": 7\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/admin/assignRole", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "admin", "assignRole"], + "query": [ + { + "key": "page", + "value": "", + "disabled": true + }, + { + "key": "limit", + "value": "", + "disabled": true + } + ] + } + }, + "response": [] } ] }, @@ -927,6 +3453,42 @@ }, "response": [] }, + { + "name": "Org details", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "x-auth-token", + "value": "{{token}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/organization/details/1", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "organization", "details", "1"], + "query": [ + { + "key": "organisation_code", + "value": "ls", + "disabled": true + } + ] + } + }, + "response": [] + }, { "name": "Create Organization", "request": { @@ -940,13 +3502,13 @@ }, { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"name\": \"orgrr\",\n \"code\": \"mentor112\",\n \"description\": \"testing org\",\n \"domains\": [\"cc.com\"]\n}", + "raw": "{\n \"name\": \"New organization\",\n \"code\": \"neworgs\",\n \"description\": \"Description\",\n \"tenant_code\": \"shikshalokam\",\n \"registration_codes\": [\n \"neworgdatas\"\n ],\n \"domains\": [\n \"neworg.org\"\n ]\n}", "options": { "raw": { "language": "json" @@ -968,13 +3530,69 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"MentorEd\",\n \"description\": \"Organisation of the default tenant\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/organization/update/1", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "organization", "update", "1"] + } + }, + "response": [] + }, + { + "name": "addRelatedOrg", + "request": { + "method": "POST", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"related_orgs\": [\n 41\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/organization/addRelatedOrg/1", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "organization", "addRelatedOrg", "1"] + } + }, + "response": [] + }, + { + "name": "Remove realated orgs", + "request": { + "method": "POST", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"name\": \"MentorEd\",\n \"description\": \"testing org\",\n \"related_orgs\": [\n 3,\n 4\n ]\n}", + "raw": "{\n \"related_orgs\": [\n 41\n ]\n}", "options": { "raw": { "language": "json" @@ -982,9 +3600,9 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/organization/update/1", + "raw": "{{UserDevBaseUrl}}user/v1/organization/removeRelatedOrg/1", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "organization", "update", "1"] + "path": ["v1", "organization", "removeRelatedOrg", "1"] } }, "response": [] @@ -996,12 +3614,17 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", + "type": "text" + }, + { + "key": "tenant-id", + "value": "default", "type": "text" } ], "url": { - "raw": "{{UserDevBaseUrl}}user/v1/organization/list?page=1&limit=10", + "raw": "{{UserDevBaseUrl}}user/v1/organization/list?page=1&limit=10&tenant_code", "host": ["{{UserDevBaseUrl}}user"], "path": ["v1", "organization", "list"], "query": [ @@ -1012,6 +3635,10 @@ { "key": "limit", "value": "10" + }, + { + "key": "tenant_code", + "value": null } ] } @@ -1025,7 +3652,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -1045,6 +3672,64 @@ } }, "response": [] + }, + { + "name": "Add registration code", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"registration_codes\": [\n \"abBang\",\n \"puducherry\",\n \"mys\"\n ],\n \"tenant_code\": \"shikshagraha\" //only valid for admin roles, else tenant is identified from token\n}" + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/organization/addRegistrationCode", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "organization", "addRegistrationCode"] + } + }, + "response": [] + }, + { + "name": "Remove registration code", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}" + }, + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"registration_codes\": [\n \"abBang\",\n \"puducherry\",\n \"mys\"\n ],\n \"tenant_code\": \"shikshagraha\" //only valid for admin roles, else tenant is identified from token\n}" + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/organization/removeRegistrationCode", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "organization", "removeRegistrationCode"] + } + }, + "response": [] } ] }, @@ -1058,13 +3743,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"value\": \"ml\",\n \"label\": \"Malayalam\",\n \"status\": \"ACTIVE\",\n \"type\": \"SYSTEM\",\n \"entity_type_id\": 1\n}", + "raw": "{\n \"value\": \"ml\",\n \"label\": \"Malayalam\",\n \"status\": \"ACTIVE\",\n \"type\": \"SYSTEM\",\n \"entity_type_id\": 50\n}", "options": { "raw": { "language": "json" @@ -1087,13 +3772,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"value\": \"hm\",\n \"label\": \"malayalam\",\n \"status\": \"ACTIVE\",\n \"type\": \"SYSTEM\",\n \"entity_type_id\": 1\n}", + "raw": "", "options": { "raw": { "language": "json" @@ -1101,16 +3786,58 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/entity/read?read_user_entity=true", + "raw": "{{UserDevBaseUrl}}user/v1/entity/read?value=ml&entity_type_id=44", "host": ["{{UserDevBaseUrl}}user"], "path": ["v1", "entity", "read"], "query": [ + { + "key": "value", + "value": "ml", + "description": "User value or id" + }, + { + "key": "entity_type_id", + "value": "44" + }, { "key": "id", - "value": "2", - "description": "User value or id", + "value": "1115", "disabled": true - }, + } + ] + }, + "description": "NOTE: Pass type as roles/designation/expertise etc. whatever types needs to be created" + }, + "response": [] + }, + { + "name": "Entity list", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/entity/list?entity_type_id=12", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "entity", "list"], + "query": [ { "key": "value", "value": "ml", @@ -1118,9 +3845,13 @@ "disabled": true }, { - "key": "read_user_entity", - "value": "true", - "description": "use this param to get all entities, including user created entities." + "key": "id", + "value": "1115", + "disabled": true + }, + { + "key": "entity_type_id", + "value": "12" } ] }, @@ -1135,13 +3866,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"value\": \"english\",\n \"label\": \"English\",\n \"status\": \"ACTIVE\",\n \"type\": \"SYSTEM\",\n \"entity_type_id\": 1\n}", + "raw": "{\n \"label\": \"English UUS\",\n \"status\": \"ACTIVE\",\n \"type\": \"SYSTEM\"\n}", "options": { "raw": { "language": "json" @@ -1149,9 +3880,9 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/entity/update/1", + "raw": "{{UserDevBaseUrl}}user/v1/entity/update/3", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "entity", "update", "1"] + "path": ["v1", "entity", "update", "3"] }, "description": "NOET: All body req parameters are optional to update." }, @@ -1164,14 +3895,14 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "url": { - "raw": "{{UserDevBaseUrl}}user/v1/entity/delete/1", + "raw": "{{UserDevBaseUrl}}user/v1/entity/delete/1117", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "entity", "delete", "1"] + "path": ["v1", "entity", "delete", "1117"] } }, "response": [] @@ -1188,13 +3919,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"value\": \"ln\",\n \"label\": \"Languages\",\n \"status\": \"ACTIVE\",\n \"type\": \"SYSTEM\",\n \"allow_filtering\": true,\n \"data_type\": \"STRING\"\n}", + "raw": "{\n \"value\": \"ln\",\n \"label\": \"Languages\",\n \"status\": \"ACTIVE\",\n \"type\": \"SYSTEM\",\n \"allow_filtering\": true,\n \"model_names\": [\n \"User\"\n ],\n \"data_type\": \"STRING\"\n}", "options": { "raw": { "language": "json" @@ -1217,7 +3948,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -1237,7 +3968,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -1283,13 +4014,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"value\": \"roles\",\n \"label\": \"RolesV\",\n \"status\": \"ACTIVE\",\n \"type\": \"SYSTEM\",\n \"allow_filtering\": true,\n \"data_type\": \"string\"\n}", + "raw": "{\n \"value\": \"ln\",\n \"label\": \"BAASA\",\n \"status\": \"ACTIVE\",\n \"type\": \"SYSTEM\",\n \"allow_filtering\": true,\n \"model_names\": [\n \"User\"\n ],\n \"data_type\": \"STRING\"\n}", "options": { "raw": { "language": "json" @@ -1297,9 +4028,9 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/entity-type/update/1", + "raw": "{{UserDevBaseUrl}}user/v1/entity-type/update/64", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "entity-type", "update", "1"] + "path": ["v1", "entity-type", "update", "64"] }, "description": "NOET: All body req parameters are optional to update." }, @@ -1312,7 +4043,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -1358,7 +4089,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}" + "value": "bearer {{token}}" }, { "key": "", @@ -1396,7 +4127,8 @@ "listen": "test", "script": { "exec": [""], - "type": "text/javascript" + "type": "text/javascript", + "packages": {} } } ], @@ -1405,7 +4137,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -1414,7 +4146,7 @@ "formdata": [ { "key": "file_path", - "value": "org-admin/test.csv", + "value": "users/59-1747832592343-samplecsvlocal.csv", "type": "text" } ] @@ -1434,7 +4166,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], @@ -1467,14 +4199,14 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "url": { - "raw": "{{UserDevBaseUrl}}user/v1/org-admin/getRequestDetails/1", + "raw": "{{UserDevBaseUrl}}user/v1/org-admin/getRequestDetails/5", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "org-admin", "getRequestDetails", "1"] + "path": ["v1", "org-admin", "getRequestDetails", "5"] } }, "response": [] @@ -1486,13 +4218,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"id\": [1,2]\n}", + "raw": "{\n \"emails\": [\n \"nevilab@shikshalokam.org\"\n ],\n \"ids\": [\n 55\n ]\n}", "options": { "raw": { "language": "json" @@ -1526,7 +4258,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" }, { @@ -1559,7 +4291,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" }, { @@ -1570,7 +4302,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"request_id\": 1,\n\t\"comments\": [\"All uploaded documents verified\", \"Profile information verified\"],\n\t\"status\": \"APPROVED\"\n}\n" + "raw": "{\n \"request_id\": 5,\n \"comments\": [\n \"All uploaded documents verified\",\n \"Profile information verified\"\n ],\n \"status\": \"APPROVED\"\n}" }, "url": { "raw": "{{UserDevBaseUrl}}user/v1/org-admin/updateRequestStatus", @@ -1587,7 +4319,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}" + "value": "{{token}}" }, { "key": "Content-Type", @@ -1596,12 +4328,12 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"entity_type_value\": \"categories\",\n\t\"target_entity_type_label\": \"training\"\n}" + "raw": "{\n\t\"entity_type_value\": \"languages\",\n\t\"target_entity_type_label\": \"Languages\"\n}" }, "url": { - "raw": "{{MentoringBaseUrl}}/mentoring/v1/org-admin/inheritEntityType", - "host": ["{{MentoringBaseUrl}}"], - "path": ["mentoring", "v1", "org-admin", "inheritEntityType"] + "raw": "{{UserDevBaseUrl}}user/v1/org-admin/inheritEntityType", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "org-admin", "inheritEntityType"] } }, "response": [] @@ -1613,7 +4345,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}" + "value": "{{token}}" }, { "key": "Content-Type", @@ -1630,8 +4362,8 @@ } }, "url": { - "raw": "{{interfaceBaseUrl}}user/v1/org-admin/updateUser/157", - "host": ["{{interfaceBaseUrl}}user"], + "raw": "{{UserDevBaseUrl}}user/v1/org-admin/updateUser/157", + "host": ["{{UserDevBaseUrl}}user"], "path": ["v1", "org-admin", "updateUser", "157"] } }, @@ -1649,7 +4381,7 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "bearer {{token}}", "type": "text" } ], @@ -1680,7 +4412,85 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/notification/template/?type=email&code=invitee_upload_status", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "notification", "template", ""], + "query": [ + { + "key": "type", + "value": "email" + }, + { + "key": "code", + "value": "invitee_upload_status" + } + ] + } + }, + "response": [] + }, + { + "name": "Read Notification Templates with ID", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{UserDevBaseUrl}}user/v1/notification/template/:id", + "host": ["{{UserDevBaseUrl}}user"], + "path": ["v1", "notification", "template", ":id"], + "variable": [ + { + "key": "id", + "value": "20" + } + ] + } + }, + "response": [] + }, + { + "name": "Read all Notification Templates Copy", + "protocolProfileBehavior": { + "disableBodyPruning": true + }, + "request": { + "method": "GET", + "header": [ + { + "key": "X-auth-token", + "value": "{{token}}", "type": "text" } ], @@ -1694,9 +4504,9 @@ } }, "url": { - "raw": "{{UserDevBaseUrl}}user/v1/notification/template/14", + "raw": "{{UserDevBaseUrl}}user/v1/notification/template", "host": ["{{UserDevBaseUrl}}user"], - "path": ["v1", "notification", "template", "14"] + "path": ["v1", "notification", "template"] } }, "response": [] @@ -1708,13 +4518,13 @@ "header": [ { "key": "X-auth-token", - "value": " {{token}}", + "value": "{{token}}", "type": "text" } ], "body": { "mode": "raw", - "raw": "{\n \"type\" : \"email\",\n \"code\": \"tl-email-invite\",\n \"subject\": \"Hi Welcome Back We missed You\" ,\n \"body\": \"
Dear User,
Welcome back to mentorEd\",\n \"email_header\": \"email_header\",\n \"email_footer\":\"email_footer\"\n}", + "raw": " {\n \"id\": 8,\n \"type\": \"emailHeader\",\n \"code\": \"email_header\",\n \"subject\": null,\n \"body\": \"