Thanks to visit codestin.com
Credit goes to docs.nocobase.com

nb api

Call NocoBase APIs from the CLI. nb api includes generic nb api resource CRUD commands and dynamic commands generated from the current app's OpenAPI Schema.

Usage

nb api <command>

Subcommands

CommandDescription
nb api resourceRun generic CRUD and aggregate queries against any NocoBase resource
nb api dynamic commandsTopic and operation commands generated from OpenAPI Schema

Common Parameters

Most nb api commands support the following connection parameters:

ParameterTypeDescription
--api-base-urlstringNocoBase API URL, for example http://localhost:13000/api
--env, -estringEnv name
--token, -tstringAPI key override
--rolestringRole override sent as the X-Role request header
--verbosebooleanShow detailed progress
--json-output, -j / --no-json-outputbooleanWhether to output raw JSON; enabled by default

Examples

nb api resource list --resource users -e app1
nb api resource get --resource users --filter-by-tk 1 -e app1
nb api resource create --resource users --values '{"nickname":"Ada"}' -e app1
nb api resource list --resource users -e app1 --no-json-output