Fixing api endopoint urls