Gateway REST Interface
The gateway REST API returns current state. Field lists live on each route in the gateway reference, which is generated from the same service. This page covers the rules those routes share. Base URL:
https://gateway.fnlb.net/v1Authentication
Send the same Authorization header as the API. The gateway accepts:
- an API token, only if the account has developer access
- an OAuth2 access token with the
bots.readscope
A session from the website is not accepted here. Use Try request in the reference only when that client can send one of the tokens above.
curl "https://gateway.fnlb.net/v1/bots?FNLB_BUCKET_ID=YOUR_ACCOUNT_ID" \
-H "Authorization: Bearer FNLB_YOUR_API_TOKEN"Your account id is the id from GET /user.
Routes
- GET /bots
Every bot connected to the gateway for this account.
- GET /bots/{botId}
One connected bot, including its party when it has one.
- GET /shards
Clusters serving those bots, with capacity and version.
GET /bots is not the catalog of bots you own. Offline bots are omitted. Use GET /bots on the API for that list.
Status
status on a bot is a number:
| Value | State |
|---|---|
0 | Offline |
1 | Booting |
2 | Available |
3 | Busy |
4 | Disconnected |
Party member flags
When party is present, each member has a flags bitfield:
| Bit | Meaning |
|---|---|
1 | Ready |
2 | Leader |
4 | Sitting out |
8 | Playing |
The boolean fields isReady, isLeader, isSittingOut, and isPlaying are still sent. Prefer flags. The booleans will be removed later.
Polling
Stay inside the gateway limits: 100 requests per 10 seconds for the whole gateway, 100 per minute shared by the bot routes, and 100 per minute for shards. A dashboard can refresh every 10 to 30 seconds.
- Open the gateway reference
Schemas, examples, and errors for each route.