moved REST resource code to app/; api specific