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 cus or std to define the report template is custom or standard.
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 The URL for the location of the RPT file. 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:

  • For a custom report template, its key must be unique in the OU.
  • For a standard report template, its key must be unique across all OUs.

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 reportId the interface returned after uploading the template.
reportKey Optional String The returned key after uploading the Key of the report template.

Response Content Type


multipart/form-data

Samples

Request Sample


#requestURL:
POST https://{api-gateway}/report-design-service/v1.0/report-file/update?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


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
}