Api

first draft of api doc