Posts

Showing posts with the label rest api

PLSQL PROCEDURE TO CALL A REST API POST METHOD

 PLSQL PROCEDURE TO CALL A REST API POST METHOD create or replace procedure XXXCC_XXX_XXX_PROC(oredrno number) as -- varibles for running REST API   l_http_request  UTL_HTTP.req;   l_http_response UTL_HTTP.resp;   l_response_text CLOB;   l_payload       CLOB; --below 3 are non mandatroy varibales only to store data from table to paas in payload   NUM varchar2(200);   RNAME varchar2(200); BEGIN --sql query only use if you are passing values from tables into api SELECT a,b,into num,rname FROM dual where ord = oredrno; -- Create the payload l_payload := '{     "method": "add",     "data": {       "recipient_details": {         "recp_mobile": "'||NUM||'",         "recp_name": "'||RNAME||'"       },   }';   -- Initialize the HTTP request    ...