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 Blue organization through the API. Before that make sure to create a Partner Token to authenticate your API request.

Create a Group

to create a group required data is name and organization_id .

  • In example requests only required data is 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 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 prganization
num_members str no total user of the group
num_printers str no total printers associated with the group


Example Request

curl  -X POST "https://api2.ezeep.com/printing/v1/groups/" \
      --header "Authorization:Bearer <Access Token>" \
      --data
          "{
            \"name\":\"test\",
            \"organization_id\":\"3fa85f64-5717-4562-b3fc-2c963f66afsd\"
          }"


Example Response

{
  "id": "d16eeaa2-97ba-464a-b12a-f0ed66cc6078",
  "name": "Test",
  "description": "",
  "local_printing_enabled": false,
  "myprinters_enabled": false,
  "origin": { "provider": "ezeep" },
  "organization_id": "54e3a324-cc89-4722-8338-c285d26bef15",
  "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/users/userinvitations/"
Attribute Type Required Description
id str no uuid
email 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>" /
      --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"
}

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 prganization
num_members str no total user of the group
num_printers str 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": "54e3a324-cc89-4722-8338-c285d26bef15",
  "num_members": 0,
  "num_printers": 0
}

Udpate 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
email 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,expiray_Date and delivery_status of a user
roles str yes admin or a user
is_verified str yes verfication


Example Request

curl  -X PATCH "https://account.ezeep.com/v1/users/cbe182e3-d726-4055-9459-f23bd0a73d78/" \
      --header "Authorization:Bearer <Access Token>" \
      --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
}

Update Group Information

Each group get a specific id ,user can delete 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 prganization
num_members str no total user of the group
num_printers str 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>" \
      --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":"4f0277fc-a336-4621-81f9-bea114e6fa2c","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": "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 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/cbe182e3-d726-4055-9459-f23bd0a73d78/' \
      --header "Authorization:Bearer <Access Token>"
      -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"
    }
  ]
}

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": "19b5963a-35eb-416c-9ca4-a4c2950385fb" }]
}

Remove a User from a Group

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 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/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"
    }
  ]
}

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 prganization
num_members str no total user of the group
num_printers str 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
email 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,expiray_Date and delivery_status of a user
roles str yes admin or a user
is_verified str yes verfication


Example Request

curl  -X DELETE "https://account.ezeep.com/v1/users/0810f57c-6ce6-4ef0-badc-dcd121576b84/" \
      --header "Authorization:Bearer <Access Token>"


Example Response


{
    204
}