CLI & APICommand reference
stackblaze orgs
List and switch organizations
Usage: stackblaze orgs|org [options] [command]
List and switch organizations
Options:
-h, --help Print help
Commands:
list|ls [options] List your organizations (* = the one this login acts
in)
switch [options] <slug> Switch the saved login to another organization
(slug, id or name)
help [command] Print this message or the help of the given
subcommand(s)orgs list
Usage: stackblaze orgs list|ls [options]
List your organizations (* = the one this login acts in)
Options:
--api-url <url> StackBlaze API base URL (env STACKBLAZE_API_URL)
--token <token> API token, sb_pat_... (env STACKBLAZE_TOKEN)
--json Output JSON (same as -o json) (default: false)
-o, --output <format> Output format: text or json (choices: "text", "json")
-h, --help Print helpExample
List the organizations you belong to. * marks the one this login acts in:
stackblaze orgs list┌─────┬───────────────────┬───────────────────┬──────────┬────────┐
│ │ Slug │ Name │ Plan │ Status │
├─────┼───────────────────┼───────────────────┼──────────┼────────┤
│ * │ mellow-river-uw3w │ mellow-river-uw3w │ Business │ active │
└─────┴───────────────────┴───────────────────┴──────────┴────────┘With --json, current marks it and id is what --org and the API take:
stackblaze orgs list --json[
{
"id": "cmw5858w5002xvk010f9zs5w8",
"slug": "mellow-river-uw3w",
"name": "mellow-river-uw3w",
"status": "active",
"plan": "Business",
"current": true
}
]orgs switch
Usage: stackblaze orgs switch [options] <slug>
Switch the saved login to another organization (slug, id or name)
Options:
--api-url <url> StackBlaze API base URL (env STACKBLAZE_API_URL)
--token <token> API token, sb_pat_... (env STACKBLAZE_TOKEN)
--json Output JSON (same as -o json) (default: false)
-o, --output <format> Output format: text or json (choices: "text", "json")
-h, --help Print help
Saves a token scoped to that organization where `login` saves
credentials. For a single command use the global --org <slug> instead.
A browser-login token is exchanged for a new one in that organization (the
old one is revoked); a password login switches its session. Tokens created
on the dashboard's tokens page are pinned to their organization and cannot
switch: run `login`, or use a token created in that organization.