Update Report Template¶
Update a BIRT report template by uploading a report design file (rptdesign) or library file (rptlibrary).
Request Format¶
POST https://{api-gateway}/report-design-service/v1.0/report-file?action=update
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 |
originalId |
Mandatory |
String |
The root ID of the report template. How to get originalId>> |
fileName |
Optional |
String |
The name of the RPT file. |
fileUrl |
Mandatory |
String |
URL of the RPT file location. If the system administrator configured a whitelist, requests with non-whitelisted URL would fail. If both fileUrl and fileBase64 are provided, fileUrl will take precedence. If neither is provided, the RPT file will not be updated. |
fileBase64 |
Optional |
String |
RPT file encoded in Base64. If both fileUrl and fileBase64 are provided, fileUrl will take precedence. If neither is provided, the RPT file will not be updated. |
reportKey |
Optional |
String |
The unique key of the new report template. How to get reportKey>> A report template key must meet these requirements:
Note that if you use reportKey to update a report template, you need to save the key in a secured place for later use, e.g. to query the template. |
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. |
Response Content Type¶
multipart/form-data
Response Codes¶
Samples¶
Request Sample¶
#requestURL:
POST https://{api-gateway}/report-design-service/v1.0/report-file/update?orgId=yourOrgId
#requestbody:
{
"fileUrl": "https://your.file.server.domain/yourTemplate.rpt",
"originalId": "ddaa91a6723c9d111758c1cf52b14d8f",
"reportKey": "yourReportKey",
"type": "cus"
}
Response Sample¶
Sample of response success.
{
"msg": "OK",
"code": 0,
"data": {
"reportId": "ddaa91a6723c9d111758c1cf52b14d8f",
"originalId": "ddaa91a6723c9d111758c1cf52b14d8f",
"reportKey":"uuid"
}
}
Sample of response failure.
{
"msg": "Report key yourEnteredKey is not consistent with the root key ",
"code": 93030,
"success": false
}