API section
Emulators
Register, terminal, scale and printer emulators for debugging without hardware: response modes (out of paper, terminal declines).
| PUT | /api/v1/emulators/{number} | Switch emulator mode |
| GET | /api/v1/emulators | Emulators and their response modes |
Switch emulator mode#
PUT
/api/v1/emulators/{number}For example {"mode":"NO_PAPER"} — the register answers “out of paper”; {"mode":"DECLINED","once":true} — the terminal declines once; {"mode":"NORMAL"} — works again
Parameters
| Name | In | Type | Description |
|---|---|---|---|
numberrequired | path | integer int32 | device number from |
Request body application/json required
Fields · ModeRequest
modestringonceboolean
JSON
{
"mode": "string",
"once": false
}Response 200 application/json
Fields · EmulatorInfo
Errors — problem+json with a code field, see error codes.
Request example
curl
curl -X PUT 'http://localhost:7790/api/v1/emulators/1' \
-H 'Content-Type: application/json' \
--data '{"mode":"string","once":false}'curl
curl -X PUT 'https://cloud.hw-connector.ru/agent/api/v1/emulators/1' \
-H 'X-Api-Key: hwk_…' \
-H 'X-Device-Id: 42' \
-H 'Content-Type: application/json' \
--data '{"mode":"string","once":false}'Emulators and their response modes#
GET
/api/v1/emulatorsResponse 200 application/json
Array · EmulatorInfo
Errors — problem+json with a code field, see error codes.
Request example
curl
curl 'http://localhost:7790/api/v1/emulators'curl
curl 'https://cloud.hw-connector.ru/agent/api/v1/emulators' \
-H 'X-Api-Key: hwk_…' \
-H 'X-Device-Id: 42'