add the first version of the REST API + functions for MYSQL