Output and Pagination
Every command prints JSON to stdout, errors included. Add --pretty to indent the output, and --debug to log the underlying HTTP calls to stderr.
Keep output small
--fields name,state keeps only those fields:
gameflow servers list --game-id GAME_ID --all --fields name,state,address
gameflow usage summary --fields summary,billingUsage
- Lists: applies to each item. The rest of the envelope, such as
nextCursor, is kept, and an empty list stays empty ({"servers":[]}). - Results with several blocks: name the blocks you want, as in the
usage summaryexample. - Errors: never trimmed.
Pagination
Every list command that pages takes the same flags and reports the next page the same way:
--limitsets the page size, and--cursorcontinues from a previous page.- With
--limitor--cursor, the output includeshasMoreand, when there is another page,nextCursor. PassnextCursorback as--cursor. --allfollows every page and returns everything. It works onservers list,builds list,games list,events listandmodels leaderboard.
Without any of these flags a list command makes one request and prints what the API returns by default, with no hasMore.
| Command | Without flags | Also takes |
|---|---|---|
servers list | All servers. | --search, --sort (latest, oldest, name or status). --limit is at most 50. |
builds list | The first 15 builds. | |
games list | The first 10 games. | |
events list | The API's default page. | --from, --to, --user-id. |
models leaderboard | The API's default page. | --period-id. |
servers events | The API's default page. |
Treat nextCursor as an opaque value and pass it back unchanged:
gameflow servers list --game-id GAME_ID --limit 50
gameflow servers list --game-id GAME_ID --limit 50 --cursor NEXT_CURSOR
gameflow games list --limit 25 --cursor NEXT_CURSOR
Older flags
--page-size,--page-token,--pageand--offsetstill work, but they are hidden from--help.builds listalso still printsnextPageToken, which is the same value asnextCursor.- Use a standard flag or its older name, not both. Together they are a usage error.
Reading values
The CLI prints what the API returns and does not convert it:
- 64-bit integers are JSON strings (
"creditRemainingCents":"517"), while smaller numbers are real numbers. Convert before doing arithmetic. - Timestamps are epoch seconds as strings in some commands and ISO 8601 in others. Check the field before comparing.