finish REST api support for multi-tenant