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 page and per_page to restrict the list of users

For Ordinary Users

Ordinary user will only get his own information. User will not be able to retrieve information about rest of the users in the organization.


GET "https://account.ezeep.com/v1/users/"
Attribute Type Required Description
id str no uuid
email str no email of the user
first_name str no first name of the user
last_name str no last name of the user
display_name str no full name
date_joined str no date of joining the ezeep cloud
azure_profile str no azure profile
id_profile str no if azure profile ,then it will have a id
user_invitations str no list of email,expiray_Date and delivery_status of a user
roles str no admin or a user
is_verified str no verfication


Example Request

curl  -X GET "https://account.ezeep.com/v1/users/" \
      --header "Authorization:Bearer <Access Token>"


Example Response

{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": "99e3ca15-fafc-4e37-a741-842e1ae4ad07",
      "email": "user@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": true
    }
  ]
}

For Organization Admin

Admin can retrieve list of all users associated with the organization.Only admin has the rights to get information about users.


GET "https://account.ezeep.com/v1/users/"
Attribute Type Required Description
id str no uuid
email str no email of the user
first_name str no first name of the user
last_name str no last name of the user
display_name str no full name
date_joined str no date of joining the ezeep cloud
azure_profile str no azure profile
id_profile str no if azure profile ,then it will have a id
user_invitations str no list of email,expiray_Date and delivery_status of a user
roles str no admin or a user
is_verified str no verfication


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 str yes uuid
email str no email of the user
first_name str no first name of the user
last_name str no last name of the user
display_name str no full name
date_joined str no date of joining the ezeep cloud
azure_profile str no azure profile
id_profile str no if azure profile ,then it will have a id
user_invitations str no list of email,expiray_Date and delivery_status of a user
roles str no admin or a user
is_verified str no verfication


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

Check Total Invitation Send Requests

To check in total how many requests had been sent from this account


GET "https://account.ezeep.com/v1/users/userinvitations"
Attribute Type Required Description
id str no uuid
email 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"
    }
  ]
}

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
}

Resent User Invations

when client send a invitation to any user it generate a unique user_invitations id which is totally different from user unique id .To resend the invitation client need the the user_invitation id

PATCH "https://account.ezeep.com/v1/userinvitations/<user_id>/"
Attribute Type Required Description
is str yes uuid
email 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/6016428a-0185-4639-9aef-4ccf4e1718a3/" \
      --header "Authorization:Bearer <Access Token>"


Example Response

{ "id": "6016428a-0185-4639-9aef-4ccf4e1718a3" }

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

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

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

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
}