Database

Get Involved. Join the Conversation.

Topic

    Digvijay Chauhan
    Invoke REST API from Database on Cloud VCN
    Topic posted September 20, 2019 by Digvijay ChauhanBronze Trophy: 5,000+ Points, last edited September 20, 2019, tagged DBaaS, REST API 
    39 Views, 4 Comments
    Title:
    Invoke REST API from Database on Cloud VCN
    Summary:
    How to call REST API that are username-password protected to be invoked from Database
    Content:

    Hi All,

    We have a requirement to invoke OIC integrations from Oracle Database on Cloud. All OIC integrations are exposed as REST API by default and to invoke those REST API we need to pass the username and password as REST call when invoking from any 3rd party tool such as SOAP UI,Post Mater etc. Assuming that even when invoking the same REST API from database on cloud would need user-password to be passed. How do we do this?

    Thanks

    Dvi

    Comment

     

    • Vladislav Uvarov

      You can use UTL_HTTP PLSQL package to make outbound web calls from Oracle Database. You can use SET_AUTHENTICATION procedure to specify Basic Authentication credentials. Alternatively, if you have Oracle APEX installed in this database, you can use a higher level APEX_WEB_SERVICE PLSQL API to accomplish the same thing. In both cases, you need to configure Network ACL in the database and likely Oracle Wallet with trusted SSL certs. If you are using DBCS in OCI and it is deployed in a private subnet, you will need to define a NAT Gateway to be able to reach OIC (although if OIC is also in OCI, you may be able to use a Service Gateway instead).

    • Digvijay Chauhan

      Much appreciate your response Vladislav.

      We are using both DBCS and OIC in OCI. Could you please confirm on below:

      1- Configure Network ACL in the DBCS. 

      2- Oracle Wallet? Where would we generate this wallet and how would this be used?

      3- NAT Gateway or Service Gateway? Would we need this considering both OIC and DBCS is in OCI?

       

      Thanks

      • vijayaragavan Ramasamy

        1. on Configuring Network ACL, you can check this  

        2. I think Oracle Wallet is needed for storing the certificates of webservice

      • Vladislav Uvarov

        1) See the link above to the excellent blog post talking about Network ACL. You will need to configure it in OCI DBCS. Here is the link again. You may want to open this link in an incognito browser in case you get the 403 Forbidden error.

        2) See the link above to another excellent blog post talking about Oracle Wallet, why you need one, and how to build one. You will need this in OCI DBCS. Here is the link again.

        3) In case of OIC deployed in OCI, try with Service Gateway first.