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» 
}

Status

Status
colourGreen
titleimplemented

URL

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

Method

PUT

Description

Stores information on the cabinet.

Request

Code Block
languagejson
{ 
  "planks": «numberofplanks», 
  "sections": «numberofsections» 
}

Response

HTTP204 when successful

Possible Errors

HTTP400 when request was invalid

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

Status

Status
colourGreen
titleimplemented

Section

Plank and section numbering is 1-based. So if 4 planks are available, they are numbered 1 to 4.

URL

http://<<ip address>>/rest/plank/«plankno»/section/«sectionno»

Method

GET

Description

Receives information of section.

Response

Code Block
languagejson
{
  "value": «lastdisplayedvalue»,
  "state": «state»
}

Possible Error

HTTP404 with no body when section does not exist.

Status

Status
colourYellow
titlein progress

URL

http://<<ip address>>/rest/plank/«plankno»/section/«sectionno»

Method

PUT

Description

Sets value on display.

Request

Code Block
languagejson
{
  "value": «valuetodisplay»
}

Response

HTTP204 when successful

Possible Errors

HTTP400 when request was invalid

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

HTTP404 with no body when section does not exist