games.versions.getGameVersionById


Description

Returns a game version by its version ID.


Code Examples

Request

GET
https://api.rivet.gg/cloud/games/{game_id}/versions/{version_id}
curl -X GET 'https://api.rivet.gg/cloud/games/{game_id}/versions/{version_id}'

Request Parameters

game_id

required path parameter

version_id

required path parameter

Response Body

version

required object

A full version.

config

required object

Cloud configuration for a given version.

cdn

object

CDN configuration for a given version.

build_command

string

Configures Rivet CLI behavior. Has no effect on server behavior.

build_env

map<string, string>

Configures Rivet CLI behavior. Has no effect on server behavior.

build_env.<build_env>

string

build_output

string

Configures Rivet CLI behavior. Has no effect on server behavior.

routes

array<object>

Multiple CDN version routes.

routes[*]

object

glob

required string

middlewares

required array<object>

Multiple CDN version middleware.

middlewares[*]

object

kind

required object

custom_headers

object

headers

required array<object>

headers[*]

object

name

required string

value

required string

priority

required integer

Unsigned 32 bit integer.

site_id

string

engine

object

custom

object

godot

object

html5

object

unity

object

unreal

object

game_module

required string

Name of the Unreal module that holds the game code. This is usually the value of $.Modules[0].Name in the file MyProject.unproject. Configures Rivet CLI behavior. Has no effect on server behavior.

kv

object

KV configuration for a given version.

matchmaker

object

Matchmaker configuration for a given version.

captcha

object

Matchmaker captcha configuration.

hcaptcha

object

hCpatcha configuration.

secret_key

string

Secret key for your hCaptcha application. Must be set.

site_key

string

Site key for your hCaptcha application. Must be set.

requests_before_reverify

required integer

Denotes how many requests a connection can make before it is required to reverify a captcha.

turnstile

object

Turnstile captcha configuration.

secret_key

required string

site_key

required string

verification_ttl

required integer

Denotes how long a connection can continue to reconnect without having to reverify a captcha (in milliseconds).

dev_hostname

string

Configures Rivet CLI behavior. Has no effect on server behavior.

docker

object

A game mode runtime running through Docker.

args

array<string>

args[*]

string

build_args

map<string, string>

Configures Rivet CLI behavior. Has no effect on server behavior.

build_args.<build_arg>

string

dockerfile

string

Configures Rivet CLI behavior. Has no effect on server behavior.

env

map<string, string>

env.<key>

string

image

string

Configures Rivet CLI behavior. Has no effect on server behavior.

image_id

string

network_mode

string

Configures how the container's network is isolated from the host. bridge (default) networking isolates the container's network from the host & other containers. host networking removes isolation between the container and the host. Only available in Rivet Open Source & Enterprise. Read more about bridge vs host networking here.

ports

map<string, object>

ports.<port>

object

Port config for a docker build.

dev_port

integer

Configures Rivet CLI behavior. Has no effect on server behavior.

dev_port_range

object

Configures Rivet CLI behavior. Has no effect on server behavior.

max

required integer

Unsigned 32 bit integer.

min

required integer

Unsigned 32 bit integer.

dev_protocol

string

Configures Rivet CLI behavior. Has no effect on server behavior.

port_range

object

Range of ports that can be connected to. If configured, network_mode must equal host. Port ranges may overlap between containers, it is the responsibility of the developer to ensure ports are available before using. Read more about host networking here. Only available on Rivet Open Source & Enterprise.

  • cloud.version.matchmaker.PortProtocol
  • cloud.version.matchmaker.ProxyKind

max

required integer

Unsigned 32 bit integer.

min

required integer

Unsigned 32 bit integer.

protocol

string

Signifies the protocol of the port. Note that when proxying through GameGuard (via ProxyKind), the port number returned by /find, /join, and /create will not be the same as the port number configured in the config:

  • With HTTP, the port will always be 80. The hostname of the port correctly routes the incoming connection to the correct port being used by the game server.
  • With HTTPS, the port will always be 443. The hostname of the port correctly routes the incoming connection to the correct port being used by the game server.
  • Using TCP/UDP, the port will be a random number between 26000 and 31999. This gets automatically routed to the correct port being used by the game server.

proxy

string

How this port should be proxied. Defaults to 'game-guard`.

game_modes

map<string, object>

A list of game modes.

game_modes.<game_mode>

object

A game mode.

actions

object

Configuration for the connection types allowed for a game mode.

create

object

Configures the requirements and authentication for the /create endpoint. If this value is not set in the config, the /create endpoint is NOT enabled.

enable_private

boolean

Defaults to true when unset.

enable_public

boolean

Defaults to false when unset.

enabled

required boolean

Sets whether or not the /create endpoint is enabled.

verification

object

Configuration that tells Rivet where to send validation requests and with what headers. When set, Rivet will send the verification_data property (given by the user in the find/join/create endpoint) to the given url along with the headers provided and some information about the requested lobby. The response of this request will determine if the user can join that lobby or not.

headers

required map<string, string>

headers.<header>

string

url

required string

find

object

Configures the requirements and authentication for the /find endpoint. If this value is not set in the config, the /find endpoint is still enabled.

enabled

required boolean

Sets whether or not the /find endpoint is enabled.

verification

object

Configuration that tells Rivet where to send validation requests and with what headers. When set, Rivet will send the verification_data property (given by the user in the find/join/create endpoint) to the given url along with the headers provided and some information about the requested lobby. The response of this request will determine if the user can join that lobby or not.

headers

required map<string, string>

headers.<header>

string

url

required string

join

object

Configures the requirements and authentication for the /join endpoint. If this value is not set in the config, the /join endpoint is still enabled.

enabled

required boolean

Sets whether or not the /join endpoint is enabled.

verification

object

Configuration that tells Rivet where to send validation requests and with what headers. When set, Rivet will send the verification_data property (given by the user in the find/join/create endpoint) to the given url along with the headers provided and some information about the requested lobby. The response of this request will determine if the user can join that lobby or not.

headers

required map<string, string>

headers.<header>

string

url

required string

allow_dynamic_max_players

boolean

docker

object

A game mode runtime running through Docker.

args

array<string>

args[*]

string

build_args

map<string, string>

Configures Rivet CLI behavior. Has no effect on server behavior.

build_args.<build_arg>

string

dockerfile

string

Configures Rivet CLI behavior. Has no effect on server behavior.

env

map<string, string>

env.<key>

string

image

string

Configures Rivet CLI behavior. Has no effect on server behavior.

image_id

string

network_mode

string

Configures how the container's network is isolated from the host. bridge (default) networking isolates the container's network from the host & other containers. host networking removes isolation between the container and the host. Only available in Rivet Open Source & Enterprise. Read more about bridge vs host networking here.

ports

map<string, object>

ports.<port>

object

Port config for a docker build.

dev_port

integer

Configures Rivet CLI behavior. Has no effect on server behavior.

dev_port_range

object

Configures Rivet CLI behavior. Has no effect on server behavior.

max

required integer

Unsigned 32 bit integer.

min

required integer

Unsigned 32 bit integer.

dev_protocol

string

Configures Rivet CLI behavior. Has no effect on server behavior.

port_range

object

Range of ports that can be connected to. If configured, network_mode must equal host. Port ranges may overlap between containers, it is the responsibility of the developer to ensure ports are available before using. Read more about host networking here. Only available on Rivet Open Source & Enterprise.

  • cloud.version.matchmaker.PortProtocol
  • cloud.version.matchmaker.ProxyKind

max

required integer

Unsigned 32 bit integer.

min

required integer

Unsigned 32 bit integer.

protocol

string

Signifies the protocol of the port. Note that when proxying through GameGuard (via ProxyKind), the port number returned by /find, /join, and /create will not be the same as the port number configured in the config:

  • With HTTP, the port will always be 80. The hostname of the port correctly routes the incoming connection to the correct port being used by the game server.
  • With HTTPS, the port will always be 443. The hostname of the port correctly routes the incoming connection to the correct port being used by the game server.
  • Using TCP/UDP, the port will be a random number between 26000 and 31999. This gets automatically routed to the correct port being used by the game server.

proxy

string

How this port should be proxied. Defaults to 'game-guard`.

idle_lobbies

object

Configuration for how many idle lobbies a game version should have.

max

required integer

min

required integer

listable

boolean

max_players

integer

max_players_direct

integer

max_players_party

integer

regions

map<string, object>

regions.<region>

object

A game mode region.

idle_lobbies

object

Configuration for how many idle lobbies a game version should have.

max

required integer

min

required integer

tier

string

taggable

boolean

tier

string

idle_lobbies

object

Configuration for how many idle lobbies a game version should have.

max

required integer

min

required integer

max_players

integer

max_players_direct

integer

max_players_party

integer

regions

map<string, object>

regions.<region>

object

A game mode region.

idle_lobbies

object

Configuration for how many idle lobbies a game version should have.

max

required integer

min

required integer

tier

string

tier

string

scripts

map<string, string>

scripts.<script>

string

create_ts

required string

RFC3339 timestamp

display_name

required string

Represent a resource's readable display name.

version_id

required string

Rivet

Open-source multiplayer infrastructure. Easy, flexible, and affordable.

This website is not sponsored by or affiliated with Unity Technologies or its affiliates. Unity Trademark(s) are trademark(s) or registered trademark(s) of Unity Technologies or its affiliates in the U.S. and elsewhere. | This website is not sponsored by, affiliated with, or endorsed by Epic Games, Inc. or its affiliates. 'Unreal Engine' is a trademark or registered trademark of Epic Games, Inc. in the U.S. and elsewhere. | The HTML5 Logo by the World Wide Web Consortium (W3C), used under a Creative Commons Attribution 3.0 License. Source | The Godot Engine Logo by the Andrea Calabró, used under a Creative Commons Attribution 4.0 International License. Source | Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries. Docker, Inc. and other parties may also have trademark rights in other terms used herein.

© 2024 Rivet Gaming, Inc. All rights reserved.