Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to use PATCH request in REST Data Source?

Leon_MAug 24 2023 — edited Aug 25 2023

Hello,

I created a REST Data Source in Apex 23.1 and Interactive grid, which uses this Data Source to display the data.
The Data Source is a test to query and update data in Hubspot using their API.

The GET request works fine, I get the data and it is displayed in the grid.
How do I use PATCH method to update a row?
The PATCH request is configured in my REST Data Source along with GET.

I tried to make Interactive grid editable but after hitting Save button to update one row I got an error:
“ORA-20999: REST Data Source returned an HTTP error: HTTP 405: Method not allowed”.

I was able to send the PATCH request using Postman and updated a row in my Hubspot's contacts successfully.

So how do I approach it in Apex? I assume I need to change the Interactive Grid - Automatic Row process Target Type to PL/SQL and create a call there? How do I do it in PL/SQL?

Please give me a push to the right direction?

Here are some screenshots on how the PATCH is configured in my Data Source in Apex:

PATCH Request:

This post has been answered by Steve Muench-Oracle on Aug 25 2023
Jump to Answer
Comments
Post Details
Added on Aug 24 2023
11 comments
1,083 views