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

Was this page helpful?

Edit Page

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.