register api and get all location api