- Create a Group
- Invite a User
- Read a specific Group by id
- Update User Information
- Update Group Information
- Get all Members of Organization
- Add User to a Group
- Get total registered Groups for a User
- Remove a User from a Group
- Delete a Group
- Delete a User
Organization & User Management Quick Guide
This guide will walk you through the different endpoints and functionalities of the Organization and User Management API. You will learn how to create groups, invite users, get information on groups and users, add and remove users from a group, manage user roles and delete users and groups from the ezeep organization through the API. Authenticate your requests with an access token that has admin rights in the organization. A Partner Token can act as organization admin in all organizations created by that partner.
Create a Group
to create a group required data is name and organization_id .
- In example requests only required
datais used but you can also use other parameters according to your requirements.
POST "https://api2.ezeep.com/printing/v1/groups/"
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | str | yes | uuid |
| name | str | yes | name of the group |
| description | str | no | group description |
| local_printing_enabled | boolean | no | |
| myprinters_enabled | boolean | no | |
| origin | str | no | provider of the printing that will be ezeep |
| organization_id | str | yes | uuid of the organization |
| num_members | int | no | total user of the group |
| num_printers | int | no | total printers associated with the group |
Example Request
curl -X POST "https://api2.ezeep.com/printing/v1/groups/" \
--header "Authorization: Bearer <access_token>" \
--header "Content-Type: application/json" \
--data '{"name": "test", "organization_id": "<organization_id>"}'
Example Response
{
"id": "d16eeaa2-97ba-464a-b12a-f0ed66cc6078",
"name": "Test",
"description": "",
"local_printing_enabled": false,
"myprinters_enabled": false,
"origin": { "provider": "ezeep" },
"organization_id": "00000000-0000-4000-8000-0000000000a1",
"num_members": 0,
"num_printers": 0
}
Invite a User
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": "user@example.com", "expire_date": "2021-07-22T15:15:33"}'
Example Response
{
"id": "9c056c16-47db-4972-a132-39d14216c3e2",
"updated": "2021-06-22T14:07:20.922318Z",
"email": "user@example.com",
"expire_date": "2021-07-22T15:15:33.761000Z",
"delivery_status": "SENT",
"invitation_status": "OPEN"
}
Read a specific Group by id
Each group get a specific id ,if you know the id of the group then associated group will be in response.
GET "https://api2.ezeep.com/printing/v1/groups/<id>"
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | str | yes | uuid |
| name | str | no | name of the group |
| description | str | no | group description |
| local_printing_enabled | boolean | no | |
| myprinters_enabled | boolean | no | |
| origin | str | no | provider of the printing that will be ezeep |
| organization_id | str | no | uuid of the organization |
| num_members | int | no | total user of the group |
| num_printers | int | no | total printers associated with the group |
Example Request
curl -X GET "https://api2.ezeep.com/printing/v1/groups/dd8d4007-2522-42ab-ac2e-bf23d87defc3" \
--header "Authorization: Bearer <access_token>"
Example Response
{
"id": "dd8d4007-2522-42ab-ac2e-bf23d87defc3",
"name": "Test",
"description": "",
"local_printing_enabled": false,
"myprinters_enabled": false,
"origin": { "provider": "ezeep" },
"organization_id": "00000000-0000-4000-8000-0000000000a1",
"num_members": 0,
"num_printers": 0
}
Update User Information
Information that client can only change are first name, last name ,email and role . To
PATCH "https://account.ezeep.com/v1/users/<user_id>/"
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | str | no | uuid |
| str | yes | email of the user | |
| first_name | str | yes | first name of the user |
| last_name | str | yes | last name of the user |
| display_name | str | yes | full name |
| date_joined | str | yes | date of joining the ezeep cloud |
| azure_profile | str | yes | azure profile |
| id_profile | str | yes | if azure profile ,then it will have a id |
| user_invitations | str | yes | list of email,expire_date and delivery_status of a user |
| roles | str | yes | admin or a user |
| is_verified | str | yes | verification |
Example Request
curl -X PATCH "https://account.ezeep.com/v1/users/00000000-0000-4000-8000-0000000000c1/" \
--header "Authorization: Bearer <access_token>" \
--header "Content-Type: application/json" \
--data '{"last_name": "Doe", "roles": "user"}'
Example Response
{
"id": "00000000-0000-4000-8000-0000000000c1",
"email": "jane.doe@example.com",
"first_name": "Jane",
"last_name": "Doe",
"display_name": "Jane Doe",
"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": "jane.doe@example.com",
"expire_date": "2021-07-22T15:15:33Z",
"delivery_status": "SENT",
"invitation_status": "OPEN"
}
],
"roles": ["user"],
"is_verified": false
}
Update Group Information
Each group get a specific id ,user can update that specific group by using this id
PATCH "https://api2.ezeep.com/printing/v1/groups/<id>/"
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | str | yes | uuid |
| name | str | yes | name of the group |
| description | str | yes | group description |
| local_printing_enabled | boolean | no | |
| myprinters_enabled | boolean | no | |
| origin | str | no | provider of the printing that will be ezeep |
| organization_id | str | no | uuid of the organization |
| num_members | int | no | total user of the group |
| num_printers | int | no | total printers associated with the group |
Example Request
curl -X PATCH "https://api2.ezeep.com/printing/v1/groups/bd63ffd9-6904-46ec-b271-b258a59f07a5/" \
--header "Authorization: Bearer <access_token>" \
--header "Content-Type: application/json" \
--data '{"name": "test-2", "description": "this is test group"}'
Example Response
{
"id":"bd63ffd9-6904-46ec-b271-b258a59f07a5","name":"test-2","description":"this is test group","local_printing_enabled":false,"myprinters_enabled":false,"origin":{"provider":"ezeep"},"organization_id":"00000000-0000-4000-8000-0000000000a1","num_members":1,"num_printers":1
}
Get all Members of Organization
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 | str | no | |
| self_service_enabled | str | no | |
| myprinters_enabled | str | no | |
| pull_printing_enabled | str | no | |
| 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": "00000000-0000-4000-8000-0000000000b1" }]
},
{
"id": "a83b3e13-d69f-4e62-9073-cccae4e35bd9",
"local_printing_enabled": false,
"self_service_enabled": true,
"myprinters_enabled": true,
"groups": []
},
{
"id": "00000000-0000-4000-8000-0000000000c1",
"local_printing_enabled": false,
"self_service_enabled": true,
"myprinters_enabled": true,
"groups": [{ "group_id": "00000000-0000-4000-8000-0000000000b1" }]
}
]
}
Add User to a Group
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 | str | no | |
| self_service_enabled | str | no | |
| myprinters_enabled | str | no | |
| pull_printing_enabled | str | no | |
| groups | str | yes | user associated with groups |
Example Request
curl -X PATCH 'https://api2.ezeep.com/printing/v1/users/00000000-0000-4000-8000-0000000000c1/' \
--header "Authorization: Bearer <access_token>" \
--header "Content-Type: application/json" \
--data '{"groups": [{"group_id": "00000000-0000-4000-8000-0000000000b1"}, {"group_id": "bd63ffd9-6904-46ec-b271-b258a59f07a5"}]}'
Example Response
{
"id": "00000000-0000-4000-8000-0000000000c1",
"local_printing_enabled": false,
"self_service_enabled": true,
"myprinters_enabled": true,
"groups": [
{
"group_id": "bd63ffd9-6904-46ec-b271-b258a59f07a5"
},
{
"group_id": "00000000-0000-4000-8000-0000000000b1"
}
]
}
Get total registered Groups for 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 | str | no | |
| self_service_enabled | str | no | |
| myprinters_enabled | str | no | |
| pull_printing_enabled | str | no | |
| 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": "00000000-0000-4000-8000-0000000000b2" }]
}
Remove a User from a Group
To remove the user from the above example from the group 00000000-0000-4000-8000-0000000000b1, pass only the group IDs the user should stay in. The user is removed from all other groups.
PATCH "https://api2.ezeep.com/printing/v1/users/<user_id>/"
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | str | yes | uuid |
| local_printing_enabled | str | no | |
| self_service_enabled | str | no | |
| myprinters_enabled | str | no | |
| pull_printing_enabled | str | no | |
| groups | str | yes | user associated with groups |
Example Request
curl -X PATCH "https://api2.ezeep.com/printing/v1/users/00000000-0000-4000-8000-0000000000c1/" \
--header "Authorization: Bearer <access_token>" \
--header "Content-Type: application/json" \
--data '{"groups": [{"group_id": "bd63ffd9-6904-46ec-b271-b258a59f07a5"}]}'
Example Response
{
"id": "00000000-0000-4000-8000-0000000000c1",
"local_printing_enabled": false,
"self_service_enabled": true,
"myprinters_enabled": true,
"groups": [
{
"group_id": "bd63ffd9-6904-46ec-b271-b258a59f07a5"
}
]
}
Delete a Group
Each group get a specific id ,admin can delete that specific group by using group id
DELETE "https://api2.ezeep.com/printing/v1/groups/<id>/"
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | str | yes | uuid |
| name | str | no | name of the group |
| description | str | no | group description |
| local_printing_enabled | boolean | no | |
| myprinters_enabled | boolean | no | |
| origin | str | no | provider of the printing that will be ezeep |
| organization_id | str | no | uuid of the organization |
| num_members | int | no | total user of the group |
| num_printers | int | no | total printers associated with the group |
Example Request
curl -X DELETE "https://api2.ezeep.com/printing/v1/groups/d16eeaa2-97ba-464a-b12a-f0ed66cc6078/" \
--header "Authorization: Bearer <access_token>"
Example Response
{
204
}
Delete a User
Each user get a specific id ,admin can delete that specific user by using his/her user_id_
DELETE "https://account.ezeep.com/v1/users/<id>/"
| Attribute | Type | Required | Description |
|---|---|---|---|
| id | str | no | uuid |
| str | yes | email of the user | |
| first_name | str | yes | first name of the user |
| last_name | str | yes | last name of the user |
| display_name | str | yes | full name |
| date_joined | str | yes | date of joining the ezeep cloud |
| azure_profile | str | yes | azure profile |
| id_profile | str | yes | if azure profile ,then it will have a id |
| user_invitations | str | yes | list of email,expire_date and delivery_status of a user |
| roles | str | yes | admin or a user |
| is_verified | str | yes | verification |
Example Request
curl -X DELETE "https://account.ezeep.com/v1/users/0810f57c-6ce6-4ef0-badc-dcd121576b84/" \
--header "Authorization: Bearer <access_token>"
Example Response
{
204
}