- Download OpenAPI specification:Download -
-{context}/user/v1 -
- Note: These resources can be used in other services
- This Api is associated with Create User on mentoring
-/user/v1/account/create
- required
- Request body consist of metadata and accepts payload as JSON
-|
- name
- required
- |
-
-
-
-
- string
-
-
-
-
-
- Name of the user - |
-
|
- email
- required
- |
-
-
-
-
- string
-
-
-
-
-
- Email Id of user - |
-
|
- password
- required
- |
-
-
-
-
- string
- <password>
-
-
-
-
-
-
- Password of user - |
-
| - otp - | -
-
-
-
- string
-
-
-
-
-
- Email OTP for verification - |
-
| - has_accepted_terms_and_conditions - | -
-
-
-
- boolean
-
-
-
-
-
- - Flag specifiying if user has accepted the terms & - conditions - - |
-
{
-
- -
-
- "name":
- "John Deo",
-
-
- -
-
- "email":
- "example@mail.com",
-
-
- -
-
- "password":
- "Password",
-
-
- -
-
- "otp":
- 6845975,
-
-
- -
-
- "has_accepted_terms_and_conditions":
- true
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Sign-up successful Please
- wait while logging in.",
-
-
- -
-
- "result":
- {
-
- -
-
- "access_token":
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
-
-
- -
-
- "refresh_token":
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
-
-
- -
-
- "user":
- {
-
- -
-
- "id":
- 8,
-
-
- -
-
- "email":
- "example@mail.com",
-
-
- -
-
- "email_verified":
- "true",
-
-
- -
-
- "name":
- "John
- Deo",
-
-
- -
-
- "status":
- "ACTIVE",
-
-
- -
-
- "has_accepted_terms_and_conditions":
- true,
-
-
- -
-
- "preferred_language":
- {
-
- -
-
- "value":
- "english",
-
-
- -
-
- "label":
- "English"
-
-
-
- },
-
-
- -
-
- "organization_id":
- 1,
-
-
- -
-
- "roles":
- [
-
- -
-
- 2
-
-
-
- ],
-
-
- -
-
- "created_at":
- "2023-09-20T11:59:37.871Z",
-
-
- -
-
- "updated_at":
- "2023-09-20T11:59:37.871Z",
-
-
- -
-
- "user_roles":
- [
-
- -
-
- {
-
- -
-
- "id":
- 1,
-
-
- -
-
- "title":
- "mentee",
-
-
- -
-
- "user_type":
- 0,
-
-
- -
-
- "status":
- "ACTIVE"
-
-
-
- }
-
-
-
- ]
-
-
-
- }
-
-
-
- }
-
-
-
- }
- This Api is associated with login user
-/user/v1/account/loginrequired
- |
- email
- required
- |
-
-
-
-
- string
-
-
-
-
-
- Email Id of user - |
-
|
- password
- required
- |
-
-
-
-
- string
-
-
-
-
-
- Password of user - |
-
{
-
- -
-
- "email":
- "example@mail.com",
-
-
- -
-
- "password":
- "Password"
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "User logged in
- successfully.",
-
-
- -
-
- "result":
- {
-
- -
-
- "access_token":
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjo3LCJlbWFpbCI6ImhpbGJlcnQyOUB5YWhvby5jb20iLCJuYW1lIjoiQWRlbGlhIiwicm9sZXMiOlt7ImlkIjoyLCJ0aXRsZSI6Im1lbnRvciIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiYWN0aXZlIn1dfSwiaWF0IjoxNjkwMjg2Nzg2LCJleHAiOjE2OTAzNzMxODZ9.0_Yi8yEu_G04VNJvVvafWMvO-Eb9TVsoCnp_pfrFVi8",
-
-
- -
-
- "refresh_token":
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjo3LCJlbWFpbCI6ImhpbGJlcnQyOUB5YWhvby5jb20iLCJuYW1lIjoiQWRlbGlhIiwicm9sZXMiOlt7ImlkIjoyLCJ0aXRsZSI6Im1lbnRvciIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiYWN0aXZlIn1dfSwiaWF0IjoxNjkwMjg2Nzg2LCJleHAiOjE3MDYwOTc5ODZ9.quHyyjz4DEc7rvKpxwzaiRyRKFkqrbTb8tNB5zX0eF0",
-
-
- -
-
- "user":
- {
-
- -
-
- "id":
- 7,
-
-
- -
-
- "email":
- "hilbert29@yahoo.com",
-
-
- -
-
- "email_verified":
- true,
-
-
- -
-
- "name":
- "Adelia",
-
-
- -
-
- "gender":
- {
-
- -
-
- "value":
- "male",
-
-
- -
-
- "label":
- "Male"
-
-
-
- },
-
-
- -
-
- "location":
- [ ],
-
-
- -
-
- "about":
- null,
-
-
- -
-
- "share_link":
- null,
-
-
- -
-
- "status":
- "ACTIVE",
-
-
- -
-
- "last_logged_in_at":
- "2023-07-25T11:50:35.044Z",
-
-
- -
-
- "has_accepted_terms_and_conditions":
- true,
-
-
- -
-
- "languages":
- null,
-
-
- -
-
- "preferred_language":
- {
-
- -
-
- "value":
- "english",
-
-
- -
-
- "label":
- "English"
-
-
-
- },
-
-
- -
-
- "organization_id":
- 1,
-
-
- -
-
- "roles":
- [
-
- -
-
- 2
-
-
-
- ],
-
-
- -
-
-
- -
-
- "deleted_at":
- null,
-
-
- -
-
- "created_at":
- "2023-07-24T14:37:56.393Z",
-
-
- -
-
- "updated_at":
- "2023-07-25T11:50:35.044Z",
-
-
- -
-
- "user_roles":
- [
-
- -
-
- {
-
- -
-
- "id":
- 1,
-
-
- -
-
- "title":
- "mentee",
-
-
- -
-
- "user_type":
- 0,
-
-
- -
-
- "status":
- "ACTIVE"
-
-
-
- }
-
-
-
- ]
-
-
-
- }
-
-
-
- }
-
-
-
- }
- - This API is associated with re-login and generating access token from - refresh token -
-/user/v1/account/generateToken
- required
- |
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
| - refresh_token - | -
-
-
-
- string
-
-
-
-
-
- Refresh token. - |
-
{
-
- -
-
- "refresh_token":
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Il9pZCI6IjYyODMyNTMxYTA1Y2JkNTdiMjczYWViYiIsImVtYWlsIjoiYW5raXQuc0BwYWNld2lzZG9tLmNvbSIsIm5hbWUiOiJBbmtpdCIsImlzQU1lbnRvciI6dHJ1ZX0sImlhdCI6MTY1MzAxMDYxNCwiZXhwIjoxNjY4ODIxODE0fQ.hrIiKz3envHDPauVXSmA_BO_KKzWJAePsP3xD8l851s"
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Access token generated
- successfully",
-
-
- -
-
- "result":
- {
-
- -
-
- "access_token":
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Il9pZCI6IjYyODMyNTMxYTA1Y2JkNTdiMjczYWViYiIsImVtYWlsIjoiYW5raXQuc0BwYWNld2lzZG9tLmNvbSIsIm5hbWUiOiJBbmtpdCIsImlzQU1lbnRvciI6dHJ1ZX0sImlhdCI6MTY1MzAxMDk4NCwiZXhwIjoxNjUzMDk3Mzg0fQ.BOZ_d6xNxuAJZ1ubdj94mCeO4jwXsC7t9JT4KXECVN"
-
-
-
- }
-
-
-
- }
- This API is associated with generating OTP
-user/v1/account/generateOtp
- required
- |
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
|
- email
- required
- |
-
-
-
-
- string
-
-
-
-
-
- Email Id of user - |
-
|
- password
- required
- |
-
-
-
-
- string
-
-
-
-
-
- Password of user - |
-
{
-
- -
-
- "email":
- "example@mail.com",
-
-
- -
-
- "password":
- "Password"
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "OTP has been sent to your
- registered email ID. Please enter
- the number to update your
- password.",
-
-
- -
-
- "result":
- [ ]
-
-
-
- }
- This API is associated with reset password
-user/v1/account/resetPassword
- required
- |
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
|
- email
- required
- |
-
-
-
-
- string
-
-
-
-
-
- Email Id of user - |
-
|
- password
- required
- |
-
-
-
-
- string
-
-
-
-
-
- New password of user - |
-
|
- otp
- required
- |
-
-
-
-
- number
-
-
-
-
-
- OTP sent on mail - |
-
{
-
- -
-
- "email":
- "example@mail.com",
-
-
- -
-
- "password":
- "New password",
-
-
- -
-
- "otp":
- 123456
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Password reset
- successfully.",
-
-
- -
-
- "result":
- {
-
- -
-
- "access_token":
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjo5LCJlbWFpbCI6ImJyYW5keW4udGVycnlAeWFob28uY29tIiwibmFtZSI6IkFzaGx5Iiwicm9sZXMiOlt7ImlkIjoyLCJ0aXRsZSI6Im1lbnRvciIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiYWN0aXZlIn1dfSwiaWF0IjoxNjkwMjg1NzE4LCJleHAiOjE2OTAzNzIxMTh9.WmhUXIocykrBVti7vtznx_BMAaBtuqYUks4sc1J94Do",
-
-
- -
-
- "refresh_token":
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImlkIjo5LCJlbWFpbCI6ImJyYW5keW4udGVycnlAeWFob28uY29tIiwibmFtZSI6IkFzaGx5Iiwicm9sZXMiOlt7ImlkIjoyLCJ0aXRsZSI6Im1lbnRvciIsInVzZXJfdHlwZSI6MCwic3RhdHVzIjoiYWN0aXZlIn1dfSwiaWF0IjoxNjkwMjg1NzE4LCJleHAiOjE3MDYwOTY5MTh9.eqJ-KD0YA-Cdpz3XHWKgmi66uU6o229K9pyp6BwAAzI",
-
-
- -
-
- "user":
- {
-
- -
-
- "id":
- 9,
-
-
- -
-
- "email":
- "brandyn.terry@yahoo.com",
-
-
- -
-
- "email_verified":
- true,
-
-
- -
-
- "name":
- "Ashly",
-
-
- -
-
- "gender":
- {
-
- -
-
- "value":
- "male",
-
-
- -
-
- "label":
- "Male"
-
-
-
- },
-
-
- -
-
- "about":
- null,
-
-
- -
-
- "share_link":
- null,
-
-
- -
-
- "status":
- "ACTIVE",
-
-
- -
-
- "image":
- null,
-
-
- -
-
- "last_logged_in_at":
- "string",
-
-
- -
-
- "has_accepted_terms_and_conditions":
- true,
-
-
- -
-
- "languages":
- [ ],
-
-
- -
-
- "preferred_language":
- {
-
- -
-
- "value":
- "english",
-
-
- -
-
- "label":
- "English"
-
-
-
- },
-
-
- -
-
- "organization_id":
- 1,
-
-
- -
-
- "roles":
- [
-
- -
-
- 2
-
-
-
- ],
-
-
- -
-
- "deleted_at":
- null,
-
-
- -
-
- "created_at":
- "2023-07-25T11:48:38.270Z",
-
-
- -
-
- "updated_at":
- "2023-07-25T11:48:38.270Z",
-
-
- -
-
- "user_roles":
- [
-
- -
-
- {
-
- -
-
- "id":
- 2,
-
-
- -
-
- "title":
- "mentor",
-
-
- -
-
- "user_type":
- 0,
-
-
- -
-
- "status":
- "ACTIVE"
-
-
-
- }
-
-
-
- ]
-
-
-
- }
-
-
-
- }
-
-
-
- }
- This API is associated with logout
-/user/v1/account/logoutrequired
- |
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
| - refresh_token - | -
-
-
-
- string
-
-
-
-
-
- Refresh token. - |
-
{
-
- -
-
- "refresh_token":
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Il9pZCI6IjYyODMyNTMxYTA1Y2JkNTdiMjczYWViYiIsImVtYWlsIjoiYW5raXQuc0BwYWNld2lzZG9tLmNvbSIsIm5hbWUiOiJBbmtpdCIsImlzQU1lbnRvciI6dHJ1ZX0sImlhdCI6MTY1MzAxMDYxNCwiZXhwIjoxNjY4ODIxODE0fQ.hrIiKz3envHDPauVXSmA_BO_KKzWJAePsP3xD8l851s"
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "User logged out
- successfully.",
-
-
- -
-
- "result":
- [ ]
-
-
-
- }
- - This API Requires only X-auth-token and it will set an email to verify true. -
-|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
{
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "User successfully
- updated.",
-
-
- -
-
- "result":
- [ ]
-
-
-
- }
- This API is associated with the listing of users based on condition
-/user/v1/account/listrequired
- |
- userType
- required
- |
-
-
-
-
- string
-
-
-
- Example:
-
- userType=mentor
-
-
-
-
-
- Type of user - |
-
| - page - | -
-
-
-
- number
-
-
-
- Example:
-
- page=1
-
-
-
-
-
- Please add page number - |
-
| - limit - | -
-
-
-
- number
-
-
-
- Example:
-
- limit=2
-
-
-
-
-
- number of record to limit - |
-
| - search - | -
-
-
-
- string
-
-
-
- Example:
-
- search=john
-
-
-
-
-
- Please search for name or title of user etc. - |
-
|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
{
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Mentor list fetched
- successfully.",
-
-
- -
-
- "result":
- {
-
- -
-
- "data":
- [
-
- -
-
- {
-
- -
-
- "key":
- "A",
-
-
- -
-
- "values":
- [
-
- -
-
- {
-
- -
-
- "_id":
- 1,
-
-
- -
-
- "name":
- "jhon",
-
-
- -
-
-
-
- }
-
-
-
- ]
-
-
-
- }
-
-
-
- ],
-
-
- -
-
- "count":
- 1
-
-
-
- }
-
-
-
- }
- This API is associated with the user's profile details
-/user/v1/user/read/
- required
- |
- userId
- required
- |
-
-
-
-
- integer
-
-
-
- Example:
-
- 1
-
-
-
-
-
- Please append a valid User Id To the Request URL - |
-
|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
{
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Profile fetched
- successfully.",
-
-
- -
-
- "result":
- {
-
- -
-
- "email":
- "example@mail.com",
-
-
- -
-
- "role":
- "mentee",
-
-
- -
-
- "email_verified":
- true,
-
-
- -
-
- "has_accepted_terms_and_conditions":
- false,
-
-
- -
-
- "id":
- 1,
-
-
- -
-
- "name":
- "Ankit",
-
-
- -
-
- "location":
- [
-
- -
-
- {
-
- -
-
- "value":
- "kl",
-
-
- -
-
- "label":
- "Kerala"
-
-
-
- }
-
-
-
- ],
-
-
- -
-
- "languages":
- [
-
- -
-
- {
-
- -
-
- "value":
- "english",
-
-
- -
-
- "label":
- "English"
-
-
-
- }
-
-
-
- ],
-
-
- -
-
- "organization_id":
- 2,
-
-
- -
-
- "preferred_language":
- {
-
- -
-
- "value":
- "english",
-
-
- -
-
- "label":
- "English"
-
-
-
- },
-
-
- -
-
- "status":
- "ACTIVE",
-
-
- -
-
- "share_link":
- null,
-
-
- -
-
- "updated_at":
- "2022-05-18T05:24:52.431Z",
-
-
- -
-
- "created_at":
- "2022-05-18T05:24:52.431Z",
-
-
- -
-
- "last_logged_in_at":
- "2022-05-18T05:24:52.431Z",
-
-
- -
-
- "about":
- "This is test
- about of
- mentee",
-
-
- -
-
- "gender":
- {
-
- -
-
- "value":
- "male",
-
-
- -
-
- "label":
- "Male"
-
-
-
- },
-
-
- -
-
-
-
- }
-
-
-
- }
- This API is associated with update user profile
-/user/v1/user/update
- required
- |
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
| - name - | -
-
-
-
- string
-
-
- |
-
| - location - | -
-
-
-
- Array of strings
-
-
- |
-
| - about - | -
-
-
-
- string
-
-
- |
-
| - has_accepted_terms_and_conditions - | -
-
-
-
- boolean
-
-
- |
-
| - gender - | -
-
-
-
- string
-
-
- |
-
| - image - | -
-
-
-
- string
-
-
- |
-
{
-
- -
-
- "name":
- "Jhon",
-
-
- -
-
- "location":
- [
-
- -
-
- "ap"
-
-
-
- ],
-
-
- -
-
- "about":
- "This is test about of
- mentee",
-
-
- -
-
- "has_accepted_terms_and_conditions":
- true,
-
-
- -
-
- "gender":
- "male",
-
-
- -
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Profile updated
- successfully.",
-
-
- -
-
- "result":
- {
-
- -
-
- "id":
- 8,
-
-
- -
-
- "email":
- "example@mail.com",
-
-
- -
-
- "email_verified":
- "true",
-
-
- -
-
- "name":
- "John
- Deo",
-
-
- -
-
- "status":
- "ACTIVE",
-
-
- -
-
- "has_accepted_terms_and_conditions":
- true,
-
-
- -
-
- "preferred_language":
- {
-
- -
-
- "value":
- "english",
-
-
- -
-
- "label":
- "English"
-
-
-
- },
-
-
- -
-
- "organization_id":
- 1,
-
-
- -
-
- "roles":
- [
-
- -
-
- 2
-
-
-
- ],
-
-
- -
-
- "created_at":
- "2023-09-20T11:59:37.871Z",
-
-
- -
-
- "updated_at":
- "2023-09-20T11:59:37.871Z",
-
-
- -
-
- "user_roles":
- [
-
- -
-
- {
-
- -
-
- "id":
- 1,
-
-
- -
-
- "title":
- "mentee",
-
-
- -
-
- "user_type":
- 0,
-
-
- -
-
- "status":
- "ACTIVE"
-
-
-
- }
-
-
-
- ]
-
-
-
- }
-
-
-
- }
- This API is associated with the cloud services for getting signed URL
-/user/v1/cloud-services/file/getSignedUrl
- required
- |
- file_name
- required
- |
-
-
-
-
- string
-
-
-
- Example:
-
- image.jpg
-
-
-
-
-
- - Please append a valid file name to url which has to - be uploaded - - |
-
|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
{
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Signed Url Generated
- Successfully.",
-
-
- -
-
- "result":
- {
-
- -
-
-
- -
-
- "file_path":
- "users/62832531a05cbd57b273aebb-1654149589875-laptop1.jpg",
-
-
- -
-
- "dest_file_ath":
- "users/62832531a05cbd57b273aebb-1654149589875-laptop1.jpg"
-
-
-
- }
-
-
-
- }
- - This API is associated with the cloud services for getting downloadable URL -
-/user/v1/cloud-services/file/getDownloadableUrl
- required
- |
- file_path
- required
- |
-
-
-
-
- string
-
-
-
- Example:
-
- users/62832531a05cbd57b273aebb-1654149589875-image.jpg
-
-
-
-
-
- - Please append a valid file path to url which has to - be downloaded - - |
-
|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
{
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Download Url Generated
- Successfully.",
-
-
- -
-
-
-
- }
- This API is associated with create form
-/user/v1/form/createrequired
- |
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
|
- type
- required
- |
-
-
-
-
- string
-
-
- |
-
|
- sub_type
- required
- |
-
-
-
-
- string
-
-
- |
-
|
-
- required
- |
-
-
-
-
- object
-
-
- |
-
{
-
- -
-
- "type":
- "profile",
-
-
- -
-
- "sub_type":
- "profileForm",
-
-
- -
-
- "data":
- {
-
- -
-
- "template_name":
- "defaultTemplate",
-
-
- -
-
- "fields":
- {
-
- -
-
- "controls":
- [
-
- -
-
- {
-
- -
-
- "name":
- "name",
-
-
- -
-
- "label":
- "name",
-
-
- -
-
- "value":
- "",
-
-
- -
-
- "class":
- "ion-margin",
-
-
- -
-
- "type":
- "text",
-
-
- -
-
- "position":
- "floating",
-
-
- -
-
- "validators":
- {
-
- -
-
- "required":
- true,
-
-
- -
-
- "minLength":
- 10
-
-
-
- }
-
-
-
- }
-
-
-
- ]
-
-
-
- }
-
-
-
- }
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Form created
- successfully",
-
-
- -
-
- "result":
- [ ]
-
-
-
- }
- This API is associated with update form
-/user/v1/form/update/{formId}
- required
- |
- formId
- required
- |
-
-
-
-
- string
-
-
-
- Example:
-
- 1
-
-
-
-
-
- Please append a valid form Id to the Request URL. - |
-
|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
|
- type
- required
- |
-
-
-
-
- string
-
-
- |
-
|
- sub_type
- required
- |
-
-
-
-
- string
-
-
- |
-
|
-
- required
- |
-
-
-
-
- object
-
-
- |
-
{
-
- -
-
- "type":
- "profile",
-
-
- -
-
- "sub_type":
- "profileForm",
-
-
- -
-
- "data":
- {
-
- -
-
- "template_name":
- "defaultTemplate",
-
-
- -
-
- "fields":
- {
-
- -
-
- "controls":
- [
-
- -
-
- {
-
- -
-
- "name":
- "name",
-
-
- -
-
- "label":
- "name",
-
-
- -
-
- "value":
- "",
-
-
- -
-
- "class":
- "ion-margin",
-
-
- -
-
- "type":
- "text",
-
-
- -
-
- "position":
- "floating",
-
-
- -
-
- "validators":
- {
-
- -
-
- "required":
- true,
-
-
- -
-
- "minLength":
- 10
-
-
-
- }
-
-
-
- }
-
-
-
- ]
-
-
-
- }
-
-
-
- }
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Form updated
- successfully",
-
-
- -
-
- "result":
- [ ]
-
-
-
- }
- This API is associated with update form
-/user/v1/form/update/{formId}
- required
- |
- formId
- required
- |
-
-
-
-
- string
-
-
-
- Example:
-
- 62832531a05cbd57b273aebb
-
-
-
-
-
- Please append a valid form Id to the Request URL. - |
-
|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
| - type - | -
-
-
-
- string
-
-
- |
-
| - sub_type - | -
-
-
-
- string
-
-
- |
-
{
-
- -
-
- "type":
- "profile",
-
-
- -
-
- "sub_type":
- "profileForm"
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Form fetched
- successfully",
-
-
- -
-
- "result":
- {
-
- -
-
- "type":
- "profile",
-
-
- -
-
- "sub_type":
- "profileForm",
-
-
- -
-
- "updated_at":
- "2022-05-24T23:14:10.080Z",
-
-
- -
-
- "created_at":
- "2022-05-24T23:14:10.080Z",
-
-
- -
-
- "id":
- 2,
-
-
- -
-
- "data":
- {
-
- -
-
- "templateName":
- "defaultTemplate",
-
-
- -
-
- "fields":
- {
-
- -
-
- "controls":
- [
-
- -
-
- {
-
- -
-
- "name":
- "name",
-
-
- -
-
- "label":
- "name",
-
-
- -
-
- "value":
- "",
-
-
- -
-
- "class":
- "ion-margin",
-
-
- -
-
- "type":
- "text",
-
-
- -
-
- "position":
- "floating",
-
-
- -
-
- "validators":
- {
-
- -
-
- "required":
- true,
-
-
- -
-
- "minLength":
- 10
-
-
-
- }
-
-
-
- }
-
-
-
- ]
-
-
-
- }
-
-
-
- }
-
-
-
- }
-
-
-
- }
- API associated with creating new admin user
-/user/v1/admin/create
- required
- |
- name
- required
- |
-
-
-
-
- string
-
-
- |
-
|
- email
- required
- |
-
-
-
-
- string
-
-
- |
-
|
- password
- required
- |
-
-
-
-
- string
- <password>
-
-
-
- |
-
|
- secret_code
- required
- |
-
-
-
-
- string
-
-
- |
-
{
-
- -
-
- "name":
- "John Deo",
-
-
- -
-
- "email":
- "systemuser@mail.com",
-
-
- -
-
- "password":
- "password",
-
-
- -
-
- "secret_code":
- "secret_code"
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Sign-up successful, Please
- wait while logging in.",
-
-
- -
-
- "result":
- [
-
- -
-
- {
-
- -
-
- "user_id":
- 1
-
-
-
- }
-
-
-
- ]
-
-
-
- }
- This API is associated with login system user
-/user/v1/systemUsers/login
- required
- |
- email
- required
- |
-
-
-
-
- string
-
-
- |
-
|
- password
- required
- |
-
-
-
-
- string
- <password>
-
-
-
- |
-
{
-
- -
-
- "email":
- "systemuser@mail.com",
-
-
- -
-
- "password":
- "password"
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "User logged in
- successfully.",
-
-
- -
-
- "result":
- {
-
- -
-
- "access_token":
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Il9pZCI6IjYyOGQ4YjljNGRmOGFkM2ExM2QyODNlNyIsImVtYWlsIjoic3lzdGVtQGFkbWluLmNvbSIsInJvbGUiOiJhZG1pbiJ9LCJpYXQiOjE2NTM0NDQ2MDQsImV4cCI6MTY1MzUzMTAwNH0.l6I0MC16FegRLDym_VwgxFsa97ApUuOKohj2k49cV0I",
-
-
- -
-
- "refresh_token":
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7Il9pZCI6IjYyOGQ4YjljNGRmOGFkM2ExM2QyODNlNyIsImVtYWlsIjoic3lzdGVtQGFkbWluLmNvbSIsInJvbGUiOiJhZG1pbiJ9LCJpYXQiOjE2NTM0NDQ2MDQsImV4cCI6MTY2OTI1NTgwNH0.TGDhpCVa0hTAbki8Dp5XGtQyqCMXu4Xu9L_72Yr4G1A",
-
-
- -
-
- "user":
- {
-
- -
-
- "id":
- 7,
-
-
- -
-
- "email":
- "hilbert29@yahoo.com",
-
-
- -
-
- "email_verified":
- true,
-
-
- -
-
- "gender":
- {
-
- -
-
- "value":
- "male",
-
-
- -
-
- "label":
- "Male"
-
-
-
- },
-
-
- -
-
- "location":
- [ ],
-
-
- -
-
- "about":
- null,
-
-
- -
-
- "share_link":
- null,
-
-
- -
-
- "status":
- "ACTIVE",
-
-
- -
-
- "last_logged_in_at":
- "2023-07-25T11:50:35.044Z",
-
-
- -
-
- "has_accepted_terms_and_conditions":
- true,
-
-
- -
-
- "languages":
- [ ],
-
-
- -
-
- "preferred_language":
- {
-
- -
-
- "value":
- "english",
-
-
- -
-
- "label":
- "English"
-
-
-
- },
-
-
- -
-
- "organization_id":
- 1,
-
-
- -
-
- "roles":
- [
-
- -
-
- 4
-
-
-
- ],
-
-
- -
-
-
- -
-
- "deleted_at":
- null,
-
-
- -
-
- "created_at":
- "2023-07-24T14:37:56.393Z",
-
-
- -
-
- "updated_at":
- "2023-07-25T11:50:35.044Z",
-
-
- -
-
- "user_roles":
- [
-
- -
-
- {
-
- -
-
- "id":
- 4,
-
-
- -
-
- "title":
- "admin",
-
-
- -
-
- "user_type":
- 0,
-
-
- -
-
- "status":
- "ACTIVE"
-
-
-
- }
-
-
-
- ]
-
-
-
- }
-
-
-
- }
-
-
-
- }
- This API is associated with delete user
-/user/v1/admin/deleteUser
- required
- |
- id
- required
- |
-
-
-
-
- string
-
-
-
- Example:
-
- 1
-
-
-
-
-
- Please append a valid user id to the request url - |
-
|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
{
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "User deleted
- successfully",
-
-
- -
-
- "result":
- [
-
- -
-
- {
-
- -
-
- "user_id":
- 1
-
-
-
- }
-
-
-
- ]
-
-
-
- }
- This API is used to assign a user as the Org-Admin
-/user/v1/admin/addOrgAdmin
- required
- |
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
| - user_id - | -
-
-
-
- integer
-
-
- |
-
| - org_id - | -
-
-
-
- integer
-
-
- |
-
{
-
- -
-
- "user_id": 12,
-
-
- -
-
- "org_id": 55
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "User Assigned As The
- Org-Admin Successfully",
-
-
- -
-
- "result":
- {
-
- -
-
- "user_id":
- 12,
-
-
- -
-
- "org_id":
- 55,
-
-
- -
-
- "user_roles":
- [
-
- -
-
- [
-
- -
-
- {
-
- -
-
- "id":
- 2,
-
-
- -
-
- "title":
- "mentor",
-
-
- -
-
- "user_type":
- 0,
-
-
- -
-
- "status":
- "ACTIVE"
-
-
-
- },
-
-
- -
-
- {
-
- -
-
- "id":
- 3,
-
-
- -
-
- "title":
- "org_admin",
-
-
- -
-
- "user_type":
- 0,
-
-
- -
-
- "status":
- "ACTIVE"
-
-
-
- }
-
-
-
- ]
-
-
-
- ]
-
-
-
- }
-
-
-
- }
- This API is associated with organization
-/user/v1/organization/create
- required
- |
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
|
- name
- required
- |
-
-
-
-
- string
-
-
- |
-
|
- code
- required
- |
-
-
-
-
- string
-
-
- |
-
|
- description
- required
- |
-
-
-
-
- string
-
-
- |
-
{
-
- -
-
- "name":
- "MentorEd",
-
-
- -
-
- "code":
- "mentor112",
-
-
- -
-
- "description":
- "testing"
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Organization created
- successfully",
-
-
- -
-
- "result":
- [ ]
-
-
-
- }
- This API is associated with organization
-/user/v1/organization/update
- required
- |
- id
- required
- |
-
-
-
-
- integer
-
-
-
- Example:
-
- 1
-
-
-
-
-
- Please append a valid user id to the request url - |
-
|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
|
- name
- required
- |
-
-
-
-
- string
-
-
- |
-
|
- code
- required
- |
-
-
-
-
- string
-
-
- |
-
|
- description
- required
- |
-
-
-
-
- string
-
-
- |
-
{
-
- -
-
- "name":
- "MentorEd",
-
-
- -
-
- "code":
- "mentor112",
-
-
- -
-
- "description":
- "testing"
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Organization updated
- successfully",
-
-
- -
-
- "result":
- [ ]
-
-
-
- }
- - This API is associated with the listing of organization based on condition -
-/user/v1/organization/list
- required
- | - page - | -
-
-
-
- number
-
-
-
- Example:
-
- 1
-
-
-
-
-
- Please add page number - |
-
| - limit - | -
-
-
-
- number
-
-
-
- Example:
-
- 2
-
-
-
-
-
- number of record to limit - |
-
| - search - | -
-
-
-
- string
-
-
-
- Example:
-
- jhon
-
-
-
-
-
- Please search for name or title of user etc. - |
-
|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
{
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Organization fetched
- successfully.",
-
-
- -
-
- "result":
- {
-
- -
-
- "data":
- [
-
- -
-
- {
-
- -
-
- "id":
- 1,
-
-
- -
-
- "name":
- "Shikshalokam",
-
-
- -
-
- "code":
- "sl",
-
-
- -
-
- "description":
- "Founded
- in
- 2017
- ShikshaLokam
- is
- an
- Education
- Leadership
- Catalyst
- under
- the
- aegis
- of
- Advaith
- Foundation."
-
-
-
- }
-
-
-
- ],
-
-
- -
-
- "count":
- 1
-
-
-
- }
-
-
-
- }
- Request a specific role within an organization.
-|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - User's access token which already recognizes the - user as the organization's mentee. - - |
-
| - role - | -
-
-
-
- string
-
-
- |
-
| - - | -
-
-
-
- object
-
-
- |
-
{
-
- -
-
- "role":
- "mentor",
-
-
- -
-
- "form_data":
- {
-
- -
-
- "org_specific_fields":
- "answer"
-
-
-
- }
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Mentor role requested
- successfully",
-
-
- -
-
- "result":
- {
-
- -
-
- "request_id":
- 12,
-
-
- -
-
- "org_id":
- 10,
-
-
- -
-
- "status":
- "REQUESTED",
-
-
- -
-
- "meta":
- { }
-
-
-
- }
-
-
-
- }
- - Get a list of organization role requests for a specific role. This api is - used by the user to get the request for role change -
-|
- page
- required
- |
-
-
-
-
- integer
-
-
-
-
-
- Page number for pagination. - |
-
|
- limit
- required
- |
-
-
-
-
- integer
-
-
-
-
-
- Number of items per page. - |
-
|
- role
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - The specific role for which requests are being - fetched. - - |
-
|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - Access token of the user who is already a mentee of - the organization. - - |
-
{
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Org Role Requests Fetched
- Successfully",
-
-
- -
-
- "result":
- {
-
- -
-
- "data":
- [
-
- -
-
- {
-
- -
-
- "id":
- 12,
-
-
- -
-
- "requester_id":
- 23,
-
-
- -
-
- "role":
- "mentor",
-
-
- -
-
- "status":
- "under_review",
-
-
- -
-
- "org_id":
- 43,
-
-
- -
-
- "handled_by":
- 22
-
-
-
- }
-
-
-
- ],
-
-
- -
-
- "count":
- 1
-
-
-
- }
-
-
-
- }
- This API is associated with the user's role details
-/user/v1/userRole/list
- required
- |
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
{
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "User Role list fetched
- successfully.",
-
-
- -
-
- "result":
- [
-
- -
-
- {
-
- -
-
- "id":
- 1,
-
-
- -
-
- "title":
- "mentor",
-
-
- -
-
- "user_type":
- 0,
-
-
- -
-
- "status":
- "ACTIVE",
-
-
- -
-
- "created_at":
- "2023-08-07T11:27:23.560Z",
-
-
- -
-
- "updated_at":
- "2023-08-07T11:27:23.560Z",
-
-
- -
-
- "deleted_at":
- null
-
-
-
- }
-
-
-
- ]
-
-
-
- }
- You can use this API to create a user entity
-/mentoring/v1/entity-type/create
- required
- |
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - Access token of the user who is already a mentee of - the organization. - - |
-
| - value - | -
-
-
-
- string
-
-
- |
-
| - label - | -
-
-
-
- string
-
-
- |
-
| - type - | -
-
-
-
- string
-
-
- |
-
| - allow_filtering - | -
-
-
-
- boolean
-
-
- |
-
| - data_type - | -
-
-
-
- string
-
-
- |
-
| - has_entities - | -
-
-
-
- boolean
-
-
- |
-
{
-
- -
-
- "value":
- "ln",
-
-
- -
-
- "label":
- "Languages",
-
-
- -
-
- "type":
- "SYSTEM",
-
-
- -
-
- "allow_filtering":
- true,
-
-
- -
-
- "data_type":
- "string",
-
-
- -
-
- "has_entities":
- "STRING"
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Entity type created
- successfully",
-
-
- -
-
- "result":
- {
-
- -
-
- "id":
- 1,
-
-
- -
-
- "value":
- "ln",
-
-
- -
-
- "label":
- "Languages",
-
-
- -
-
- "status":
- "ACTIVE",
-
-
- -
-
- "allow_filtering":
- true,
-
-
- -
-
- "data_type":
- "STRING",
-
-
- -
-
- "created_by":
- 1,
-
-
- -
-
- "updated_by":
- 1,
-
-
- -
-
- "updated_at":
- "2023-09-22T12:40:19.817Z",
-
-
- -
-
- "created_at":
- "2023-09-22T12:40:19.817Z",
-
-
- -
-
- "has_entities":
- true
-
-
-
- },
-
-
- -
-
- "meta":
- {
-
- -
-
- "correlation":
- "3babe76b-d277-4073-8a59-8dfb94face9b",
-
-
- -
-
- "meeting_platform":
- "BBB"
-
-
-
- }
-
-
-
- }
- This API is associated with entity type updation
-/user/v1/entity-type/update
- required
- |
- id
- required
- |
-
-
-
-
- integer
-
-
-
- Example:
-
- 1
-
-
-
-
-
- Please append a valid user id to the request url - |
-
|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
| - value - | -
-
-
-
- string
-
-
- |
-
| - label - | -
-
-
-
- string
-
-
- |
-
| - status - | -
-
-
-
- string
-
-
- |
-
| - type - | -
-
-
-
- string
-
-
- |
-
| - allow_filtering - | -
-
-
-
- boolean
-
-
- |
-
| - data_type - | -
-
-
-
- string
-
-
- |
-
{
-
- -
-
- "value":
- "roles",
-
-
- -
-
- "label":
- "Roles",
-
-
- -
-
- "status":
- "ACTIVE",
-
-
- -
-
- "type":
- "SYSTEM",
-
-
- -
-
- "allow_filtering":
- true,
-
-
- -
-
- "data_type":
- "string"
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "string",
-
-
- -
-
- "message":
- "string",
-
-
- -
-
- "result":
- {
-
- -
-
- "id":
- 1,
-
-
- -
-
- "value":
- "roles",
-
-
- -
-
- "label":
- "Roles",
-
-
- -
-
- "status":
- "ACTIVE",
-
-
- -
-
- "created_by":
- "2023-09-06T12:01:09.025Z",
-
-
- -
-
- "updated_by":
- "2023-09-22T12:47:42.510Z",
-
-
- -
-
- "allow_filtering":
- true,
-
-
- -
-
- "data_type":
- "string",
-
-
- -
-
- "org_id":
- 1,
-
-
- -
-
- "has_entities":
- true
-
-
-
- },
-
-
- -
-
- "meta":
- {
-
- -
-
- "correlation":
- "5f384234-cd5a-467e-a5ac-b43365d2a7a3",
-
-
- -
-
- "meeting_platform":
- "BBB"
-
-
-
- }
-
-
-
- }
- This API is associated with entity type list
-/user/v1/entity-type/read
- required
- |
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
| - value - | -
-
-
-
- Array of strings
-
-
- |
-
| - read_user_entity - | -
-
-
-
- boolean
-
-
- |
-
{
-
- -
-
- "value":
- [
-
- -
-
- "ln"
-
-
-
- ],
-
-
- -
-
- "read_user_entity":
- false
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Entity type fetched
- successfully",
-
-
- -
-
- "result":
- [
-
- -
-
- {
-
- -
-
- "id":
- 4,
-
-
- -
-
- "value":
- "ln",
-
-
- -
-
- "label":
- "Languages",
-
-
- -
-
- "status":
- "ACTIVE",
-
-
- -
-
- "created_by":
- 0,
-
-
- -
-
- "updated_by":
- 0,
-
-
- -
-
- "allow_filtering":
- true,
-
-
- -
-
- "data_type":
- "STRING",
-
-
- -
-
- "created_at":
- "2023-09-21T10:16:19.270Z",
-
-
- -
-
- "updated_at":
- "2023-09-21T10:16:19.270Z",
-
-
- -
-
- "has_entities":
- true,
-
-
- -
-
- "entities":
- [
-
- -
-
- {
-
- -
-
- "id":
- 13,
-
-
- -
-
- "entity_type_id":
- 4,
-
-
- -
-
- "value":
- "ml",
-
-
- -
-
- "label":
- "Malayalam",
-
-
- -
-
- "status":
- "ACTIVE",
-
-
- -
-
- "type":
- "SYSTEM",
-
-
- -
-
- "created_by":
- 1,
-
-
- -
-
- "updated_by":
- 1,
-
-
- -
-
- "created_at":
- "2023-09-21T10:16:33.583Z",
-
-
- -
-
- "updated_at":
- "2023-09-21T10:16:33.583Z"
-
-
-
- }
-
-
-
- ]
-
-
-
- }
-
-
-
- ],
-
-
- -
-
- "meta":
- {
-
- -
-
- "correlation":
- "64cd08ba-cc87-4172-9633-2146dabe0b78",
-
-
- -
-
- "meeting_platform":
- "BBB"
-
-
-
- }
-
-
-
- }
- This API is associated with delete entity
-/user/v1/entity-type/delete
- required
- |
- id
- required
- |
-
-
-
-
- integer
-
-
-
- Example:
-
- 31
-
-
-
-
-
- - Please append a valid user entity id to the request - url - - |
-
|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
{
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Entity deleted
- successfully",
-
-
- -
-
- "result":
- [ ]
-
-
-
- }
- This API is associated with entity creation
-/user/v1/entity/createrequired
- |
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
|
- value
- required
- |
-
-
-
-
- string
-
-
- |
-
|
- label
- required
- |
-
-
-
-
- string
-
-
- |
-
|
- type
- required
- |
-
-
-
-
- string
-
-
- |
-
|
- entity_type_id
- required
- |
-
-
-
-
- integer
-
-
- |
-
{
-
- -
-
- "value":
- "AP",
-
-
- -
-
- "label":
- "Andhra Pradesh",
-
-
- -
-
- "type":
- "string",
-
-
- -
-
- "entity_type_id": 4
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Entity created
- successfully",
-
-
- -
-
- "result":
- {
-
- -
-
- "id":
- 1,
-
-
- -
-
- "value":
- "en",
-
-
- -
-
- "label":
- "English",
-
-
- -
-
- "status":
- "ACTIVE",
-
-
- -
-
- "type":
- "string",
-
-
- -
-
- "entity_type_id":
- 1,
-
-
- -
-
- "created_by":
- 0,
-
-
- -
-
- "updated_by":
- 0,
-
-
- -
-
- "updated_at":
- "2023-07-21T21:46:41.392Z",
-
-
- -
-
- "created_at":
- "2023-07-21T21:46:41.392Z",
-
-
- -
-
- "deleted_at":
- null
-
-
-
- },
-
-
- -
-
- "meta":
- {
-
- -
-
- "formsVersion":
- [ ],
-
-
- -
-
- "correlation":
- "6191e4d4-438b-4609-8de6-da3694b506b1",
-
-
- -
-
- "meeting_platform":
- "BBB"
-
-
-
- }
-
-
-
- }
- This API is associated with update entity
-/user/v1/entity/updaterequired
- |
- id
- required
- |
-
-
-
-
- integer
-
-
-
- Example:
-
- 2
-
-
-
-
-
- - Please append a valid user entity id to the request - url - - |
-
|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
| - value - | -
-
-
-
- string
-
-
- |
-
| - label - | -
-
-
-
- string
-
-
- |
-
| - status - | -
-
-
-
- string
-
-
- |
-
| - entity_type_id - | -
-
-
-
- number
-
-
- |
-
{
-
- -
-
- "value":
- "en",
-
-
- -
-
- "label":
- "English",
-
-
- -
-
- "status":
- "ACTIVE",
-
-
- -
-
- "entity_type_id": 1
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Entity updated
- successfully",
-
-
- -
-
- "result":
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Entity created
- successfully",
-
-
- -
-
- "result":
- {
-
- -
-
- "id":
- 1,
-
-
- -
-
- "value":
- "en",
-
-
- -
-
- "label":
- "English",
-
-
- -
-
- "status":
- "ACTIVE",
-
-
- -
-
- "type":
- "string",
-
-
- -
-
- "entity_type_id":
- 1,
-
-
- -
-
- "created_by":
- 0,
-
-
- -
-
- "updated_by":
- 0,
-
-
- -
-
- "updated_at":
- "2023-07-21T21:46:41.392Z",
-
-
- -
-
- "created_at":
- "2023-07-21T21:46:41.392Z",
-
-
- -
-
- "deleted_at":
- null
-
-
-
- },
-
-
- -
-
- "meta":
- {
-
- -
-
- "formsVersion":
- [ ],
-
-
- -
-
- "correlation":
- "6191e4d4-438b-4609-8de6-da3694b506b1",
-
-
- -
-
- "meeting_platform":
- "BBB"
-
-
-
- }
-
-
-
- },
-
-
- -
-
- "meta":
- {
-
- -
-
- "formsVersion":
- [ ],
-
-
- -
-
- "correlation":
- "4b69c161-1d19-4d4c-963c-057feaa2e82e",
-
-
- -
-
- "meeting_platform":
- "BBB"
-
-
-
- }
-
-
-
- }
- This API is associated with getting user entity based on id or value
-/user/v1/entity/read
- required
- |
- id
- required
- |
-
-
-
-
- integer
-
-
-
- Example:
-
- id=1
-
-
-
-
-
- Please append a valid id - |
-
|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
{
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Entity fetched
- successfully",
-
-
- -
-
- "result":
- [
-
- -
-
- {
-
- -
-
- "id":
- 1,
-
-
- -
-
- "entity_type_id":
- 1,
-
-
- -
-
- "value":
- "AP",
-
-
- -
-
- "label":
- "Andhra
- Pradesh",
-
-
- -
-
- "status":
- "ACTIVE",
-
-
- -
-
- "type":
- "system",
-
-
- -
-
- "created_by":
- null,
-
-
- -
-
- "updated_by":
- null,
-
-
- -
-
- "created_at":
- "2023-08-07T11:27:23.573Z",
-
-
- -
-
- "updated_at":
- "2023-08-07T11:27:23.573Z",
-
-
- -
-
- "deleted_at":
- null
-
-
-
- }
-
-
-
- ]
-
-
-
- }
- This API is associated with delete entity
-/user/v1/entity/delete
- required
- |
- id
- required
- |
-
-
-
-
- integer
-
-
-
- Example:
-
- 31
-
-
-
-
-
- - Please append a valid user entity id to the request - url - - |
-
|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- - To make use of the API, you require X-auth-token. - This is Available in login API Response. - - |
-
{
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Entity deleted
- successfully",
-
-
- -
-
- "result":
- [ ]
-
-
-
- }
- Get a list of organization requests based on specified filters.
-|
- page
- required
- |
-
-
-
-
- integer
-
-
-
-
-
- Page number for pagination. - |
-
|
- limit
- required
- |
-
-
-
-
- integer
-
-
-
-
-
- Number of items per page. - |
-
|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- Access token of the org admin. - |
-
| - - | -
-
-
-
- object
-
-
- |
-
{
-
- -
-
- "filters":
- {
-
- -
-
- "role":
- [
-
- -
-
- "mentor"
-
-
-
- ],
-
-
- -
-
- "status":
- [
-
- -
-
- "requested"
-
-
-
- ],
-
-
- -
-
- "handled_by":
- [
-
- -
-
- 2
-
-
-
- ]
-
-
-
- }
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Organization requests fetched
- successfully",
-
-
- -
-
- "result":
- {
-
- -
-
- "data":
- [
-
- -
-
- {
-
- -
-
- "id":
- 12,
-
-
- -
-
- "requester_id":
- 23,
-
-
- -
-
- "role":
- "mentor",
-
-
- -
-
- "status":
- "under_review",
-
-
- -
-
- "org_id":
- 43,
-
-
- -
-
- "handled_by":
- 22,
-
-
- -
-
- "requester":
- {
-
- -
-
- "id":
- 23,
-
-
- -
-
- "name":
- "Jake",
-
-
- -
-
- "email":
- "jake@gmail.com"
-
-
-
- }
-
-
-
- },
-
-
- -
-
- {
-
- -
-
- "id":
- 13,
-
-
- -
-
- "requester_id":
- 22,
-
-
- -
-
- "role":
- "mentor",
-
-
- -
-
- "status":
- "approved",
-
-
- -
-
- "org_id":
- 43,
-
-
- -
-
- "handled_by":
- 22,
-
-
- -
-
- "requester":
- {
-
- -
-
- "id":
- 23,
-
-
- -
-
- "name":
- "Jake",
-
-
- -
-
- "email":
- "jake@gmail.com"
-
-
-
- }
-
-
-
- }
-
-
-
- ],
-
-
- -
-
- "count":
- 12
-
-
-
- }
-
-
-
- }
- Update the status of an organization request.
-|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- Access token of the org admin. - |
-
| - request_id - | -
-
-
-
- integer
-
-
- |
-
| - comments - | -
-
-
-
- Array of strings
-
-
- |
-
| - status - | -
-
-
-
- string
-
-
- Enum:
- "APPROVED"
- "REJECTED"
- "UNDER_REVIEW"
-
-
- |
-
{
-
- -
-
- "request_id": 12,
-
-
- -
-
- "comments":
- [
-
- -
-
- "All uploaded
- documents
- verified"
-
-
-
- ],
-
-
- -
-
- "status":
- "APPROVED"
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Successfully updated
- organization request
- status",
-
-
- -
-
- "result":
- {
-
- -
-
- "id":
- 12,
-
-
- -
-
- "requester_id":
- 23,
-
-
- -
-
- "status":
- "approved",
-
-
- -
-
- "org_id":
- 43,
-
-
- -
-
- "handled_by":
- 22,
-
-
- -
-
- "requester":
- {
-
- -
-
- "id":
- 23,
-
-
- -
-
- "name":
- "Jake"
-
-
-
- }
-
-
-
- }
-
-
-
- }
- Get details of a specific organization request.
-|
- request_id
- required
- |
-
-
-
-
- integer
-
-
-
- Example:
-
- request_id=12
-
-
-
-
-
- ID of the request to get details for. - |
-
|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- Access token of the org admin. - |
-
{
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Organisation request details
- fetched successfully",
-
-
- -
-
- "result":
- {
-
- -
-
- "id":
- 12,
-
-
- -
-
- "requester_id":
- 23,
-
-
- -
-
- "role":
- "mentor",
-
-
- -
-
- "status":
- "approved",
-
-
- -
-
- "org_id":
- 43,
-
-
- -
-
- "handled_by":
- 22,
-
-
- -
-
- "requester":
- {
-
- -
-
- "id":
- 23,
-
-
- -
-
- "name":
- "Jake"
-
-
-
- },
-
-
- -
-
- "handler":
- {
-
- -
-
- "id":
- 24,
-
-
- -
-
- "name":
- "org_admin
- name"
-
-
-
- },
-
-
- -
-
- "comments":
- [
-
- -
-
- "Temp
- 1",
-
-
- -
-
- "Temp
- 2"
-
-
-
- ],
-
-
- -
-
- "meta":
- { }
-
-
-
- }
-
-
-
- }
- Create multiple users in bulk using a CSV file.
-|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- Access token of the org admin. - |
-
| - file_path - | -
-
-
-
- string
-
-
- |
-
{
-
- -
-
- "file_path":
- "path/to/uploaded-csv-file"
-
-
-
- }
- {
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Bulk User Invites CSV
- Uploaded Successfully",
-
-
- -
-
- "result":
- {
-
- -
-
- "id":
- 20,
-
-
- -
-
- "input_path":
- "<file_path>",
-
-
- -
-
- "status":
- "UPLOADED",
-
-
- -
-
- "created_by":
- 22,
-
-
- -
-
- "type":
- "text/csv",
-
-
- -
-
- "updated_at":
- "2023-09-20T12:00:46.533Z",
-
-
- -
-
- "created_at":
- "2023-09-20T12:00:46.533Z"
-
-
-
- }
-
-
-
- }
- Get a list of uploaded bulk invite CSV files.
-|
- page
- required
- |
-
-
-
-
- integer
-
-
-
-
-
- Page number for pagination. - |
-
|
- limit
- required
- |
-
-
-
-
- integer
-
-
-
-
-
- Number of items per page. - |
-
|
- status
- required
- |
-
-
-
-
- string
-
-
- Enum:
- "uploaded"
- "processed"
- "failed"
-
-
-
- Example:
-
- status=uploaded
-
-
-
-
-
- - Status of the bulk invite files - (uploaded/processed/failed). - - |
-
|
- X-auth-token
- required
- |
-
-
-
-
- string
-
-
-
-
-
- Access token of the org admin. - |
-
{
-
- -
-
- "responseCode":
- "OK",
-
-
- -
-
- "message":
- "Bulk Invites CSV List Fetched
- Successfully",
-
-
- -
-
- "result":
- {
-
- -
-
- "data":
- [
-
- -
-
- {
-
- -
-
- "id":
- 12,
-
-
- -
-
- "name":
- "filename.csv",
-
-
- -
-
- "input_path":
- "<path/to/uploaded-csv>",
-
-
- -
-
- "status":
- "UPLOADED",
-
-
- -
-
- "created_by":
- 4,
-
-
- -
-
- "type":
- "text/csv",
-
-
- -
-
- "output_path":
- "<path/to/output-csv>"
-
-
-
- },
-
-
- -
-
- {
-
- -
-
- "id":
- 13,
-
-
- -
-
- "name":
- "filename2.csv",
-
-
- -
-
- "input_path":
- "<path/to/uploaded-csv>",
-
-
- -
-
- "status":
- "UPLOADED",
-
-
- -
-
- "created_by":
- 4,
-
-
- -
-
- "type":
- "text/csv",
-
-
- -
-
- "output_path":
- "<path/to/output-csv>"
-
-
-
- }
-
-
-
- ],
-
-
- -
-
- "count":
- 2
-
-
-
- }
-
-
-
- }
- Dear {name},
We are delighted to inform you that you have been successfully onboarded as a {roles} for {orgName}. You can now explore {appName}.Dear {name},
Welcome to {appName} community! . We are excited for you to start your journey as a {roles}.Dear {name},
Your OTP to reset your password is {otp}. Please enter the OTP to reset your password. For your security, please do not share this OTP with anyone.', + body: 'Dear {name},
Your OTP to reset your password is {otp}. Please enter the OTP to reset your password. For security, please do not share this OTP with anyone.', }, { code: 'registrationotp', diff --git a/src/package.json b/src/package.json index b7da86789..43288d152 100644 --- a/src/package.json +++ b/src/package.json @@ -60,13 +60,6 @@ "module-alias": "^2.2.3", "moment": "^2.29.1", "moment-timezone": "^0.5.34", - "mongodb": "^4.1.2", - "mongoose": "^6.1.6", - "mongoose-autopopulate": "^0.16.0", - "mongoose-delete": "^0.5.4", - "mongoose-lean-getters": "^0.3.5", - "mongoose-paginate-v2": "^1.4.2", - "mongoose-timestamp": "^0.6.0", "p-each-series": "^2.1.0", "path-to-regexp": "^6.2.1", "pg": "^8.11.0", diff --git a/src/sample.csv b/src/sample.csv index 98b1e86ee..f1c308291 100644 --- a/src/sample.csv +++ b/src/sample.csv @@ -1,3 +1,4 @@ name,email,roles Sarah,sarah@tunerlabs.com,mentee John,john@tunerlabs.com,mentor +Pradeep,pradeep@tunerlabs.com,"mentor,session_manager" diff --git a/src/scripts/encryptDecryptEmails.js b/src/scripts/encryptDecryptEmails.js new file mode 100644 index 000000000..3050fd6a8 --- /dev/null +++ b/src/scripts/encryptDecryptEmails.js @@ -0,0 +1,66 @@ +'use strict' +const { Sequelize } = require('sequelize') +require('dotenv').config({ path: '../.env' }) +const emailEncryption = require('../utils/emailEncryption') + +const nodeEnv = process.env.NODE_ENV || 'development' + +let databaseUrl + +switch (nodeEnv) { + case 'production': + databaseUrl = process.env.PROD_DATABASE_URL + break + case 'test': + databaseUrl = process.env.TEST_DATABASE_URL + break + default: + databaseUrl = process.env.DEV_DATABASE_URL +} + +if (!databaseUrl) { + console.error(`${nodeEnv} DATABASE_URL not found in environment variables.`) + process.exit(1) +} + +const sequelize = new Sequelize(databaseUrl, { + dialect: 'postgres', + logging: process.env.NODE_ENV === 'development' ? console.log : false, +}) + +const processTable = async (tableName, operation) => { + const records = await sequelize.query(`SELECT * FROM ${tableName};`, { + type: Sequelize.QueryTypes.SELECT, + }) + + for (const record of records) { + const columnValue = + operation === 'encrypt' ? emailEncryption.encrypt(record.email) : emailEncryption.decrypt(record.email) + await sequelize.query(`UPDATE ${tableName} SET email = '${columnValue}' WHERE id = ${record.id};`) + } + + console.log(`Finished processing ${tableName} table.`) +} + +const main = async () => { + const operation = process.argv[2] + + if (operation !== 'encrypt' && operation !== 'decrypt') { + console.error('Invalid operation. Please use "encrypt" or "decrypt".') + process.exit(1) + } + + try { + await processTable('organization_user_invites', operation) + await processTable('users', operation) + await processTable('users_credentials', operation) + } catch (err) { + console.error(err) + process.exit(1) + } + + console.log('Script completed successfully.') + process.exit(0) +} + +main() diff --git a/src/scripts/generateEncyrptionKeys.js b/src/scripts/generateEncyrptionKeys.js new file mode 100644 index 000000000..88f53d886 --- /dev/null +++ b/src/scripts/generateEncyrptionKeys.js @@ -0,0 +1,3 @@ +const crypto = require('crypto') +console.log('Email Id Encryption Key: ', crypto.randomBytes(32).toString('hex')) +console.log('Email Id Encryption IV:', crypto.randomBytes(16).toString('hex')) diff --git a/src/scripts/readme.md b/src/scripts/readme.md index ae1b1fe4d..060c6fc3f 100644 --- a/src/scripts/readme.md +++ b/src/scripts/readme.md @@ -8,3 +8,23 @@ ```bash node -r module-alias/register uploadSampleCSV.js ``` + +## Email Encryption/Decryption Script + +- Navigate to the script folder using the following command + ```bash + cd src/script + ``` +- Run the **encryptDecryptEmails.js** using the following commands for encryption and decryption respectively. + + Encryption: + + ``` + node ./encryptDecryptEmails.js encrypt + ``` + + Decryption: + + ``` + node ./encryptDecryptEmails.js decrypt + ``` diff --git a/src/scripts/updateEmailTemplates.js b/src/scripts/updateEmailTemplates.js deleted file mode 100644 index 64539c2c9..000000000 --- a/src/scripts/updateEmailTemplates.js +++ /dev/null @@ -1,28 +0,0 @@ -const mongoose = require('mongoose') -require('dotenv').config({ path: '../.env' }) -require('../configs/mongodb')() -const NotificationTemplate = require('../db/notification-template/model') - -const updateNotificationTemplate = async (code, newBody) => { - try { - const filter = { code } - const update = { body: newBody } - const options = { new: true } - const updatedDoc = await NotificationTemplate.findOneAndUpdate(filter, update, options) - - if (!updatedDoc) { - console.log('Document not found') - } else { - console.log('Updated document:', updatedDoc) - } - } catch (error) { - console.error('Error updating the document:', error) - } finally { - mongoose.disconnect() - } -} - -// Usage: -const newBodyContent = - "