Previous Next

Create report

post

/services/rest/v1/reports

Create a report in the Oracle BI Publisher catalog. The method enables you to set the path to the data model, supply template files and translation (XLIFF) files to the report definition

Request

Supported Media Types
  • multipart/form-data
Form Parameters
ReportRequest
Required: true
Report metadata having "Content-Type: application/json" . Check the examples section for JSON structure details
TemplateData
Type: file
Template file . "Content-Type: application/octet-stream"
XliffData
Type: file
Translation file (XLIFF) . "Content-Type: application/octet-stream"

Response

201 Response
Report successfully created.
400 Response
An error occurred while creating report
Body
Root Schema : /paths/~1v1~1reports/post/responses/400/schema
Type: string

Examples

Simple create report request

The following example shows the request structure to create a report:

--Boundary_1_1153447573_1465550157807
Content-Type: application/json
Content-Disposition: form-data; name="MyReportRequest"

{"absolutePath":"FolderName/SubFolderName/","dataModelPath":"/Sample Lite/Published Reporting/Data Models/Balance Letter Datamodel.xdm","name":"ReportName","update":false}
--Boundary_1_1153447573_1465550157807--

Where:

  • name (string): Name of the report. Do not suffix it with .xdo. For example, specify name="myreport" (not name="myreport.xdo").

  • absolutePath (string): Path to the folder where you want to save the report. For example: xmlp/Reports/financials

  • dataModelPath (string): Path to the data model that will be used as the data source for this report. For example: xmlp/Reports/financials/Data Models/my data model.xdm

  • templateFileName(string): File name of the template to add the report definition.

  • xliffFileName (string): File name of the translation XLIFF file, appended with the locale as follows:

    • template_<language code>_<country code>.xlf

    where:

    • language_code is the two-letter ISO 639 language code

    • country_code is the two-letter ISO 639 language code

    For example: template_en_us.xlf

  • update (boolean): If true, overwrites the existing report. If false, throws an error if the report exists.

Create a report with a custom template

The following example shows the request structure to create a report with a custom template (RTFTemplate.rtf):

--Boundary_4_1611832218_1465550158746
Content-Type: application/json
Content-Disposition: form-data; name="ReportRequest"

{"absolutePath":"FolderName/SubFolderName/","dataModelPath":"/Sample Lite/Published Reporting/Data Models/Balance Letter Datamodel.xdm","name":"ReportName","update":false}
--Boundary_4_1611832218_1465550158746
Content-Type: application/octet-stream
Content-Disposition: form-data; filename="RTFTemplate.rtf"; modification-date="Tue, 01 Jan 2000 07:35:28 GMT"; size=486813; name="TemplateData"

<Template Content>
--Boundary_4_1611832218_1465550158746--

Create a report with a custom template and XLIFF data

The following example shows the request structure to create a report with a custom template and translation file (sampleTranslation.xlf):

--Boundary_5_474488818_1465547908933
Content-Type: application/json
Content-Disposition: form-data; name="ReportRequest"

{"absolutePath":"FolderName/SubFolderName/","dataModelPath":"/Sample Lite/Published Reporting/Data Models/Balance Letter Datamodel.xdm","name":"ReportName","templateFileName":"sample_en_US.rtf","update":false,"xliffFileName":"samplexliff_en_IN.xlf"}
--Boundary_5_474488818_1465547908933
Content-Type: application/octet-stream
Content-Disposition: form-data; filename="BalanceLetter_Template.rtf"; modification-date="Tue, 01 Jan 2000 07:35:28 GMT"; size=486813; name="TemplateData"

<Template Data>
--Boundary_5_474488818_1465547908933
Content-Type: application/octet-stream
Content-Disposition: form-data; filename="sampleTranslation.xlf"; modification-date="Tue, 01 Jan 2000 07:35:28 GMT"; size=6447; name="XliffData"

<XLIFF Data>
--Boundary_5_474488818_1465547908933--