Bifrost Bifrost
POSThttps://api.dev.bifrostgaming.com/v1/graphql

guildGetGameState

v1

Get real-time game state data from a remote game server, including map, mode, player counts, and team scores.

Operation Type

Query

Rate Limit: 1 request per 30 seconds per server

Designed for near real-time polling of live game state.

Input Fields

FieldTypeRequiredDescription
serverIdID!RequiredUnique server identifier
gameTypeStringOptionalGame type filter (e.g., 'HLL')

Code Examples

curl -X POST https://api.dev.bifrostgaming.com/v1/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -d '{
    "query": "query { guildGetGameState(serverId: \"YOUR_SERVER_ID\", gameType: \"HLL\") { data timestamp matchTimeRemainingSeconds team1 { teamName playerCount score faction } team2 { teamName playerCount score faction } nextMap nextMapGameMode pendingNextMap } }"
  }'

Postman Collection

Download a ready-to-use Postman collection for this endpoint. Import it into Postman to start testing immediately.

How to import into Postman
  1. Open Postman and click Import (top-left)
  2. Drag and drop the downloaded .json file, or click Upload Files and select it
  3. Click Import to confirm
  4. The collection appears in your sidebar — expand it and select the request
  5. In the Body tab, update the placeholder values (your-partner-id, etc.) with your actual credentials
  6. Click Send

The collection uses Postman's GraphQL body type, which provides syntax highlighting and variable editing. Make sure your Postman version is 7.2+ for GraphQL support.

Success Response200

{
  "data": {
    "guildGetGameState": {
      "data": {
        "serverName": "My Community Server #1",
        "currentMap": "Hurtgen Forest",
        "currentGameMode": "Warfare",
        "playerCount": 87,
        "maxPlayers": 100,
        "timeRemaining": "0:45:32",
        "score": { "allies": 3, "axis": 2 }
      },
      "timestamp": "2025-01-15T12:34:56.789Z",
      "matchTimeRemainingSeconds": 2732,
      "team1": { "name": "Allies", "score": 3 },
      "team2": { "name": "Axis", "score": 2 },
      "nextMap": "Carentan",
      "nextMapGameMode": "Offensive",
      "pendingNextMap": null
    }
  }
}

Error Responses

Response Fields

FieldTypeRequiredDescription
dataJSONOptionalDynamic object containing normalized server state data
timestampStringOptionalISO 8601 timestamp when data was last updated
matchTimeRemainingSecondsIntOptionalSeconds remaining in current match
team1ObjectOptionalTeam 1 data: teamName, playerCount, score, faction
team2ObjectOptionalTeam 2 data: teamName, playerCount, score, faction
nextMapStringOptionalFriendly name of next map
nextMapGameModeStringOptionalGame mode of next map
pendingNextMapStringOptionalIf a next map has already been set for this match (e.g. by a Discord vote), this field contains the map RCON name. Null if no map is pending.
Shrapnelworks Logo

A Shrapnelworks product