Skip to main content

Global flags

FlagDescription
--params '<JSON>'Query, path and header parameters (id, page, filters, X-Workspace-Id)
--json '<JSON>'Request body (POST/PUT/PATCH)
--fields '<FIELDS>'Limits which fields come back in the response
--dry-runShows the request (URL, query, headers and body) without sending it
--page-allAutomatic pagination, with NDJSON output
--page-limit <N>Maximum number of pages (default: 10)
--page-delay <MS>Delay between pages (default: 100ms)
--env <ENV>Environment. Magic Dashboard only has production (default)
--verboseRequest details on stderr
--output <PATH>Saves the response to a file
--output-format <FMT>Format: json, table, csv
--idempotency-key <KEY>Custom idempotency key
--lang <LANG>Language of the messages: pt, en or es (default: the system's)

Headers in --params​

A --params key that the endpoint declares as a header is sent as a header, not in the URL. That is how you switch workspaces for a single call — --params '{"X-Workspace-Id": "WORKSPACE_ID"}' —, winning over KOBANA_WORKSPACE_ID. kobana schema lists those headers under header_params.

Pagination​

Magic Dashboard lists paginate with page/per_page, and that is what --page-all works with. The exceptions paginate on their own — pass the parameters in --params: entities records list uses limit/offset, and portal-users activity timeline list uses limit and the before cursor.

Language​

The CLI speaks Portuguese, English or Spanish: help, messages, errors and command descriptions. The language comes, in this order, from --lang, the KOBANA_LANG variable, the terminal's locale variables (LC_ALL, LC_MESSAGES, LANG) and, last, the system language.

kobana --lang pt dashboards --help
export KOBANA_LANG=es

Command and flag names, JSON keys and exit codes never change with the language. Available since version 0.6.0.

Next steps​