list


Description

Lists all servers associated with the token used. Can be filtered by tags in the query string.


Code Examples

curl -X GET 'https://api.rivet.gg/games/{game_id}/environments/{environment_id}/servers'

Request Parameters

game_id

required path parameter

environment_id

required path parameter

tags_json

optional query parameter

include_destroyed

optional query parameter

cursor

optional query parameter

Response Body

  • servers
    array of objects

    A list of servers for the game associated with the token.

    • servers.id
      string
    • servers.environment
      string
    • servers.datacenter
      string
    • servers.tags
      any value
    • servers.runtime
      object
      • servers.runtime.build
        string
      • servers.runtime.arguments
        array of strings
      • servers.runtime.environment
        union of empty object and string
    • servers.network
      object
      • servers.network.mode
        string
      • servers.network.ports
        union of empty object and object
          • servers.network.ports.protocol
            string
          • servers.network.ports.internal_port
            number
          • servers.network.ports.public_hostname
            string
          • servers.network.ports.public_port
            number
          • servers.network.ports.routing
            object
            • servers.network.ports.routing.game_guard
              empty object
            • servers.network.ports.routing.host
              empty object
    • servers.resources
      object
      • servers.resources.cpu
        number

        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.

      • servers.resources.memory
        number

        The amount of memory in megabytes

    • servers.lifecycle
      object
      • servers.lifecycle.kill_timeout
        number

        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.

    • servers.created_at
      number
    • servers.started_at
      number
    • servers.destroyed_at
      number