Table of Contents
- Add User
- Edit User
- Get User Information
- Get User Listing
- Assign App License to User
- Revoke App License from User
- Error Codes
Add User
This API is used to add a new user.
- API Route: https://api.enablex.io/ucaas/v1/users
- HTTP Request: POST
- Role Based Accessibility:
- Reseller Admin: Accesses Users under Reseller and all Customers under it
- EnableX Admin: Accesses Users of any Reseller / Customer under EnableX
- Customer: Accesses own User Base
Headers Explanation:
Content-Type
: To haveapplication/json
to notify that the body content is in JSON.
Request Example (OAuth2):
POST https://api.enablex.io/ucaas/v1/users Content-Type: application/json Authorization: Token ACCESS_TOTKEN { "user_type": "String", "first_name": "String", "middle_name": "String", "last_name": "String", "email": "String", "password": "String", "status": "String", "department": "String", "designation": "String", "send_welcome_mail": "Boolean" }
Raw Body JSON Payload Explanation:
Object/Key | Data Type | Required | Description |
user_type | String | Required | Enumerated Values. Check App data.constant.php (AP) |
first_name | String | Required | First Name |
middle_name | String | Optional | Middle Name |
last_name | String | Optional | Last Name |
email | String | Required | Email should be unique |
password | String | Optional | If not passed, password to be generated |
status | String | Optional | Enum. Check data.constant.php. If not passed, set it to active (A: Active, S: Suspend) |
department | String | Optional | |
designation | String | Optional | |
send_welcome_mail | Boolean | Optional | If true, send a mail with login details to user |
Response Example (Success):
{ "result": "Number", "user": { "user_id": "Number", "name": "String" } }
Response Example (Error):
{ "result": "Number", "msg": "String", "desc": "String" }
Edit User
This API is used to update Contact Information. All Keys in JSON payload are optional. Use only the one which you want to edit.
- API Route: https://api.enablex.io/ucaas/v1/users/{{$USER_ID}}
- HTTP Request: PATCH
- Role Based Accessibility:
- Reseller Admin: Accesses Users under Reseller and all Customers under it
- EnableX Admin: Accesses Users of any Reseller/Customer under EnableX
- Customer: Accesses own User Base
Headers Explanation:
Content-Type
: To haveapplication/json
to notify that the body content is in JSON.
Request Example (OAuth2):
PATCH https://api.enablex.io/ucaas/v1/users/{{$USER_ID}} Content-Type: application/json Authorization: Token ACCESS_TOTKEN { "user_type": "String", "first_name": "String", "middle_name": "String", "last_name": "String", "status": "String", "designation": "String" }
Raw Body JSON Payload Explanation:
Object/Key | Data Type | Required | Description |
first_name | String | Optional | First Name |
middle_name | String | Optional | Middle Name |
last_name | String | Optional | Last Name |
status | String | Optional | Enum. Check data.constant.php. |
department | String | Optional | |
designation | String | Optional |
Response Example:
{ "result": "Number", "msg": "User $first_name $middle_name $last_name has been updated", "user": { "user_id": "Number", "name": "Sting" } }
Get User Information
This API is used to get information for a given User ID.
- API Route: https://api.enablex.io/ucaas/v1/users/{{$USER_ID}}
- HTTP Request: GET
- Role Based Accessibility:
- Reseller Admin: Accesses Users under Reseller and all Customers under it
- EnableX Admin: Accesses Users of any Reseller/Customer under EnableX
- Customer: Accesses own User Base
Headers Explanation:
Content-Type
: To haveapplication/json
to notify that the body content is in JSON.
Response Example:
GET https://api.enablex.io/ucaas/v1/users/{{$USER_ID}} Content-Type: application/json Authorization: Token ACCESS_TOTKEN { "result": 1, "user": { "user_id": "String", "user_type": "String", "first_name": "String", "middle_name": "String", "last_name": "String", "email": "String", "status": "String", "designation": "String", "department": "String", "vc": { "access": "Boolean", "status": "String", "wef": "Date" }, "wb": { "access": "Boolean", "status": "String", "wef": "Date" }, "created_at": "Date", "updated_at": "Date", "activated_at": "Date", "suspended_at": "Date" } }
Get User Listing
This API is used to search or get listing of all Users.
- API Route: https://api.enablex.io/ucaas/v1/users, https://api.enablex.io/ucaas/v1/users?page={{$PAGE_NUM}}
- HTTP Request: GET
- Role Based Accessibility:
- Reseller Admin: Accesses Users under Reseller and all Customers under it
- EnableX Admin: Accesses Users of any Reseller / Customer under EnableX
- Customer: Accesses own User Base
Headers Explanation:
Content-Type
: To haveapplication/json
to notify that the body content is in JSON.
URL Placeholder Explanation::
Object/Key | Description |
page | Data return requested for the Page. Default 1. |
page_length | Total Records to include in a page. Default 10. |
from_create_dt | From Create Date Filter |
to_create_dt | To Create Date Filter |
search_by | Required if “search_string” is used. Use any of the enumerated values: o first_name: To search on first_name field o last_name: To search on last_name field o email: To search on email field o status: To search by status constants o user_type: To search by user-type constants o vc: Boolean. To search for user with Meeting Access o wb: Boolean. To search for users with Webinar Access |
search_string | Required with search_by. |
order_by | Database field names. |
order_qualify | Default “asc”. Enumerated values: asc, desc. |
Request Example (HTTP Basic Authentication):
GET https://api.enablex.io/ucaas/v1/users, https://api.enablex.io/ucaas/v1/users?page={{$PAGE_NUM}} Content-Type: application/json Authorization: Basic BASE64_AUTH_STRING
Response Example:
{ "result": 1, "search": { "page": "Number", "page_length": "Number", "from_create_dt": "Date", "to_create_dt": "Date", "search_by": "String", "search_string": "String", "order_by": "String", "order_qualify": "String" }, "users": [ { "user_id": "String", "user_type": "String", "first_name": "String", "middle_name": "String", "last_name": "String", "email": "String", "status": "String", "designation": "String", "department": "String", "vc": { "access": "Boolean", "status": "String", "wef": "Date" }, "wb": { "access": "Boolean", "status": "String", "wef": "Date" }, "created_at": "Date", "updated_at": "Date", "activated_at": "Date", "suspended_at": "Date" } ] }
Assign App License to User
This API is used to assign license i.e. a Subscription-ID to a user to allow him access the related app.
- API Route: https://api.enablex.io/ucaas/v1/users/{{$USER_ID}}
- HTTP Request: PATCH
- Role Based Accessibility:
- Reseller Admin: Accesses Users under Reseller and all Customers under it
- EnableX Admin: Accesses Users of any Reseller / Customer under EnableX
- Customer: Accesses own User Base
Headers Explanation:
Content-Type
: To haveapplication/json
to notify that the body content is in JSON.X-License
:assign
Request Example (HTTP Basic Authentication):
PATCH https://api.enablex.io/ucaas/v1/users/{{$USER_ID}} Content-Type: application/json Authorization: Basic BASE64_AUTH_STRING { "app": "String", "subscription_id": "String", "send_access_mail": "Boolean" }
Raw Body JSON Payload Explanation:
Object/Key | Data Type | Required | Description |
app | String | Required | Enumerated Values: vc, wb |
subscription_id | String | Required | Object ID of subscription to be assigned |
send_access_mail | Boolean | If true, send mail to user with Permanent Room ID |
Response Example:
{ "result": "Number", "msg": "User $first_name $middle_name $last_name has been given access to Meeting Application", "user": { "user_id": "Number", "name": "Sting", "access": { "app": "String", "url": "String", "ppin": "String", "mpin": "String" } } }
Revoke App License From User
This API is used to remove license from a user to bar him from using a app.
- API Route: https://api.enablex.io/ucaas/v1/users/{{$USER_ID}}
- HTTP Request: PATCH
- Role Based Accessibility:
- Reseller Admin: Accesses Users under Reseller and all Customers under it
- EnableX Admin: Accesses Users of any Reseller / Customer under EnableX
- Customer: Accesses own User Base
Headers Explanation:
Content-Type
: To haveapplication/json
to notify that the body content is in JSON.X-License: revoke
Request Example (HTTP Basic Authentication):
PATCH https://api.enablex.io/ucaas/v1/users/{{$USER_ID}} Content-Type: application/json Authorization: Basic BASE64_AUTH_STRING { "app": "String" }
Raw Body JSON Payload Explanation:
Object/Key | Data Type | Required | Description |
app | String | Required | Enumerated Values: vc, wb |
Response Example:
{ "result": "Number", "msg": "User $first_name $middle_name $last_name has been revoked access to Meeting Application", "user": { "user_id": "Number", "name": "Sting", "access": { "app": "String" } } }
Error Codes
Error Code | Description |
---|---|
1103 | The email has already been taken, put a unique email address |
1105 | The email is a valid email |
1106 | The selected email is invalid |
1111 | The first name is required |
1112 | First name must be a string |
1115 | Middle name must be a string |
1119 | Last name must be a string |
1121 | The user password must be a string |
1131 | Status must be a string (A: Active, S: Suspended) |
1141 | Department must be a string |
1145 | Designation must be a string |
1152 | User type must be string (AP : User) |
1153 | The User type entered is invalid |
1161 | Send Welcome mail is Boolean (True: send mail with login details) |
1191 | Status is invalid |