Create Report Template¶
To 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/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 |
URL of the RPT file location. The system administrator can configure a whitelist, and requests with non-whitelisted URL would fail. 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 custom ID of the report template, specified by the caller. The reportKey value must meet the following requirements:
|
supportLanguage |
Optional |
String |
The supported languages, such as |
Note
If you assign a reportKey when creating the report template, you may use it to query or delete the templates.
You can assign or update the reportKey value 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. |
Note
Save the
originalIdfrom the response. You may use it later to update, query or delete the report template.You may use
reportIdto query or delete the previous versions of a 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"
}
}