resource based api builder