API section
Agent
The agent is running, its version and power state; the device list; language; build branding.
| GET | /api/v1/language | Agent interface language |
| GET | /api/v1/health | The agent is running |
| GET | /api/v1/devices | Workplace devices |
| GET | /api/v1/branding | Build branding |
| GET | /api/v1/branding/icon | Brand icon |
Agent interface language#
GET
/api/v1/languageru or en
Response 200 application/json
Type: map → string
Errors — problem+json with a code field, see error codes.
Request example
curl
curl 'http://localhost:7790/api/v1/language'curl
curl 'https://cloud.hw-connector.ru/agent/api/v1/language' \
-H 'X-Api-Key: hwk_…' \
-H 'X-Device-Id: 42'The agent is running#
GET
/api/v1/healthVersion, start time, power; the client checks that the agent is installed
Response 200 application/json
Fields · AgentInfo
statusstringversionstringstartedAtstring date-timepowerPower5 fields · Power
sourcestringvalues:ACBATTERYUNKNOWNbatterybooleanbatteryPercentinteger int32minutesLeftinteger int32atstring date-time
Errors — problem+json with a code field, see error codes.
Request example
curl
curl 'http://localhost:7790/api/v1/health'curl
curl 'https://cloud.hw-connector.ru/agent/api/v1/health' \
-H 'X-Api-Key: hwk_…' \
-H 'X-Device-Id: 42'Workplace devices#
GET
/api/v1/devicesResponse 200 application/json
Array · DeviceInfo
idinteger int32kindstringvalues:FISCAL_REGISTERPAYMENT_TERMINALBARCODE_SCANNERPRINTERCASH_DRAWERCUSTOMER_DISPLAYCARD_READERCHANNELSCALEtypestringnamestringactivebooleaninfomap → any value
Errors — problem+json with a code field, see error codes.
Request example
curl
curl 'http://localhost:7790/api/v1/devices'curl
curl 'https://cloud.hw-connector.ru/agent/api/v1/devices' \
-H 'X-Api-Key: hwk_…' \
-H 'X-Device-Id: 42'Build branding#
GET
/api/v1/brandingProduct name, vendor, support, color; the standard build is “HW agent”
Response 200 application/json
Fields · Info
productNamestringvendorstringsupportEmailstringsupportUrlstringaccentColorstringcustomIconboolean
Errors — problem+json with a code field, see error codes.
Request example
curl
curl 'http://localhost:7790/api/v1/branding'curl
curl 'https://cloud.hw-connector.ru/agent/api/v1/branding' \
-H 'X-Api-Key: hwk_…' \
-H 'X-Device-Id: 42'Brand icon#
GET
/api/v1/branding/iconPNG; 404 for the standard build
Response 200
File.
Errors — problem+json with a code field, see error codes.
Request example
curl
curl 'http://localhost:7790/api/v1/branding/icon'curl
curl 'https://cloud.hw-connector.ru/agent/api/v1/branding/icon' \
-H 'X-Api-Key: hwk_…' \
-H 'X-Device-Id: 42'