AIPro API

Updated at:

This topic introduces the AIPro API.

1. Dialogue skill

Common calling conventions

To call the QuickBI OpenAPI, you sign requests with an AK/SK. The platform automatically identifies the user and organization from the AK, so you do not need to pass user_id or tenant_id. You also do not need to understand the internal authentication mechanism between QBI and ABI services.

Item

Description

Call authentication

The signature method is the same as for the existing QuickBI OpenAPI.

User identity

The platform automatically identifies the user from the AK, so you do not need to pass user_id.

Organization identity

The platform automatically identifies the organization from the AK, so you do not need to pass tenant_id.

Request tracing

Optionally, pass an X-Trace-Id header. If not provided, the platform automatically generates one.

Response language

Optionally, pass an X-Locale header with a value of zh_CN or en_US. The default value is zh_CN.

Except for Server-Sent Events (SSE) APIs, all responses use the following structure:

{
  "success": true,
  "data": {},
  "message": null,
  "code": 200,
  "trace_id": "trace-id"
}

A business error is indicated by success=false and a specific code in the response, even though the HTTP status code is typically 200. In contrast, FastAPI returns an HTTP 422 status code for invalid request parameters.

Submit chat (asynchronous)

  • Path: /openapi/v2/abi/chat/completions/async

  • Method:POST

  • Content-Type: application/json

  • Description: Submits a plain-text chat asynchronously, immediately returning a session ID and a message ID. The caller then uses the SSE API to retrieve execution events.

  • Input parameters

    Parameter

    Type

    Description

    Required

    message

    String

    The user's message. Must be between 1 and 10,000 characters in length.

    Yes

    session_id

    String

    The ID of an existing session, with a maximum length of 36 characters. If omitted, a new session is created.

    No

    model

    String

    The model alias available to the tenant, such as qwen3.7-plus or deepseek-v4-pro. The maximum length is 64 characters. An empty string is equivalent to omitting the parameter. This parameter is ignored if mode is lite.

    No

    mode

    String

    The session mode. Valid values are standard for full capabilities and lite for lightweight Q&A. The default is standard. This parameter applies only when creating a new session.

    No

    options

    Object

    An object for toggling per-request features. These settings apply only to the current request. Currently supports enable_ask_user (Boolean). If false, the AI does not ask a clarification question and instead proceeds based on its default assumptions. If omitted, the system uses the server-side default. Setting this to true cannot override server-enforced limitations (e.g., the feature is always disabled if mode is lite). The API returns a 400 error if this object contains unknown keys or invalid value types.

    No

  • Return parameters

    Parameter

    Type

    Description

    session_id

    String

    The session ID.

    conversation_id

    String

    This field provides the message ID for the current chat turn. Use this ID to connect to the SSE stream.

  • Request example

    {
      "message": "Analyze this month's sales trends",
      "model": "qwen3.7-plus",
      "mode": "standard",
      "options": {
        "enable_ask_user": false
      }
    }
  • Response example

    {
      "success": true,
      "data": {
        "session_id": "s1",
        "conversation_id": "c1"
      },
      "message": null,
      "code": 202,
      "trace_id": "t1"
    }
  • Common errors

    Code

    Description

    400

    The mode is invalid, the specified model is not in the list of model aliases available to the tenant, or the options object contains unknown keys or invalid value types.

    403

    You do not have permission to access the specified session.

    404

    The specified session does not exist.

    429

    The user has insufficient credit.

    500/502

    An internal server error occurred, or a call to the downstream CodeAgent service failed.

Get conversation event stream (query)

  • API path: /openapi/v2/abi/chat/completions/async/stream

  • Request method: GET

  • Return type: text/event-stream

  • Description: Gets or resumes an asynchronous conversation event stream. This fixed path is compatible with the precise URI signature verification rules of the QuickBI Open Platform and is the recommended format for gateway calls.

  • Input parameters

    Parameter

    Location

    Type

    Description

    Required

    conversation_id

    Query

    String

    Conversation message ID. Length: 1–36.

    Yes

    last_event_id

    Query

    String

    ID of the last received SSE event, used to resume the stream.

    No

    Last-Event-ID

    Header

    String

    Standard SSE resumption cursor. If both this header and the last_event_id parameter are provided, this header takes precedence.

    No

  • Response headers

    Header

    Description

    X-Trace-Id

    Request trace ID.

    X-Conversation-Id

    Conversation message ID.

    Cache-Control

    Fixed to no-cache.

    X-Accel-Buffering

    Fixed to no to disable proxy buffering.

  • Request example

    GET /openapi/v2/abi/chat/completions/async/stream?conversation_id=c1
    Last-Event-ID: 1721990000000-5
  • Response example

    id: 1721990000001-0
    data: {"type":"message.content","data":{"text":"YoY sales increased"}}

You can replay completed conversations from the persistent record. The API returns a 404 code if the conversation does not exist or does not belong to the current user. If a conversation is in progress and Redis is unavailable, the API returns a 503 code.

Cancel an in-progress conversation

  • API path: /openapi/v2/abi/chat/cancel

  • Request method: POST

  • Content-Type: application/json

  • Description: Cancels an in-progress conversation in a specified session. Only the session owner can make this request. If no conversation is in progress, the request succeeds idempotently.

  • Input parameters

    Parameter

    Type

    Description

    Required

    session_id

    String

    The unique ID for the session. Must be 1 to 36 characters long.

    Yes

  • Request example

    {
      "session_id": "s1"
    }
  • Response example

    {
      "success": true,
      "data": {
        "session_id": "s1"
      },
      "message": null,
      "code": 200,
      "trace_id": "t1"
    }

2. Agent integration

These interfaces are designed for external agents and dialogue systems, covering the complete workflow: discovering data, onboarding an asset, awaiting model training, making conversational queries, and reviewing query history. The platform automatically resolves the user and their organization from the customer AK, so the caller does not need to pass these identity parameters. All URIs use fixed paths and support only GET and POST methods.

List workspaces

  • API path: /openapi/v2/abi/agent/workspaces

  • request method: GET

  • Description: Lists the Quick BI workspaces that the current user can access.

  • Input parameters

    Parameter

    Type

    Description

    Required

    page_num

    Int

    The page number. Default value: 1. Minimum value: 1.

    No

    page_size

    Int

    The number of items per page. Default value: 10. Valid values: 1 to 100.

    No

  • Return parameters

    Parameter

    Type

    Description

    items

    Array

    A list of workspace objects.

    items[].workspace_id

    String

    The workspace ID.

    items[].name

    String

    The workspace name.

    total_pages

    Int

    The total number of pages, not the total number of items.

  • Request example

    GET /openapi/v2/abi/agent/workspaces?page_num=1&page_size=10
  • Response example

    {"success":true,"data":{"items":[{"workspace_id":"ws1","name":"Sales Workspace"}],"total_pages":1},"code":200,"trace_id":"t1"}

List datasets

  • API path: /openapi/v2/abi/agent/datasets

  • Request method: GET

  • Description: Lists the datasets that the current user can access in a specified workspace.

  • Input parameters

    Parameter

    Type

    Description

    Required

    workspace_id

    String

    The ID of the workspace.

    Yes

    keyword

    String

    A keyword for a fuzzy search on dataset names.

    No

  • Return parameters: Returns items[{dataset_id,name}] and total.

  • Request example

    GET /openapi/v2/abi/agent/datasets?workspace_id=ws1&keyword=Orders
  • Response example

    {"success":true,"data":{"items":[{"dataset_id":"cube1","name":"Order Data"}],"total":1},"code":200,"trace_id":"t1"}

Batch register dataset assets

  • API path: /openapi/v2/abi/agent/assets/register-dataset

  • Request method: POST

  • Content-Type: application/json

  • Description: Registers Quick BI datasets as personal data assets for the authenticated user and triggers an asynchronous learning process.

  • Request parameters

    Parameter

    Type

    Description

    Required

    datasets

    Array

    A list of 1 to 100 dataset objects. If the list contains duplicate dataset_id values, only the first occurrence is processed.

    Yes

    datasets[ ].dataset_id

    String

    The ID of the dataset. Cannot be empty.

    Yes

    datasets[ ].name

    String

    The name of the dataset. Cannot be empty.

    Yes

    folder_id

    String

    The ID of the destination folder for the personal data assets.

    No

  • Response parameters

    Parameter

    Type

    Description

    items

    Array

    A list of successfully registered assets.

    items[ ].asset_id

    String

    The ID of the created personal asset.

    items[ ].dataset_id

    String

    The original dataset ID.

    items[ ].asset_name

    String

    The asset name.

    items[ ].md_status

    String

    The initial status is processing.

    total

    Integer

    The total number of registered assets.

  • Request example

    {
      "datasets": [{"dataset_id":"cube1","name":"Order Data"}],
      "folder_id": "folder1"
    }
  • Response example

    {"success":true,"data":{"items":[{"asset_id":"a1","dataset_id":"cube1","asset_name":"Order Data","md_status":"processing"}],"total":1},"code":200,"trace_id":"t1"}
    During the synchronous phase, the operation writes records to the database individually. If the operation is interrupted, records that are already saved are not rolled back.

Upload a file asset

  • API path: /openapi/v2/abi/agent/assets/upload

  • Request method: POST

  • Content-Type: multipart/form-data

  • Description: Uploads a file, adds it as a personal data asset, and starts a learning process asynchronously.

  • Input parameters

    Parameter

    Type

    Description

    Required

    file

    File

    The file to be uploaded. Supported formats include xlsx, xls, csv, txt, pdf, doc, docx, png, jpg, jpeg, gif, bmp, webp, md, markdown, svg, jp2, and tiff.

    Yes

    folder_id

    String

    The ID of the target personal asset folder.

    No

    description

    String

    The asset description.

    No

    The maximum file size depends on the environment configuration. The default is 50 MB.

  • Response parameters

    Parameter

    Data type

    Description

    asset_id

    String

    Personal asset ID.

    asset_name

    String

    The asset name parsed from the file name.

    file_extension

    String

    The file extension in lowercase.

    file_size

    Int

    The file size in bytes.

    md_status

    String

    The learning status. The initial status is typically processing.

  • Code example

    POST /openapi/v2/abi/agent/assets/upload
    Content-Type: multipart/form-data
    
    file=@sales.csv
    description=Sales data

Relearn asset

  • API path: /openapi/v2/abi/agent/assets/learn

  • request method: POST

  • Content-Type: application/json

  • Request parameters

    Parameter

    Type

    Description

    Required

    asset_id

    String

    The personal asset ID. Cannot be empty.

    Yes

  • Response parameters: Returns asset_id, accepted (indicates whether the learning task was accepted), and reason. The API consistently returns a code=404 response for both non-existent assets and unauthorized access to prevent asset enumeration attacks.

  • Request example

    {"asset_id":"a1"}
  • Response example

    {"success":true,"data":{"asset_id":"a1","accepted":true,"reason":null},"code":200,"trace_id":"t1"}

Check asset learning status

  • Request path: /openapi/v2/abi/agent/assets/status

  • Request method: GET

  • Description: Performs a lightweight query for the learning status of an asset. External agents should poll this endpoint for status updates instead of the asset details endpoint.

  • Request parameters

    Parameter

    Type

    Description

    Required

    asset_id

    String

    The asset ID.

    Yes

  • Response parameters

    Parameter

    Type

    Description

    asset_id

    String

    The asset ID.

    asset_name

    String

    The asset name.

    md_status

    String

    The metadata status. Possible values are pending, processing, completed, and failed.

    md_error

    String

    The reason for the metadata processing failure.

    wiki_status

    String

    The knowledge learning status. Possible values are pending, processing, completed, and failed.

    wiki_error

    String

    The reason for the knowledge learning failure.

    When both md_status and wiki_status are completed, the asset is ready for data query and recall.

  • Request example

    GET /openapi/v2/abi/agent/assets/status?asset_id=a1
  • Response example

    {"success":true,"data":{"asset_id":"a1","asset_name":"Order Data","md_status":"completed","md_error":null,"wiki_status":"completed","wiki_error":null},"code":200,"trace_id":"t1"}

List personal assets

  • API path: /openapi/v2/abi/agent/assets

  • Request method: GET

  • Request parameters

    Parameter

    Type

    Description

    Required

    asset_type

    String

    The asset type. Examples: dataset, csv, or pdf.

    No

    source_type

    String

    The source type. Valid values: online or offline.

    No

    folder_id

    String

    The folder ID.

    No

    offset

    Int

    The number of items to skip before returning results. Default: 0. Minimum: 0.

    No

    limit

    Int

    The maximum number of items to return. Default: 20. Range: 1-100.

    No

  • Return parameters: Returns items, total, offset, and limit. Each item contains asset_id, asset_name, asset_type, source_type, md_status, wiki_status, created_at, and updated_at.

List enterprise assets

  • API path: /openapi/v2/abi/agent/enterprise-assets

  • Request method: GET

  • API description: Lists enterprise assets filtered by user permissions.

  • Request parameters

    Parameter

    Type

    Description

    Required

    workspace_id

    String

    The workspace ID.

    No

    asset_type

    String

    The asset type.

    No

    keyword

    String

    A keyword for a fuzzy search of asset names.

    No

    page

    Int

    The page number. Default: 1.

    No

    page_size

    Int

    The number of items to return per page. Default: 20. Range: 1-100.

    No

  • Response parameters: Returns items[{enterprise_asset_id,asset_name,asset_type,workspace_id}], total, page, and page_size.

Copy an enterprise asset

  • API path: /openapi/v2/abi/agent/enterprise-assets/copy

  • Request method: POST

  • Content-Type: application/json

  • Request parameters

    Parameter

    Data type

    Description

    Required

    enterprise_asset_id

    String

    The ID of the enterprise asset.

    Yes

    folder_id

    String

    The ID of the destination folder in the personal space.

    No

  • Response parameters: The response includes the asset_id, enterprise_asset_id, and asset_name. This operation is idempotent when the same user copies the same source asset.

  • Code example

    {"enterprise_asset_id":"e1","folder_id":"folder1"}
  • Common error codes

    Code

    Description

    403

    You do not have permission to view this enterprise asset.

    404

    The specified enterprise asset or destination folder does not exist.

    409

    The source asset is still being processed and is not yet ready.

    502

    The request failed because a required storage or copy dependency is unavailable.

List OpenAPI sessions

  • API path: /openapi/v2/abi/agent/sessions

  • Request method: GET

  • Description: Lists sessions created by the current user through OpenAPI. This endpoint returns only sessions where source=openapi. These sessions also appear in the Quick BI frontend sidebar.

  • Request parameters

    Parameter

    Type

    Description

    Required

    page

    Int

    The page number. Default: 1.

    No

    page_size

    Int

    The page size. Default: 20. Valid values: 1 to 100.

    No

    keyword

    String

    A keyword for fuzzy searching session titles.

    No

  • Response parameters: Returns an items array, and the total, page, and page_size fields. Each object in the items array contains the following fields: session_id, title, message_count, is_generating, created_at, and updated_at.

Session message history

  • API path: /openapi/v2/abi/agent/conversations

  • Request method: GET

  • Request parameters

    Parameter

    Type

    Description

    Required

    session_id

    String

    The session ID.

    Yes

    page

    Int

    The page number. The default is 1.

    No

    page_size

    Int

    The page size. The default is 50. Valid values are 1 to 200.

    No

    order

    String

    The sort direction. Valid values are asc or desc. The default is desc.

    No

  • Response parameters: A successful request returns items[{conversation_id,role,message,created_at}], total, page, and page_size. The API returns code=403 if the session belongs to another user, or code=404 if the session does not exist.

Semantic recall

  • API path: /openapi/v2/abi/agent/recall/embedding-search

  • Request method: POST

  • Content-Type: application/json

  • Description: Recalls relevant knowledge from accessible assets based on a user query. External agents can use this knowledge to assemble context.

  • Request parameters

    Parameter

    Type

    Description

    Required

    query

    String

    The user's search query.

    Yes

    top_k

    Int

    The number of results to return. Default: 5. Valid values: 1 to 50.

    No

    asset_ids

    Array

    The IDs of the assets to search.

    No

    rerank

    Boolean

    Specifies whether to rerank the results. Default: true.

    No

  • Response parameters: Returns a results array. Each item includes asset_id, asset_type, asset_name, origin_asset_id, md_content, recall_content[{chunk_type,content}], and knowledge_list[{knowledge_id,type,terms,definition}]. The chunk_type can be any string.

  • Request example

    {"query":"change in sales this month","top_k":5,"rerank":true}
  • Response example

    {"success":true,"data":{"results":[{"asset_id":"a1","asset_type":"dataset","asset_name":"Order Data","origin_asset_id":"cube1","md_content":"...","recall_content":[{"chunk_type":"overview","content":"..."}],"knowledge_list":[ ]}]},"code":200,"trace_id":"t1"}
    

Returns an HTTP 502 error if the recall backend fails, or an HTTP 503 error if the recall service is not configured.

List dashboards

  • Interface path: /openapi/v2/abi/agent/dashboards

  • Request method: GET

  • Description: Lists accessible dashboards in a specified workspace.

  • Request parameters

    Parameter

    Type

    Description

    Required

    workspace_id

    String

    The workspace ID.

    Yes

    keyword

    String

    A keyword for a fuzzy search on dashboard names.

    No

  • Return parameters: Returns items[{dashboard_id,name}] and total.

Bulk check dataset permissions

  • API path: /openapi/v2/abi/agent/dashboards/dataset-permissions

  • Request method: POST

  • Content-Type: application/json

  • Request parameters

    Parameter

    Type

    Description

    Required

    workspace_id

    String

    The workspace ID.

    Yes

    dashboard_ids

    Array

    An array of dashboard IDs. The array can contain 1 to 100 IDs.

    Yes

  • Response parameters: Returns a dashboards array, where each object contains the following parameters.

    Parameter

    Type

    Description

    dashboard_id

    String

    The dashboard ID.

    has_permission

    Boolean

    Indicates whether the user has full permission for the dashboard.

    permission_status

    String

    The permission status. Possible values are granted, no_permission, or pending_approval.

    datasets

    Array

    A list of associated datasets and their permission status.

    datasets[].dataset_id

    String

    The dataset ID.

    datasets[].dataset_name

    String

    The dataset name.

    datasets[].has_permission

    Boolean

    Indicates whether the user has permission for the dataset.

    datasets[].permission_status

    String

    The permission status for the dataset.

  • Code example

    {"workspace_id":"ws1","dashboard_ids":["d1"]}

Bulk register dashboard assets

  • API path: /openapi/v2/abi/agent/assets/register-dashboard

  • Request method: POST

  • Content-type: application/json

  • Description: Registers dashboards as personal assets in bulk. If a user lacks permission to access a dashboard, it is placed in the needs_permission array instead of causing an API error.

  • Request parameters

    Parameter

    Type

    Description

    Required

    dashboards

    Array

    An array of 1 to 100 dashboard objects. If duplicate dashboard_id values are provided, only the first is processed.

    Yes

    dashboards[ ].dashboard_id

    String

    The ID of the dashboard.

    Yes

    dashboards[ ].name

    String

    The name of the dashboard.

    Yes

    dashboards[ ].workspace_id

    String

    The ID of the workspace.

    No

    dashboards[ ].workspace_name

    String

    The name of the workspace.

    No

    folder_id

    String

    The ID of the destination folder for the new assets.

    No

  • Response parameters: Returns items[{asset_id,dashboard_id,asset_name,md_status}], needs_permission[{dashboard_id,dashboard_name,workspace_id,workspace_name}], and total.

  • Request example

    {"dashboards":[{"dashboard_id":"d1","name":"Sales Dashboard","workspace_id":"ws1"}]}

Register dashboards and request permission

  • API path: /openapi/v2/abi/agent/assets/register-dashboard/apply-permission

  • Request method: POST

  • Content-Type: application/json

  • Request parameters

    Parameter

    Type

    Description

    Required

    items

    Array

    A list of dashboards to process. The array can contain 1 to 100 items.

    Yes

    items[ ].dashboard_id

    String

    The dashboard ID.

    Yes

    items[ ].workspace_id

    String

    The workspace ID.

    Yes

    items[ ].datasets

    Array

    A list of associated datasets. Defaults to an empty array.

    No

    items[ ].datasets[ ].dataset_id

    String

    The dataset ID.

    Yes

    items[ ].datasets[ ].has_permission

    Boolean

    Indicates whether the user already has permission for the dataset.

    Yes

    approver_id

    String

    The user ID of the approver.

    Yes

    folder_id

    String

    The ID of the target folder where the dashboard will be registered upon approval.

    No

  • Response parameters: Returns added[{dashboard_id,asset_id}] for dashboards registered directly, and permission_packages[{dashboard_id,dashboard_name,package_id,status}] for dashboards submitted for approval.

  • Code example

    {
      "items": [{"dashboard_id":"d1","workspace_id":"ws1","datasets":[ ]}],
      "approver_id": "reviewer1"
    }

List analysis themes

  • API path: /openapi/v2/abi/agent/themes

  • Request method: GET

  • Description: Lists the available analysis themes. Pagination is not supported.

  • Request parameters

    Parameter

    Type

    Description

    Required

    keyword

    String

    Performs a fuzzy search by theme name.

    No

  • Return parameters: Returns items[{theme_id,name,already_added,personal_asset_id}] and total.

Register analysis theme assets in bulk

  • Request path: /openapi/v2/abi/agent/assets/register-theme

  • Request method: POST

  • Content-Type: application/json

  • Request parameters

    Parameter

    Type

    Description

    Required

    themes

    Array

    A list of 1 to 100 themes. The API ignores subsequent occurrences of a duplicate theme_id.

    Yes

    themes[ ].theme_id

    String

    The theme ID.

    Yes

    themes[ ].name

    String

    The theme name.

    Yes

    folder_id

    String

    The ID of the destination personal asset folder.

    No

  • Response parameters: Returns items[{asset_id,theme_id,asset_name}] and total. This registration is idempotent for a given user and source theme.

Save analysis

  • API path: /openapi/v2/abi/agent/analysis/save

  • Request method: POST

  • Content-Type: application/json

  • API description: Updates the name, description, content, Markdown, or screenshot of an existing analysis for the current user. You must provide the analysis_id and at least one other parameter to update.

  • Request parameters

    Parameter

    Type

    Description

    Required

    analysis_id

    String

    The ID of the analysis to update.

    Yes

    name

    String

    The name of the analysis. Length: 1–512 characters.

    conditionally required

    description

    String

    The description of the analysis. Maximum length: 2,048 characters.

    conditionally required

    content

    String

    A non-empty JSON string that defines the dashboard.

    conditionally required

    analysis_md

    String

    The Markdown content of the analysis.

    conditionally required

    screenshot

    String

    The screenshot of the analysis, provided as a Base64-encoded string or a data URL. Supported formats: PNG, JPEG, WebP, and GIF.

    conditionally required

  • Return parameters: Returns analysis_id and updated_at.

  • Request example

    {"analysis_id":"an1","name":"Updated Analysis Name"}
  • Response example

    {"success":true,"data":{"analysis_id":"an1","updated_at":"2026-08-18T15:00:00"},"code":200,"trace_id":"t1"}
  • Common error codes

    Code

    Description

    400

    No parameters to update were provided, or the screenshot format is invalid.

    403

    The analysis does not belong to the current user.

    404

    The specified analysis does not exist.

    500

    The database or storage operation failed.

Custom components

Use these APIs to upload, update, query, and delete custom components for the AI dashboard, and to read their artifacts. All APIs share the prefix/openapi/v2/abi/components. The platform automatically resolves user and organization identities from the provided access key (AK), so you do not need to pass user or organization parameters.

Upload and publish component

  • API path: /openapi/v2/abi/components/upload

  • Request method: POST

  • Content-Type: multipart/form-data

  • API description: Creates and immediately publishes a custom component.

  • Request parameters

    Parameter

    Type

    Description

    Required

    package

    File

    A ZIP file of the component artifact, not exceeding 10 MB. The root directory or a single top-level wrapper directory must contain main.js and meta.js. The main.css file is optional.

    Yes

    name

    String

    The component name. Must be unique within the tenant, non-empty after trimming leading and trailing whitespace, and have a maximum length of 200 characters.

    Yes

    desc

    String

    A description for the component, with a maximum length of 200 characters.

    No

    externalAssets

    String

    A string containing a JSON array of external dependencies. If provided, this value overrides the externals defined in the manifest file.

    No

    sourceArchive

    String

    A Base64-encoded ZIP file of the source code. The data:*;base64, prefix is optional. The decoded file must not exceed 10 MB.

    No

    thumbnail

    File

    A thumbnail for the component. Supported formats: png, jpg, jpeg, and svg. The file size must not exceed 200 KB.

    No

  • Response parameters

    Parameter

    Type

    Description

    componentId

    String

    The component ID.

    jsUrl

    String

    The URL of the main.js file.

    metaJsUrl

    String

    The URL of the meta.js file.

    cssUrl

    String

    The URL of the main.css file. This value is null if the file does not exist.

    sourceArchiveUrl

    String

    The URL of the source code archive.

    thumbnailUrl

    String

    The URL of the thumbnail.

    revision

    String

    The current revision.

    autoInstalled

    Boolean

    Indicates whether the component was automatically installed.

  • Request example

    POST /openapi/v2/abi/components/upload
    Content-Type: multipart/form-data
    
    name=Sankey
    package=@sankey.zip
    thumbnail=@thumbnail.png
  • Response example

    {
      "success": true,
      "data": {
        "componentId": "c1",
        "jsUrl": "/api/v2/abi/components/c1/assets?name=main.js&v=r1",
        "metaJsUrl": "/api/v2/abi/components/c1/assets?name=meta.js&v=r1",
        "cssUrl": null,
        "sourceArchiveUrl": null,
        "thumbnailUrl": null,
        "revision": "r1",
        "autoInstalled": true
      },
      "code": 200,
      "trace_id": "t1"
    }

Update component

  • API path: /openapi/v2/abi/components/update

  • Request method: POST

  • Content-Type: multipart/form-data

  • API description: Partially updates an existing component. Fields that are not provided in the request are not modified. Replacing the package file generates a new revision, but updating only the metadata, source code archive, or thumbnail does not change the revision.

  • Request parameters

    Parameter

    Type

    Description

    Required

    component_id

    String

    The ID of the component to update.

    Yes

    name

    String

    The new component name, up to 200 characters. If left blank, the name is not updated.

    No

    desc

    String

    The new description, up to 200 characters. To clear the existing description, provide an empty string.

    No

    sourceArchive

    String

    The new Base64-encoded source code ZIP file.

    No

    package

    File

    The new component artifact ZIP file. Validation rules are the same as for the upload API.

    No

    thumbnail

    File

    The new thumbnail. Validation rules are the same as for the upload API.

    No

  • Response parameters: The response parameters are the same as those for the upload API, with an additional revisionChanged field that indicates whether the update created a new revision.

  • Request example

    POST /openapi/v2/abi/components/update
    Content-Type: multipart/form-data
    
    component_id=c1
    desc=Updated component description

List components

  • API path: /openapi/v2/abi/components/list

  • Request method: GET

  • API description: Retrieves the components available to the current tenant.

  • Response parameters: The response returns anitems array and atotal count. If the results are not paginated, total equals the length of the items array.

  • Request example

    GET /openapi/v2/abi/components/list?keyword=Sankey&page=1&page_size=20

Get component details

  • API path: /openapi/v2/abi/components/detail

  • Request method: GET

  • Request parameters

    Parameter

    Type

    Description

    Required

    component_id

    String

    The ID of the component.

    Yes

  • Response parameters: The response returns componentId, name, desc, metaJson, externalAssets, packageFilename, jsUrl, metaJsUrl, cssUrl, sourceArchiveUrl, thumbnailUrl, currentRevision, visibilityType, enabled, created_at, and updated_at.

Read component asset

  • API path: /openapi/v2/abi/components/asset

  • Request method: GET

  • API description: Reads the text content of a compiled component asset. This API is intended for use in a sandbox environment or with a personal access key (AK) and secret key (SK).

  • Request parameters

    Parameter

    Type

    Description

    Required

    component_id

    String

    The ID of the component. Must belong to the current tenant.

    Yes

    name

    String

    The name of the asset. Allowed values are main.js, meta.js, and main.css.

    Yes

  • Response parameters: The response returns name, content, contentType, and revision.

  • Request example

    GET /openapi/v2/abi/components/asset?component_id=c1&name=meta.js
  • Response example

    {"success":true,"data":{"name":"meta.js","content":"{...}","contentType":"text/javascript;charset=utf-8","revision":"r1"},"code":200,"trace_id":"t1"}

Delete component

  • API path: /openapi/v2/abi/components/delete

  • Request method: POST

  • Content-Type: application/json

  • API description: Deletes a component along with its installation and visibility scope records. The API call succeeds even if it fails to clean up files in object storage.

  • Request parameters

    Parameter

    Type

    Description

    Required

    component_id

    String

    The ID of the component to delete.

    Yes

  • Request example

    {"component_id":"c1"}
  • Response example

    {"success":true,"data":null,"message":null,"code":200,"trace_id":"t1"}
  • Common error codes

    Error code

    Description

    400

    Validation failed for the ZIP file, manifest, Base64 string, externalAssets, or thumbnail.

    403

    The current user lacks management permissions (upload, update, or delete).

    404

    The component does not exist or does not belong to the current tenant.

    409

    The component name is already in use within the tenant.

    500

    The database query or save operation failed.

    502

    A text component artifact in object storage is not valid UTF-8.

    503

    Object storage is unavailable or a write operation failed.

Embedded integration

The AIPro embedded integration workflow involves creating or querying an embedding configuration (using aiProId), enabling it on the management page, calling the ticket generation API to generate an accessTicket, and constructing a login-free URL to open in an iframe.

Your server-side application calls the Alibaba Cloud POP OpenAPI path and signs the request with an AccessKey/SecretKey pair, according to the QuickBI OpenAPI specification. The API wraps all responses in a standard structure that contains RequestId, Success, and Result fields.

CreateTicket4AiPro: Generate an AIPro embedding ticket

  • POP path: /openapi/v2/pop/ticket/createTicket4AiPro

  • Request method: POST

  • Content-Type: application/x-www-form-urlencoded

  • Description: Issues a login-free ticket of type AI_PRO_TICKET(31) for an enabled AIPro embedding configuration.

  • Request parameters

    Parameter

    Type

    Description

    Required

    aiProId

    String

    The ID of the AIPro embedding configuration. The configuration must exist, belong to the current organization, and have a status of 1.

    Yes

    ticketNum

    Int

    The number of times the ticket can be used. Valid values: 1 to 99999. Default: 1.

    No

    userId

    String

    The QuickBI userId of the user to bind to the ticket. You must provide either this parameter or a combination of accountName and accountType.

    Conditionally

    accountName

    String

    The account name of the user to bind to the ticket. Use this with accountType when userId is not provided.

    Conditionally

    accountType

    Int

    The account type. The value must map to the QuickBI AccountTypeEnum.

    Conditionally

    expireTime

    Int

    The expiration time in minutes. The value must be greater than 0. Default: 240.

    No

    systemUid

    String

    A custom system identifier. Must be less than 150 characters long.

    No

    customParam

    String

    A custom pass-through parameter. If not empty, this value must be a valid JSON string.

    No

    The userId parameter takes precedence over the accountName and accountType combination. If neither is provided, the ticket is bound to the creator of the embedding configuration by default. The calling account must be an organization administrator or a member with the COPILOT_ABI feature and COPILOT_ABI_MANAGE operational permissions. This requirement is consistent with other AIPro embedding management APIs.

  • Request example

    POST /openapi/v2/pop/ticket/createTicket4AiPro
    Content-Type: application/x-www-form-urlencoded
    
    aiProId=a1&ticketNum=1&expireTime=240
  • Response example

    {
      "RequestId": "req-1",
      "Success": true,
      "Result": "generated-ticket"
    }
  • Login-free URL

    https://{QuickBI-access-domain}/token3rd/ai/chat?accessTicket={accessTicket}&aiProId={aiProId}
    The /token3rd/ai/chat path requires a type 31 ticket generated by this API. Do not use the create4Abi API, which issues a type ABI_ARTIFACT(28) artifact ticket. Using an artifact ticket to open the AIPro chat page will result in an AE0580800019 Access Denied error.
  • Common errors

    Error code

    Description

    AE0566662010

    The configuration does not exist or does not belong to the current organization.

    AE0566662011

    The embedding configuration is disabled.

    AE0530010025

    The ticketNum value is out of the allowed range.

    AE0510000038

    Invalid parameter.

    AE0591000014

    Cannot resolve the bound user.

ModifyAiproEmbedConfig: Create or modify an embedding configuration

  • POP path: /openapi/v2/pop/aipro/modifyAiproEmbedConfig

  • Request method: POST

  • Content-Type: application/json

  • Description: Creates an embedding configuration if aiProId is empty or not provided. Partially updates an existing configuration if aiProId is provided. This API must be called by an organization administrator or a member with COPILOT_ABI management permissions.

  • Request parameters

    Parameter

    Type

    Description

    Required

    aiProId

    String

    The configuration ID. Omit to create a new configuration, or provide an ID to modify an existing one.

    If modifying

    showName

    String

    The configuration name. Required and must be unique within the organization when creating. If left blank during modification, the name is not updated.

    If creating

    agentName

    String

    Agent nickname. The default nickname for a new agent is "Intelligent Data Analysis Assistant".

    No

    chatHistoryStatus

    Int

    Specifies whether to show chat history. Valid values: 1 (show), 0 (do not show). Defaults to 1 for new configurations.

    No

    memoryEnabled

    Int

    Specifies whether to enable memory. Valid values: 1 (on), 0 (off). Defaults to 0 for new configurations.

    No

    uploadEnabled

    Int

    Specifies whether to allow file uploads. Valid values: 1 (on), 0 (off). Defaults to 0 for new configurations.

    No

    config

    String

    A JSON string containing the front-end appearance settings for the embedded component.

    No

    A new configuration is created with its status set to status=0 (disabled). This API does not support modifying the status. After creation, you must enable the configuration on the embedding configuration management page before you can issue tickets.

  • Request example

    {
      "showName": "Customer Portal",
      "agentName": "Intelligent Data Analysis Assistant",
      "chatHistoryStatus": 1,
      "memoryEnabled": 0,
      "uploadEnabled": 0,
      "config": "{\"themes\":{\"type\":\"light\"}}"
    }
  • Response example

    {
      "RequestId": "req-1",
      "Success": true,
      "Result": true
    }
  • Common error codes

    Error code

    Description

    AE0510000005

    The showName parameter is empty during creation.

    AE0566662010

    The specified configuration does not exist or does not belong to the current organization.

    AE0566662017

    The configuration name is already in use within the organization.

QueryAiproEmbedConfig: Query embedding configurations

  • POP path: /openapi/v2/pop/aipro/queryAiproEmbedConfig

  • Request method: POST

  • Description: Queries AIPro embedding configurations for the current organization. The API returns results in descending order of their database ID, up to a maximum of 10,000 records. This API must be called by an organization administrator or a member with COPILOT_ABI management permissions.

  • Request parameters

    Parameter

    Type

    Description

    Required

    keyword

    String

    A keyword for a fuzzy search on the showName parameter.

    No

  • Response parameters

    Parameter

    Type

    Description

    aiProId

    String

    The embedding configuration ID. Used in the CreateTicket4AiPro request.

    showName

    String

    The configuration name.

    agentName

    String

    The agent nickname.

    status

    Int

    The status of the configuration. Valid values: 1 (enabled), 0 (disabled).

    chatHistoryStatus

    Int

    Specifies whether chat history is shown. Valid values: 1 (show), 0 (do not show).

    memoryEnabled

    Int

    Specifies whether memory is enabled. Valid values: 1 (on), 0 (off).

    uploadEnabled

    Int

    Specifies whether file uploads are allowed. Valid values: 1 (on), 0 (off).

    config

    String

    A JSON string containing the appearance configuration.

    createUser

    String

    The user ID of the creator.

    createUserName

    String

    The user nickname of the creator.

    modifyUser

    String

    The user ID of the last modifier.

    gmtCreate

    Datetime

    The creation time.

    gmtModified

    Datetime

    The modification time.

  • Response example

    {
      "RequestId": "req-1",
      "Success": true,
      "Result": [
        {
          "aiProId": "a1",
          "showName": "Customer Portal",
          "agentName": "Intelligent Data Analysis Assistant",
          "status": 1,
          "chatHistoryStatus": 1,
          "memoryEnabled": 0,
          "uploadEnabled": 0,
          "config": "{\"themes\":{\"type\":\"light\"}}",
          "createUser": "u1",
          "createUserName": "John Doe",
          "modifyUser": "u1",
          "gmtCreate": "2026-09-01 10:00:00",
          "gmtModified": "2026-09-01 10:00:00"
        }
      ]
    }

Common embedding errors

Symptom

Cause

Solution

The /token3rd/ai/chat endpoint returns error code AE0580800019.

The request used a type 28 artifact ticket generated by the create4Abi API.

Use the CreateTicket4AiPro API to issue a new type 31 ticket.

Ticket does not exist or is invalid.

The ticket was used across different environments, has expired, or its usage limit has been reached.

Issue a new ticket in the correct environment and verify the expireTime and ticketNum values.

Configuration does not exist.

The aiProId is incorrect, belongs to a different organization, or the configuration has been deleted.

Call the QueryAiproEmbedConfig API to verify the configuration exists.

Embedding is disabled.

The configuration status is 0.

Enable the configuration on the management page, then issue a new ticket.

Other API calls within the page are rejected.

The called API endpoint is not on the embedding allowlist.

Add the rejected request path to the EMBED_ALLOWLIST / no_login_url_list configuration.

V. Artifact management

Use these APIs to create, read, and generate login-free embedded previews for AI dashboard artifacts (DashboardSpec). All APIs in this group share the prefix /openapi/v2/abi/artifacts. The platform automatically resolves user and organization identities from the provided AK, so you do not need to pass them as parameters in your requests.

The calling conventions are the same as those described in the I. Dialogue Skill section. All responses use the BaseResponse structure.

Create artifact

  • Path:/openapi/v2/abi/artifacts/create

  • Method: POST

  • Content-Type:application/json

  • Description: Creates an AI dashboard artifact, saves it to the database, and returns its artifact ID and version. You can then retrieve the artifact content with the content API or generate a login-free preview URL with the embed-ticket API.

  • Request parameters

    Parameter

    Type

    Description

    Required

    artifact_type

    String

    The artifact type.

    Yes

    title

    String

    The artifact title. Cannot be empty.

    Yes

    content

    Object

    The artifact content object, which contains a dsl field (DashboardSpec).

    Yes

    session_id

    String

    The session ID.

    No

    conversation_id

    String

    The conversation ID.

    No

  • Response parameters

    Parameter

    Type

    Description

    artifact_id

    String

    The artifact ID.

    draft_id

    String

    The draft ID, used for subsequent edits.

    version

    Int

    The current version.

  • Example request

    {
      "artifact_type": "ai_dashboard",
      "title": "Sales Trend Dashboard",
      "content": {
    
        "dsl": {"type": "ai_dashboard", "title": "Sales Trend Dashboard", "charts": [ ]}
    
      }
    }
  • Example response

    {
      "success": true,
      "data": {
        "artifact_id": "3f8e9b2a-...",
        "draft_id": "d7c1a5b3-...",
        "version": 1
      },
      "code": 200,
      "trace_id": "t1"
    }

Read artifact content

  • Path:/openapi/v2/abi/artifacts/content

  • Method: GET

  • Description: Retrieves the content of an artifact by its ID and version. Because the gateway requires an exact URI match for signature verification, pass the artifact_id as a query parameter instead of using a RESTful path template.

  • Request parameters

    Parameter

    Location

    Type

    Description

    Required

    artifact_id

    Query

    String

    The artifact ID.

    Yes

    version

    Query

    Int

    The version to retrieve. If this parameter is omitted, the latest version is returned.

    No

  • Response parameters

    Parameter

    Type

    Description

    artifact_id

    String

    The artifact ID.

    version

    Int

    The current version.

    current_version

    Int

    The latest version. If version is less than current_version, the retrieved version is not the latest.

    content

    Object

    The artifact content.

    created_at

    String

    The time at which the artifact was created.

    updated_at

    String

    The time at which the artifact was last updated.

  • Example

    GET /openapi/v2/abi/artifacts/content?artifact_id=a1&version=1

Generate a login-free ticket

  • Path:/openapi/v2/abi/artifacts/embed-ticket

  • Method: POST

  • Content-Type:application/json

  • Description: Exchanges an artifact ID for a login-free ticket and an iframe preview URL. By default, the ticket is valid for the user associated with the AK making the call. To specify a different user, use the ticket_user_id parameter; this user must have permission to access the artifact.

  • Request parameters

    Parameter

    Type

    Description

    Required

    artifact_id

    String

    The artifact ID.

    Yes

    ticket_num

    Int

    The number of times the ticket can be used. Default: 1.

    No

    expire_minutes

    Int

    The validity period of the ticket in minutes. Default: 240.

    No

    ticket_user_id

    String

    Specifies the user ID to bind to the ticket. This user must have permission to access the artifact.

    No

    watermark_param

    String

    A JSON string that contains watermark parameters.

    No

    global_param

    String

    A JSON string that contains global pass-through parameters.

    No

  • Response parameters

    Parameter

    Type

    Description

    embed_url

    String

    The embeddable preview URL.

    ticket

    String

    The login-free ticket.

    expire_at

    String

    The time at which the ticket expires.

  • Example request

    {
      "artifact_id": "a1",
      "ticket_num": 99999,
      "expire_minutes": 525600
    }
  • Example response

    {
      "success": true,
      "data": {
        "embed_url": "https://bi.aliyun.com/token3rd/ai-dashboard/view/pc.htm?accessTicket=xxx&artifactId=a1",
        "ticket": "generated-ticket",
        "expire_at": "2027-09-10T12:00:00"
      },
      "code": 200,
      "trace_id": "t1"
    }
  • Common error codes

    Code

    Description

    400

    Parameter validation failed.

    403

    The current user (or the user specified by ticket_user_id) does not have permission to access the artifact.

    404

    The artifact was not found.

    502

    The request to the Quick BI service to generate a ticket failed.

    The embedded preview URL can be used to display the AI dashboard in an iframe or as a clickable link. This can be used in conjunction with the AIPro embedding described in the III. Embedded integration section.