Thursday, August 10, 2023

How to use SOAP APIs to Automate Migration of BIP Reports to another environment in Oracle Fusion

In the previous post, we saw how to manually migrate various reports in Oracle Fusion Cloud to another environments.

In this blog, let's see how we can automate migration of BI Publisher reports using BI Publisher SOAP APIs offered by Oracle Fusion Cloud.

We need to use below SOAP API provided by Fusion/ERP Cloud in order to download/upload various BIP components.

Catalog Service WSDL for creating connections:
https:// <SourceServer/DestinationServer>.fa.us2.oraclecloud.com/xmlpserver/services/v2/CatalogService?wsdl


Source Report to be migrated:



Request Payload to Download the BIP report from source instance:

<x:Envelope
    xmlns:x="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:v="http://xmlns.oracle.com/oxp/service/v2">
    <x:Header/>
    <x:Body>
        <v:downloadObject>
            <v:reportAbsolutePath>Your report path </v:reportAbsolutePath>
            <v:userID>username</v:userID>
            <v:password>password</v:password>
        </v:downloadObject>
    </x:Body>
</x:Envelope>




Response Payload will contain the Encoded base64 data:



Request Payload to Upload the BIP report to destination instance:

The above returned encoded data need to be passed as input to the below along with report absolute path:

<x:Envelope
    xmlns:x="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:v="http://xmlns.oracle.com/oxp/service/v2">
    <x:Header/>
    <x:Body>
        <v:uploadObject>
 <v:reportObjectAbsolutePathURL>/Custom/Financials/Payables/TestUpload/</v:reportObjectAbsolutePathURL>
            <v:objectType>xdoz</v:objectType>
            <v:objectZippedData>[base64Binary?]</v:objectZippedData>
            <v:userID>?</v:userID>
            <v:password>?</v:password>
        </v:uploadObject>
    </x:Body>
</x:Envelope>




Result:





More operations offered by BI Publisher SOAP API:


Create Folder:

This operation lets you create a new custom folder in the desired path.



Payload:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://xmlns.oracle.com/oxp/service/v2">
   <soapenv:Header/>
   <soapenv:Body>
      <v2:createFolder>
         <v2:folderAbsolutePath>/Custom/Financials/Payables/TestUpload/Custom Folder</v2:folderAbsolutePath>
         <v2:userID>username</v2:userID>
         <v2:password>password</v2:password>
      </v2:createFolder>
   </soapenv:Body>
</soapenv:Envelope>


Result:







Rename Report:

This operation lets you rename an existing report to a new name.




Payload:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://xmlns.oracle.com/oxp/service/v2">
   <soapenv:Header/>
   <soapenv:Body>
      <v2:renameObject>
         <v2:objectAbsolutePath>/Custom/Financials/Payables/CUSTOM_INVOICES.xdo</v2:objectAbsolutePath>
         <v2:newName>NEW_CUST_INV</v2:newName>
         <v2:userID>username</v2:userID>
         <v2:password>password</v2:password>
      </v2:renameObject>
   </soapenv:Body>
</soapenv:Envelope>


Result:





Delete Report:

This operation lets you delete any existing report.






Payload:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v2="http://xmlns.oracle.com/oxp/service/v2">
   <soapenv:Header/>
   <soapenv:Body>
      <v2:deleteObject>
         <v2:objectAbsolutePath>/Custom/Financials/Payables/NEW_CUST_INV.xdo</v2:objectAbsolutePath>
         <v2:userID>username</v2:userID>
         <v2:password>password</v2:password>
      </v2:deleteObject>
   </soapenv:Body>
</soapenv:Envelope>


Result:



Share:

0 comments:

Post a Comment