Creating Rest API for File Provider for On-Premises

The source code of the SampleRestAPI is delivered in Primavera Gateway to enable you to use it as a template to create a rest api for the XML format of the File provider that supports the requirements of your organization. It is an alternative option to using the delivered SampleRestAPI.

Use the source code as a starting point to build a new REST API as follows:

  1. Download and install Primavera Gateway from the Oracle E-delivery Software Cloud.
  2. Go to <Primavera_Gateway_home>/providers/fileprovider/samplerestapi folder
  3. Locate the build.xml file.
  4. Execute: ant clean war

    A new SampleRestAPI.war file is created in the <Primavera_Gateway_home>/providers/fileprovider/samplerestapi/output folder.

  5. Modify the source code in the XmlDataResource.java file as necessary, located in the <Primavera_Gateway_home>/providers/fileprovider/samplerestapi/projects/sampleapi/src/com/oracle/pgbu/sample/resources folder.
  6. Rebuild, deploy, and test the customized REST API.