Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

URL

http://<<ip address>>/rest/cabinet

Method

GET

Description

Receives information on the cabinet.

Response

Code Block
languagejson
{
  "planks": «numberofplanks», 
  "sections": «numberofsections»,
  "name": «nameofcabinet»,
  "status": [«listofhumanreadablestatusmessages»],
  "demo": "barcode|off",
  "mode": "section|tag",
  "sides": "frontonly|frontandback"
}

Status message can be:

  • Missing tag at plank P, section S (Tag ID N)

  • No connection to controller

When list of messages is empty, cabinet is “OK”.

De demo mode tells in which (stateful) demo mode the cabinet is, of off when not in demo mode. Use the calls in Demo to manipulate these modes.

The sides attribute can be used when no back controller is available. Otherwise, many error will occur.

Status

Status
colourGreen
titleimplemented

URL

http://<<ip address>>/rest/cabinet

Method

PUT

Description

Stores information on the cabinet.

mode can be tag or section:

  • section mode will use planks, sections and sides to to control the lights. The websocket will return a plank-section-side combo when button pushed.

  • tag mode will use direct tags and controller numbers. The websocket will return a controller-tag combo when button pushed.

When the section call is done, and the cabinet is in mode tag (or the other way round), this will result in a HTTP409 Conflict.

Request

Code Block
languagejson
{ 
  "planks": «numberofplanks», 
  "sections": «numberofsections»,
  "name": «nameofcabinet»,
  "mode": "section|tag",
  "sides": "frontonly|frontandback"
}

Response

HTTP204 when successful

Possible Errors

HTTP400 when request was invalid

Code Block
languagejson
{
  "message": «human readable error»
}

Status

Status
colourGreen
titleimplemented

...