Updated to use RestAPI as an object

Signed-off-by: Dalton Pelc <daltonjpelc@gmail.com>