Base URL: http://localhost:8765
Returns the version of the Print Agent.
GET http://localhost:8765/version
{
"Version": "1.0.3"
}
Returns the default printer name.
GET http://localhost:8765/defaultprinter
{
"defaultPrinter": "HP LaserJet P1006"
}
Returns a list of installed printers.
GET http://localhost:8765/printers
[
{ "name": "HP LaserJet P1006", "status": "online" },
{ "name": "Microsoft Print to PDF", "status": "online" }
]
Returns a log of previous print attempts.
GET http://localhost:8765/history
[
"[2025-06-01 14:33] User: John, Printer: HP LaserJet, File: document1.pdf, Attempt: 1",
"[2025-06-01 14:35] User: Alice, Printer: Canon Pixma, File: file.pdf, Attempt: 1"
]
Sends a PDF document to a specified printer.
POST http://localhost:8765/print
Content-Type: application/json
{
"pdfBase64": "JVBERi0xLjQKJcfs...",
"printerName": "HP LaserJet P1006",
"userId": "john.doe"
}
Response:
"Printed"
Stops the print agent gracefully.
GET http://localhost:8765/quit
"VSI Print Agent stopped..."