HW agent API 2.14.1

API section

Customer display

Text on the customer display and a QR code on a QR display or a second monitor.

GET/api/v1/displays/{id}What is shown on the display
POST/api/v1/displays/{id}Show lines on the customer display
POST/api/v1/displays/{id}/qrShow a QR code on the customer display

What is shown on the display#

GET/api/v1/displays/{id}

For the second-monitor display: the page takes the lines from here when it opens

Parameters

NameInTypeDescription
idrequiredpathinteger int32

device number from GET /api/v1/devices

Response 200 application/json

Type: map → any value

Errors — problem+json with a code field, see error codes.

Request example

curl
curl 'http://localhost:7790/api/v1/displays/1'
curl
curl 'https://cloud.hw-connector.ru/agent/api/v1/displays/1' \
  -H 'X-Api-Key: hwk_…' \
  -H 'X-Device-Id: 42'

Show lines on the customer display#

POST/api/v1/displays/{id}

VFD — usually 2 lines of 20 characters; second monitor — up to 10 large lines. Immediate, not an operation

Parameters

NameInTypeDescription
idrequiredpathinteger int32

device number from GET /api/v1/devices

Request body application/json required

Fields · DisplayRequest
  • linesarray of stringrequired
    from 0
    to 20
JSON
{
  "lines": [
    "string"
  ]
}

Response 200

No body.

Errors — problem+json with a code field, see error codes.

Request example

curl
curl -X POST 'http://localhost:7790/api/v1/displays/1' \
  -H 'Content-Type: application/json' \
  --data '{"lines":["string"]}'
curl
curl -X POST 'https://cloud.hw-connector.ru/agent/api/v1/displays/1' \
  -H 'X-Api-Key: hwk_…' \
  -H 'X-Device-Id: 42' \
  -H 'Content-Type: application/json' \
  --data '{"lines":["string"]}'

Show a QR code on the customer display#

POST/api/v1/displays/{id}/qr

QR code display (Mertech QR-PA, QR-Screen) or second monitor. An empty payload removes the QR. Immediate, not an operation

Parameters

NameInTypeDescription
idrequiredpathinteger int32

device number from GET /api/v1/devices

Request body application/json required

Fields · QrRequest
  • payloadstring
    from 0
    to 2000
  • topstring
    from 0
    to 100
  • bottomstring
    from 0
    to 100
JSON
{
  "payload": "string",
  "top": "string",
  "bottom": "string"
}

Response 200

No body.

Errors — problem+json with a code field, see error codes.

Request example

curl
curl -X POST 'http://localhost:7790/api/v1/displays/1/qr' \
  -H 'Content-Type: application/json' \
  --data '{"payload":"string","top":"string","bottom":"string"}'
curl
curl -X POST 'https://cloud.hw-connector.ru/agent/api/v1/displays/1/qr' \
  -H 'X-Api-Key: hwk_…' \
  -H 'X-Device-Id: 42' \
  -H 'Content-Type: application/json' \
  --data '{"payload":"string","top":"string","bottom":"string"}'