I'd like to delete test builds
I'd like to delete test builds
You may call DeleteAsset API to delete corresponding assets. Please feel free to tell us if you have any questions on the usage.
Hello!
How are we able to call this DeleteAsset API? I'm using Unity, could I create an Editor only script with the SDK to call it? How can I aunthenticate myself to be able to call this API?
I can't find a proper step-by-step description about the way of logging in "as an admin(?)" and call these management APIs. Could You please point me in the right direction?
Thanks in advance!
David
Because DeleteAsset belongs to Entity API set, If you are using Unity SDK, you will need to firstly enable Entity API and select the corresponding title. Call GetEntityToken API and set title entity in the request to get a Title-level Entity Token to perform the administrative action:
PlayFabAuthenticationAPI.GetEntityToken( new PlayFab.AuthenticationModels.GetEntityTokenRequest { Entity = new PlayFab.AuthenticationModels.EntityKey { Type = "title", Id = "xxxx" } }, onSuccess => { print("Get the Token: " + onSuccess.EntityToken); PlayFabMultiplayerAPI.DeleteAsset( new PlayFab.MultiplayerModels.DeleteAssetRequest { FileName = "xxxxx.zip" }, onDeleted => { print("deleted!"); }, onFailed => { print(onFailed.GenerateErrorReport()); }); }, onFailed => { print(onFailed.GenerateErrorReport()); } );
Otherwise, I think it will be more convenient if you are using Postman.
Ah, I didn't know how to use the GetEntityToken call. It works now! Thanks for the insanely fast help!
3 People are following this question.