API

main api functionalities has been written. Minors ajustements are
pending