Cmdr bridge
Report results
Report the outcome of commands a game server received from a poll, once per command and only from the server that received it.
https://api.bloxlytics.app/v1/bridge/resultcurl -X POST https://api.bloxlytics.app/v1/bridge/result \
-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,
"jobId": "<job id>",
"results": [
{ "id": "<execution id>", "ok": true, "output": "Gave 500 coins to <username>", "durationMs": 3, "context": "player" },
{ "id": "<execution id>", "ok": false, "error": "Player is not in this server.", "durationMs": 0 }
]
}'{ "accepted": 2 }After running the commands from a poll, the server reports what happened to each one. The person who ran the command sees the output or error in the dashboard straight away, and macros that were waiting on it carry on.
Each command accepts exactly one result, and only from the server it was delivered to. Anything else in the request is ignored, without an error.
#Headers
Content-Typestringheaderrequiredapplication/json.
AuthorizationstringheaderrequiredBearer followed by the project's bridge key, bxb_….
X-Bloxlytics-ProjectstringheaderrequiredThe experience's Universe ID (game.GameId).
X-Bloxlytics-TimestampstringheaderrequiredThe current Unix time in seconds, 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 - { }.
#Body
protocolnumberbodyrequiredMust be 1.
jobIdstringbodyrequiredThe id of the server that ran the commands, up to 64 characters. Must be the jobId of the poll that delivered them.
resultsResult[]bodyrequiredUp to 50 results. One poll returns at most 10 commands, so one request per poll is enough.
Output and error strings longer than 4,000 characters fail the whole request with 400. Cut them first, as the Luau bridge does.
#Response
200 OK.
acceptedintegerrequiredHow many results were recorded. A result is recorded only when all of these hold:
- the command belongs to this project,
- it was delivered by a poll from this same
jobId, within the last 10 minutes, - it's still waiting for a result: no result has been recorded yet, and it hasn't been marked as timed out.
Results that don't qualify are skipped silently, so accepted can be lower than the number you sent. Nothing is gained by sending them again.
#What happens to a recorded result
- The command's status becomes success (
ok: true) or error (ok: false), with its output or error, duration and run context, and the time it completed. - If the command was a moderation action taken through the bridge, such as a kick, the action is marked as confirmed by the game server, or as failed with your error.
- Everyone watching the project in the dashboard is notified, so the result appears without a refresh.
If no result arrives, the command is marked as timed out (The game server didn't respond in time.), at the latest two minutes after it was delivered. A late result is then ignored. The Luau bridge doesn't retry this request.