- Get all available Printers
- Get Printers for Specific Groups
- Assign Printers to Groups
- Remove Printers from Groups
- Get Printers assigned to Users
Assignments
Assignments represent the allocation of printers to groups and their users within an ezeep Blue organization.
Get all available Printers
To add printers in a group we need printer_id
and this request will get you all printers available.
GET "https://api2.ezeep.com/printing/v1/assignments"
Attribute | Type | Required | Description |
---|---|---|---|
printer_id | string | no | uuid of the printer |
printer_name | string | no | name of the printer |
assignments | string | no | assignments |
assignment | string | no | list of groups assigned to the printer with their group_id |
Authorization | Bearer {{Access Token}} | yes | single string which acts as the authentication of the API request |
Example Request
curl -X GET "https://api2.ezeep.com/printing/v1/assignments" \
--header "Content-Type: application/json" \
--header "Authorization:Bearer <Access Token>"
Example Response
{
"count": 37,
"next": "http://api2.ezeep.com/printing/v1/assignments/?limit=20&offset=20",
"previous": null,
"results": [
{
"printer_id": "64cd9c03-9749-4dc5-b5f2-dcc651adb5b5",
"printer_name": "Microsoft XPS Document Writer",
"assignments": []
},
{
"printer_id": "b00f8e38-b347-46e9-b51d-d9bcaab54c2b",
"printer_name": "AnyDesk Printer",
"assignments": []
},
{
"printer_id": "a2af8a4c-ea54-4a2c-8881-3b75b141be09",
"printer_name": "Samsung M2070 Series",
"assignments": []
},
{
"printer_id": "dc6ddec3-2685-49a4-bdb7-b60ebd4635a9",
"printer_name": "Invia a OneNote 2010",
"assignments": []
},
{
"printer_id": "643e8e5b-2c47-4367-bf97-5ffccab11c95",
"printer_name": "OneNote (Desktop)",
"assignments": []
},
{
"printer_id": "845f5c81-ba14-49a4-acd8-fa1d633418a2",
"printer_name": "OneNote for Windows 10",
"assignments": []
}
]
}
Get Printers for Specific Groups
Client can also check the number of printers associated with a group. For that clent need group_id to pass it in the request.
GET "https://api2.ezeep.com/printing/v1/assignments/?group=<group_id>"
Attribute | Type | Required | Description |
---|---|---|---|
printer_id | string | no | uuid of the printer |
printer_name | string | no | name of the printer |
assignments | string | no | assignments |
assignment | string | no | list of groups assigned to the printer with their group_id |
Authorization | Bearer {{Access Token}} | yes | single string which acts as the authentication of the API request |
Example Request
curl -X GET "https://api2.ezeep.com/printing/v1/assignments/?group=8228b289-2926-4813-8267-c61c767e55f0" \
--header "Content-Type: application/json" \
--header "Authorization:Bearer <Access Token>"
Example Response
{
"count": 6,
"next": null,
"previous": null,
"results": [
{
"printer_id": "b5e91fac-88a2-42fb-83d3-e0f0e7990364",
"printer_name": "ZDesigner GK420t 234",
"assignments": [
{
"settings": null,
"groups": [
{
"group_id": "8228b289-2926-4813-8267-c61c767e55f0",
"group_name": "free",
"group_foreign_id": null,
"force_chosen": false
}
]
}
]
},
{
"printer_id": "5a3deccc-8334-4512-9162-0bdfe8cc3552",
"printer_name": "Canon MG3600 series Printer",
"assignments": [
{
"settings": null,
"groups": [
{
"group_id": "8228b289-2926-4813-8267-c61c767e55f0",
"group_name": "free",
"group_foreign_id": null,
"force_chosen": false
}
]
}
]
},
{
"printer_id": "15abe3b7-7711-401e-9dec-1add57eb888e",
"printer_name": "TSC TE210",
"assignments": [
{
"settings": null,
"groups": [
{
"group_id": "8228b289-2926-4813-8267-c61c767e55f0",
"group_name": "free",
"group_foreign_id": null,
"force_chosen": false
}
]
}
]
}
]
}
Assign Printers to Groups
Client can add printers into the group by passing the printer_id
in url and in data pass the group_id
to do the job.
PATCH "https://api2.ezeep.com/printing/v1/assignments/<printer_id>/"
Attribute | Type | Required | Description |
---|---|---|---|
printer_id | string | no | uuid of the printer |
printer_name | string | no | name of the printer |
assignments | string | no | assignments |
assignment | string | yes | list of groups assigned to the printer with their group_id |
Authorization | Bearer {{Access Token}} | yes | single string which acts as the authentication of the API request |
Example Request
curl -X "PATCH https://api2.ezeep.com/printing/v1/assignments/15abe3b7-7711-401e-9dec-1add57eb888e/" \
--header "Content-Type: application/json" \
--header "Authorization:Bearer <Access Token>" \
--data '{
"assignment": [
{
"groups": [
{
"group_id": "8228b289-2926-4813-8267-c61c767e55f0"
}
]
}
]
}'
Example Response
{
"printer_id": "15abe3b7-7711-401e-9dec-1add57eb888e",
"printer_name": "TSC TE210",
"assignments": [
{
"settings": null,
"groups": [
{
"group_id": "8228b289-2926-4813-8267-c61c767e55f0",
"group_name": "free",
"group_foreign_id": null,
"force_chosen": false
}
]
}
]
}
Remove Printers from Groups
This request is to remove any printer from the group. If we want to remove printer_id 15abe3b7-7711-401e-9dec-1add57eb888e
from the group_id 8228b289-2926-4813-8267-c61c767e55f0
, use following method
DELETE "https://api2.ezeep.com/printing/v1/assignments/<printer_id>/"
Attribute | Type | Required | Description |
---|---|---|---|
printer_id | string | no | uuid of the printer |
printer_name | string | no | name of the printer |
assignments | string | no | assignments |
assignment | string | yes | list of groups assigned to the printer with their group_id |
Authorization | Bearer {{Access Token}} | yes | single string which acts as the authentication of the API request |
Example Request
curl -X 'DELETE https://api2.ezeep.com/printing/v1/assignments/15abe3b7-7711-401e-9dec-1add57eb888e/' \
--header "Content-Type: application/json" \
--header "Authorization:Bearer <Access Token>" \
--data '{
"assignment": [
{
"groups": [
{
"group_id": "8228b289-2926-4813-8267-c61c767e55f0"
}
]
}
]
}'
Example Response
204
Get Printers assigned to Users
Printer is connected to a group and user can be a part of multiple groups. To check the printer accesibility by a user, first all of the groups in which user is a part of should be noted.
- In example request user_id(
cbe182e3-d726-4055-9459-f23bd0a73d78
) is a part of two groups, that’s why user can use all of the printer which are associated with both groups.
GET "https://api2.ezeep.com/printing/v1/assignments/?group=<group_id>"
Type | Key | Value |
---|---|---|
Header | Authorization | Bearer {{Access Token}} |
Example Request
curl -X GET "https://api2.ezeep.com/printing/v1/assignments/?group=8228b289-2926-4813-8267-c61c767e55f0" \
--header "Authorization:Bearer <Access Token>"
Example Response
{
"count": 6,
"next": null,
"previous": null,
"results": [
{
"printer_id": "b5e91fac-88a2-42fb-83d3-e0f0e7990364",
"printer_name": "ZDesigner GK420t 234",
"assignments": [
{
"settings": null,
"groups": [
{
"group_id": "8228b289-2926-4813-8267-c61c767e55f0",
"group_name": "free",
"group_foreign_id": null,
"force_chosen": false
}
]
}
]
},
{
"printer_id": "30dbc200-f01e-4c59-9922-e5b02ee281cd",
"printer_name": "Canon MG3600 series",
"assignments": [
{
"settings": null,
"groups": [
{
"group_id": "359bf1fb-eb55-40e4-b7e4-8c637f5f549c",
"group_name": "test2",
"group_foreign_id": null,
"force_chosen": false
},
{
"group_id": "bd63ffd9-6904-46ec-b271-b258a59f07a5",
"group_name": "test",
"group_foreign_id": null,
"force_chosen": false
},
{
"group_id": "8228b289-2926-4813-8267-c61c767e55f0",
"group_name": "free",
"group_foreign_id": null,
"force_chosen": false
}
]
}
]
},
{
"printer_id": "5a3deccc-8334-4512-9162-0bdfe8cc3552",
"printer_name": "Canon MG3600 series Printer",
"assignments": [
{
"settings": null,
"groups": [
{
"group_id": "8228b289-2926-4813-8267-c61c767e55f0",
"group_name": "free",
"group_foreign_id": null,
"force_chosen": false
}
]
}
]
},
{
"printer_id": "4d7901a5-dcc6-4fd9-aa64-e3fe0604d53d",
"printer_name": "TSC TE210x",
"assignments": [
{
"settings": null,
"groups": [
{
"group_id": "8228b289-2926-4813-8267-c61c767e55f0",
"group_name": "free",
"group_foreign_id": null,
"force_chosen": false
}
]
}
]
},
{
"printer_id": "15abe3b7-7711-401e-9dec-1add57eb888e",
"printer_name": "TSC TE210",
"assignments": [
{
"settings": null,
"groups": [
{
"group_id": "8228b289-2926-4813-8267-c61c767e55f0",
"group_name": "free",
"group_foreign_id": null,
"force_chosen": false
}
]
}
]
},
{
"printer_id": "176f7433-48b1-43c0-bf5f-637c0d831bdd",
"printer_name": "Canon Generic UFR II Driver",
"assignments": [
{
"settings": null,
"groups": [
{
"group_id": "8228b289-2926-4813-8267-c61c767e55f0",
"group_name": "free",
"group_foreign_id": null,
"force_chosen": false
}
]
}
]
}
]
}
- user can use all those 6 printers from this group and same request can be send for other group by changing the
group_id
.