Overview
Client-mode REST API connectors for BarTender label printing: print BarTender documents with data from MQTT through the BarTender 2022+ Actions API (on-premises or BarTender Cloud) or Print Portal, follow the print script status and variables, and list printers and Print Portal libraries. This is one of the templates in the BarTender (Seagull Scientific) label printing REST API app (bartender-label-printing). Deploy it alongside the other connectors of that app when they depend on each other (for example a token connector plus an API connector).
Not yet verified against the live vendor API: No BarTender host, BarTender Cloud token or Print Portal URL/user on the factory box (no BARTENDER_ variables in env). Static 176/176 against the cached Actions API v1 OpenAPI spec and documented Print Portal / Cloud Printers paths, local mock 20/20 (+4/4 controls), BarTender Cloud unauthenticated probes 9/9 (8 real paths 401, bogus path 404). Unblock: BARTENDER_BASE_URL (+BARTENDER_TEST_BTW) for a 2022+ REST service the broker can authenticate to, or BARTENDER_CLOUD_TOKEN, or BARTENDER_PORTAL_BASE + BARTENDER_PORTAL_USERNAME/PASSWORD; then python3 smoke_bartender.py and a broker MQTT round-trip printing to PDF.
Auth
- BarTenderActions: Windows authentication (Negotiate) on the REST service; not sent by the connector (reverse proxy needed, unverified)
- BarTenderCloud: Authorization: Bearer {value.json.access_token}
- BarTenderPrintPortal: POST /BarTender/api/v1/Authenticate {userName,password} -> token; Authorization: Bearer {value.json.token}
- secret: [“BARTENDER_PORTAL_USERNAME”, “BARTENDER_PORTAL_PASSWORD”]
Authorization: Bearer {value.json.access_token}.
Template parameters
BASE_ADDRESS default: https://am1.bartendercloud.com.
Events
Deploy
Get the template card (JSON withtemplate and metadata) from the broker, then deploy the connector:
BASE_ADDRESS already filled in:
-addRoute (do not include ADD METADATA).
Usage example
CallCloudSubmitScript by publishing a JSON payload to its request topic, and read the reply on the response topic:

