レポートの実行

post

/services/rest/v1/reports/{reportPath}/run

Oracle BI Publisherサーバーにリクエストを送信して特定のレポートを実行します。リクエストは同期されており、レスポンスにはレポート出力が含まれます。

リクエスト

サポートされているメディア・タイプ
パス・パラメータ
  • URLエンコードされたレポート・パス。たとえば、レポート・パスが"/Sample Lite/Published Reporting/Reports/Balance Letter"の場合、エンコードされたレポート・パスは"%2FSample%20Lite%2FPublished%20Reporting%2FReports%2FBalance%20Letter"となります。エンコードされたスラッシュを渡すように構成されていないロード・バランサを介してBI PublisherにRESTリクエストを送信する場合は、二重にエンコードされたスラッシュを使用します。たとえば、レポート・パスがSample Lite/Published Reporting/Reports/Balance Letterの場合、エンコードされたレポート・パスはSample%20Lite%252FPublished%20Reporting%252FReports%252FBalance%20Letterとなります。
フォーム・パラメータ
  • レポート・データ。"Content-Type: application/octet-stream"
  • レポート・リクエスト。"Content-Type: application/json".レポート・パラメータの取得(/services/rest/v1/reports/{reportPath}/parameters)のReportRequestでJSON構造を確認します。
先頭に戻る

レスポンス

サポートされているメディア・タイプ

200レスポンス

レポート出力を次の2つの部分を含むmultipart/form-dataとして返します。1) "Content-Type: application/json"を含むReportResponse。2) "Content-Type: application/octet-stream"を含むReportOutput。
本文 ()
ルート・スキーマ: ReportResponse
型: object
ソースを表示
ネストされたスキーマ: ReportResponseMetaData
型: object
ソースを表示
ネストされたスキーマ: MetaDataList
型: object
ソースを表示
先頭に戻る

簡易なレポートの実行リクエストとレスポンス

次の例は、cURLを使用してRESTリソースにPOSTリクエストを発行してレポートを実行する方法を示しています。

curl -X POST -u username:password -o report_output.html -H
      "Content-Type:multipart/form-data"  -v -F
      'ReportRequest={"attributeFormat":"html","attributeTemplate":"Publisher
      Template"};type=application/json' 
http://host.com:port/xmlpserver/services/rest/v1/reports
/Sample%20Lite%252FPublished%20Reporting%252FReports%252FBalance%20Letter/run

CURLコマンドを実行してレポートを実行すると、メタデータJSONおよび実際のレポート出力データがreport_output.html出力ファイルに格納されます。出力ファイルからメタデータ・セクションを削除します。

この例は、簡易なレポートを実行するためのリクエスト構造を示しています。

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

{"byPassCache":true,"flattenXML":false}
--Boundary_1_1153447573_1465550731355--

この例は、レスポンスを示しています。

--Boundary_4_543972006_1465550732053
Content-Type: application/json
Content-Disposition: form-data; name="ReportResponse"

{"reportContentType":"application/pdf"}
--Boundary_4_543972006_1465550732053
Content-Type: application/octet-stream
Content-Disposition: form-data; filename="xmlp3001677868600512506tmp"; 
modification-date="Fri, 10 Jun 2017 09:25:32 GMT"; size=7638; name="ReportOutput"

<Report output. For example PDF,HTML,EXCEL content>
--Boundary_4_543972006_1465550732053--

カスタム・レポート・データを含むレポートを実行します。

次の例は、cURLを使用してRESTリソースにPOSTリクエストを発行し、カスタム・レポート・データを設定してレポートを実行する方法を示しています。mydata.xmlファイルを配置したディレクトリからcURLコマンドを実行します。

curl -X POST -v -u username:password 
-o report_output.html -H "Content-Type:multipart/form-data" 
-F 'ReportData=@mydata.xml;type=application/octet-stream' 
-F 'ReportRequest={"attributeFormat":"html",
"attributeTemplate":"Publisher Template","byPassCache":"true"};
type=application/json' 
http://host.com:port/xmlpserver/services/rest/v1/reports
/Sample%20Lite%252FPublished%20Reporting%252FReports%252FBalance%20Letter/run
この例は、カスタム・レポート・データを使用してレポートを実行するためのリクエスト構造を示しています。
--Boundary_3_384617262_1465550732541
Content-Type: application/json
Content-Disposition: form-data; name="ReportRequest"

{"byPassCache":true,"flattenXML":false}
--Boundary_3_384617262_1465550732541
Content-Type: application/xml
Content-Disposition: form-data; filename="Balance Letter.xml"; 
modification-date="Tue, 01 Jan 2000 07:35:28 GMT"; size=24700; name="ReportData"

<Report XML Data Content>
--Boundary_3_384617262_1465550732541--

この例は、レスポンスを示しています。

--Boundary_6_656616533_1465550732888
Content-Type: application/json
Content-Disposition: form-data; name="ReportResponse"

{"reportContentType":"application/pdf"}
--Boundary_6_656616533_1465550732888
Content-Type: application/octet-stream
Content-Disposition: form-data; filename="xmlp2661880851808387788tmp"; 
modification-date="Fri, 01 Jan 2000 09:25:32 GMT"; size=7647; name="ReportOutput"

<Report output. For example PDF,HTML,EXCEL content>
--Boundary_6_656616533_1465550732888--
先頭に戻る