add docs for the rest api