Downloading the configuration + cloud code using REST API
I
Ivo Swartjes
started a topic
almost 6 years ago
Hi,
In the old REST API we were able to download and upload the game configuration by making GET / POST calls to https://portal.gamesparks.net/rest/games/<myapikey>. This was very useful for placing work in progress in our version control system and collaborating on a game in progress (doing diffs on the cloud code or configuration etc). What is the equivalent within the new REST API (restv2)? At first glance it looks like we'll need to make multiple REST calls for each part of the configuration (scripts, messages, events etc) but maybe I'm overlooking an easier approach?
Yes you can do this in the new REST API. The call you are looking for can be found here.
Thanks,
Liam
I
Ivo Swartjes
said
almost 6 years ago
Thanks Liam, works like a charm. For others:
Make sure full=true is added so you get the full config rather than references only
It is possible to strip off/leave out @id, apiKey, name and description from the downloaded JSON so that you can upload it to a different game without overwriting those values there.
Ivo Swartjes
Hi,
In the old REST API we were able to download and upload the game configuration by making GET / POST calls to https://portal.gamesparks.net/rest/games/<myapikey>. This was very useful for placing work in progress in our version control system and collaborating on a game in progress (doing diffs on the cloud code or configuration etc). What is the equivalent within the new REST API (restv2)? At first glance it looks like we'll need to make multiple REST calls for each part of the configuration (scripts, messages, events etc) but maybe I'm overlooking an easier approach?
Best regards,
Ivo