- Add a Printer
- 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)
Printers
Every ezeep Blue 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. To see how connectors are being created go here.
Add a Printer
Creates a printer object owned by an ezeep Blue Connector.
POST "https://api2.ezeep.com/printing/v1/printers/"
Attribute | Type | required | type |
---|---|---|---|
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
Updates an existing printer object (full object json required).
PUT "https://api2.ezeep.com/printing/v1/printers/<printer_id>/"
Attribute | Type | required | type |
---|---|---|---|
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 | uniwue 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": "09baa3b7-3ea2-4b11-8a91-b00d745dadb0",
"name": "Test Printer",
"tp_id": 0,
"status": "Offline",
"vendor_name": "",
"model_name": "",
"location": "first floor",
"connector_id": "fe030bd1-5238-4be4-80c4-cdadb83316ed",
"driver_id": null,
"manual_driver_id": null,
"supported_formats": [
"RAW"
],
"blob_capabilities": null,
"pnp_id": "",
"auto_driver_assignment_state": "SKIPPED"
}
Updates an existing printer object (only properties to change are required)
PATCH "https://api2.ezeep.com/printing/v1/printers/<printer_id>/"
Attribute | Type | required | type |
---|---|---|---|
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 | uniwue 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/09baa3b7-3ea2-4b11-8a91-b00d745dadb0/" \
--header "Content-Type: application/json" \
--header "Authorization:Bearer <Access Token>" \
--data "{
\"location\":\"on the roof\"
}"
Example Response
{
"id": "09baa3b7-3ea2-4b11-8a91-b00d745dadb0",
"name": "Test Printer",
"tp_id": 0,
"status": "Offline",
"vendor_name": "",
"model_name": "",
"location": "on the roof",
"connector_id": "fe030bd1-5238-4be4-80c4-cdadb83316ed",
"driver_id": null,
"manual_driver_id": null,
"supported_formats": [
"RAW"
],
"blob_capabilities": null,
"pnp_id": "",
"auto_driver_assignment_state": "SKIPPED"
}
List Printers
List all the printer acessible 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 | type |
---|---|---|---|
name | string | yes | unique name of printer (max 255 chars) |
status | string | yes | “Online”, “Offline”, “Inproperly Configured” (printer status) |
tp_id | integer | no | uniwue 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.tst.azdev.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",
"EMF"
],
"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",
"EMF"
],
"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 | | :—————: | :—–: | :——: | :———————————————————–: | | connector_id | string | yes | uuid of connector to be deleted |
Example Request
curl -X DELETE "https://api2.ezeep.com/printing/v1/printers/09baa3b7-3ea2-4b11-8a91-b00d745dadb0/" \
--header "Authorization:Bearer <Access Token>"
Blob Capabilities
Each ezeep Blue 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/<printer_id>/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 PUT "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 {{Access Token}} |
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>" \
--data '{
"code": "7S35D8ZB"
}'
Example Response
200