Skip to main content
GET
/
api
/
v3
/
servers
/
{instance_id}
/
roster
Get the authoritative match roster
curl --request GET \
  --url https://api.computeflow.cloud/api/v3/servers/{instance_id}/roster \
  --header 'api-key: <api-key>'
import requests

url = "https://api.computeflow.cloud/api/v3/servers/{instance_id}/roster"

headers = {"api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'api-key': '<api-key>'}};

fetch('https://api.computeflow.cloud/api/v3/servers/{instance_id}/roster', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.computeflow.cloud/api/v3/servers/{instance_id}/roster",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.computeflow.cloud/api/v3/servers/{instance_id}/roster"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("api-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.computeflow.cloud/api/v3/servers/{instance_id}/roster")
.header("api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.computeflow.cloud/api/v3/servers/{instance_id}/roster")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "match_id": "<string>",
  "instance_id": "<string>",
  "capacity": 123,
  "current_players": 123,
  "backfill_open": true,
  "backfill_deadline": "2023-11-07T05:31:56Z",
  "roster_version": 123,
  "teams": {},
  "roster": [
    {
      "playerId": "<string>",
      "team": "<string>",
      "lobbyId": "<string>",
      "joinedAt": "2023-11-07T05:31:56Z"
    }
  ]
}
{
"error": "<string>",
"status": 123,
"detail": "<string>"
}

Authorizations

api-key
string
header
required

Path Parameters

instance_id
string
required

Server instance ID (the game server's own INSTANCE_ID).

Response

Authoritative roster for the match backing this server.

Authoritative roster for a running match. Game servers poll this (by instance_id, with a server API key) to know which players to admit.

match_id
string
required

Identifier of the match backing this server.

instance_id
string
required

Server instance backing this match.

status
enum<string>
required

Match lifecycle status. "in_game": active. "locked": no further joiners. "completed": ended.

Available options:
in_game,
locked,
completed
capacity
integer
required

Total admissible players across all teams (teams × playersPerTeam).

current_players
integer
required

Number of players currently on the roster.

backfill_open
boolean
required

Whether the match is currently accepting backfill joiners.

backfill_deadline
string<date-time> | null
required

ISO 8601 timestamp after which backfill closes. Null if no window is active.

roster_version
integer
required

Monotonically increasing version bumped on every roster change. Poll this to detect updates cheaply.

teams
object
required

Per-team slot map keyed by team name.

roster
object[]
required

Authoritative flat list of admitted players. The game server uses this to admit connecting players.