create
Description
Create a new dynamic server.
Code Examples
Request
POST
https://api.rivet.gg/games/{game_id}/environments/{environment_id}/servers# Write the request body to body.json before running
curl -X POST -d '@body.json' 'https://api.rivet.gg/games/{game_id}/environments/{environment_id}/servers'
Request Parameters
game_id
required path parameter
environment_id
required path parameter
Request Body
datacenter
required string
lifecycle
object
kill_timeout
integer
The duration to wait for in milliseconds before killing the server. This should be set to a safe default, and can be overridden during a DELETE request if needed.
network
required object
mode
string
ports
required map<string, object>
ports.<port>
object
internal_port
integer
protocol
required string
routing
object
game_guard
object
host
object
resources
required object
cpu
required integer
The number of CPU cores in millicores, or 1/1000 of a core. For example, 1/8 of a core would be 125 millicores, and 1 core would be 1000 millicores.
memory
required integer
The amount of memory in megabytes
runtime
required object
arguments
array<string>
arguments[*]
string
build
required string
environment
map<string, string>
environment.<environment>
string
tags
required object
Response Body
server
required object
The server that was created
created_at
required integer
datacenter
required string
destroyed_at
integer
environment
required string
id
required string
lifecycle
required object
kill_timeout
integer
The duration to wait for in milliseconds before killing the server. This should be set to a safe default, and can be overridden during a DELETE request if needed.
network
required object
mode
string
ports
required map<string, object>
ports.<port>
object
internal_port
integer
protocol
required string
public_hostname
string
public_port
integer
routing
required object
game_guard
object
host
object
resources
required object
cpu
required integer
The number of CPU cores in millicores, or 1/1000 of a core. For example, 1/8 of a core would be 125 millicores, and 1 core would be 1000 millicores.
memory
required integer
The amount of memory in megabytes
runtime
required object
arguments
array<string>
arguments[*]
string
build
required string
environment
map<string, string>
environment.<environment>
string
started_at
integer
tags
required object