- Add a Printer
- Update a Printer
- Partially Update a Printer
- List Printers
- Delete a Printer
- List Blob Capabilities
- Update a Capability
- Assign a pull-printing pairing code to a printer (requires an admin role)
- List Custom Printer Capabilities
- Update a Custom Printer Capability
- List Default Printer Capabilities
Printers
Every ezeep Connector has to register their connected printer at the ezeep Backend. Here we will go through how to register a printer with an existing connector.
Add a Printer
Creates a printer object owned by an ezeep Connector.
POST "https://api2.ezeep.com/printing/v1/printers/"
| Attribute | Type | required | description |
|---|---|---|---|
| name | string | yes | unique name of printer (max 255 chars) |
| status | string | yes | “Online”, “Offline”, “Inproperly Configured” (printer status) |
| tp_id | integer | no | unique printer id (1-2147483646) per connector |
| supported_formats | string array | no | “RAW”, “PDF”, “XPS” |
| vendor_name | string | no | string (max_len: 255) |
| model_name | string | no | string (max_len: 255) |
| location | string | no | string |
| pnp_id | string | no | IEEE1284 PnP id string |
The connector has to be sent as HTTP header field value X-Host-Id.
Example Request
curl -X POST "https://api2.ezeep.com/printing/v1/printers/" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <access_token>" \
--header "X-Host-Id: 980b5aff-30a2-4114-a758-2e454c9840e3" \
--data "{
\"name\":\"Some Printer2\",
\"status\":\"Online\",
\"tp_id\":1,
\"supported_formats\":[\"XPS\",\"RAW\"],
\"vendor_name\":\"Some Vendor\",
\"model_name\":\"Some Printer\",
\"pnp_id\":\"MANUFACTURER:ACME Manufacturing;MODEL:LaserBeam 9;COMMAND SET:PCL,PJL,PS,XHTML-Print+xml;COMMENT:Anything you like;ACTIVE COMMAND SET:PCL;\"
}"
Example Response
{
"id": "0b92401b-c1ca-4e9b-aff5-41424503fb87",
"name": "Some Printer2",
"tp_id": 1,
"status": "Online",
"vendor_name": "",
"model_name": "",
"location": "",
"connector_id": "980b5aff-30a2-4114-a758-2e454c9840e3",
"driver_id": null,
"manual_driver_id": null,
"supported_formats": [
"RAW",
"XPS"
],
"blob_capabilities": null,
"pnp_id": "",
"auto_driver_assignment_state": "SKIPPED"
}
Update a Printer
Replaces an existing printer object. All required attributes must be sent.
PUT "https://api2.ezeep.com/printing/v1/printers/<printer_id>/"
| Attribute | Type | required | description |
|---|---|---|---|
| name | string | yes | unique name of printer (max 255 chars) |
| status | string | yes | “Online”, “Offline”, “Inproperly Configured” (printer status) |
| connector_id | string | yes | uuid of connector the printer belongs to |
| tp_id | integer | no | unique printer id (1-2147483646) per connector |
| supported_formats | string array | no | “RAW”, “PDF”, “XPS” |
| vendor_name | string | no | string (max_len: 255) |
| model_name | string | no | string (max_len: 255) |
| location | string | no | string |
| pnp_id | string | no | IEEE1284 PnP id string |
Example Request
curl -X PUT "https://api2.ezeep.com/printing/v1/printers/0b92401b-c1ca-4e9b-aff5-41424503fb87/" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <access_token>" \
--data "{
\"name\":\"Test printer\",
\"status\":\"Offline\",
\"connector_id\":\"980b5aff-30a2-4114-a758-2e454c9840e3\",
\"location\":\"first floor\"
}"
Example Response
{
"id": "0b92401b-c1ca-4e9b-aff5-41424503fb87",
"name": "Test printer",
"tp_id": 0,
"status": "Offline",
"vendor_name": "",
"model_name": "",
"location": "first floor",
"connector_id": "980b5aff-30a2-4114-a758-2e454c9840e3",
"driver_id": null,
"manual_driver_id": null,
"supported_formats": [
"RAW"
],
"blob_capabilities": null,
"pnp_id": "",
"auto_driver_assignment_state": "SKIPPED"
}
Partially Update a Printer
Updates an existing printer object. Send only the attributes you want to change.
PATCH "https://api2.ezeep.com/printing/v1/printers/<printer_id>/"
| Attribute | Type | required | description |
|---|---|---|---|
| name | string | no | unique name of printer (max 255 chars) |
| status | string | no | “Online”, “Offline”, “Inproperly Configured” (printer status) |
| connector_id | string | no | uuid of connector the printer belongs to |
| tp_id | integer | no | unique printer id (1-2147483646) per connector |
| supported_formats | string array | no | “RAW”, “PDF”, “XPS” |
| vendor_name | string | no | string (max_len: 255) |
| model_name | string | no | string (max_len: 255) |
| location | string | no | string |
| pnp_id | string | no | IEEE1284 PnP id string |
Example Request
curl -X PATCH "https://api2.ezeep.com/printing/v1/printers/0b92401b-c1ca-4e9b-aff5-41424503fb87/" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <access_token>" \
--data "{
\"location\":\"on the roof\"
}"
Example Response
{
"id": "0b92401b-c1ca-4e9b-aff5-41424503fb87",
"name": "Test printer",
"tp_id": 0,
"status": "Offline",
"vendor_name": "",
"model_name": "",
"location": "on the roof",
"connector_id": "980b5aff-30a2-4114-a758-2e454c9840e3",
"driver_id": null,
"manual_driver_id": null,
"supported_formats": [
"RAW"
],
"blob_capabilities": null,
"pnp_id": "",
"auto_driver_assignment_state": "SKIPPED"
}
List Printers
List all printers accessible with the current access_token (e.g. organization admin, user, device).
GET "https://api2.ezeep.com/printing/v1/printers/"
Example Request
curl -X GET "https://api2.ezeep.com/printing/v1/printers/" \
--header "Authorization: Bearer <access_token>"
supported attributes:
| Attribute | Type | required | description |
|---|---|---|---|
| name | string | yes | unique name of printer (max 255 chars) |
| status | string | yes | “Online”, “Offline”, “Inproperly Configured” (printer status) |
| tp_id | integer | no | unique printer id (1-2147483646) per connector |
| supported_formats | string array | no | “RAW”, “PDF”, “XPS” |
| vendor_name | string | no | string (max_len: 255) |
| model_name | string | no | string (max_len: 255) |
| location | string | no | string |
| pnp_id | string | no | IEEE1284 PnP id string |
Example Response
{
"count": 2,
"next": "https://api2.ezeep.com/printing/v1/printers/?limit=20&offset=20",
"previous": null,
"results": [
{
"id": "50bdde56-7431-4059-b543-6422bcc911fb",
"name": "Microsoft Print to PDF (redirected 2)",
"tp_id": 48,
"status": "Online",
"vendor_name": "Microsoft",
"model_name": "Remote Desktop Easy Print",
"location": "",
"connector_id": "7eb7584d-4c48-4261-bac4-a252d5136533",
"driver_id": null,
"manual_driver_id": null,
"supported_formats": [
"RAW"
],
"blob_capabilities": null,
"pnp_id": "microsoftremote_deskf655",
"auto_driver_assignment_state": "SKIPPED",
"can_modify_favorite": false,
"is_favorite": false
},
{
"id": "e6cc311f-94a3-401a-961f-e982d8587518",
"name": "HP LaserJet M1530 MFP Series PCL 6 (redirected 2)",
"tp_id": 50,
"status": "Online",
"vendor_name": "Microsoft",
"model_name": "Remote Desktop Easy Print",
"location": "",
"connector_id": "7eb7584d-4c48-4261-bac4-a252d5136533",
"driver_id": null,
"manual_driver_id": null,
"supported_formats": [
"RAW"
],
"blob_capabilities": null,
"pnp_id": "microsoftremote_deskf655",
"auto_driver_assignment_state": "SKIPPED",
"can_modify_favorite": false,
"is_favorite": false
}
]
}
Delete a Printer
This endpoint deletes a printer object including all depending associations (e.g. printer policies, user/group assignments, printer preferences).
DELETE "https://api2.ezeep.com/printing/v1/printers/<printer_id>/"
| Attribute | Type | Required | Description | | —————– | ——- | ——– | ————————————————————- | | printer_id | string | yes | uuid of the printer to be deleted (path parameter) |
Example Request
curl -X DELETE "https://api2.ezeep.com/printing/v1/printers/0b92401b-c1ca-4e9b-aff5-41424503fb87/" \
--header "Authorization: Bearer <access_token>"
Blob Capabilities
Each ezeep Printer has a certain number of capabilities that can be overridden. Here is explained how to overwrite and read the capabilities. Currently the capabilities ‘colors’, ‘trays’, ‘options’, ‘papers’, ‘resolutions’ are available. For each capability there is a default capability, which is set by the driver or the printer itself, and a custom capability. The custom capability is the overriding value of a user of the capability.
List Blob Capabilities
List all changeable capabilities of a printer
GET "https://api2.ezeep.com/printing/v1/printers/<printer_id>/blob_capabilities/"
Example Request
curl -X GET "https://api2.ezeep.com/printing/v1/printers/0b92401b-c1ca-4e9b-aff5-41424503fb87/blob_capabilities/" \
--header "Authorization: Bearer <access_token>"
Example Response
{
"colors": {
"custom": null,
"default": {
"devmode": 2,
"mono_num_colors": 8,
"color_num_colors": 8,
"mono_bits_pixel": 24,
"color_bits_pixel": 24,
"mono_planes": 1,
"color_planes": 1
}
},
"trays": {
"custom": null,
"default": [{
"index": 7,
"name": "Auto",
"default": true
}, {
"index": 4,
"name": "First Tray",
"default": false
}, {
"index": 1,
"name": "Second Try",
"default": false
}
]
},
"options": {
"custom": null,
"default": 8
},
"papers": {
"custom": null,
"default": [{
"index": 1,
"xsize": 2159,
"ysize": 2794,
"name": "Default",
"default": false,
"printable_area": {
"left_right_margins": 63,
"top_bottom_margins": 49,
"printable_width": 2032,
"printable_length": 2694
}
}
]
},
"resolutions": {
"custom": null,
"default": [{
"value": 600,
"default": false
}, {
"value": 600,
"default": false
}
]
}
}
Update a Capability
Only the custom field can be used to overwrite or change the current capability. The custom property always completely overwrites the default property.
PATCH "https://api2.ezeep.com/printing/v1/printers/<printer_id>/blob_capabilities/<capability>/"
Example Request
curl -X PATCH "https://api2.ezeep.com/printing/v1/printers/0b92401b-c1ca-4e9b-aff5-41424503fb87/blob_capabilities/trays/" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <access_token>" \
--data "{
\"custom\": [{
\"index\": 7,
\"name\": \"Auto\",
\"default\": true
}, {
\"index\": 4,
\"name\": \"First Tray\",
\"default\": false
}, {
\"index\": 1,
\"name\": \"Second Tray\",
\"default\": false
},
{
\"index\": 2,
\"name\": \"Custom Tray\",
\"default\": false
}
]
}"
Example Response
{
"custom": [{
"index": 7,
"name": "Auto",
"default": true
}, {
"index": 4,
"name": "First Tray",
"default": false
}, {
"index": 1,
"name": "Second Tray",
"default": false
}, {
"index": 2,
"name": "Custom Tray",
"default": false
}
],
"default": [{
"index": 7,
"name": "Auto",
"default": true
}, {
"index": 4,
"name": "First Tray",
"default": false
}, {
"index": 1,
"name": "Second Tray",
"default": false
}
]
}
Assign a pull-printing pairing code to a printer (requires an admin role)
POST "https://api2.ezeep.com/printing/v1/printers/<printer_id>/pull_printing_pairing/"
Supported Attributes:
| Attribute | Type | Required | Description |
|---|---|---|---|
| Authorization | Header | yes | Bearer |
| code | str | yes | The pairing code value |
| printer_id | str | yes | The printer ID |
If successful, returns 200 OK.
Example Request
curl --request POST \
--url "https://api2.ezeep.com/printing/v1/printers/b4ec0b0e-728a-416d-b91d-054cad744671/pull_printing_pairing/" \
--header "Authorization: Bearer <access_token>" \
--header "Content-Type: application/json" \
--data '{
"code": "7S35D8ZB"
}'
Example Response
200
Custom Printer Capabilities
The Custom Printer Capabilities are a simplified set of the Blob Capabilities.
List Custom Printer Capabilities
Lists the capabilities merged with the customized capabilities of a printer.
GET "https://api2.ezeep.com/printing/v1/printers/<printer_id>/capabilities/"
Example Request
curl -X GET "https://api2.ezeep.com/printing/v1/printers/0b92401b-c1ca-4e9b-aff5-41424503fb87/capabilities/" \
--header "Authorization: Bearer <access_token>"
Example Response
{
"color_supported": true,
"duplex_supported": true,
"trays": [
{
"index": 15,
"name": null,
"original_name": "Automatically Select",
"enabled": true
},
{
"index": 257,
"name": "Custom Tray",
"original_name": "Main Tray",
"enabled": false
}
]
}
Update a Custom Printer Capability
Custom Printer Capabilities can be updated by sending a PATCH request to the printer capabilities endpoint with a payload containing the updated capabilities.
The original_name capability can’t be changed.
Tray names can’t be duplicate with other tray names.
PATCH "https://api2.ezeep.com/printing/v1/printers/<printer_id>/capabilities/"
Example Request
curl -X PATCH "https://api2.ezeep.com/printing/v1/printers/0b92401b-c1ca-4e9b-aff5-41424503fb87/capabilities/" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <access_token>" \
--data "{
\"color_supported\": false,
\"trays\": [
{
\"index\": 15,
\"name\": \"Custom Tray 2\"
},
{
\"index\": 257,
\"name\": \"Custom Tray\",
\"enabled\": true
}
]
}"
Example Response
{
"color_supported": false,
"duplex_supported": true,
"trays": [
{
"index": 15,
"name": "Custom Tray 2",
"original_name": "Automatically Select",
"enabled": true
},
{
"index": 257,
"name": "Custom Tray",
"original_name": "Main Tray",
"enabled": true
}
]
}
List Default Printer Capabilities
Lists the default capabilities of a printer.
GET "https://api2.ezeep.com/printing/v1/printers/<printer_id>/default_capabilities/"
Example Request
curl -X GET "https://api2.ezeep.com/printing/v1/printers/0b92401b-c1ca-4e9b-aff5-41424503fb87/default_capabilities/" \
--header "Authorization: Bearer <access_token>"
Example Response
{
"color_supported": true,
"duplex_supported": true,
"trays": [
{
"index": 15,
"name": null,
"original_name": "Automatically Select",
"enabled": true
},
{
"index": 257,
"name": null,
"original_name": "Main Tray",
"enabled": true
}
]
}