first draft of rest api