Create Report Template¶
Create a report template by uploading a report design file or a library file.
Request Format¶
POST https://{api-gateway}/report-design-service/v1.0/report-file?action=create
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|---|
orgId |
Query |
Mandatory |
String |
The ID of the organization which the report template belongs to. How to get orgID>> |
Request Parameters (Body)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
type |
Mandatory |
String |
Use |
fileName |
Mandatory |
String |
The name of the RPT file, which will be set as the template name. |
fileUrl |
Optional |
String |
The URL for the location of the RPT file. You must provide either fileUrl or fileBase64, and if both are provided, fileUrl will take precedence. |
fileBase64 |
Optional |
String |
RPT file encoded in Base64. You must provide either fileUrl or fileBase64, and if both are provided, fileUrl will take precedence. |
reportKey |
Optional |
String |
The unique key of the report template. A report template key must meet these requirements:
Note that if you use |
supportLanguage |
Optional |
String |
The supported languages, such as zh_CN, en_US, etc., should be separated by commas. The default language is en_US. |
Response Parameters¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
reportId |
Mandatory |
String |
The unique ID of the report. |
originalId |
Mandatory |
String |
The first |
reportKey |
Optional |
String |
The returned key after uploading the key of the report template. |
Note
Take a note of the returned reportId
, which will be used as originalId
if you need to update or perform other operations on this report template.
Response Content Type¶
multipart/form-data
Response Codes¶
Samples¶
Request Sample¶
#requestURI:
POST https://{api-gateway}/report-design-service/v1.0/report-file/create?orgId=yourOrgId
#requestBody:
{
"fileUrl": "https://your.file.server.domain/yourTemplate.rpt",
"reportKey": "yourReportKey",
"fileName": "yourFileName"
"type": "cus"
}
Response Sample¶
{
"msg": "OK",
"code": 0,
"data": {
"reportId": "ddaa91a6723c9d111758c1cf52b14d8f",
"originalId": "ddaa91a6723c9d111758c1cf52b14d8f",
"reportKey":"uuid"
}
}