REST API: Player Metrics
-
I have a list of email addresses that I want to store in a custom player metric. I have already created the field via sportspress configuration. I have also created some Python functions that successfully GET and POST to retrieve and update other attributes of players (like jersey number). However, when I try to update metrics, I get a response of 200 and there is no change. There seems to be some overlap with this issue that was only ever partially resolved (Updating event results via REST API | www.remarpro.com). I assume that either there is a trick to the player metric payload that is not documented anywhere, or the API is broken. Can someone either confirm there is an issue or give me an example request that works to update player metrics?
Secondarily, when I GET, I can not see “invisible” metrics (as configured). If I can view those fields via the edit player part of the admin site, I’d assume (and hope) there is a way to view them via the API. Interestingly, it seems that some older records allow viewing these invisible metrics, while others do not. Can someone confirm whether this is possible and give me an example how to adjust my GET to view everything?
- The topic ‘REST API: Player Metrics’ is closed to new replies.