question

Brent Batas (Lisk) avatar image
Brent Batas (Lisk) asked

How to get a server build by name?

I'm updating my dev tools for Servers 2.0.

I want to run a command to delete a build.

In the past, I called RemoveServerBuild

https://docs.microsoft.com/en-us/rest/api/playfab/admin/custom-server-management/removeserverbuild?view=playfab-rest

However, the v2.0 API call of DeleteBuild seems to want a guid instead of the server name.

https://docs.microsoft.com/en-us/rest/api/playfab/multiplayer/multiplayerserver/deletebuild?view=playfab-rest

The only way I can think of getting the guid from the server name is to first list the server builds, then match by name.

https://docs.microsoft.com/en-us/rest/api/playfab/multiplayer/multiplayerserver/listbuildsummaries?view=playfab-rest#buildsummary

I think this will work, but feels unnecessary, so I thought I'd ask if there's a more direct approach.

Custom Game Servers
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

·
Sarah Zhang avatar image
Sarah Zhang answered

“BuildId” is the unique identifier of the previously uploaded build. It’s a fixed GUID string. So, it’s not necessary to get it by name every time. Maybe you could use it instead of build name. Actually, there is API that can get build name by build Id, but no API that can get build Id by build name now.

2 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.

Brent Batas (Lisk) avatar image Brent Batas (Lisk) commented ·

Hi Sarah, thanks for the reply. I ended up just using the method I described in my question (list server builds, then match by name).

The reason I prefer to search by name is in my developer tool (which is a command line interface), I can type things like "deploy game v2.1" and "undeploy game v2.1" and it will deploy/undeploy the corresponding builds.

This is also useful for our CICD tool, which will call these commands automatically. For example,we have a 'beta' branch where we frequently push changes and our CICD workflow will automatically undeploy the prior beta version & deploy the new beta version whenever we push to the beta branch.

1 Like 1 ·
nathanielj avatar image nathanielj Brent Batas (Lisk) commented ·

Did you get an answer to this? I'd also like to know.

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.