question

rafaelgonzalez avatar image
rafaelgonzalez asked

Is it possible to download JSONs from PlayFabAdminAPI?

Hi guys,

I'm creating a tool to automaticly update all the catalog/currencies/drops/tittle data/etc... from jsons, but before uploading that new data I want to download a backup of the previous data already stored, so I want to download its jsons as it can be done on the Game Manager but from code.

The functions I've founded return some data that later I should parse to a compatible json to be able to upload them later on if necessary.

For example, on the catalog one (GetCatalogItemsAsync) I must add some extra strings to the info it returns to make it work, but when I call ListVirtualCurrencyTypesAsync it returns a list that not includes all the info stored online like the 'CurrencyCodeFull' field.

Am I missing some other API functions to download the same JSONs as from the Game Manager buttons?

If not, what should be the propper way to automate a back up json copy of the info already stored before uploading the new one?

Thanks!

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

The normal way to do this is using the Admin API calls. For example, these calls get all the VC and catalog/store/drop table info for your title:

https://api.playfab.com/documentation/admin/method/ListVirtualCurrencyTypes

https://api.playfab.com/documentation/admin/method/GetCatalogItems

https://api.playfab.com/documentation/admin/method/GetRandomResultTables

https://api.playfab.com/documentation/admin/method/GetStoreItems

If you have a look at AddVirtualCurrencyTypes, you'll see that it actually takes the same parameters that you get back from ListVirtualCurrencyTypes. If you're seeing any places in the Game Manager where different terms are used, let us know and we can make sure to get that clarified. Case in point - where are you seeing "CurrencyCodeFull"? I'm not able to find that in any interfaces right now.

3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

rafaelgonzalez avatar image rafaelgonzalez commented ·

Hi Brendan,

That's the thing, we want to convert that info returned from those calls to jsons to be able to upload them later on from the Game Manager.

Our problem is that those calls do not return the full info that can be gathered if you export the json from the Game Manager (like the "CurrencyCodeFull" field).

0 Likes 0 ·
brendan avatar image brendan rafaelgonzalez commented ·

So I did find what you're referring to - "CurrencyCodeFull" does show up in the data for the VC definitions when you download them from the Game Manager, but it's just an extra field for your convenience - it's not needed in the upload.

The fields for a currency are: CurrencyCode, DisplayName, InitialDeposit, RechargeRate, and RechargeMax. They are all returned from the call to ListVirtualCurrencyTypes, and are the same parameters taken by the AddVirtualCurrencyTypes call. In the Game Manager upload, the only ones of those required in the JSON are CurrencyCode and DisplayName.

1 Like 1 ·
rafaelgonzalez avatar image rafaelgonzalez commented ·

Ah, ok!

Thank you Brendan!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.