Skip to content
blacksponge edited this page Oct 15, 2018 · 3 revisions

GET /games

Response

[
  {
    "name": "GameName",
    "uid": 1000,
    "gid": 1000,
    "cwd": "path/to/work/dir",
    "vars": [
      {
        "name": "a_variable",
        "label": "MyVariable",
        "default": "world"
      }
    ],
    "command": [
      "echo",
      "Hello $var_a_variable
    ]
  },
  ...
]

GET /games/:name

Response

{
  "name": "GameName",
  "uid": 1000,
  "gid": 1000,
  "cwd": "path/to/work/dir",
  "vars": [
    {
      "name": "a_variable",
      "label": "MyVariable",
      "default": "world"
    }
  ],
  "command": [
    "echo",
    "Hello $var_a_variable
  ]
}

Post /servers

Request

{
  "nickname": "MyGameServer",
  "game": "GameName",
  "vars": {
    "a_variable": "friend"
  }
}

Response

{
  "pid": #pid,
  "command": "echo Hello friend"
}

Where #pid is the PID of the process.

Clone this wiki locally