add sync support for api