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. How to get reportKey>> 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%3A%2F%2Fenossolarcn.blob.core.chinacloudapi.cn%2Fpdc1%2Fnative-report-system%2Freport-file%2Fcustomized%2Fo15891646475831%2Frptdesign%2F138552a2b07ed1f8a0ec34d08c8c3e03.zip%3Fsv%3D2019-10-10%26st%3D2020-12-16T01%253A47%253A22Z%26se%3D2020-12-17T01%253A47%253A22Z%26sr%3Db%26sp%3Dr%26sig%3DqWUajh6OKHcfBjH3r8jOVZLRysT%252FFe1JuuHdnHh4jMo%253D",
"reportKey": "yourReportKey",
"type": "cus"
}
Response Sample¶
{
"msg": "OK",
"code": 0,
"data": {
"reportId": "ddaa91a6723c9d111758c1cf52b14d8f",
"originalId": "ddaa91a6723c9d111758c1cf52b14d8f",
"reportKey":"uuid"
}
}