make rest controller more generic to support additional workflows