Allocate a new game session in a specific region. Each session is to be identified by a unique identifier that is provided by the caller. It is recommended to use a UUID. In case a warm pool is configured for the specified region and image, an already spun up session will be taken from the pool instead and the given set of program arguments, environment variables and additional labels in the HTTP request will be ignored. Sessions managed by a warm pool will always use the same static set of program arguments and environment variables. The warm pool will then as soon as possible try to replenish itself. If the warm pool is exhausted, a cold allocation will occur as normal.

post/session

Request

  • Base URL: https://api.sandbox-gameye.gameye.net
  • URL: https://api.sandbox-gameye.gameye.net/session
  • Auth: HTTP bearer

Request body

idstring

The unique identifier of the session. If undefined, Gameye will generate a UUIDV4 for you and return it in the API response.

locationstring required

The region the game session is to be hosted in.

imagestring required

The name of the application.

envobject

The list of environment variables to feed the underlying container on startup. This field is ignored when a container is claimed from a warm pool.

argsstring[]

The list of program console arguments to feed to the application hosted inside the underlying container. This field is ignored when a container is claimed from a warm pool.

restartboolean

Indicates whether this session must be automatically restarted on failure. The underlying container will not be restarted in case of a manual termination. This field is ignored when a container is claimed from a warm pool.

labelsobject

A collection of user-defined key/value metadata. This field is ignored in case a container is claimed from a warm pool.

versionstring

Tag of the image that the session will be run. This tag needs to be available or a 404 will be thrown. If not specified run the tag with the highest priority. This field is ignored when a container is claimed from a warm pool.

ttlstring

The amount of time a container should live for until it is to be automatically (and forcefully) terminated. Valid time units are 'm' and 'h'. Any value than a minute will be rounded up to a minute.

external_idstring

An optional customer-provided identifier for this session.

Example request

{
  "id": "f7965a22-e327-4541-a30e-8262890d3a29",
  "location": "europe",
  "image": "my-very-special-game",
  "env": {
    "my-secret": "<my_secret_value"
  },
  "args": [
    "--max-players=8"
  ],
  "labels": {
    "my-example-tag": "1",
    "another-example-tag": "3"
  },
  "restart": false
}

Response

A session is running on a machine in the provided region.

idstring

The generated unique session ID.

hoststring required

The IP address of the machine that the session is running on.

Example response

{
  "id": "c5c7c507-f5de-443e-b772-af4b444cfc21",
  "host": "a.b.c.d",
  "ports": [
    {
      "type": "tcp",
      "container": 80,
      "host": 49159
    },
    {
      "type": "tcp",
      "container": 80,
      "host": 49159
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.