Quick BI CLI reference

更新时间:
复制 MD 格式
Version 0.1.0 | 20 commands, 134 subcommands

Quick start

# View help
quickbi --help
quickbi <command> --help

# Global options (apply to all commands)
quickbi --json ...          # JSON output for script parsing
quickbi --verbose ...       # Verbose logging
quickbi --endpoint <url> --access-id <id> --access-key <key> ...  # Specify credentials

Common operations cheat sheet

# List workspaces
quickbi workspace list

# List works in a workspace
quickbi works list <workspaceId>

# See who a report is shared with
quickbi share list <worksId>

# Check dataset row-level permission status
quickbi row-permission switch-info -c <cubeId>

# Search for users
quickbi user list -k "John Smith"

# Generate an embed link
quickbi embed create-ticket --works-id <id> --works-type PAGE

Command overview

Organization management (47 subcommands)

Command

Description

workspace

Manage workspaces and their members.

user

Manage organization users.

user-group

Manage user group hierarchies and members.

user-label

Manage manual and dynamic user labels for row-level permission.

role

View organization and workspace roles.

Permission management (35 subcommands)

Command

Description

row-permission

Manage dataset row-level and column-level permissions, rules, and the allowlist.

share

Share works, manage collaboration authorization, and view or revoke permissions.

portal

Manage data portal menu authorization and visibility.

approval

Handle callbacks for external approval systems and data form submission approvals.

Resource management (27 subcommands)

Command

Description

works

Query works, perform data lineage analysis, check embed status, and monitor performance.

dataset

Manage datasets, clear caches, manage acceleration, and monitor performance.

datasource

Add data source connections.

favorite

Manage user favorites.

homepage

Manage homepage lists for favorites, shared items, and frequently viewed items.

Embedded analytics (16 subcommands)

Command

Description

embed

Manage third-party embedding tickets and Copilot embed configurations.

smartq

Manage natural language query, training, authorization, and configuration.

Data services (5 subcommands)

Command

Description

data-service

Query data service APIs (for standalone deployment only).

subscription

Run email subscription tasks and check their status.

Statistics and configuration (4 subcommands)

Command

Description

stats

Query the audit log.

config

Manage local CLI configuration.

Organization management

workspace

A workspace is an organizational unit in Quick BI for data sources, datasets, and works.

# List workspaces
quickbi workspace list
quickbi workspace list -k "Data Analytics Dept"  # Search by name
quickbi workspace list -u <userId>               # Find workspaces a user belongs to

# Create or delete a workspace
quickbi workspace create -n "New Workspace" -d "Description"
quickbi workspace delete <workspaceId>

# Manage members
quickbi workspace add-user <workspaceId> -m <userId> -r analyst
quickbi workspace remove-user <workspaceId> <userId>

Workspace role (-r):

  • admin — An administrator who can manage members and spaces.

  • developer — A developer who can create and edit reports.

  • analyst — Analyst. Can view and analyze data.

  • viewer — Can only view reports

user

Manage users within the organization.

# Query users
quickbi user list                     # List all users
quickbi user list -k "John Smith"     # Search by name
quickbi user get <userId>             # View details
quickbi user exists <userId>          # Check if a user belongs to the organization

# Create a user (for new employee onboarding)
quickbi user create \
  --account-name jsmith \
  --account-type 3 \
  --nick-name "John Smith" \
  --user-type 3 \
  -r 111111113

# Update or delete a user
quickbi user update <userId> [options]
quickbi user delete <userId>
quickbi user force-delete [options]   # Force delete a user and transfer their resources

# Find by account
quickbi user query-by-account --account jsmith --account-type 3
quickbi user query-by-mobile [options]

Parameter Reference:

Parameter

Value

Recommended

--account-type

3 Proprietary accounts, 6 Third-party accounts

3

--user-type

1 developer, 2 visitor, 3 analyst

3

-r organization role

111111111 Administrator, 111111112 Permissions Administrator, 111111113 Regular User

111111113

user-group

User groups are organized in a tree structure for managing permissions in bulk. You can grant permissions for sharing and row-level access by user group.

# View user groups
quickbi user-group list               # View the user group tree
quickbi user-group search [options]   # Search by keyword
quickbi user-group get-by-ids [options]
quickbi user-group list-by-user [options]   # See which groups a user belongs to

# Create, update, or delete a user group
quickbi user-group create --name "East China Team" --parent-id <parentId>
quickbi user-group update [options]
quickbi user-group delete <groupId>   # Only leaf nodes can be deleted

# Manage members
quickbi user-group list-members <groupId>
quickbi user-group add-members <groupId> --user-ids uid1,uid2
quickbi user-group remove-member [options]
quickbi user-group add-to-groups --user-id <uid> --group-ids gid1,gid2

# Batch withdraw users
quickbi user-group batch-withdraw [options]
quickbi user-group withdraw-all [options]

user-label

User labels are often used with the SIMPLE mode of row-level permission to control data visibility on a per-user basis.

# Manage labels
quickbi user-label list                         # List all labels
quickbi user-label create --tag-name Region --tag-value "East China"
quickbi user-label batch-create [options]
quickbi user-label update [options]
quickbi user-label delete <tagId>

# Manage user label values
quickbi user-label get-user-tags <userId>
quickbi user-label update-user-tags <userId> --tag-id <id> --tag-value "East China"
quickbi user-label batch-update [options]

# Reverse lookup
quickbi user-label get-users --tag-id <id> --tag-value "East China"

# Dynamic labels
quickbi user-label list-dynamic [options]
quickbi user-label clear-dynamic-cache [options]

To use user labels for row-level permission:

  1. Create a label (e.g., "Region").

  2. Set a label value for a user (e.g., "East China").

  3. Use SIMPLE mode in row-permission set-rule to map fields to labels.

  4. When the user queries data, it is automatically filtered by their label value.

role

Organization roles

quickbi role org list                 # List all organization roles
quickbi role org get <roleId>         # Get role details
quickbi role org users <roleId>       # List users in a role

Workspace roles

quickbi role workspace list -w <workspaceId>
quickbi role workspace get <roleId>
quickbi role workspace users <roleId>

Workspace role ID: 25=admin, 26=developer, 27=analyst, 30=viewer

Permission management

row-permission

Controls which data rows (row-level) and which fields (column-level) a user can see.

# Check permission status
quickbi row-permission switch-info -c <cubeId>

# Enable or disable permissions
quickbi row-permission switch -c <cubeId> -t ROW_LEVEL --is-open 1
quickbi row-permission switch -c <cubeId> -t COLUMN_LEVEL --is-open 0

# View rules
quickbi row-permission list -c <cubeId> -t ROW_LEVEL

# Set a rule
quickbi row-permission set-rule \
  -c <cubeId> -t ROW_LEVEL \
  -m COMPLEX -s 2 \
  --users uid1,uid2 \
  --rule-content-type ROW_FIELD \
  --rule-content-json '<json>'

# Delete a rule
quickbi row-permission delete-rule -c <cubeId> -r <ruleId>

# Add or remove users from a rule
quickbi row-permission add-rule-users -c <cubeId> -r <ruleId> --users uid1,uid2
quickbi row-permission remove-rule-users -c <cubeId> -r <ruleId> --users uid1

# Set policy for non-matching users
quickbi row-permission set-extra -c <cubeId> -t ROW_LEVEL -p NONE

# Manage the whitelist (bypasses all rules)
quickbi row-permission whitelist-list -c <cubeId> -t ROW_LEVEL
quickbi row-permission whitelist-save -c <cubeId> -t ROW_LEVEL --users uid1,uid2
quickbi row-permission whitelist-modify -c <cubeId> -t ROW_LEVEL \
  -o ADD --target-type USER --target-ids uid3

# Authorize column-level fields
quickbi row-permission column-authorize \
  -u <userId> -c <cubeId> --column-ids col1,col2 --auth-type 2
  

Parameter Reference:

Parameter

Value

-t The permission type.

ROW_LEVEL row-level, COLUMN_LEVEL column-level

-m authorization method

COMPLEX condition combination, SIMPLE tag association

-s Scope

1 Everyone, 2 Specified users

-p miss policy

NONE no permissions, ALL all permissions

--auth-type column-level

1 Deny access, 2 Allow access

share

Manage work sharing and collaboration authorization.

# View sharing status
quickbi share list <worksId>                    # List sharing history for a work
quickbi share list-by-user <userId>             # All works shared with a user
quickbi share list-auth \
  --resource-id <id> --works-type dashboard \
  --share-to-type 0 --has-auth true             # Collaboration authorization history

# Add a share
quickbi share add <worksId> \
  --share-to <userId> --share-to-type 0 \
  --expire-date 2026-12-31 --auth-point 1

# Set collaboration authorization
quickbi share authorize \
  --resource-type dashboard --resource-id <id> \
  --authorized-id <userId> --authorize-scope 0 --auth-points 1

# Modify authorization attributes
quickbi share set-attributes \
  --resource-type dashboard --resource-id <id> \
  --use-permission-type 2

# Cancel or delete a share
quickbi share cancel --report-id <id> --share-to-ids uid1,uid2 --share-to-type 0
quickbi share delete <shareId>
quickbi share unauthorize --resource-type dashboard --resource-id <id> --user-id <uid>

Parameter Reference:

Parameter

Value

Resource type

dashboard dashboard, report report, screen data screen, cube dataset, datasource data source, ANALYSIS ad-hoc analysis, dataForm data form

Permission level

1 View only, 2 Edit, 3 Manage

Share target type

0 user, 1 user group, 2 organization

portal

Manage data portal menu authorization and visibility.

# View portal information
quickbi portal list-menus <portalId>            # List menus
quickbi portal list-permissions <portalId>      # List permission details for each menu
quickbi portal list-whitelist [options]

# Authorize a single menu
quickbi portal authorize-single <portalId> <menuId> [options]
quickbi portal authorize-menu <portalId> <menuId> [options]

# Batch authorize or unauthorize
quickbi portal batch-authorize \
  --dataportal-id <id> --menu-ids m1,m2 --user-ids u1,u2
quickbi portal batch-unauthorize \
  --dataportal-id <id> --menu-ids m1,m2 --user-ids u1,u2

# Unauthorize a single menu
quickbi portal unauthorize-single <portalId> <menuId> [options]
quickbi portal unauthorize-menu <portalId> [options]

# Set visibility
quickbi portal set-visible [options]

Menu type: 0 for dashboard, 1 for external link, 2 for report, 4 for directory, 5 for data entry, and 6 for self-service data retrieval

Permissions: 1 View only, 3 View and export

approval

Integrate with external approval systems and manage approvals for data form submissions.

# View approvals
quickbi approval list --user-id <uid> --status 0    # Pending approval
quickbi approval list --user-id <uid> --status 1    # Approved

# Approval callback
quickbi approval callback --application-id <id> --status 1 --reason "Approved"

# Data form submission approval
quickbi approval config-receipt --works-id <id> --enable true --user-ids uid1,uid2
quickbi approval get-receipt [options]

Approval status: 0 for pending approval, 1 for approved, and 2 for rejected

Resource management

works

Manage Quick BI works, such as dashboards, reports, and data screens.

# Query works
quickbi works list-org                                  # All works in the organization
quickbi works list-org --type PAGE --status 1           # Published dashboards
quickbi works list <workspaceId>                        # Works in a workspace
quickbi works get <worksId>                             # Work details
quickbi works list-authorized <userId>                  # Works a user is authorized to view

# Data lineage and permissions
quickbi works bloodline <worksId>                       # Analyze data lineage and list associated datasets
quickbi works check-readable --user-id <uid> --works-id <wid>

# Manage embedding
quickbi works embed-config                              # Check the organization's embed quota
quickbi works embed-status <worksId>                    # Check if embedding is enabled
quickbi works embed-update <worksId> --third-party 1    # Enable embedding
quickbi works embed-list -k "Sales"                     # List of embedded reports

# Export and download records
quickbi works offline-downloads <userId> --start-time "2026-01-01 00:00:00"
quickbi works export-records --user-id <uid> --start-time "2026-01-01 00:00:00"

# Monitor performance
quickbi works component-performance --query-type sevenDays -w <wsId>
quickbi works report-performance --query-type sevenDays -w <wsId>

Parameter Reference:

Parameter

Value

--type Work type

PAGE dashboard, REPORT report, SCREEN data screen, DATAPRODUCT data portal, ANALYSIS ad-hoc analysis, DATAFORM data form, dashboardOfflineQuery self-service data retrieval

--status status

0 Unpublished, 1 Published, 2 Modified and unpublished, 3 Taken offline

--query-type time range

lastDay, sevenDays, thirtyDays

dataset

A dataset is the data foundation for a report and is created from physical tables in a data source.

# Query datasets
quickbi dataset list -w <workspaceId>
quickbi dataset list -w <workspaceId> -k "Sales"    # Search by name
quickbi dataset get <datasetId>                     # Get details

# Create a dataset
quickbi dataset create \
  -w <workspaceId> --ds-id <datasourceId> \
  --table orders -n "Orders Dataset"

# Optimize performance
quickbi dataset clear-cache --ids cube1,cube2       # Clear cache
quickbi dataset accelerate <cubeId>                 # Trigger extraction acceleration
quickbi dataset performance -w <wsId> --query-type sevenDays

Performance metric fields: costTimeAvg (Average time cost (ms)), queryCount (Query count), cacheQueryCount (Cache hits), queryTimeoutCount (Timeout count)

datasource

quickbi datasource add [options]    # Add a new data source (e.g., MySQL, PostgreSQL, or ODPS)

favorite

quickbi favorite list <userId>
quickbi favorite add <userId> -w <worksId>
quickbi favorite remove -u <userId> -w <worksId>

homepage

quickbi homepage list-favorites -u <userId>         # Favorites list
quickbi homepage list-shared -u <userId>            # Shared with me
quickbi homepage list-recent -u <userId> -m 1       # Frequently used (by access count)
quickbi homepage list-recent -u <userId> -m 2       # Recent activity (by time)

Embedded analytics

embed

Manage third-party embedding tickets to enable no-login or public access to works.

# Create an embedding ticket (automatically returns an embed link)
quickbi embed create-ticket \
  --works-id <worksId> --works-type PAGE \
  --expire-time 1440 --ticket-num 240

# Manage tickets
quickbi embed get-ticket <ticket>                   # View ticket details
quickbi embed delete-ticket <ticket>                # Delete a ticket
quickbi embed update-ticket-num <ticket> [options]  # Update the usage limit for a ticket
quickbi embed delay-expire <ticket> --expire-time 1440  # Extend the expiration time

# Manually build a URL
quickbi embed build-url [options]

# Copilot embedding
quickbi embed create-copilot-ticket [options]
quickbi embed modify-copilot-config [options]
quickbi embed list-copilot-config [options]
quickbi embed list-data-range [options]

Embedded link format: https://<domain>/<path>?<id_parameter>=xxx&accessTicket=xxx

Work type

Path

ID parameter

Dashboard

token3rd/dashboard/view/pc.htm

pageId

Data screen

token3rd/screen/view/pc.htm

pageId

Self-service data retrieval

token3rd/offline/view/pc.htm

pageId

Report

token3rd/report/view.htm

id

Ad-hoc analysis

token3rd/analysis/view.htm

id

Data form

token3rd/dataform/view.htm

id

Block embedding: Append &cmptId=<Component ID> to the URL.

smartq

Manage the configuration and authorization for natural language query. Prerequisites: A data source and a dataset are required.

quickbi smartq cubes [options]          # List datasets available for natural language query
quickbi smartq authorize [options]      # Manage natural language query authorization

Data services

data-service

Publish a dataset as an API for external systems to query or consume. For standalone deployment only.

quickbi data-service list                               # List APIs
quickbi data-service list -n "Order Query"               # Search by name
quickbi data-service query -s <sid>                      # Execute a query
quickbi data-service query -s <sid> -c '{"region":"East China"}'  # Execute a query with conditions

subscription

Manage report email subscription and delivery tasks.

quickbi subscription list                   # List subscription tasks
quickbi subscription run -m <mailId>        # Trigger a task manually
quickbi subscription status -m <mailId>     # Check execution status

Task status: SENT Sent successfully, FAILED Sending failed, PROCESSING Processing

Statistics and configuration

stats

# Query audit logs
quickbi stats audit-log -t dataView --start-date 20260401 --end-date 20260403

Log type (-t): dataView access type, function operation type, permission permission type

config

Manage local CLI configuration, such as credentials and endpoints.

quickbi config list                                 # List all configurations
quickbi config get endpoint                         # Get a single configuration item
quickbi config set endpoint https://bi.example.com  # Set a configuration item

Common workflows

Onboard a new employee

# 1. Create a user
quickbi user create --account-name jsmith --account-type 3 \
  --nick-name "John Smith" --user-type 3 -r 111111113

# 2. Add the user to a workspace
quickbi workspace add-user <workspaceId> -m <userId> -r analyst

# 3. Add the user to a user group
quickbi user-group add-members <groupId> --user-ids <userId>

Employee offboarding

# 1. List works shared with the user
quickbi share list-by-user <userId>

# 2. List the user groups the user belongs to
quickbi user-group list-by-user [options]

# 3. Withdraw the user from all user groups
quickbi user-group withdraw-all [options]

# 4. Remove the user from the workspace
quickbi workspace remove-user <workspaceId> <userId>

# 5. Delete the user
quickbi user delete <userId>

Embed a work

# 1. Find the report
quickbi works list <workspaceId> --type PAGE

# 2. Enable embedding for the report
quickbi works embed-update <worksId> --third-party 1

# 3. Create a ticket (automatically returns an embed link)
quickbi embed create-ticket --works-id <worksId> --works-type PAGE --expire-time 43200

Audit dataset permissions

# 1. List datasets in the workspace
quickbi dataset list -w <workspaceId>

# 2. Check the row-level permission status
quickbi row-permission switch-info -c <cubeId>

# 3. View permission rules
quickbi row-permission list -c <cubeId> -t ROW_LEVEL

# 4. View the allowlist
quickbi row-permission whitelist-list -c <cubeId> -t ROW_LEVEL