Merge RestAPI with basic funcionality

see how i fixed these exception handlers in main branch