Back to Nocobase

nb api dynamic commands

docs/docs/en/api/cli/api/dynamic.md

2.2.22.1 KB
Original Source

nb api dynamic commands

In addition to nb api resource, nb api includes commands generated from the NocoBase app's OpenAPI Schema. These commands are generated and cached the first time you run nb env add or nb env update.

Common Groups

Command groupDescription
nb api aclAccess control: roles, resource permissions, and action permissions
nb api api-keysAPI Key management
nb api appApp management
nb api authenticatorsAuthentication management: password, SMS, SSO, and more
nb api data-modelingData modeling: data sources, collections, and fields
nb api file-managerFile management: storage services and attachments
nb api flow-surfacesPage orchestration: pages, blocks, fields, and actions
nb api system-settingsSystem settings: title, logo, language, and more
nb api theme-editorTheme management: colors, sizes, and theme switching
nb api workflowWorkflow: automation process management

Available groups and commands depend on the connected NocoBase app version and enabled plugins. Run the following commands to inspect the commands supported by the current app:

bash
nb api --help
nb api <topic> --help

Request Body Parameters

Dynamic commands with request bodies support:

ParameterTypeDescription
--bodystringRequest body as a JSON string
--body-filestringPath to a JSON file

--body and --body-file are mutually exclusive.

Dynamic API commands also support:

  • --env, -e: CLI env name to send the request to; when omitted, the current env is used
  • --yes, -y: When an explicitly passed --env targets a different env than the current env, skip the interactive confirmation prompt

If you explicitly pass --env and it differs from the current env, the CLI asks for confirmation first. In non-interactive terminals or AI agent sessions, add --yes yourself or run nb env use <name> first and try again.