PlanyDocs
Services

GameRegistryService

plany.game.v1.GameRegistryService — the games your servers run, and the builds behind them.

Endpoint api.plany.cloud:443 · Guide · Reference

The Game Registry is the catalogue a game server is created from. It holds two kinds of thing:

  • A game — games/{game} for one Plany publishes, or accounts/{account}/games/{game} for your own — says how to run a server: the build, the launch command, the ports and the settings. A game can inherit from another, so your modpack can extend games/minecraft-java and declare only what is different.
  • A build — accounts/{account}/builds/{build} — is what gets installed: an archive you upload, a Steam app, or an archive at a URL.

Both belong to your account rather than to a project, so one build serves every project you have.

If you run a game Plany publishes, you never call this service: name the game on CreateGameServer and that is all.

Bringing your own game

  1. Create a build

    CreateBuild with kind: KIND_SERVER and a source. For an upload, the build starts out waiting for its archive.

  2. Upload the archive

    GetBuildUploadUrl returns a URL to PUT the zip to, and the headers to send with it. Pass checksum_sha256 and the upload is refused if the bytes do not match. Then call FinalizeBuild, and the build moves to READY.

  3. Create a game that uses it

    CreateGame with a server half naming the build, the launch command and the ports — or with a parent to inherit everything you do not set.

  4. Run it

    Create a game server with game set to your game. See PlayputeService.

plany builds create my-server --kind server --upload ./server.zip

The CLI and the Terraform provider do the upload and finalize steps for you.

kind is required and cannot be changed. Use KIND_SERVER for anything a game server runs. A single upload can be up to 5 GiB; check the size before you start, because a larger archive is refused only after it has been sent.

Reading the catalogue

CallWhat it is for
ListGamesYour games and every game Plany publishes. Set launchable_for: KIND_SERVER for only the games a server can be created from.
GetGameOne game as declared — only the fields set on that node.
ResolveGameOne game with everything it inherits filled in, plus the build it resolves to. What a server created from it would run.
ListBuilds, GetBuildYour builds and their state. A failed build carries error.

Never write ResolveGame's answer back with UpdateGame. That copies every inherited value onto your game, after which changing its parent stops reaching it. And UpdateGame with server in the mask replaces the whole server message: read the game, change what you need, and send the whole half back.

Changing and deleting

A game server pins the build it was created with, so updating a game or a build never changes a server that is already running. Create a new build and point the game at it; new servers pick it up.

DeleteGame is refused while a game server or an autoscaling group is running the game. DeleteBuild is refused while a game uses the build.