Clipboard API
This API allows integration with third-party programs running on a remote server via RDP when installing AzureLabel on the remote server is not possible. In such cases, data is exchanged through the clipboard shared between the local and remote machines.
To use this API, the program must be started in Print Server (Desktop) mode.
After the first launch, enable the Use Clipboard API option via the tray menu of the application:
In this mode, the application polls the clipboard every second. If it detects text matching the expected request format, it processes the command and writes the response back to the clipboard.
Requests are passed as a text block in the clipboard with the following structure:
Request Format
The request must be placed in the clipboard as three separate lines, in the following order:
AzureLabelClipboardAPIRequest
– A fixed identifier indicating the start of a request.-
The endpoint path, including any query parameters, as defined in the REST API documentation.
Examples:/labels?encoding=utf-8&format=text
/labels/print
-
Optional JSON body – same as described in the Request body section of the
/labels/print
endpoint. This line is required only if the endpoint expects data.
To explore the full list of available API endpoints, visit the AzureLabel REST API Documentation.
Request Examples
Show a preview using ready-to-use data:
AzureLabelClipboardAPIRequest
/labels/preview
{
"request": "/labels/preview",
"label": "My label",
"printData": {
"source": "ready",
"data": [
{
"PrintQuantity": 3,
"Name": "AzureLabel Pro, yearly subscription",
"Barcode": "5678901234562",
"Price": 69,
"Unit": "ea",
"Code": "pro-y"
},
{
"PrintQuantity": 1,
"Name": "AzureLabel Corporate, yearly subscription",
"Barcode": "8901234567890",
"Price": 102,
"Price2": 95,
"PriceOld": 110,
"Unit": "ea",
"Code": "corp-y"
}
]
}
}
Retrieve the list of all labels from the Labels folder:
AzureLabelClipboardAPIRequest
/labels?encoding=utf-8&format=text
Server Response
The program places the response in the clipboard. The first line indicates the result:
AzureLabelClipboardAPIAnswer::OK
– if the operation was successful. The following lines contain data returned by the program, if applicable.AzureLabelClipboardAPIAnswer::ERROR
– if an error occurred. The following lines contain the error message.