working with api server