页面树结构

版本比较

标识

  • 该行被添加。
  • 该行被删除。
  • 格式已经改变。

...

名称

请求地址

http://smartbi-AIChat-server:port/aiweb/integration/api/v1/get_using_theme

请求方式

POST

请求参数

token

 

 

 

 

 

 

 

3.2.2 接口参数说明


URL参数名

说明

是否必填

输入参数

token

登陆AIChat返回获得的token

必填

返回值

{

    "code": 0,

    "result": [

        {

            "id": "I8a80818c0191262b262b26b0019126c8d71a****",

            "name": "****NLA-绩效考核-20240806",

            "title": "****NLA-绩效考核-20240806",

            "desc": "**证券NLA-绩效考核-20240806包含了年月、年、指标名称、指标口径、指标大类、指标负责人、指标细类、分支机构考核类别、所属考核组织类型、分支机构分组等字段",

            "type": "augmentedDataset",

            "recommendQuestion": [

                "每年指标名称排名",

                "每年得分",

                "近5年指标名称得分",

                "排名按年份排序,线图显示",

                "排名的合计"

            ],

            "lastBuildTime": "2024/08/09 16:11:00"

        }

    ],

    "message": null,

    "token": "717261E64AEC5D904AA2410D127BFB27"

}



 

3.2.3 接口返回说明

返回参数名

返回值说明

code

接口调用是否成功;大于等于0 - 表示成功;负数为错误码

message

错误描述,code=0 时,该内容为空

token

登录方法特有内容,这个非常重要,后续接口需要传递该值以验证登录

result

调用接口的返回内容,登录接口的返回内容说明如下:

"id":                          数据模型themeID

"name":                       数据模型名称

"title":                        数据模型名称别名

"desc":                      数据模型概览    

"type":                        数据类型

"recommendQuestion":           推荐问句

"lastBuildTime":                 最近构建时间

...


其他返回值可以忽略

 

3.2.4 调用示例(PostMan 调用截图)

 Image Modified

 

3.3 维度指标树-详细版

3.3.1 接口说明

名称

请求地址

http://smartbi-AIChat-server:port/aiweb/integration/api/v1/get_theme_tree

请求方式

POST

请求参数

token

themeId

type

 

3.3.2 接口参数说明


URL参数名

说明

是否必填

输入参数

token

登陆AIChat两种方式返回获得的token

必填

themeId

数据模型ID

必填

type

传入参数值:augmentedDataset

必填

返回值

{

    "code": 0,

    "result": [

        {

            "id": "MEASURE",

            "parentId": null,

            "path": "/度量",

            "value": "MEASURE",

            "label": "度量",

            "dataType": "MEASURE_FOLDER",

            "fieldType": null,

            "timeLevel": null,

            "hasChild": "true",

            "defaultCheck": "false",

            "children": [ ]

                }

            ]

        },

        {

            "id": "DIMENSION",

            "parentId": null,

            "path": "/维度",

            "value": "DIMENSION",

            "label": "维度",

            "dataType": "DIMENSION_FOLDER",

            "fieldType": null,

            "timeLevel": null,

            "hasChild": "true",

            "defaultCheck": "false",

            "children": [ ]

                }

            ]

        }

    ],

    "message": null,

    "token": "A381D523DD9C96754C2F40BA6365542F"

}


 

3.3.3 接口返回说明

返回参数名

返回值说明

code

接口调用是否成功;大于等于0 - 表示成功;负数为错误码

message

错误描述,code=0 时,该内容为空

token

登录方法特有内容,这个非常重要,后续接口需要传递该值以验证登录

result

调用接口的返回内容,登录接口的返回内容说明如下:

"id":                         维度或者度量

"children":                    对应id下得维度/指标信息,数组得形式存储

...


其他返回值可以忽略

 

3.3.4 调用示例(PostMan 调用截图)

 Image Modified

3.4 维度指标树-精简版、推荐问句

3.4.1 接口说明

名称

请求地址

http://smartbi-AIChat-server:port/aiweb/integration/api/v1/get_data_set_info_summary

请求方式

POST

请求参数

token

themeId

 

3.4.2 接口参数说明


URL参数名

说明

是否必填

输入参数

token

登陆AIChat返回获得的token

必填

themeId

数据模型ID

必填

返回值

{

    "code": 0,

    "result": {

        "id": "I8a8085ba0190fa36fa36ed470191065c84e70006",

        "name": "**证券NLA-**考核-20240731",

        "alias": "**证券NLA-**考核-20240731",

        "dimensions": {

            "考核日期维度": [

                "年月",

                "年"

            ],

            "分支机构维": [

                "所属考核组织类型",

                "所属分公司代码(考核)",

                "分公司名称",

                "所属分公司名称(考核)",

                "分组",

                "分支机构代码(实际)",

                "分支机构代码(考核)",

                "分支机构级别",

                "分支机构名称(实际)",

                "分支机构名称(考核)"

            ],

            "绩效考核指标": [

                "c_rank"

            ],

            "指标信息维": [

                "指标名称",

                "指标口径",

                "指标负责人",

                "指标细类"

            ]

        },

        "measures": {

            "绩效考核指标": [

                "排名",

                "得分",

                "完成值新",

                "完成值"

            ]

        },

        "recommendQuestions": null

    },

    "message": null,

    "token": "A381D523DD9C96754C2F40BA6365542F"

}


 

3.4.3 接口返回说明

返回参数名

返回值说明

code

接口调用是否成功;大于等于0 - 表示成功;负数为错误码

message

错误描述,code=0 时,该内容为空

token

登录方法特有内容,这个非常重要,后续接口需要传递该值以验证登录

result

调用接口的返回内容,登录接口的返回内容说明如下:

"id":                          数据模型themeID

"name":                       数据模型名称

"alias":                        数据模型名称别名

"dimensions"                   NLA模型中所有维度

"measures"                    NLA模型中所有度量

"recommendQuestions"          推荐问句

...


其他返回值可以忽略

 

3.4.4 调用示例(PostMan 调用截图)


3.5 执行查询

...

名称

请求地址

http://smartbi-AIChat-server:port/aiweb/integration/api/v1/feedback

请求方式

POST

请求参数

tag

uuid

feedbackText

token

 

3.6.2 接口参数说明


URL参数名

说明

是否必填

输入参数

tag

1-为正确,0-为错误

必填

uuid

query接口查询的问句返回的uuid唯一标识

必填

feedbackText

人工输入,反馈内容

必填

token

AIChat登陆方法返回的token

必填

返回值

{

    "code": 0,

    "result": null,

    "message": null,

    "token": "A381D523DD9C96754C2F40BA6365542F"

}


接口调用成功后,会将点赞点踩相关信息写入AIChat的数据库服务中对应表中:

 Image Modified

3.6.3 接口返回说明

返回参数名

返回值说明

code

接口调用是否成功;大于等于0 - 表示成功;负数为错误码

message

错误描述,code=0 时,该内容为空

token

登录方法特有内容,这个非常重要,后续接口需要传递该值以验证登录

 

3.6.4 调用示例(PostMan 调用截图)

 Image Modified

3.7 切换图形

3.7.1 接口说明

名称

请求地址

http://smartbi-AIChat-server:port/aiweb/integration/api/v1/query_with_nl2sql

请求方式

POST

请求参数

table

nl2sql

chartType

token

 

3.7.2 接口参数说明


URL参数名

说明

是否必填

输入参数

table

数据模型themeId

必填

nl2sql

query接口查询的问句返回的nl2sql的value值;注:需要将value值中转义符\剔除

必填

chartType

执行查询接口中附注的PortletType值;举例:ECHARTS_BAR

必填

token

AIChat登陆方法返回的token

必填

返回值

{

    "code": 0,

    "result": {

        "intentionType": null,

        "queryRecordIndex": null,

        "multiRecordSessionId": null,

        "uuid": null,

        "rowsCount": 0,

        "currentRows": 0,

        "currentPage": 0,

        "rowsPerPage": 50,

        "headers": null,

        "values": null,

        "realValues": null,

        "warnings": null,

        "html": "{"yAxis":{"fieldFormat":{"date":"","prefix":"","name":"<整型-默认值>","viewType":"TNUMBER","scale":1.0,"time":"","type":"INTEGER","suffix":"","decimal":0},"axisLabel":{"show":true},"type":"value"},"xAxis":{"fieldFormat":{"date":"","prefix":"","name":"<字符串-默认值>","viewType":"NONE","scale":1.0,"time":"","type":"STRING","suffix":"","decimal":0},"axisLabel":{"show":true},"data":["沪世纪"],"type":"category"},"color":["rgba(149,162,255,1)","rgba(250,128,128,1)","rgba(60,185,252,1)","rgba(255,192,118,1)","rgba(250,231,104,1)","rgba(135,232,133,1)","rgba(115,171,245,1)","rgba(203,155,255,1)","rgba(67,67,72,1)","rgba(144,237,125,1)","rgba(247,163,92,1)","rgba(128,133,233,1)"],"advanced":{"rowNotEmpty":true},"series":[{"fieldFormat":{"date":"","prefix":"","name":"<整型-默认值>","viewType":"TNUMBER","scale":1.0,"time":"","type":"INTEGER","suffix":"","decimal":0},"groupName":"GLOBAL_MARK","data":[{"displayValue":["沪世纪","813"],"tooltipInfo":[{"realValue":"沪世纪","fieldGroupType":"cols","realValueString":"沪世纪","label":"分支机构名称(考核)","value":"沪世纪","uniqueId":"8c4e629e045a44e3b3a79d69b34aafd2"},{"realValue":813,"fieldGroupType":"rows","realValueString":"813","label":"排名","value":"813","uniqueId":"3cfa25d8e1a74b7da592a7860c6efcda"}],"colIndex":1,"rowIndex":[0,0],"value":[0,813]}],"name":"排名","type":"bar","markLine":{"symbol":"none"},"yAxisIndex":0}],"tooltip":{"trigger":"item"},"seriesConfig":{"global":{"stack":false,"step":false,"smooth":false}},"chartEx":{"clasifyName":[{"data":"排名"}],"drillableFields":[],"outputRows":1000}}",

        "nl2sql": null,

        "nl2sqlDuration": 0,

        "nl2mdx": null,

        "portletType": "ECHARTS_BAR",

        "queryType": "PageQuery",

        "clientId": "fd768e86c2ff43a4ae663da42f38066b",

        "combinedQueryClientId": null,

        "question": null,

        "themeId": "I8a8085ba0190fa36fa36ed470191065c84e70006",

        "intentionParams": null,

        "resultTips": null,

        "interActionItems": null,

        "processing": null,

        "pageBO": null,

        "subTable": null,

        "llmReviseQuestion": null,

        "measureDescriptions": null,

        "nl2sqlStatus": null,

        "nl2sqlRecommendInfo": null,

        "intentionRecommendInfo": null,

        "jsonResult": null,

        "gptMql": null,

        "prompt": null,

        "llm": false,

        "num": false

    },

    "message": null,

    "token": "717261E64AEC5D904AA2410D127BFB27"

}


...

返回参数名

返回值说明

code

接口调用是否成功;大于等于0 - 表示成功;负数为错误码

message

错误描述,code=0 时,该内容为空

token

登录方法特有内容,这个非常重要,后续接口需要传递该值以验证登录

result

调用接口的返回内容,登录接口的返回内容说明如下:

"html":                        切换后的图表的html

"portletType":                  切换后的图标的类型

...


其他返回值可以忽略

 

3.7.4 调用示例(PostMan 调用截图)

 Image Modified

 

3.8  查询结果设置输出行数


3.8.1 接口说明

...