Got the beginings of the api working properly