Title: RESTapi
Last modified: October 28, 2021

---

# RESTapi

 *  Resolved [compil3](https://wordpress.org/support/users/compil3/)
 * (@compil3)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/restapi/)
 * Hello everyone,
 * I seem to be having trouble build a URL to fetch data on the Player Schema. Currently
   I can find a player using `wp-json/sportspress/v2/players?slug=PLAYERNAME` but
   I’ve run into an issue. If a player has requested a name change, the slug stays
   the same but their Rendered name is different. Now in order to remember these
   changes to look up the correct slug either involves using a database for our 
   app to bind the new-name to slug or remembering what it was. Now with over 2500
   + members it’s highly unlikely that our moderators/admins will remember everyone’s
   sign up name.
 * My question is this:
    Is there a way to look up a players “rendered” name using
   a URL and retreiving the json data as if we used `.../v2/players?slug=NAME` or
   is there any other way?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [compil3](https://wordpress.org/support/users/compil3/)
 * (@compil3)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/restapi/#post-15017495)
 * I am not sure if the slug data changes if a member decides to change their player
   info, if it does not change automatically then a fix (including a script to go
   through the db and change it automatically), will need to be issued as doing 
   so manually will take a very long time.
 *  Thread Starter [compil3](https://wordpress.org/support/users/compil3/)
 * (@compil3)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/restapi/#post-15020511)
 * I figure it out `.../v2/players?search=NAME`
 *  [Roch](https://wordpress.org/support/users/rochesterj/)
 * (@rochesterj)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/restapi/#post-15026555)
 * I’m glad it’s resolved!
 * And thanks for sharing the solution.
 * If you need anything else, just let us know.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘RESTapi’ is closed to new replies.

 * ![](https://ps.w.org/sportspress/assets/icon-256x256.png?rev=1252005)
 * [SportsPress - Sports Club & League Manager](https://wordpress.org/plugins/sportspress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sportspress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sportspress/)
 * [Active Topics](https://wordpress.org/support/plugin/sportspress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sportspress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sportspress/reviews/)

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)

 * 3 replies
 * 2 participants
 * Last reply from: [Roch](https://wordpress.org/support/users/rochesterj/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/restapi/#post-15026555)
 * Status: resolved