Sending and Retrieving commands from items that are Numbers and Strings

For Switch commands you send ON and OFF but what if I want to send a command to retrieve information which is not of type Switch but Number or String

Number and String items can be sent commands just like Switch items can, except that Number items accept DecimalType commands, and String items accept StringType commands.

For instance I want to retrieve the current power usage data of a fridge, In this case I am just getting a value but when you are using the REST API for testing it requires you to enter not only the itemname but also a body. So do you just send any string at all

Can you give an example? I haven’t needed to provide a body to retrieve a state from an item using the ReST API.

Oh okay I think I get you. Thanks

If you’re sending a command the you use the POST with the value as the body.

If you’re trying to retrieve a value then you use the GET which doesn’t require a body.