Updating event results via REST API
-
I’m trying to migrate my current baseball league website to the Sportspress and Sportspress for Baseball plugins using the REST API. Most data was easily migrated but adding/updating event results doesn’t seem to be working.
I’ve tried updating event results using data below. The format is based on the data retrieved by performing a GET on a different event which had its results manually entered. I can also confirm that the IDs used are valid.
{“results”: {
“0”: {
“e”: “E”,
“eight”: “8”,
“five”: “5”,
“four”: “4”,
“h”: “H”,
“nine”: “9”,
“one”: “1”,
“outcome”: “Outcome”,
“r”: “R”,
“seven”: “7”,
“six”: “6”,
“ten”: “10”,
“three”: “3”,
“two”: “2”
},
“2254”: {
“outcome”: [
“win”
],
“e”: “3”,
“eight”: “”,
“five”: “3”,
“four”: “0”,
“h”: “13”,
“nine”: “”,
“one”: “1”,
“r”: “11”,
“seven”: “2”,
“six”: “0”,
“ten”: “”,
“three”: “0”,
“two”: “5”
},
“2286”: {
“e”: “2”,
“eight”: “”,
“five”: “0”,
“four”: “1”,
“h”: “12”,
“nine”: “”,
“one”: “1”,
“outcome”: [
“loss”
],
“r”: “6”,
“seven”: “2”,
“six”: “1”,
“ten”: “”,
“three”: “1”,
“two”: “0”
}}}I’ve tried including this data when creating a new event as well as updating an existing event using PUT and PATCH. In all 3 cases I get a response status of 200 indicating that the action was successful but the results data is not updated. In the case of creating a new event, the event is created while the results data is ignored.
Is add/updating event results via the REST API available in the free version of the plugin or does this require the pro version? I’d planned on upgrading to the PRO version once the migration is successful so doing so earlier is not a problem if it’s a requirement.
If this feature is available in the free version, is there a known issue related to updating event results via the REST API in the current release?
Thanks
- The topic ‘Updating event results via REST API’ is closed to new replies.