Groups

  1. Get all groups
  2. Add user into the groups
  3. Remove user from a group
  4. Get total groups a user is assigned to.

Get all Groups

Returns all groups assigned to your organisation.


GET "https://api2.ezeep.com/printing/v1/groups/"
Attribute Type Required Description
id str no 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/" \
      --header "Authorization:Bearer <Access Token>"


Example Response

{
  "count": 2,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": "8228b289-2926-4813-8267-c61c767e55f0",
      "name": "free",
      "description": "free",
      "local_printing_enabled": true,
      "myprinters_enabled": false,
      "origin": { "provider": "Ezeep" },
      "organization_id": "4f0277fc-a336-4621-81f9-bea114e6fa2c",
      "num_members": 3,
      "num_printers": 6
    },
    {
      "id": "bd63ffd9-6904-46ec-b271-b258a59f07a5",
      "name": "test",
      "description": "",
      "local_printing_enabled": false,
      "myprinters_enabled": false,
      "origin": { "provider": "Ezeep" },
      "organization_id": "4f0277fc-a336-4621-81f9-bea114e6fa2c",
      "num_members": 1,
      "num_printers": 1
    }
  ]
}

Add a User to a Group

Each user can be assigned to multiple groups. you will need the user_id and group_id.

  • If the user is already part of a group(A), and you want to add the user into another group(B) then you should add both groups_id(A,B) in the data. If you only add the user in to group B then the user will be removed from group(A) and will 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>"
      --data "{
          \"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 a User from a Group

To remove a user from a group, you will need to add all the groups you would like the user to still be assigned to and leave out the no longer required group ids.


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-226-481-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 assigned Groups for a User

Each user has their own id which is assigned to the specific group. The user can be assigned to multiple groups.

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