add docs about how to write api application