games.versions.validateGameVersion
Description
Validates information used to create a new game version.
Code Examples
Request
# Write the request body to body.json before running
curl -X POST -d '@body.json' 'https://api.rivet.gg/cloud/games/{game_id}/versions/validate'
Request Parameters
game_id
required path parameterRequest Body
config
required objectCloud configuration for a given version.
cdn
objectCDN configuration for a given version.
build_command
stringConfigures 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>
stringbuild_output
stringConfigures Rivet CLI behavior. Has no effect on server behavior.
routes
array<object>Multiple CDN version routes.
routes[*]
objectglob
required stringmiddlewares
required array<object>Multiple CDN version middleware.
middlewares[*]
objectkind
required objectcustom_headers
objectheaders
required array<object>headers[*]
objectname
required stringvalue
required stringpriority
required integerUnsigned 32 bit integer.
site_id
stringengine
objectcustom
objectgodot
objecthtml5
objectunity
objectunreal
objectgame_module
required stringName 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
objectKV configuration for a given version.
matchmaker
objectMatchmaker configuration for a given version.
captcha
objectMatchmaker captcha configuration.
hcaptcha
objecthCpatcha configuration.
secret_key
stringSecret key for your hCaptcha application. Must be set.
site_key
stringSite key for your hCaptcha application. Must be set.
requests_before_reverify
required integerDenotes how many requests a connection can make before it is required to reverify a captcha.
turnstile
objectTurnstile captcha configuration.
secret_key
required stringsite_key
required stringverification_ttl
required integerDenotes how long a connection can continue to reconnect without having to reverify a captcha (in milliseconds).
dev_hostname
stringConfigures Rivet CLI behavior. Has no effect on server behavior.
docker
objectA game mode runtime running through Docker.
args
array<string>args[*]
stringbuild_args
map<string, string>Configures Rivet CLI behavior. Has no effect on server behavior.
build_args.<build_arg>
stringdockerfile
stringConfigures Rivet CLI behavior. Has no effect on server behavior.
env
map<string, string>env.<key>
stringimage
stringConfigures Rivet CLI behavior. Has no effect on server behavior.
image_id
stringnetwork_mode
stringConfigures 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>
objectPort config for a docker build.
dev_port
integerConfigures Rivet CLI behavior. Has no effect on server behavior.
dev_port_range
objectConfigures Rivet CLI behavior. Has no effect on server behavior.
max
required integerUnsigned 32 bit integer.
min
required integerUnsigned 32 bit integer.
dev_protocol
stringConfigures Rivet CLI behavior. Has no effect on server behavior.
port
integerThe port number to connect to.
Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind
port_range
objectRange 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.
Related
- cloud.version.matchmaker.PortProtocol
- cloud.version.matchmaker.ProxyKind
max
required integerUnsigned 32 bit integer.
min
required integerUnsigned 32 bit integer.
protocol
stringSignifies 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.
Related - cloud.version.matchmaker.GameModeRuntimeDockerPort - cloud.version.matchmaker.ProxyKind - /docs/dynamic-servers/concepts/game-guard - matchmaker.lobbies.find
proxy
stringHow this port should be proxied. Defaults to 'game-guard`.
game_modes
map<string, object>A list of game modes.
game_modes.<game_mode>
objectA game mode.
actions
objectConfiguration for the connection types allowed for a game mode.
create
objectConfigures 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
booleanDefaults to true when unset.
enable_public
booleanDefaults to false when unset.
enabled
required booleanSets whether or not the /create endpoint is enabled.
verification
objectConfiguration 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>
stringurl
required stringfind
objectConfigures 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 booleanSets whether or not the /find endpoint is enabled.
verification
objectConfiguration 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>
stringurl
required stringjoin
objectConfigures 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 booleanSets whether or not the /join endpoint is enabled.
verification
objectConfiguration 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>
stringurl
required stringallow_dynamic_max_players
booleandocker
objectA game mode runtime running through Docker.
args
array<string>args[*]
stringbuild_args
map<string, string>Configures Rivet CLI behavior. Has no effect on server behavior.
build_args.<build_arg>
stringdockerfile
stringConfigures Rivet CLI behavior. Has no effect on server behavior.
env
map<string, string>env.<key>
stringimage
stringConfigures Rivet CLI behavior. Has no effect on server behavior.
image_id
stringnetwork_mode
stringConfigures 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>
objectPort config for a docker build.
dev_port
integerConfigures Rivet CLI behavior. Has no effect on server behavior.
dev_port_range
objectConfigures Rivet CLI behavior. Has no effect on server behavior.
max
required integerUnsigned 32 bit integer.
min
required integerUnsigned 32 bit integer.
dev_protocol
stringConfigures Rivet CLI behavior. Has no effect on server behavior.
port
integerThe port number to connect to.
Related - cloud.version.matchmaker.PortProtocol - cloud.version.matchmaker.ProxyKind
port_range
objectRange 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.
Related
- cloud.version.matchmaker.PortProtocol
- cloud.version.matchmaker.ProxyKind
max
required integerUnsigned 32 bit integer.
min
required integerUnsigned 32 bit integer.
protocol
stringSignifies 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.
Related - cloud.version.matchmaker.GameModeRuntimeDockerPort - cloud.version.matchmaker.ProxyKind - /docs/dynamic-servers/concepts/game-guard - matchmaker.lobbies.find
proxy
stringHow this port should be proxied. Defaults to 'game-guard`.
idle_lobbies
objectConfiguration for how many idle lobbies a game version should have.
max
required integermin
required integerlistable
booleanmax_players
integermax_players_direct
integermax_players_party
integerregions
map<string, object>regions.<region>
objectA game mode region.
idle_lobbies
objectConfiguration for how many idle lobbies a game version should have.
max
required integermin
required integertier
stringtaggable
booleantier
stringidle_lobbies
objectConfiguration for how many idle lobbies a game version should have.
max
required integermin
required integermax_players
integermax_players_direct
integermax_players_party
integerregions
map<string, object>regions.<region>
objectA game mode region.
idle_lobbies
objectConfiguration for how many idle lobbies a game version should have.
max
required integermin
required integertier
stringtier
stringscripts
map<string, string>scripts.<script>
stringdisplay_name
required stringRepresent a resource's readable display name.
Response Body
errors
required array<object>A list of validation errors.
errors[*]
objectAn error given by failed content validation.
path
required array<string>A list of strings denoting the origin of a validation error.
path[*]
string