Query Template Parameter¶
通过指定报表模板 ID、报表模板密钥(key)和组织 ID 等信息查询报表模板中的参数。
请求格式¶
GET https://{api-gateway}/report-design-service/v1.0/report-file/arguments?action=query
请求参数 (URI)¶
名称 |
位置 (Path/Query) |
必需/可选 |
数据类型 |
描述 |
---|---|---|---|---|
orgId |
Query |
必需 |
String |
报表模板所属组织的 ID。 如何获取 orgID>> |
请求参数(Body)¶
名称 |
必需/可选 |
数据类型 |
描述 |
---|---|---|---|
reportId |
可选 |
String |
报表模板的 ID。如何获取 reportId>> |
reportKey |
可选 |
String |
报表模板的密钥(key)。如何获取 reportKey>> 模板密钥需满足以下要求:
|
originalId |
可选 |
String |
报表模板的源 ID。如何获取 originalId>> |
指定报表模板的参数的优先级如下:
reportId
(最高)> reportKey
> originalId
(最低)。
reportId
、reportKey
和 originalId
均为可选参数,但在一次请求中必须使用至少其中一个参数。
返回内容类型¶
application/json
返回码¶
参见 报表工具 API 返回码。
示例¶
请求示例¶
#requestURI:
GET https://{api-gateway}/report-design-service/v1.0/report-file/arguments/query?reportId=yourReportId&reportKey=yourReportKey&originalId=yourOriginalId&orgId=yourOrgId
返回示例¶
{
"msg": "Success",
"code": 0,
"data": {[
{
"name": "token",
"hidden": "false",
"parameterType": "simple",
"controlType": "text",
"required": "true",
"allowNull": "false",
"allowMultiple": "false",
"dataType": "string",
"conceal": "false"
},
{
"name": "type",
"hidden": "false",
"parameterType": "simple",
"controlType": "text",
"required": "true",
"allowNull": "false",
"allowMultiple": "false",
"dataType": "string",
"conceal": "false"
},
{
"name": "booleanParameter",
"defaultValue": "False",
"hidden": "false",
"parameterType": "simple",
"controlType": "checkbox",
"required": "true",
"allowNull": "false",
"allowMultiple": "false",
"dataType": "boolean",
"conceal": "false"
},
{
"name": "startDate",
"hidden": "false",
"parameterType": "simple",
"controlType": "text",
"required": "true",
"allowNull": "false",
"allowMultiple": "false",
"dataType": "dateTime",
"conceal": "false"
},
{
"name": "endDate",
"displayFormat": "EndDate",
"hidden": "false",
"parameterType": "simple",
"controlType": "text",
"required": "false",
"allowNull": "true",
"allowMultiple": "false",
"dataType": "date",
"conceal": "false"
},
{
"name": "siteTree",
"displayFormat": "SingleSite",
"hidden": "false",
"parameterType": "simple",
"controlType": "text",
"required": "false",
"allowNull": "true",
"allowMultiple": "false",
"dataType": "string",
"conceal": "false"
},
{
"name": "multiSiteTree",
"promptText": "{\"defaultValue\":\"site list\",\"i18nValue\":{\"en_US\":\"site list en_US\",\"zh_CN\":\"场站列表\",\"es_ES\":\"site list es_ES\",\"ja_JP\":\"site list ja_jP\"}}",
"helpText": "{\"defaultValue\":\"site list\",\"i18nValue\":{\"en_US\":\"site list en_US\",\"zh_CN\":\"场站列表\",\"es_ES\":\"site list es_ES\",\"ja_JP\":\"site list ja_jP\"}}",
"displayFormat": "MultiSite",
"hidden": "false",
"parameterType": "simple",
"controlType": "text",
"required": "false",
"allowNull": "true",
"allowMultiple": "false",
"dataType": "string",
"conceal": "false"
},
{
"name": "decimalParameter",
"hidden": "false",
"parameterType": "simple",
"controlType": "text",
"required": "false",
"allowNull": "true",
"allowMultiple": "false",
"dataType": "decimal",
"conceal": "false"
},
{
"name": "floatParameter",
"hidden": "false",
"parameterType": "simple",
"controlType": "text",
"required": "false",
"allowNull": "true",
"allowMultiple": "false",
"dataType": "float",
"conceal": "false"
},
{
"name": "integerParameter",
"hidden": "false",
"parameterType": "simple",
"controlType": "text",
"required": "false",
"allowNull": "true",
"allowMultiple": "false",
"dataType": "integer",
"conceal": "false"
},
{
"name": "listBoxParameter",
"hidden": "false",
"parameterType": "simple",
"controlType": "select",
"required": "false",
"allowNull": "true",
"allowMultiple": "true",
"dataType": "string",
"conceal": "false",
"selectionList": [
{
"selectionValue": "1",
"selectionDisplayText": "listbox1"
},
{
"selectionValue": "2",
"selectionDisplayText": "listbox2"
}
]
},
{
"name": "radioGroupParameter",
"hidden": "false",
"parameterType": "simple",
"controlType": "radio",
"required": "false",
"allowNull": "true",
"allowMultiple": "false",
"dataType": "string",
"conceal": "false",
"selectionList": [
{
"selectionValue": "1",
"selectionDisplayText": "radio1"
},
{
"selectionValue": "2",
"selectionDisplayText": "radio2"
}
]
},
{
"name": "SelectionListDefault",
"defaultValue": "123",
"hidden": "false",
"parameterType": "simple",
"controlType": "select",
"required": "true",
"allowNull": "false",
"allowMultiple": "false",
"dataType": "string",
"conceal": "false",
"selectionList": [
{
"selectionValue": "123",
"selectionDisplayText": "zh",
},
{
"selectionValue": "456",
"selectionDisplayText": "en"
}
]
},
{
"name": "MultiParameters",
"defaultValue": "12|||34",
"hidden": "false",
"parameterType": "simple",
"controlType": "select",
"required": "true",
"allowNull": "false",
"allowMultiple": "true",
"dataType": "string",
"conceal": "false",
"selectionList": [
{
"selectionValue": "12",
"selectionDisplayText": "z"
},
{
"selectionValue": "34",
"selectionDisplayText": "h"
},
{
"selectionValue": "56",
"selectionDisplayText": "c"
}
]
},
{
"name": "DefaultParameter",
"defaultValue": "test default",
"hidden": "false",
"parameterType": "simple",
"controlType": "text",
"required": "false",
"allowNull": "true",
"allowMultiple": "false",
"dataType": "string",
"conceal": "false"
}
]},
"success": true
}