Base work for REST api