Cmdr bridge
Register a server
Register a game server with the Cmdr bridge, report what it can do and publish its Cmdr command catalogue.
https://api.bloxlytics.app/v1/bridge/hellocurl -X POST https://api.bloxlytics.app/v1/bridge/hello \
-H "Content-Type: application/json" \
-H "Authorization: Bearer bxb_…" \
-H "X-Bloxlytics-Project: <universe id>" \
-H "X-Bloxlytics-Timestamp: $(date +%s)" \
-H "X-Bloxlytics-Nonce: $(uuidgen)" \
-d '{
"protocol": 1,
"version": "1.0.0",
"jobId": "<job id>",
"placeId": 1234567890,
"capabilities": ["cmdr", "presence", "executor", "kick"],
"commands": [
{
"name": "give",
"aliases": ["g"],
"description": "Give a player coins.",
"group": "Admin",
"args": [
{ "name": "player", "type": "player" },
{ "name": "amount", "type": "integer", "optional": true, "default": 100 }
],
"allowed": true
}
],
"types": [],
"allowSystemCommands": true,
"studio": false,
"tags": { "map": "Forest" }
}'{
"ok": true,
"enabled": true,
"pollHoldSeconds": 20,
"groups": { "developer": ["Moderation"] }
}The first call a game server makes to the Cmdr bridge. It tells Bloxlytics that the server is online, which bridge features it supports, and which Cmdr commands are registered in it. The response says whether the bridge is turned on for the project and how long polls are held.
After a successful hello, the server starts polling for commands. The Luau bridge waits 3 seconds after starting (so your game can register its Cmdr commands first), then sends hello, and sends it again every 300 seconds while it runs so the command catalogue stays current. If hello fails, it retries after 5 seconds, doubling the wait up to 120 seconds.
All bridge endpoints use the project's bridge key and replay protection. The protocol is described end to end in Cmdr bridge.
#Headers
Content-Typestringheaderrequiredapplication/json.
AuthorizationstringheaderrequiredBearer followed by the project's bridge key, bxb_…. A write key is refused.
X-Bloxlytics-ProjectstringheaderrequiredThe experience's Universe ID (game.GameId). Legacy UUID project IDs are also accepted.
X-Bloxlytics-TimestampstringheaderrequiredThe current Unix time in seconds. Must be within 120 seconds of Bloxlytics' clock.
X-Bloxlytics-NoncestringheaderrequiredA new random value for this request: 16 to 64 characters from A–Z a–z 0–9 - { }. Never reuse one.
#Body
At most 2 MB.
protocolnumberbodyrequiredThe bridge protocol version. Must be 1.
versionstringbodyrequiredThe bridge client's version, up to 20 characters, for example 1.0.0.
jobIdstringbodyrequiredThe server's id, up to 64 characters: game.JobId, or the studio-… key the analytics SDK uses in Studio. Use the same value as server.jobId in ingest so analytics, presence and commands refer to the same server.
placeIdintegerbodyrequiredgame.PlaceId. A whole number, 0 or more.
cmdrVersionstringbodyThe Cmdr version, up to 20 characters. Accepted but not currently used.
capabilitiesstring[]bodyrequiredWhat this server's bridge can do. Up to 10 values from the list below; any other value is refused. A server counts as running the bridge (and can be sent commands) when the list includes cmdr or kick.
| Value | Meaning |
|---|---|
cmdr |
Runs registered Cmdr commands |
kick |
Can kick a player |
warn |
Can show a player a warning (the game supplied an OnWarn handler) |
announce |
Can show a server-wide announcement (the game supplied an OnAnnounce handler) |
presence |
Reports the players in the server on each poll |
executor |
Can run a command as the issuing team member's own player when they're in the server |
The Luau bridge always sends cmdr, presence and executor, adds kick unless AllowKick = false, and adds warn and announce when their handlers are set.
commandsCommand[]bodyrequiredThe Cmdr commands registered in this server, up to 500. Send [] if there are none.
Each command is saved for the project by name. A command that's already known has its aliases, description, group, arguments and allowed replaced with what you send. Commands you leave out aren't deleted.
typesstring[]bodydefault: []Custom Cmdr type names, up to 200, each up to 64 characters. Accepted but not currently used.
allowSystemCommandsbooleanbodydefault: truefalse when the server only runs Cmdr commands as a verified team member's player who is in this server, never in the system context. Bloxlytics then won't send a Cmdr command to this server unless the issuer is in it. See Cmdr bridge security.
studiobooleanbodydefault: falsetrue for a Studio session. Studio servers are only sent commands when someone picks them explicitly.
tagsobjectbodydefault: {}Server tags, such as { "map": "Forest" }: up to 16, names starting with a letter then letters, digits, spaces, _ . - (up to 32 characters), values up to 64 characters. Invalid tags fail the request with 400.
#Response
200 OK. The server is now shown as online (as a bridge server, if capabilities includes cmdr or kick), and its player list is empty until its next poll.
okbooleanrequiredAlways true.
enabledbooleanrequiredWhether the bridge is turned on in the project's SDK configuration. When false, don't poll: Bloxlytics won't queue commands for the project. The Luau bridge stops after a hello that returns false.
pollHoldSecondsintegerrequiredHow long a poll is held open when there are no commands. Currently 20. Set your HTTP timeout above this.
groupsobjectrequiredThe Cmdr groups each Bloxlytics role may run, from the project's SDK configuration: optional keys owner, admin and developer, each a list of group names. {} when no restriction is set. Bloxlytics enforces this itself when someone queues a command; it's returned for information.