adds api restful routes