REF: move backend rest pieces into api directory