Users, Tenants & Permission Commands
This page covers users, orgs, operation audit records, tenants, subject domains, kanban resources, and authorization flows. It aligns most closely with the hbi-user-mgmt, hbi-indicator-center, and hbi-permission skills.
user
Purpose: manage user accounts.
Common subcommands:
listgetcreateupdatedeleteenabledisablereset-passwordroles
Minimal runnable example:
hbi user get 1 --output jsonRepresentative output:
{
"id": 1,
"name": "admin",
"email": "admin@example.com",
"enable": true,
"userType": "internal",
"loginName": "admin",
"roles": [
{
"id": 1,
"name": "admin",
"description": "System administrator"
}
],
"platformConfig": {
"enable": true,
"isManager": true
},
"organizations": [
{
"id": 1,
"name": "Default Organization",
"enable": true
}
]
}Common next steps:
- List users:
hbi user list --limit 10 --output json - Show user roles:
hbi user roles 1 --output json - Dry-run disable:
hbi user disable 1 --dry-run - Execute disable:
hbi user disable 1
Drill-down guidance:
- If you only know a name and not an ID, start with
listorsearch - Pair real write actions with
--dry-runfirst
audit
Purpose: query system operation records without modifying them, using user, object, and time filters to inspect account activity. System administration permission is required; the server determines access and retention. Use logs download for server debug logs or APM logs.
Run hbi audit list --help to confirm that the installed CLI provides this command. If it reports an unknown command, upgrade the CLI.
Common subcommand: list.
Query by user and object (replace the email, object name, and times with your criteria):
hbi audit list --email trial@example.com --category dataset --query "Sales" \
--begin "2026-11-01 00:00:00" --end "2026-11-16 23:59:59" \
--offset 0 --limit 100 --output jsonFilters and pagination:
| Option | Meaning |
|---|---|
--user <id> | User ID from 1 to 2147483647; can query retained historical records for a deleted user |
--email <email> | Match exactly one existing user by email, case-sensitively |
--login-name <name> | Match exactly one existing user by login name, case-sensitively |
--category <key> | One backend object category, such as app, dataset, or dashboard; comma-separated categories are not accepted |
-Q, --query <text> | Object-name keyword, not an object ID |
--begin <time> / --end <time> | Inclusive start/end times in the server's timezone, using YYYY-MM-DD HH:mm:ss without a UTC offset; start must not be later than end |
--offset <n> | Number of matching records to skip; defaults to 0 and must be nonnegative |
--limit <n> | Maximum records in this page; defaults to 100 and must be positive |
Use at most one of --user, --email, and --login-name. Omit all three to query operation records accessible to the current identity. Email/login-name lookup checks all returned pages for one exact match. No match, multiple matches, incomplete pagination, or an ID outside the supported range produces an error instead of falling back to an unfiltered user query. Deleted users cannot be resolved by email/login name; use their known ID.
Output and next steps:
- Results use descending audit-record ID order. JSON/YAML output is an array for one page and preserves all fields returned by the server. An empty page is
[]; the command does not fetch all pages automatically. - Records typically contain
createdAt,createdBy,name,ip,action,category,objectId,object,status, anddescription. Table output shows these main fields and includes pagination statistics when the server returns a total. - Keep the same filters for the next page and increase
--offsetby the number of records already returned. For example, after a full first page of 100 records, use--offset 100 --limit 100. - To save the current page, add
--write-output audit.jsonwith--output json. - An empty result only means there are no records within the current identity's access, filters, and retention range. It does not prove that the account has never been used.
user-group
Purpose: manage user groups.
Common subcommands:
listgetcreateupdatedelete
org
Purpose: manage org trees and external synchronization.
Common subcommands:
listgetget-by-codetreessync
user-attr
Purpose: manage user attributes.
Common subcommands:
listgetcreateupdatedeletevalues
tenant
Purpose: manage tenants and tenant administrators.
Common subcommands:
listgetcreateupdatedeleteenabledisableusersengine-configreset-passwordreset-adminstatistics
subject
Purpose: manage subject domains and the metrics attached to them.
Common subcommands:
listshowcreateupdatedeleteadd-metricsremove-metricstoggle-onlinelist-metricstokenize
Filter subject domains by title:
hbi subject list --query coffee --output json--query trims surrounding whitespace and performs a case-insensitive containment match against the subject-domain title. The result remains a subject tree: each level retains only matching nodes or nodes with matching descendants, together with their ancestors and idPath; it is not a flat search result. A blank query is equivalent to omitting --query, and behavior without the option is unchanged.
JSON and YAML output return an empty array ([]) when nothing matches. Table output displays No subject domains found..
Run hbi subject list --help to confirm that the installed HBI CLI exposes --query. With Sense 6.2, the server still returns the complete subject tree and the CLI filters it locally. With Sense 6.3 and later, the server prefilters with q, and the CLI applies the same filter again to keep results consistent.
kanban
Purpose: manage analysis kanbans.
Common subcommands:
listshowcreateupdatedeleteduplicateadd-metricexport
permission
Purpose: inspect permissions in a read-only way.
Common subcommands:
folder-listfolder-getapp-listapp-getapp-rules
Minimal runnable example:
hbi permission app-get <app-id> --output jsonUse it to inspect app-level permission configuration for users, user groups, and roles.
Common next steps:
- Show folder permissions:
hbi permission folder-get <folder-id> --output json - List all app permissions:
hbi permission app-list --output json - Show app permission rules:
hbi permission app-rules <app-id> --output json
Drill-down guidance:
- For actual permission changes, use
authorize - You can combine this with
--areato scope by space (personal-area/public-area/app-mart/system-portal)
authorize
Purpose: perform real grant and revoke actions.
Common subcommands:
getgrantrevoke
Pair higher-risk authorization changes with --dry-run first.
Minimal runnable example:
hbi authorize grant app <app-id> --user <user-id>:viewer --dry-runThis previews granting viewer access on an app.
Representative output:
Dry-run mode: the following actions would be executed.
Grant permission to app <app-id>:
- user <user-id> as viewerCommon next steps:
- Remove
--dry-runto execute the grant - Verify the result:
hbi permission app-get <app-id> --output json - Revoke access:
hbi authorize revoke app <app-id> --user <user-id> --dry-run
Drill-down guidance:
- Supported roles include
viewer,editor,administrator, andtenant - You can batch grants:
--user 1:viewer --user 2:editor - You can target organizations:
--organization <org-id>:viewer
Where to drill down next
| Scenario | Start with |
|---|---|
| users and user groups | user / user-group |
| query operation records by user, object, and time | audit list |
| org trees and org sync | org |
| user attributes and value lists | user-attr |
| tenants, administrators, and engine config | tenant |
| subject domains and attached metrics | subject |
| kanban resources | kanban |
| inspect permissions in read-only mode | permission |
| perform real grant or revoke actions | authorize |
When you need exact flags and examples, use that command tree's --help in the terminal.