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 ( 6 )
  • 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:


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

  • 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.
  • sneha bhat Wednesday, April 1, 2020
    hey shay, can u tell me how to send table data as a json object to an api via post call in vbcs? Thanks in advance.
  • Shay Shmeltzer Wednesday, April 1, 2020
    Sneha, If you are using ADP to store your table data, you can then pass the data[] array it contains as the body for a post.
    For further questions use our forum:
  • Hemanth Kumar Friday, July 23, 2021
    Hello Shay,

    Hope you're doing well!

    I was building a page in VBCS, Making some REST Endpoint calls. I made a GET call to get all the records and then I made PATCH request to update individual item by passing the ID and json data to update the required field on click of a button.
    All the API calls works fine when I make the request from Postman they also work fine when I am creating a service connection and testing them in VBCS, but when I set PATCH operation on button click event in a page it gives an error "415 Unsupported Media Type" I tried every possible options, I changed the content type to "application/json" I set the content types as per this document as well https://docs.oracle.com/en/cloud/paas/app-builder-cloud/consume-rest/media-types.html. But no luck I keep getting that error, for some content types like "application/vnd.oracle.adf.resourceitem+json" which should be used for PATCH operations as per the Oracle documentation, I get "502 Bad Request" error. I have been stuck on this for almost a week now. Cloud you please help with this.

  • Shay Wednesday, July 28, 2021
    Hemanth - a good place to post technical questions is our forum at - https://cloudcustomerconnect.oracle.com/resources/e610f4723c/summary
    Or work with Oracle Support to solve the issue.
    In general you need to compare the REST call created by VB and viewable in the browser's network tab to the REST call that works from your from outside VB.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.