X

Shay Shmeltzer's Oracle Development Tools Tips

Working with REST POST and Other Operations in Visual Builder

Shay Shmeltzer
Director of Product Management - Oracle

One of the strong features of Visual Builder Cloud Service is the ability to consume any REST service very easily. I have a video that shows you how to work with REST services in a completely declarative way, but that video doesn't show you what happens behind the scenes when you work with the quick starts. In addition, that video shows using the GET methods and several threads on our community's discussion forum asked for help working with other operations of REST.

The demo video aims to give you a better insight into working with REST operations showing how to:

  • Add service endpoints for various REST operations
  • Create a GET form manually for retrieving single records
  • Create a POST form manually
    • Create type for the request and response parameters
    • Create variables based on the types
    • Call the POST operation passing a variable as body
  • Get the returned values from the POST to show in a page or notifications

A couple of notes:

In the video I use the free REST testing platform at https://jsonplaceholder.typicode.com

While I do everything here manually - you should be able to use the quick starts for creating a "create" form and map them to the post operation - as long as you marked the specific entry as a "create" entry like I did in the demo.

If the concepts above such as types, variables, action chains are new to you - I would highly recommend watching this video on the VBCS Architecture and Building Blocks, it will help you better understand what VBCS is all about.

 

 

 

 

Join the discussion

Comments ( 2 )
  • Saif Arsalan Thursday, October 24, 2019
    Hi Shay,

    This is great and thanks so much for posting this. I was trying to invoke a REST GET call but ran into to Network Error. Guessing its something related to CORS?
    After adding service connection and mapping to the response endpoint, I get below error after running:

    error: TypeError: "NetworkError when attempting to fetch resource."
    ​​
    message: Object { summary: "Exception during RestAction" }
    ​​
    payload: Object { body: "NetworkError when attempting to fetch resource.", headers: {}, status: -1 }
    ​​
    is there any way in VBCS to handle such requests.

    this is a third party API to validate email address, freshaddress.com. which is very simple to call:

    https://rt.freshaddress.biz/v7.2?service=****&company=****&contract=****&email=any_email@gmail.com

    method=GET
    service, company and contract are static parameters and email is dynamic parameter.

    Regards,
    Saif
  • Shay Thursday, October 24, 2019
    Saif - these type of questions are better addressed on our forum - https://cloudcustomerconnect.oracle.com/resources/e610f4723c/summary

    We will need a more detailed error message from the REST server about what specifically failed and why. If it is a CORS issue - you might need to whitelist the VB server on the server that accepts your REST calls.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.