Update Report Template¶
To 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/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 original ID of the report template, generated when you create the template. The value of originalId remains unchanged regardless of modifications to the 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 custom ID of the report template, specified by the caller. How to get reportKey>> The reportKey value must meet the following requirements:
|
supportLanguage |
Optional |
String |
The supported languages, such as |
Note
If you assigned a reportKey when creating the report template, you may use it to query or delete the templates. You can update the
reportKeyvalue when you update the report template.If you did not assign a reportKey when creating the report template, you can assign one when you update the report template.
Response Parameters¶
Name |
Data Type |
Description |
|---|---|---|
reportId |
String |
The unique ID of each version of the report template, generated when you create or update the report template. |
originalId |
String |
The original ID of the report template, generated when you create the template. The value of originalId remains unchanged regardless of modifications to the template. |
reportKey |
String |
The custom ID of the report template, specified by the caller. |
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": "002443f7b9a513b834b187999c6d8855",
"originalId": "ddaa91a6723c9d111758c1cf52b14d8f",
"reportKey":"yourReportKey"
}
}
Sample of response failure.
{
"msg": "Operation template error. operation type is UPDATE",
"code": 93033,
"success": false
}