- List Users
- Get Specific User Information
- Invite Users
- Check Total Invitation Send Requests
- Update User Information
- Resend User Invitation
- Get all Members
- Add Users to Groups
- Remove Users from Groups
- Get Total Groups of a User
- Delete a User
Users
A user can be a Member of one or more Organizations. Only users who are also members of the organizations you manage are displayed
List Users
This function takes pagination parameters limit and offset to restrict the list of users.
An ordinary user only gets their own information and cannot retrieve information about the other users in the organization. Only an admin can retrieve the list of all users associated with the organization.
GET "https://account.ezeep.com/v1/users/"
Response attributes:
| Attribute | Type | Description |
|---|---|---|
| id | string | uuid |
| string | email of the user | |
| first_name | string | first name of the user |
| last_name | string | last name of the user |
| display_name | string | full name |
| date_joined | string | date (ISO 8601) of joining the ezeep cloud |
| azure_profile | object | azure profile |
| id_profile | object | if azure profile, then it will have an id |
| user_invitations | list of objects | list of email, expire_date and delivery_status of a user |
| roles | list of strings | admin or a user |
| is_verified | boolean | whether the user is verified |
Example Request
curl -X GET "https://account.ezeep.com/v1/users/" \
--header "Authorization:Bearer <Access Token>"
Example Response
{
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": "99e3ca15-fafc-4e37-a741-842e1ae4ad07",
"email": "wattoorocx@gmail.com",
"first_name": "Muhammad Ahmad",
"last_name": "Falak",
"display_name": "Muhammad Ahmad Falak",
"date_joined": "2021-05-21T11:32:27.796675Z",
"azure_profile": null,
"id_profile": null,
"user_invitations": [
{
"id": "e142a76f-0179-4afd-818c-663a821c2e2e",
"updated": "2021-05-21T11:32:27.817491Z",
"email": "wattoorocx@gmail.com",
"expire_date": "2021-06-20T13:32:20.642000Z",
"delivery_status": "SENT",
"invitation_status": "EXPIRED"
}
],
"roles": ["user"],
"is_verified": false
},
{
"id": "9f2e2cc1-58ee-4426-998f-62644895f162",
"email": "lisasskateboards@mailinator.com",
"first_name": "Gav",
"last_name": "Justin",
"display_name": "Gav Justin",
"date_joined": "2021-04-06T20:01:43.481259Z",
"azure_profile": null,
"id_profile": {
"oid": "64064f74-024d-4a47-9915-742320cf63c9",
"preferred_username": "lisasskateboards@mailinator.com",
"name": ""
},
"user_invitations": null,
"roles": ["admin"],
"is_verified": true
}
]
}
Get Specific User Information
To get the details of the specific user, client can a send a request with the user id
GET "https://account.ezeep.com/v1/users/<id>"
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | string | yes | uuid of the user (path parameter) |
Response attributes:
| Attribute | Type | Description |
|---|---|---|
| id | string | uuid |
| string | email of the user | |
| first_name | string | first name of the user |
| last_name | string | last name of the user |
| display_name | string | full name |
| date_joined | string | date (ISO 8601) of joining the ezeep cloud |
| azure_profile | object | azure profile |
| id_profile | object | if azure profile, then it will have an id |
| user_invitations | list of objects | list of email, expire_date and delivery_status of a user |
| roles | list of strings | admin or a user |
| is_verified | boolean | whether the user is verified |
Example Request
curl -X GET "https://account.ezeep.com/v1/users/99e3ca15-fafc-4e37-a741-842e1ae4ad07" \
--header "Authorization:Bearer <Access Token>"
Example Response
{
"id": "99e3ca15-fafc-4e37-a741-842e1ae4ad07",
"email": "example@gmail.com",
"first_name": "Muhammad Ahmad",
"last_name": "Falak",
"display_name": "Muhammad Ahmad Falak",
"date_joined": "2021-05-21T11:32:27.796675Z",
"azure_profile": null,
"id_profile": null,
"user_invitations": [
{
"id": "e142a76f-0179-4afd-818c-663a821c2e2e",
"updated": "2021-05-21T11:32:27.817491Z",
"email": "example@gmail.com",
"expire_date": "2021-06-20T13:32:20.642000Z",
"delivery_status": "SENT",
"invitation_status": "EXPIRED"
}
],
"roles": ["user"],
"is_verified": false
}
Invite Users
To invite a user client have to sent request and then request will be accepted by a user.
POST "https://account.ezeep.com/v1/userinvitations/"
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | str | no | uuid |
| str | yes | user_email | |
| expire_date | str | yes | year-month-dayThrs:min:sec |
| delivery_status | str | no | info about delivery status verifying if request will be sent ot not |
| invitation_status | str | no | invitation is expired or accepted |
| Authorization | str | yes | Bearer {{Access Token}} |
Example Request
curl -X POST "https://account.ezeep.com/v1/userinvitations/" \
--header "Authorization:Bearer <Access Token>" \
--header "Content-Type: application/json" \
--data "{
\"email\": \"wattoorocx1@gmail.com\",
\"expire_date\": \"2021-07-22T15:15:33\"
}"
Example Response
{
"id": "9c056c16-47db-4972-a132-39d14216c3e2",
"updated": "2021-06-22T14:07:20.922318Z",
"email": "wattoorocx1@gmail.com",
"expire_date": "2021-07-22T15:15:33.761000Z",
"delivery_status": "SENT",
"invitation_status": "OPEN"
}
Check Total Invitation Send Requests
To check in total how many requests had been sent from this account
GET "https://account.ezeep.com/v1/userinvitations/"
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | str | no | uuid |
| str | no | user_email | |
| expire_date | str | no | year-month-dayThrs:min:sec |
| delivery_status | str | no | info about delivery status verifying if request will be sent ot not |
| invitation_status | str | no | invitation is expired or accepted |
| Authorization | str | yes | Bearer {{Access Token}} |
Example Request
curl -X GET "https://account.ezeep.com/v1/userinvitations/" \
--header "Authorization:Bearer <Access Token>"
Example Response
{
"count": 5,
"next": null,
"previous": null,
"results": [
{
"id": "1a130f47-04ca-4bd9-aab8-1bdab5ba3447",
"updated": "2021-06-22T13:17:15.565108Z",
"email": "muhammad@ezeep.com",
"expire_date": "2021-07-22T15:15:33.761000Z",
"delivery_status": "SENT",
"invitation_status": "ACCEPTED"
},
{
"id": "074bf6b1-28b6-415b-826c-7d4480cde685",
"updated": "2021-05-21T11:35:30.149403Z",
"email": "gavnewton87@gmail.com",
"expire_date": "2021-06-20T13:35:17.892000Z",
"delivery_status": "SENT",
"invitation_status": "EXPIRED"
},
{
"id": "e142a76f-0179-4afd-818c-663a821c2e2e",
"updated": "2021-05-21T11:32:27.817491Z",
"email": "wattoorocx@gmail.com",
"expire_date": "2021-06-20T13:32:20.642000Z",
"delivery_status": "SENT",
"invitation_status": "EXPIRED"
}
]
}
Update User Information
The only attributes the client can change are first_name, last_name, email and roles.
PATCH "https://account.ezeep.com/v1/users/<user_id>/"
| Attribute | Type | Required | Description |
|---|---|---|---|
| user_id | string | yes | uuid of the user (path parameter) |
| first_name | string | no | new first name of the user |
| last_name | string | no | new last name of the user |
| string | no | new email of the user | |
| roles | string | no | admin or user |
Example Request
curl -X PATCH "https://account.ezeep.com/v1/users/cbe182e3-d726-4055-9459-f23bd0a73d78/" \
--header "Authorization:Bearer <Access Token>" \
--header "Content-Type: application/json" \
--data "{
\"last_name\": \"falak\",
\"roles\" : \"user\"
}"
Example Response
{
"id": "cbe182e3-d726-4055-9459-f23bd0a73d78",
"email": "falakmuhammadahmad@gmail.com",
"first_name": "ahmad",
"last_name": "falak",
"display_name": "ahmad falak",
"date_joined": "2021-06-22T14:15:16.343893Z",
"azure_profile": null,
"id_profile": null,
"user_invitations": [
{
"id": "6016428a-0185-4639-9aef-4ccf4e1718a3",
"updated": "2021-06-22T14:15:16.364398Z",
"email": "falakmuhammadahmad@gmail.com",
"expire_date": "2021-07-22T15:15:33Z",
"delivery_status": "SENT",
"invitation_status": "OPEN"
}
],
"roles": ["user"],
"is_verified": false
}
Resend User Invitation
When the client sends an invitation to a user it generates a unique user_invitation id, which is totally different from user unique id. To resend the invitation the client needs the user invitation id.
PATCH "https://account.ezeep.com/v1/userinvitations/<invitation_id>/"
| Attribute | Type | Required | Description |
|---|---|---|---|
| invitation_id | str | yes | uuid |
| str | no | user_email | |
| expire_date | str | no | year-month-dayThrs:min:sec |
| delivery_status | str | no | info about delivery status verifying if request will be sent ot not |
| invitation_status | str | no | invitation is expired or accepted |
| Authorization | str | yes | Bearer {{Access Token}} |
Example Request
curl -X PATCH "https://account.ezeep.com/v1/userinvitations/e142a76f-0179-4afd-818c-663a821c2e2e/" \
--header "Authorization:Bearer <Access Token>" \
--header "Content-Type: application/json" \
--data "{
\"email\": \"wattoorocx1@gmail.com\",
\"expire_date\": \"2021-07-22T15:15:33Z\"
}"
Example Response
{
"id": "e142a76f-0179-4afd-818c-663a821c2e2e",
"email": "wattoorocx1@gmail.com",
"expire_date": "2021-07-22T15:15:33Z"
}
Get all Members
To read about all of the users information and from which group user belong. All information for a specific user can be read and check which settings are enabled for a specific user.
GET "https://api2.ezeep.com/printing/v1/users/"
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | str | no | uuid |
| local_printing_enabled | bool | no | local printing support |
| self_service_enabled | bool | no | self service enabled |
| myprinters_enabled | bool | no | printer selection in user portal |
| pull_printing_enabled | bool | no | pull printing enabled |
| groups | str | no | user associated with groups |
Example Request
curl -X GET "https://api2.ezeep.com/printing/v1/users/" \
--header "Authorization:Bearer <Access Token>"
Example Response
{
"count": 4,
"next": null,
"previous": null,
"results": [
{
"id": "99e3ca15-fafc-4e37-a741-842e1ae4ad07",
"local_printing_enabled": false,
"self_service_enabled": true,
"myprinters_enabled": true,
"groups": [{ "group_id": "e882245a-9619-4de8-87e4-28ccf25435cf" }]
},
{
"id": "9f2e2cc1-58ee-4426-998f-62644895f162",
"local_printing_enabled": false,
"self_service_enabled": true,
"myprinters_enabled": true,
"groups": [{ "group_id": "8228b289-2926-4813-8267-c61c767e55f0" }]
},
{
"id": "a83b3e13-d69f-4e62-9073-cccae4e35bd9",
"local_printing_enabled": false,
"self_service_enabled": true,
"myprinters_enabled": true,
"groups": []
},
{
"id": "cbe182e3-d726-4055-9459-f23bd0a73d78",
"local_printing_enabled": false,
"self_service_enabled": true,
"myprinters_enabled": true,
"groups": [{ "group_id": "8228b289-2926-4813-8267-c61c767e55f0" }]
}
]
}
Add Users to Groups
User can be a part of multiple groups.To do that need user_id and group_id.
- If user is already part of a group(A), and client want to add user into another group(B) then client should add both groups_id(A,B) in the data. Otherwise if client passing only second _group_id(B) in data,then user will be removed from group(A) and only be a part of group(B) .
PATCH "https://api2.ezeep.com/printing/v1/users/<user_id>/"
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | str | yes | uuid |
| local_printing_enabled | bool | no | local printing support |
| self_service_enabled | bool | no | self service enabled |
| myprinters_enabled | bool | no | printer selection in user portal |
| pull_printing_enabled | bool | no | pull printing enabled |
| groups | str | yes | user associated with groups |
Example Request
curl -X PATCH 'https://api2.ezeep.com/printing/v1/users/cbe182e3-d726-4055-9459-f23bd0a73d78/' \
--header "Authorization:Bearer <Access Token>" \
--header "Content-Type: application/json" \
-D {
"groups":[
{"group_id":"8228b289-2926-4813-8267-c61c767e55f0"},{"group_id":"bd63ffd9-6904-46ec-b271-b258a59f07a5"}
]
}
Example Response
{
"id": "cbe182e3-d726-4055-9459-f23bd0a73d78",
"local_printing_enabled": false,
"self_service_enabled": true,
"myprinters_enabled": true,
"groups": [
{
"group_id": "bd63ffd9-6904-46ec-b271-b258a59f07a5"
},
{
"group_id": "8228b289-2926-4813-8267-c61c767e55f0"
}
]
}
Remove Users from Groups
From the above example if client want to remove user from a group whose id is 8228b289-2926-4813-8267-c61c767e55f0.In request pass only group_ids in which client want user to a part of,from all of the groups user will be removed.
PATCH "https://api2.ezeep.com/printing/v1/users/<user_id>/"
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | str | yes | uuid |
| local_printing_enabled | bool | no | local printing support |
| self_service_enabled | bool | no | self service enabled |
| myprinters_enabled | bool | no | printer selection in user portal |
| pull_printing_enabled | bool | no | pull printing enabled |
| groups | str | yes | user associated with groups |
Example Request
curl -X PATCH "https://api2.ezeep.com/printing/v1/users/cbe182e3-d726-4055-9459-f23bd0a73d78/" \
--header "Authorization:Bearer <Access Token>"
--data "{
\"groups\":[
{\"group_id\":\"8228b289-2926-4813-8267-c61c767e55f0\"}
]
}"
Example Response
{
"id": "cbe182e3-d726-4055-9459-f23bd0a73d78",
"local_printing_enabled": false,
"self_service_enabled": true,
"myprinters_enabled": true,
"groups": [
{
"group_id": "8228b289-2926-4813-8267-c61c767e55f0"
}
]
}
Get Total Groups of a User
Each user have his own id ,which is associated to the specific group. User can be a part of more than one group.
- To check with how may groups, user is associated
GET "https://api2.ezeep.com/printing/v1/users/<id>"
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | str | yes | uuid |
| local_printing_enabled | bool | no | local printing support |
| self_service_enabled | bool | no | self service enabled |
| myprinters_enabled | bool | no | printer selection in user portal |
| pull_printing_enabled | bool | no | pull printing enabled |
| groups | str | no | user associated with groups |
Example Request
curl -X GET "https://api2.ezeep.com/printing/v1/users/0050a068-cc7b-4490-951a-06920a610ee5" \
--header "Authorization:Bearer <Access Token>"
Example Response
{
"id": "0050a068-cc7b-4490-951a-06920a610ee5",
"local_printing_enabled": true,
"self_service_enabled": true,
"myprinters_enabled": false,
"groups": [{ "group_id": "19b5963a-35eb-416c-9ca4-a4c2950385fb" }]
}
Delete a User
Each user has a specific id; an admin can delete a specific user by using this user_id.
DELETE "https://account.ezeep.com/v1/users/<id>/"
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | string | yes | uuid of the user to delete (path parameter) |
Example Request
curl -X DELETE "https://account.ezeep.com/v1/users/0810f57c-6ce6-4ef0-badc-dcd121576b84/" \
--header "Authorization:Bearer <Access Token>"
Example Response
{
204
}