Test for REST API

This PR aims to implement tests for the REST API