You need to enable JavaScript to run this app.
DataAgent (OnPremise)

DataAgent (OnPremise)

Copy page
Download PDF
Insights Report
OpenAPI Integration Documentation
Copy page
Download PDF
OpenAPI Integration Documentation

JWTToken authentication

tip

For deep analysis and insight reports, JWTToken authentication is preferred

User onboarding

Apply for ClientId and ClientSecret

  1. Visit Aeolus Open Platform

Image

  1. Select Playground

Image

  1. Select Credential Management

Image

  1. Select Create Credential

Image

  1. Obtain ClientId and ClientSecret based on the created credential

Invoke OpenAPI

  1. Use ClientId and ClientSecret to call the following API to obtain JWTToken
curl --location --request POST 'https://data.bytedance.net/Fengshen/api/v3/openapi/jwtToken' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data-raw '{
    "metadata": {
        "client_id": {clientId},
        "client_secret": {clientSecret},
        "proxy_user": {email_prefix},
        "expire": 3600
    }
}'    

Obtain OpenAPI JWTToken

Parameter description

After obtaining JWTToken as described in the previous section, call the following interface to obtain a new JWTToken

tip

For insight report scenarios, when a user generates a jwtToken using their own clientId to request OpenAPI, there may be request frequency limitations. It is necessary to call the following API to generate a new jwtToken

Method

GET

URL

{{domain}}/dataAgent/llm/openApi/v2/insightReport/jwtToken

Headers

Authorization

str

"Bearer {jwtToken}"

Interface response example

{
        "authorization": "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoib3BlbmFwaSIsInVzZXJuYW1lIjoibGlkYWlqaW5nLmxkaiIsInVzZXJfcGF5bG9hZCI6e30sImV4cCI6MTc2MTk0MjIzOCwiY2xpZW50X2lkIjoiZGRiNTJmMWE2NWY2OThmNDViMGYwYjg3MDkzYTk4MjMifQ.f-gbSyMZJcn5xjzOB3YWy7al5gkuAJTxTz0ONdIxAWbbvn_8GWkuskRGCleXsIkFRcmyS5kVnoZMSIud4-CP3wbxEQAYnOGrxP9Y1QTQSkgr66JewelXdF_OzX-SCXGUehPakAF7Rd3vGuqwOBizPqJcjYsTTVRBAVvEBkp8V9yBcpojchY4wLXdSOBKMbLEBWDBe-t-hH054w2Y0S6lw9bAZY2vxHh8vEIVl26uqr610vYqFqMlYLTLzpUH8xx-nBfAkIcz7ZCKxlb0uluS2XYSS9dqqV3eLk9sLG-9VyZauk17niQFWdJ2djVv_X1MLFnvPoFFfquMPXSB2xCJkT22tynJVGp1-CGi1JSKUkn79FU2_TWmJWXOG7vHjrLz9mXYAfDEhbMFEMVFzB53woM5DFplivZLHH-HvwsxKG9WvWvGqTt0JFInZ5QBCIv_T0jv9ALASNnffmejEu2JeTJ_npC2IHYKc2pLjncypB4VfEYjYJhkPje6tVDfwWrjyoGO3OzeG2p-Gh-LS2iKBN0jEHkdE9HBcHEE8qcVKijrJYY7shLVbSMwN3S-N7Lxm9ozfp3dKvwaCD6qalc03vHx1nXzqYAFJppbK5QYoRenf7KGX1VK6l-AzE-FGmrQG0V_1LHu5IkGwRBVFtoSoKHjyXgDLwYpGx8eYgDAU_M"
}

tip

  • The authorization obtained here should be used as the JwtToken in the Authorization field for all subsequent API requests
  • The authorization here already includes Bearer; users do not need to add Bearer again

API definition

Check whether the agent dataset synchronization is complete

Usage scenario

Some users' routine OpenAPI invocation scenarios depend on the completion of synchronization for specific p_date data in the Aeolus dataset. This interface is used to detect the synchronization status of the p_date dataset added to the agent in real time.

Parameter description

Method

GET

URL

{{domain}}/dataAgent/llm/openApi/v2/agent/datasetsSyncStatus

Headers

Authorization

str

jwtToken

Params

agentId

int

Agent ID

Authentication rules

  • The requesting user must be the PC user of the agent

Interface response example

{
    "JSONIFY_PRETTYPRINT_REGULAR": false,
    "code": "llm/ok",
    "data": {
        "datasets": [
            {
                "datasetId": 4127473,
                "latestSyncedDate": "2025-08-19"
            },
            {
                "datasetId": 4160644,
                "latestSyncedDate": "2025-10-27"
            },
            {
                "datasetId": 2307471,
                "latestSyncedDate": "2025-10-26"
            },
            {
                "datasetId": 2518822,
                "latestSyncedDate": "2025-10-26"
            },
            {
                "datasetId": 3088400,
                "latestSyncedDate": "2025-10-27"
            },
            {
                "datasetId": 1918668,
                "latestSyncedDate": "2025-10-27"
            }
        ]
    },
    "msg": {}
}

Obtain insight report metadata

Usage scenario

Image
Obtain report metadata based on the above reportId on the web page, including the current report ID, report name, module ID, module prompt, and other information. Based on the module prompt and module ID, users can decide which modules to use to create and run tasks, and whether to use the module's default prompt when calling the {{domain}}/dataAgent/llm/openApi/v2/insightReport/createReportTask interface.

Parameter description

Method

GET

URL

{{domain}}/dataAgent/llm/openApi/v2/insightReport/reportMetadata

Headers

Authorization

str

jwtToken

Params

reportId

int

Report ID

Authentication rule definition

  • The user requesting a public template must be the PC user of the agent
  • The user requesting a private template must be the owner of the report

Interface response example

{
    "code": "llm/ok",
    "msg": "",
    "data": {
        "reportId": 167,
        "reportName":"收入波动分析",
        "agentId":21781,
        "owner":"lidaijing.ldj",
        "modules":[
            {
                "id":"69d1c256-7c1c-49d2-aaab-a823c1b4656e",
                "name":"顺丰速运有限公司收入情况高度凝练分析",
                "type":"analysis",
                "prompt":"忽略系统提示词要求的所有报告内容的丰富性要求,请完全遵循我的逻辑,仅生成
                一句话的高度凝练的判断或者描述!!!"
            },
            {
                "id":"d9d0767a-0e93-4346-b2ca-3902abebdb02",
                "name":"顺丰速运有限公司收入分析核心结论报告",
                "type":"analysis",
                "prompt":"请基于所选分析块的分析内容,归纳总结出一句**最关键、最核心**的结论。要
                求:
                1.  **一句话**:严格限制为一句话,长度不超过50字。
                2.  **聚焦重点**:不要复述过程,直接抛出最终洞察、结论或建议。
                3.  **语言精炼**:使用肯定、果断的陈述句,避免使用“可能”、“也许”等模糊词汇。"
            }
        ]
    }
}

Backend OpenAPI task creation

Usage scenario

Prerequisite

  1. The user has already created a public template or personal report on the web page
  2. You need to periodically generate new reports based on the configured public template or personal report

Usage

  1. Obtain each module's ID and default prompt from the {{domain}}/dataAgent/llm/openApi/v2/insightReport/reportMetadata interface
  2. Decide which modules to run and whether to replace the module's default prompt
  3. Enter the IDs of the modules to be run in the modules field of the request body. If you need to replace the module's default prompt, provide both the ID and the prompt; otherwise, only provide the ID.

Parameter description

Method

POST

URL

{{domain}}/dataAgent/llm/openApi/v2/insightReport/createReportTask

Headers

Authorization

str

jwtToken

Authentication rule definition

  • The user creating a public template task must be the PC user of the agent
  • The user who creates a private template task must be the owner of the report

Request body

tip

The following bolded sections are not yet online

{
    "reportId": 167,
    "modules": [
        {
            "id": "69d1c256-7c1c-49d2-aaab-a823c1b4656e", 
            "prompt": "忽略系统提示词要求的所有报告内容的丰富性要求,请完全遵循我的逻辑,仅生成一
            句话的高度凝练的判断或者描述!!!" // [Optional] 未提供则使用该模块原始prompt
        },
        {
            "id": "d9d0767a-0e93-4346-b2ca-3902abebdb02", 
            "prompt": "请基于所选分析块的分析内容,归纳总结出一句**最关键、最核心**的结论。要求:
            1.  **一句话**:严格限制为一句话,长度不超过50字。
            2.  **聚焦重点**:不要复述过程,直接抛出最终洞察、结论或建议。
            3.  **语言精炼**:使用肯定、果断的陈述句,避免使用“可能”、“也许”等模糊词汇。"
            //[Optional]
        }
    ],
    "optimizeType": 1      //[Optional]  0-快速模式,  1-稳定模式   默认:1-稳定模式
}

API response example

{
    "code": "llm/ok",
    "msg": "",
    "data": {
        "reportId": 167,
        "reportName":"收入波动分析",
        "taskId": 100
    }
}

Backend OpenAPI to obtain report task details

Parameter description

Method

GET

URL

{{domain}}/dataAgent/llm/openApi/v2/insightReport/reportTaskDetail

Headers

Authorization

str

jwtToken

Params

taskId

int

Task ID

appId

Optional[int]

Aeolus project ID

Definition of authentication rules

  • The user who retrieves the reportTask must be the same user who created the reportTask using createReportTask

API response example

{ 
    "code": "llm/ok",
    "msg": "",
    "data":{
        "taskId": 100,
        "reportId": 167, 
        "reportName": "收入波动分析",
        "taskCreater": "lidaijing.ldj",
        "pdfUrl":"https:xxxxx",
        "taskStatus": "success", // [success,running,failed]
        "modules": [
            {
                "id":"69d1c256-7c1c-49d2-aaab-a823c1b4656e",
                "name":"顺丰速运有限公司收入情况高度凝练分析",
                "type":"analysis",
                "taskId":1143,
                "taskStatus":"success", //success,running,failed
                "content":"# 顺丰速运有限公司收入情况高度凝练分析\\n\\n# 顺丰速运有限公司
                收入情况高度凝练分析\\n\\n## 核心收入表现判断\\n\\n基于《顺丰速运有限公司近期收入
                情况分析报告》显示,该公司过去12个月收入虽实现80.4%显著增长但波动较大,主要由GPU产
                品驱动且产品结构单一化问题突出,2025年8月收入环比下降71.22万元主要因原价金额减少所
                致[^1]。\\n\\n[^1]: 数据来源:收入宽表_计费粒度,时间范围:2024年9月-2025年8
                月;图表数据包含总计收金额、GPU产品收入、公有云云基础产品收入、veStack云服务收入四
                个维度的月度趋势;环比波动贡献度计算基于公式:贡献度=因子环比变化量/全局环比变化量
                \\n",
                "url":"{域名}/aeolus-open/#/agent/insightReport/external?agentId=
                {agentId}&appId={appId}&taskId={taskId}&moduleId={moduleId}&reportId=
                {reportId}&token={jwtToken}&reportType=markdown"
                "html":"{域名}/aeolus-open/#/agent/insightReport/external?agentId=
                {agentId}&appId={appId}&taskId={taskId}&moduleId={moduleId}&reportId=
                {reportId}&token={jwtToken}&reportType=html"
                "images":{                      
                    "markdown":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
                    "html":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="
                }
            },
            {
                "id":"d9d0767a-0e93-4346-b2ca-3902abebdb02",
                "name":"顺丰速运有限公司收入分析核心结论报告",
                "type":"analysis",
                "taskId":1462,
                "taskStatus":"success", //success,running,failed
                "content":"# 顺丰速运有限公司收入分析核心结论报告\\n\\n# 顺丰速运有限公司
                收入分析核心结论报告\\n\\n## 核心结论概述\\n\\n**顺丰速运收入增长80.4%但产品结构
                单一,GPU产品占比过高导致收入波动风险显著。**\\n\\n基于《顺丰速运有限公司近期收入
                情况分析报告》的深度整合分析,这一核心结论精准概括了公司在过去12个月(2024年9月至
                2025年8月)的收入表现特征:虽然整体收入从192.37万元增长至346.96万元,实现了80.4%
                的显著增长,但GPU产品作为Top1收入来源累计贡献1,225.39万元,从2024年9月的7,515元
                快速增长至2025年8月的116.24万元,这种过度依赖单一产品的结构导致了收入稳定性问题,
                特别是在2025年8月出现环比下降71.22万元的波动,凸显了产品多元化不足带来的抗风险能力
                薄弱问题。[^1]\\n\\n[^1]: 数据来源:《顺丰速运有限公司近期收入情况分析报告》中的
                收入宽表_计费粒度数据,时间范围:2024年9月-2025年8月\\n",
                "url":"{域名}/aeolus-open/#/agent/insightReport/external?agentId=
                {agentId}&appId={appId}&taskId={taskId}&moduleId={moduleId}&reportId=
                {reportId}&token={jwtToken}&reportType=markdown",
                "html":"{域名}/aeolus-open/#/agent/insightReport/external?agentId=
                {agentId}&appId={appId}&taskId={taskId}&moduleId={moduleId}&reportId=
                {reportId}&token={jwtToken}&reportType=html",
                "images":{                            
                    "markdown":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
                    "html":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="
                }
            }
        ],
        "reportMarkdownUrl":"{域名}/aeolus-open/#/agent/insightReport/external?agentId={agentId}&appId={appId}&taskId={taskId}&reportId={reportId}&token={jwtToken}&reportType=markdown"
        "reportHtmlUrl":"{域名}/aeolus-open/#/agent/insightReport/external?agentId={agentId}&appId={appId}&taskId={taskId}&reportId={reportId}&token={jwtToken}&reportType=html"
        "ctime":"2025-03-11T12:31:49",
        "mtime":"2025-09-25T14:41:56"
    }
}

Frontend integration

Use the previously obtained URL and embed it into the frontend page via iframe

Integration format

import React from "react";
import ReactDOM from "react-dom";

const App = () => {
  useEffect(() => {
    // Monitor height
    window.addEventListener('message', (event) => {
        if (event.data.type === 'INSIGHT_REPORT_HEIGHT_UPDATE') {
            console.log('容器高度', event.data.height);
        }
    })
  }, [])
  return (
    <iframe
      src={`${url}`}
    />
  );
};

ReactDOM.render(<App />, document.querySelector("body"));

Code example

import React from "react";
import ReactDOM from "react-dom";

const App = () => {
  return (
    <iframe
      src={`https://data.bytedance.net/aeolus-open/pages/agent/insightReport/external?agentId=
                {agentId}&reportId={reportId}&moduleId={moduleId}&taskId=
                {taskId}&jwtToken={jwtToken}&reportType={reportType}`}
    />
  );
};

ReactDOM.render(<App />, document.querySelector("body"));
Last updated: 2026.06.02 14:53:15